Quotes
x402 payment header. Flow:
- Make the request without this header → receive
402 Payment Requiredand, for protected routes, aPAYMENT-REQUIREDheader describing accepted payment requirements - Create the x402 payment payload for USDC on Base (chain 8453), typically via
@x402/coreand the CDP facilitator atapi.cdp.coinbase.com - Retry the request with this header set to the encoded payment payload
Successful 2xx responses may include a PAYMENT-RESPONSE settlement receipt. See https://github.com/rigoblock/agentic-operator/blob/main/AGENTS.md for full integration.
Token to sell — ticker symbol (e.g. ETH) or ERC-20 contract address.
ETHToken to buy — ticker symbol (e.g. USDC) or ERC-20 contract address.
USDCHuman-readable amount of the sell token (e.g. 1 for 1 ETH).
1Target chain. Accepts chain name or chain ID.
baseExample: basePossible values: Successful quote response
Best swap quote across 150+ liquidity sources (0x default) or Uniswap V2/V3/V4
Address of the token being sold
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeEAddress of the token being bought
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913Sell amount in token base units (wei)
1000000000000000000Buy amount in token base units
2485000000Exchange rate (buy per sell)
2485.00DEX source routing the quote
0xChain the quote is valid on
baseEncoded calldata for on-chain execution
Contract address to send the swap transaction to
ETH value to attach (for native token swaps)
1000000000000000000Estimated gas units for the transaction
180000Bad request — missing or invalid parameters
Payment required (x402). Pay in USDC on Base and retry with X-Payment header.
GET /api/quote?sell=ETH&buy=USDC&amount=1 HTTP/1.1
Host: trader.rigoblock.com
X-Payment: YOUR_API_KEY
Accept: */*
{
"sellToken": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
"buyToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"sellAmount": "1000000000000000000",
"buyAmount": "2485000000",
"price": "2485.00",
"source": "0x",
"chain": "base",
"calldata": "text",
"to": "text",
"value": "1000000000000000000",
"gasEstimate": "180000"
}x402 payment header. Flow:
- Make the request without this header → receive
402 Payment Requiredand, for protected routes, aPAYMENT-REQUIREDheader describing accepted payment requirements - Create the x402 payment payload for USDC on Base (chain 8453), typically via
@x402/coreand the CDP facilitator atapi.cdp.coinbase.com - Retry the request with this header set to the encoded payment payload
Successful 2xx responses may include a PAYMENT-RESPONSE settlement receipt. See https://github.com/rigoblock/agentic-operator/blob/main/AGENTS.md for full integration.
Quote type: EXACT_INPUT or EXACT_OUTPUT
EXACT_INPUTAmount in base units
1000000000000000000Token to sell (address or symbol). Use 0x0000...0000 for native ETH.
ETHToken to buy (address or symbol)
USDCChain ID for input token
8453Chain ID for output token
8453Address of the swapper (vault address)
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Maximum slippage tolerance in percent
0.5Routing preference: CLASSIC, BEST_PRICE, FASTEST, or BEST_PRICE_V2
CLASSICList of protocols to include (e.g. V2, V3)
["V3"]Successful quote with oracle enrichment
On-chain oracle spot-price metadata appended to DEX API responses
Whether both tokens have an active BackgeoOracle price feed
Divergence between DEX expected output and oracle spot price, in basis points. Positive = DEX gives less than oracle. Negative = DEX gives more.
12Expected output amount from oracle spot price, in base units (wei/smallest token unit)
2079548076Bad request
Unauthorized — x402 payment or browser session required
Payment required (x402)
POST /api/quote/uniswap HTTP/1.1
Host: trader.rigoblock.com
X-Payment: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 260
{
"type": "EXACT_INPUT",
"amount": "1000000000000000000",
"tokenIn": "ETH",
"tokenOut": "USDC",
"tokenInChainId": 8453,
"tokenOutChainId": 8453,
"swapper": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"slippageTolerance": 0.5,
"routingPreference": "CLASSIC",
"protocols": [
"V3"
]
}{
"priceFeedExists": true,
"deltaBps": 12,
"oracleAmount": "2079548076"
}x402 payment header. Flow:
- Make the request without this header → receive
402 Payment Requiredand, for protected routes, aPAYMENT-REQUIREDheader describing accepted payment requirements - Create the x402 payment payload for USDC on Base (chain 8453), typically via
@x402/coreand the CDP facilitator atapi.cdp.coinbase.com - Retry the request with this header set to the encoded payment payload
Successful 2xx responses may include a PAYMENT-RESPONSE settlement receipt. See https://github.com/rigoblock/agentic-operator/blob/main/AGENTS.md for full integration.
Chain ID
8453Token to sell (address or symbol)
ETHToken to buy (address or symbol)
USDCAmount to sell in base units (exact-input). Either sellAmount or buyAmount must be provided.
1000000000000000000Amount to buy in base units (exact-output). Either sellAmount or buyAmount must be provided.
2000000000Address of the taker (vault address)
0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045Maximum slippage tolerance in basis points (100 = 1%)
100Successful quote with oracle enrichment
On-chain oracle spot-price metadata appended to DEX API responses
Whether both tokens have an active BackgeoOracle price feed
Divergence between DEX expected output and oracle spot price, in basis points. Positive = DEX gives less than oracle. Negative = DEX gives more.
12Expected output amount from oracle spot price, in base units (wei/smallest token unit)
2079548076Bad request
Unauthorized — x402 payment or browser session required
Payment required (x402)
GET /api/quote/0x?chainId=8453&sellToken=ETH&buyToken=USDC HTTP/1.1
Host: trader.rigoblock.com
X-Payment: YOUR_API_KEY
Accept: */*
{
"priceFeedExists": true,
"deltaBps": 12,
"oracleAmount": "2079548076"
}Last updated