HTTP API · Execution

Get a firm quote

Open in Claude

One routed quote across every integrated venue, returned ready to sign: a transaction, a CoW order, or a deposit address.

GET/api/sdk/v1/quote
queryREQUIRED
queryREQUIRED
queryREQUIRED
queryREQUIRED
queryREQUIRED
queryREQUIRED
query
query
query
query
header
curl "https://www.swaps.pro/api/sdk/v1/quote?sellChain=8453&sellToken=ETH&buyChain=8453&buyToken=USDC&amount=0.1&address=0x21c9a94AF76B59b171b32fD125A4edF0e9A2Ad3e&partner=docs-example"
rate limitednever cachedno API keyCORS open

The quote is FIRM. buyAmount is the venue's expected output and minBuyAmount is the floor the transaction enforces on chain; the wallet receives at least the floor or the transaction reverts.

Three execution shapes. A same-chain EVM route carries tx (and approval when the sell asset is an ERC-20 and the allowance is short). A CoW route carries order with EIP-712 typed data to sign and a postUrl to send the signed order to. THORChain-style routes carry depositAddress and memo.

Free at 60 requests per minute per IP with no credential. A grant from /access lifts that to 600; present it as the X-SwapsPro-Access header. Quotes are never billed — a quote that leads to a trade already pays for itself.

Parameters#

NameInTypeDescription
sellChainREQUIREDquerychainChain symbol or numeric id, from /chains.
sellTokenREQUIREDquerysymbol | addressSymbol from /tokens, or a contract address.
buyChainREQUIREDquerychainChain symbol or numeric id. May differ from sellChain for a cross-chain route.
buyTokenREQUIREDquerysymbol | addressSymbol from /tokens, or a contract address.
amountREQUIREDquerydecimal stringHuman amount of sellToken to sell, e.g. "0.1". Never base units.
addressREQUIREDqueryaddressThe wallet that will sign. The venue builds the transaction for this sender.
recipientqueryaddressWhere the bought asset lands, when it is not the signer. Default: same as address.
slippagequerypercentMaximum slippage in percent, 0 < s ≤ 50. Sets minBuyAmount on venues that accept it. Default: the venue's own floor.
partnerquerystring ≤ 64Your integrator id. Stamped on the quote and used for attribution.
partnerFeeBpsqueryinteger bpsFee you keep on top of SwapsPro's, in basis points, capped by tier. partnerFee in the response says what was actually collected. Default: 0.
X-SwapsPro-AccessheadertokenA grant from /access. Raises the ceiling from 60 to 600 requests per minute. Also accepted as Authorization: Bearer.

Responses#

Success is the body below. Every error is { "error": string, "code": string } with a matching HTTP status — never a 200 that says no.

When: a route exists for the pair and size. Captured live. tx.data is 10,186 hex characters and is truncated here; everything else is verbatim.

{
  "provider": "0x",
  "sellChain": "BASE",
  "buyChain": "BASE",
  "sellToken": {
    "caip": "eip155:8453/slip44:60",
    "symbol": "ETH"
  },
  "buyToken": {
    "caip": "eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "symbol": "USDC"
  },
  "sellAmount": "0.1",
  "buyAmount": "244.524665",
  "minBuyAmount": "242.068365",
  "rate": 2445.24665,
  "tx": {
    "chainId": 8453,
    "to": "0x0000000000001ff3684f28c67538d4d072c22734",
    "data": "0x2213bc0b0000000000000000000000007747f8d2a76bd6345cc29622a946a929…",
    "value": "0x16345785d8a0000",
    "gasLimit": "0x13df23"
  },
  "expiresAt": "2026-09-03T14:45:40.996Z",
  "partner": "docs-example",
  "partnerFee": {
    "requestedBps": 0,
    "collectedBps": 0,
    "collected": false,
    "note": "No partner fee was requested."
  }
}

Fields worth knowing#

FieldMeaning
providerwhich venue won: 0x, cow, lifi, thorchain, …
buyAmount / minBuyAmountexpected output and the enforced floor, human decimals
ratebuyAmount per 1 sellToken
txchainId, to, data, value, gasLimit — ready for eth_sendTransaction
approvalexact-amount ERC-20 approve to send first, when needed
orderCoW: typedData to sign, body and postUrl to submit
depositAddress / memoTHORChain-style: where to send and what to say
expiresAtISO time after which the quote must not be used
partnerFeewhat was requested, what was collected, and why

For agents#

The brief below is what Copy for agents puts on the clipboard: the parameters, one example, the 200 body and the rules. It is Markdown, and it is short on purpose — everything in it is load-bearing.

  • Read minBuyAmount as the guarantee and buyAmount as the estimate. Never promise a user more than the floor.
  • Execute exactly what came back: send tx as-is (value and gasLimit are 0x-hex), or sign order.typedData and POST order.body to order.postUrl, or deposit to depositAddress with memo verbatim. Do not rebuild calldata.
  • If approval is present, send that approve transaction first and wait for it to confirm. It is for the exact amount, never unlimited.
  • A quote expires at expiresAt. Re-quote after that instead of sending a stale transaction.
  • A 502 with NO_ROUTE is an answer, not an outage: the pair cannot be priced at that size right now. Try a smaller amount or a different pair; do not retry in a loop.