v1
latestOpenAPI 3.1.02026-07-243035381.4 MBGet best swap rate
/v4/data/defi/swaps/quote
20 credits per API call
Get the single best swap rate across all supported protocols. Compares all protocols and returns the one with the best price: sell orders — highest buyAmount, buy orders — lowest sellAmount. Use this when you just want the best deal without thinking about protocols. For comparing all options, use GET /swaps/quotes instead. **Quotes are cached for up to 15 seconds** (less than one Ethereum block). Each response includes an `expiresAt` field (Unix timestamp) indicating when the underlying quote was originally fetched from the protocol. Always check `expiresAt` against the current time before displaying or acting on a quote — if less than ~10 seconds remain, re-query to get a fresh price.
Query parameters
ERC-20 token contract address to sell.
ERC-20 token contract address to buy.
Fixed-side amount in base units. sell order: exact amount of sellToken to spend. buy order: exact amount of buyToken to receive.
Wallet address initiating the swap. Used for CoW fee estimation.
Tatum network slug (e.g. ethereum-mainnet, bsc-mainnet, polygon-mainnet). Matches the networks[].id field in https://blockchains.tatum.io/blockchains2.json.
Whether this is exact-input (sell) or exact-output (buy).
Slippage tolerance in basis points (1 bps = 0.01%). Applied to the quoted amount to compute limitAmount.