# TorrentSwap — instructions for agents and integrators

TorrentSwap swaps crypto across chains with no account and no API key. All fees are included in every quote.

- MCP server (Streamable HTTP): https://torrentswap.com/mcp
- REST API (OpenAPI 3.1): https://torrentswap.com/openapi.json
- Docs: https://torrentswap.com/developers

## Tools (MCP) and endpoints (REST)

| MCP tool | REST | Purpose |
|---|---|---|
| list_assets | GET /api/v1/assets | Asset ids (e.g. bitcoin-btc, ethereum-eth, tron-usdt, zcash-zec) |
| get_quote | GET /api/v1/quote?from=&to=&amount= | Routes ranked by amount received, with quoteToken (valid ~2 min) |
| validate_address | — | Check an address for an asset's network |
| create_swap | POST /api/v1/swap | quoteToken + destinationAddress + refundAddress → depositAddress, swapId |
| get_swap_status | GET /api/v1/status?swapId= | awaiting_deposit → confirming → exchanging → sending → completed / refunded / expired |

## Rules

1. Never invent, guess or reuse addresses. Ask the user for the destination address (buy asset's network) and a refund address (sell asset's network).
2. Show the user the route (protocol, expected and minimum amount, time) and get explicit confirmation before create_swap.
3. The network is part of the asset: USDT on Tron and USDT on Ethereum are different assets with different addresses.
4. The user sends exactly the quoted amount, in one transaction, before expiresAt. Never ask for private keys or seed phrases.
5. If a quote fails (amount too small or large, no liquidity), say so and offer a different amount or pair; do not retry in a loop.
6. Quotes are prices at a moment in time, not guarantees. Blockchain transfers are public and irreversible.

## Limits

Per IP: 60 quotes/min, 30 swap creations per 5 min, 120 status checks/min. HTTP 429 carries Retry-After.
