Loading
Loading
Loading
One REST API to trade Chamber vaults, run bots, rebalance indices, use lending markets and read market data, without running your own Web3 infrastructure.
The Infinite Trading API lets software do what a vault manager does by hand: trade, approve, lend, provide liquidity and run strategies. You send a short HTTP request, and the API builds, routes, signs and submits the on-chain transactions.
It sits in front of Chamber vaults (formerly dHEDGE). A Chamber vault is a smart contract that holds investor funds. A designated tradercan trade the vault's whitelisted assets but cannot withdraw investor funds. The API gives your code that trader role, so a strategy can run around the clock while custody stays in the vault.
Writing and maintaining transaction code, gas estimation, token approvals, slippage handling, DEX integrations and RPC failover for every network you trade on.
Quant and algorithmic traders, asset managers running Chamber vaults, and developers building products on top of automated, non-custodial strategies.
Vault trading, bots and index rebalancing, Aave, Compound and Fluid lending, Uniswap V3 liquidity, fee collection, exchange sub-accounts and market data.
Not a custodian: it never holds investor funds. Not investment advice: it executes the instructions you send.
Every request follows the same path from your code to the chain.
Reads, such as poolComposition or getCandles, stop before the executor and never send a transaction. Anything that moves funds is signed by the gas wallet linked to your key, never by a shared signer.
Five ideas explain almost every endpoint.
The Chamber vault you operate, identified by its pool address (0x…). Holdings, positions and fees all belong to it.
A dedicated hot wallet that pays gas and is set as the vault's trader. Create a new one with createGasWallet or import yours with getNewApiKey. Keep only a small gas balance in it; the vault holds the funds.
A UUID tied to one gas wallet. It authenticates requests, selects which wallet signs and is what usage is billed against.
The DEX or market to use. The default auto walks a fallback chain per network and skips venues that are banned or not whitelisted for the vault.
setBot stores a threshold strategy the platform checks for you. Index bots keep a basket at target weights within a USD cap per run.
share is a percentage (0 to 100) of the available balance and takes precedence over amount. Prefer it for repeatable strategies.
Wire up a vault, inspect it, then choose how to automate or trade. Start with a small vault.
A gas wallet is a dedicated hot wallet that pays gas and acts as the vault's trader. You have two options.
One call generates a fresh wallet and its API key. The private key is returned once, so store it securely right away. This endpoint is not listed in Swagger.
curl https://api.infinitetrading.io/createGasWallet
# {
# "status": ["success"],
# "address": ["0x…"],
# "private_key": ["…64 hex characters, no 0x prefix"],
# "apiKey": ["…uuid"]
# }Send its private key once to receive an API key. Do it over HTTPS from a trusted server, never from a browser, and only for a wallet that holds gas and nothing else.
curl -X POST https://api.infinitetrading.io/getNewApiKey -H "Content-Type: application/json" -d '{"privateKey": "0x…"}'getNewApiKey again issues a new key and revokes the old one immediately. Anything still using the old key stops working.Send native gas token (ETH, POL and so on) to the wallet on every network you will trade on: at least $1 worth, or linking it to a vault is rejected with status 402. Then set it as the trader of your Chamber vault. The Managers console does both for you, including creating or importing the wallet. Check the balance any time with getGasBalance.
curl "https://api.infinitetrading.io/getGasBalance?apiKey=KEY&network=base"curl "https://api.infinitetrading.io/isPoolTrader?apiKey=KEY&network=base&pool=0xVAULT&trader=0xGASWALLET"Look at what the vault holds. This sends no transaction.
curl "https://api.infinitetrading.io/poolComposition?apiKey=KEY&network=base&pool=0xVAULT"Approve the asset once, then swap a share of the balance.
curl -X POST "https://api.infinitetrading.io/approve?apiKey=KEY&network=base&pool=0xVAULT&asset=USDC"
curl "https://api.infinitetrading.io/vaultTrade?apiKey=KEY&network=base&pool=0xVAULT&from=USDC&to=WETH&share=25"Once the gas wallet is the vault trader, setBotstores the strategy and immediately attempts a rebalance. The example below uses a small USD cap; the side, pair and limits must match your vault and strategy.
side: "hold"when checking the integration without requesting a buy or sell. A successful API response confirms the strategy was saved; it does not confirm that the rebalance succeeded. Review execution logs or the vault's on-chain activity.import os
import requests
API = "https://api.infinitetrading.io"
response = requests.post(f"{API}/setBot", json={
"apiKey": os.environ["ITP_API_KEY"],
"protocol": "chamber",
"network": "optimism",
"pool": "0xYourVaultAddress",
"pair": "WETH-USDC",
"side": "long",
"threshold": 1,
"max_usd": 100,
"share": 25,
"slippage": 1,
})
result = response.json()
if result.get("status", [None])[0] != "success":
raise RuntimeError(result)
print(result["message"][0])Keep ITP_API_KEY in a server-side secret store. Never expose the key in browser code or a public repository.
Most endpoints accept both GET and POST. Parameters can go in the query string or the JSON body, and are merged.
| Parameter | Notes |
|---|---|
apiKey | Your per-wallet key. Required by almost every endpoint. |
network | base, optimism, arbitrum, polygon, ethereum (alias mainnet), hyperliquid |
protocol | dhedge by default. chamber is the current brand name and is accepted as an alias. |
pool | Vault contract address, 40 hex characters with a 0x prefix. |
platform | Execution venue. Default auto. Retired values such as odos are accepted and routed to auto, not rejected. |
asset | A symbol such as USDC or a contract address. |
share / amount | share is 0 to 100 percent of the available balance and wins over amount. |
dryRun | Available on fee-minting endpoints: simulate and quote without submitting. |
Check the body, not just the HTTP status.
status.{
"status": ["fail"],
"status_code": ["1000"],
"message": ["Unrecognized network"]
}| Code | Meaning |
|---|---|
| 1000 | Unrecognized network |
| 1001 | Unrecognized protocol |
| 1002 | Invalid API key |
| 1004 | Invalid pool address |
| 1010 | Missing required parameter |
Failures while executing (as opposed to validating) return HTTP 400 with a flat object that carries status, status_code and error_type.
The gateway allows roughly 30 requests per minute with a burst of 20; beyond that you receive an HTML 503, which is throttling and not an outage. The API itself also limits requests per minute per client and per API key (HTTP 429), and temporarily blocks keys or networks that send mostly failing requests (HTTP 403). Back off and retry.
45 endpoints in 9 groups. Each group lists what it is for and what you can build with it. Parameters marked * are required. Use the interactive Swagger for request builders and live responses.
Generate a brand-new gas wallet. Returns the address and the private key (shown once, 64 hex characters without 0x) with deposit instructions, but no API key: deposit at least $1 of native gas on any supported network, then call getNewApiKey. Reserved for the site's authenticated proxy (Managers page). Not listed in Swagger.
Issue or replace the API key of the gas wallet identified by its private key. Requires at least $0.75 of native gas in the wallet (any supported network); otherwise status_code 402 with the balance and deposit networks. One key per wallet: calling it again revokes the previous key and moves linked vaults to the new one.
privateKey (body)Native gas-token balance of the wallet behind an API key, optionally in USD. Use it to alert before a bot runs out of gas.
network*, apiKey*, USDLink the gas wallet to a vault so bots can trade it. The wallet must be the vault's on-chain trader (1006 otherwise) and hold at least $1 of native gas on that network (402 otherwise). Not listed in Swagger.
apiKey*, network*, pool*, protocolSwap one vault asset for another. Routes across supported DEXs with fallbacks. from/to accept a symbol or token address; with amount, decimals come from the token contract for addresses and unknown symbols. Live trading: it executes on-chain.
apiKey*, pool*, from*, to*, network, platform, slippage, share, amountApprove an asset from the vault so a DEX or lending market can use it. Needed once per asset and venue.
apiKey*, network*, pool*, asset*, platformSet the trading-bot strategy for a vault (pair, side, threshold, size) and trigger a rebalance.
apiKey*, pool*, network*, pair*, side*, threshold, max_usd, slippage, share, platform, lendingRemove a vault's bot configuration, which turns the bot off.
apiKey*, network*, pool*Realise the performance and management fees a vault has accrued. Permissionless on-chain; the API key only pays the gas.
apiKey*, network*, pool*Whether an address is the authorised on-chain trader for a vault.
apiKey*, network*, pool*, trader*The bot and index configuration of one vault: pair, side, parameters and whether allocations are set. The apiKey must be linked to the vault or belong to its trader (401 otherwise).
apiKey*, network*, pool*Configure a scheduled index bot: interval, a USD cap per run and 2 to 20 targets that sum to 100. Disabled by default.
JSON bodyRead the index bot owned by the authenticated vault wallet.
Targets next to live weights, with drift in percentage points and whether each asset left its tolerance. The apiKey must be linked to the vault or belong to its trader (401 otherwise).
apiKey*, network*, pool*Preview drift and a bounded sell-before-buy plan without submitting trades.
Rebalance back to the targets. Dry-run by default; set execute=true to run the trades through vaultTrade.
apiKey*, network*, pool*, execute, force, quoteStop scheduled checks without deleting the allocation configuration.
Retired. Validates the legacy syntax but never writes. Use setIndexBot.
Supply an asset to Aave v3.
apiKey*, network*, pool*, asset*, share, amountWithdraw a supplied asset from Aave v3. Send share (1-100) or amount alone; amount is in underlying token units.
apiKey*, network*, pool*, asset*, share, amountBorrow from Aave v3 against the vault's collateral.
apiKey*, network*, pool*, asset*, share, amountRepay Aave v3 debt.
apiKey*, network*, pool*, asset*, share, amountTotal supplied on Aave v3.
Total borrowed on Aave v3.
Current Aave v3 health factor.
Full Aave v3 position data for a vault.
Supply an asset to Compound V3 (Comet).
apiKey*, network*, pool*, asset*, share, amountWithdraw an asset from Compound V3.
apiKey*, network*, pool*, asset*, share, amountSupply an asset to a Fluid fToken vault. asset is the underlying token address. Markets: Base USDC, WETH, sUSDS, EURC, GHO, wstETH; Arbitrum USDC, USDT0, WETH, sUSDS.
apiKey*, network*, pool*, asset*, share, amountWithdraw an asset from Fluid. asset is the underlying token address; same markets as /fluid/lend.
apiKey*, network*, pool*, asset*, share, amountAdd liquidity to a Uniswap V3 pool. Give the source token, the pair and an optional price range for a concentrated position.
apiKey*, pool*, network*, asset1*, asset2*, input_asset*, platform, fee_tier, lower_price, upper_price, share, amount, slippageRemove liquidity from a position by NFT token id. Defaults to a full exit.
apiKey*, pool*, network*, asset1*, asset2*, token_id*, platform, amount, output_asset, slippageThe vault's holdings, symbol-resolved and decimal-adjusted.
apiKey*, pool*, network*OHLCV candles for a trading pair.
apiKey*, exchange, timeframe, pair, bars_backLatest live tick price for a pair.
apiKey*, exchange, pairToken symbol from a contract address.
apiKey*, contract*, network*Token contract address from a symbol.
apiKey*, symbol*, network*Mint fees for a list of vaults in one Multicall3 transaction, so N vaults cost one transaction.
apiKey*, pools*, network*, protocol, dryRun, allowFailureGive a manager address and it finds the vaults, skips zero-fee ones and mints the rest in one transaction. Reports scanned and matched counts. The apiKey must belong to a gas wallet (it pays the gas), including for dryRun.
apiKey*, manager*, network, protocol, dryRun, allowFailureConnect an exchange account to a gas wallet. Exchange credentials are stored encrypted. signature is the manager's signature over message, a Sign-In with Ethereum (EIP-4361) text that expires within 24 hours; sign in again when it expires.
manager, signature, message, gas_wallet_api_key, exchange, subaccount_name, cex_api_key, cex_secret, cex_passphrase, payment_network, settingsSet the trading side and parameters of a CEX bot.
gas_wallet_api_key*, subaccount_name*, pair*, side*, max_usd*, share*, strategyRead the side and parameters of one or all CEX bots.
gas_wallet_api_key*, subaccount_name*, pairDeactivate a CEX bot without deleting it.
gas_wallet_api_key*, subaccount_name*, pair*Delete a CEX bot configuration.
gas_wallet_api_key*, subaccount_name*, pair*Delete a sub-account and, with it, all of its bots. signature covers message, the manager's Sign-In with Ethereum text (expires within 24 hours).
manager*, subaccount_name*, signature*, message*Common ways to combine endpoints.
A TradingView alert, an ML model or a cron job decides when to buy or sell. Your webhook calls one endpoint and the API handles approvals, routing and gas.
Describe the pair, side and threshold once. The platform keeps checking and trades for you; delete the bot to switch it off.
Define a crypto index, look at the drift and the planned trades, then allow a bounded rebalance. Every run is capped in USD.
Park stablecoins in Aave, Compound or Fluid while a strategy is flat, and watch the health factor if you also borrow.
Quote first with dryRun, then mint accrued fees for all of a manager's vaults in a single transaction.
No funds move and nothing is signed. Show holdings, prices and gas balance for your own vaults.
Habits that keep automated trading safe.
poolComposition, previewIndexBot and dryRun before anything that moves funds.getGasBalance and alert before the wallet runs dry.status, retry 503s with backoff and make writes idempotent on your side.