Quotes

DEX price quotes — no wallet or vault context required

Get DEX swap quote

get

Returns the best swap quote routed automatically across Uniswap V2, V3, and V4. No vault or wallet context required — any agent can call this endpoint.

Price: $0.002 USDC per request (paid via x402)

Authorizations
X-PaymentstringRequired

x402 payment header. Flow:

  1. Make the request without this header → receive 402 Payment Required
  2. Submit USDC payment on Base (chain 8453) via api.cdp.coinbase.com
  3. Retry the request with this header set to the payment receipt

See https://github.com/rigoblock/agentic-operator/blob/main/AGENTS.md for full integration.

Query parameters
sellstringRequired

Token to sell — ticker symbol (e.g. ETH) or ERC-20 contract address.

Example: ETH
buystringRequired

Token to buy — ticker symbol (e.g. USDC) or ERC-20 contract address.

Example: USDC
amountstringRequired

Human-readable amount of the sell token (e.g. 1 for 1 ETH).

Example: 1
chainstring · enumOptional

Target chain. Accepts chain name or chain ID.

Default: baseExample: basePossible values:
Responses
chevron-right
200

Successful quote response

application/json

Best swap quote across Uniswap V2/V3/V4

sellTokenstringOptional

Address of the token being sold

Example: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
buyTokenstringOptional

Address of the token being bought

Example: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
sellAmountstringOptional

Sell amount in token base units (wei)

Example: 1000000000000000000
buyAmountstringOptional

Buy amount in token base units

Example: 2485000000
pricestringOptional

Exchange rate (buy per sell)

Example: 2485.00
sourcestringOptional

DEX source routing the quote

Example: Uniswap_V3
chainstringOptional

Chain the quote is valid on

Example: base
calldatastringOptional

Encoded calldata for on-chain execution

tostringOptional

Contract address to send the swap transaction to

valuestringOptional

ETH value to attach (for native token swaps)

Example: 1000000000000000000
gasEstimatestringOptional

Estimated gas units for the transaction

Example: 180000
get
/api/quote

Last updated