Get best swap rate

/defi/v1/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 /defi/v1/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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

ERC-20 token contract address to sell.

string
required

ERC-20 token contract address to buy.

string
required

Fixed-side amount in base units. sell order: exact amount of sellToken to spend. buy order: exact amount of buyToken to receive.

string
required

Wallet address initiating the swap. Used for CoW fee estimation.

string
enum
required

Tatum network slug (e.g. ethereum-mainnet, bsc-mainnet, polygon-mainnet). Matches the networks[].id field in https://blockchains.tatum.io/blockchains2.json.

string
enum

Whether this is exact-input (sell) or exact-output (buy).

Allowed:
number
0 to 10000

Slippage tolerance in basis points (1 bps = 0.01%). Applied to the quoted amount to compute limitAmount.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json