{"openapi":"3.1.0","info":{"title":"TorrentSwap Swap API","version":"1.0.0","summary":"Cross-chain crypto swaps without an account, for apps and AI agents.","description":"Quote, create and track cross-chain swaps between BTC, ETH, SOL, USDT, USDC, TRX, ZEC and more on 17 networks. No API key and no account. All fees are already included in every quote. Flow: GET /api/v1/assets → quote → POST /api/v1/swap → the user sends funds to depositAddress → poll /api/v1/status. An MCP server with the same tools is at https://torrentswap.com/mcp.","contact":{"name":"TorrentSwap","url":"https://torrentswap.com/developers"}},"servers":[{"url":"https://torrentswap.com"}],"paths":{"/api/v1/assets":{"get":{"operationId":"listAssets","x-openai-isConsequential":false,"summary":"List swappable assets","description":"Every asset the API accepts. Any two different assets can be swapped.","responses":{"200":{"description":"Assets","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"bitcoin-btc"},"ticker":{"type":"string","example":"BTC"},"name":{"type":"string"},"network":{"type":"string"},"networkId":{"type":"string"},"decimals":{"type":"integer"},"native":{"type":"boolean"}}}}}}}}}}}},"/api/v1/quote":{"get":{"operationId":"getQuote","x-openai-isConsequential":false,"summary":"Get swap quotes","description":"Live routes ranked by amount received. Read-only.","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"example":"bitcoin-btc"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"example":"ethereum-eth"},{"name":"amount","in":"query","required":true,"schema":{"type":"string"},"example":"0.05","description":"Decimal amount of the sell asset."},{"name":"slippage","in":"query","required":false,"schema":{"type":"number","minimum":0.1,"maximum":5,"default":1.5}}],"responses":{"200":{"description":"Quotes","content":{"application/json":{"schema":{"type":"object","properties":{"routes":{"type":"array","items":{"type":"object","properties":{"quoteToken":{"type":"string","description":"Sealed token for create swap. Valid for about 2 minutes."},"provider":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","example":"NEAR Intents"}}},"badges":{"type":"array","items":{"type":"string","enum":["best_rate","fastest"]}},"fromAssetId":{"type":"string"},"toAssetId":{"type":"string"},"sellAmount":{"type":"string"},"expectedReceive":{"type":"string","description":"Expected output after all fees."},"minimumReceived":{"type":"string","description":"Minimum output, or the deposit is refunded."},"estimatedDurationSeconds":{"type":"integer"},"quotedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}}},"nextStep":{"type":"string"}}}}}},"4XX":{"description":"Invalid request, unavailable pair or amount out of range","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"5XX":{"description":"Temporarily unavailable; retry","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/api/v1/swap":{"post":{"operationId":"createSwap","x-openai-isConsequential":true,"summary":"Create a swap (deposit address)","description":"Creates a one-time deposit address for a quoted route. Idempotent per quote token. The swap executes when the user sends exactly sellAmount to depositAddress before expiresAt.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["quoteToken","destinationAddress","refundAddress"],"properties":{"quoteToken":{"type":"string"},"destinationAddress":{"type":"string","description":"Receives the bought asset (buy asset's network)."},"refundAddress":{"type":"string","description":"Receives a refund if the swap cannot complete (sell asset's network)."}}}}}},"responses":{"200":{"description":"Deposit instructions","content":{"application/json":{"schema":{"type":"object","properties":{"depositAddress":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"swapId":{"type":"string","description":"Use with /api/v1/status."},"payment":{"type":"object","description":"Amount, asset and payment URI for wallets."},"instructions":{"type":"string"}}}}}},"4XX":{"description":"Invalid or expired quote, or invalid address","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}},"5XX":{"description":"Temporarily unavailable; request a fresh quote","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}},"required":["error","message"]}}}}}}},"/api/v1/status":{"get":{"operationId":"getSwapStatus","x-openai-isConsequential":false,"summary":"Check swap status","parameters":[{"name":"swapId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["awaiting_deposit","confirming","exchanging","sending","refunding","partial_refunding","completed","refunded","partial_refunded","failed","expired","pending","unknown"]},"checkedAt":{"type":"string","format":"date-time"}}}}}}}}}}}