---
title: "Get best swap rate"
method: GET
path: "/v4/data/defi/swaps/quote"
tags: ["DeFi API"]
---

# Get best swap rate

`GET /v4/data/defi/swaps/quote`

/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

- `sellToken` string, required
- `buyToken` string, required
- `amount` string, required
- `fromAddress` string, required
- `chain` 'ethereum-mainnet' | 'ethereum-sepolia' | 'bsc-mainnet' | 'gnosis-mainnet' | 'polygon-mainnet' | 'base-mainnet' | 'plasma-mainnet' | 'arbitrum-one-mainnet' | 'avalanche-mainnet', required
- `kind` 'sell' | 'buy'
- `slippageBps` number

## Response `200`

- BestQuoteResult — The best swap rate across all protocols — payload stripped for cleaner display. Use GET /swaps/quotes to get all options with full execution payload.
  - `sellToken` string, required
  - `buyToken` string, required
  - `sellAmount` string, required
  - `buyAmount` string, required — Best-case expected output (sell orders) or required input (buy orders).
  - `kind` 'sell' | 'buy', required — Whether this is an exact-input (sell) or exact-output (buy) rate.
  - `estimatedSettlementSeconds` number, required — Estimated time until the swap is settled, in **seconds** (not minutes). Uniswap / PancakeSwap: ~12-15 s (one Ethereum block — near-instant). CoW Protocol: ≥30 s (one batch auction cycle; illiquid pairs may take longer).
  - `limitAmount` string, required — Guaranteed limit amount after applying slippage tolerance. sell order: minimum buyToken output (minBuyAmount) — higher is better. buy order: maximum sellToken input (maxSellAmount) — lower is better.
  - `fee` string, required — Protocol-level fee in sellToken units. CoW Protocol: the fee amount extracted by solvers from the order surplus. Uniswap / PancakeSwap: always '0' — LP fees are embedded in the quoted amounts (amountOut already reflects the pool fee tier). The pool fee tier is available in payload.protocolData.poolFee.
  - `expiresAt` number, required — Unix timestamp — how long this quote / order is valid. After this time, CoW orders expire and DEX quotes become stale.
  - `protocol` string, required
  - `executionModel` 'instant' | 'batch-auction', required — How this protocol executes swaps. - `instant`: atomic on-chain tx — guaranteed price (within slippage) or revert - `batch-auction`: off-chain order book — solver fills within limit price, may take minutes - `cross-chain`: bridge + swap — settlement depends on destination chain finality
  - `mevProtected` boolean, required — Whether this protocol is MEV-protected by design. CoW Protocol: true — batch auction with delegated execution means your intent never enters the public mempool, making sandwich attacks impossible. AMM protocols (Uniswap, PancakeSwap): false — transactions enter the public mempool and are vulnerable without additional measures.

## Other responses

- `400` — Bad request — invalid or missing query parameters.
- `401` — Missing or invalid Tatum API key.
- `402` — Insufficient credits or expired account.
- `403` — API key blocked or expired.
- `5XX` — Internal server error.

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/revisions/8622ee4b8fae/schema)
