For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quotes

DEX price quotes — no wallet or vault context required

Get DEX swap quote

get

Returns a swap quote sourced from Uniswap liquidity for a given token pair and amount on any of the 7 supported chains. No vault, wallet, or operator context required — any agent can call this endpoint with a $0.0020 USDC payment.

Price: $0.0020 USDC per request (x402, eip155:8453)

Typical use: Price discovery, trade sizing, yield comparison, arbitrage detection.

Example: GET /api/quote?sell=ETH&buy=USDC&amount=1&chain=base

Authorizations
X-PaymentstringRequired

x402 payment header. Flow:

  1. Make the request without this header → receive 402 Payment Required and, for protected routes, a PAYMENT-REQUIRED header describing accepted payment requirements
  2. Create the x402 payment payload for USDC on Base (chain 8453), typically via @x402/core and the CDP facilitator at api.cdp.coinbase.com
  3. 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.

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
200

Successful quote response

application/json

Best swap quote across 150+ liquidity sources (0x default) or 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: 0x
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
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"
}

Uniswap Trading API quote with oracle enrichment

post

Proxies to the Uniswap Trading API /quote endpoint and enriches the response with on-chain BackgeoOracle spot-price metadata. Returns the upstream response verbatim plus priceFeedExists, deltaBps, and oracleAmount.

Price: $0.0021 USDC per request (x402 exact scheme, eip155:8453)

Request body: Identical to the Uniswap Trading API /quote endpoint. All request body fields are forwarded verbatim to Uniswap.

Authorizations
X-PaymentstringRequired

x402 payment header. Flow:

  1. Make the request without this header → receive 402 Payment Required and, for protected routes, a PAYMENT-REQUIRED header describing accepted payment requirements
  2. Create the x402 payment payload for USDC on Base (chain 8453), typically via @x402/core and the CDP facilitator at api.cdp.coinbase.com
  3. 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.

Body
typestringRequired

Quote type: EXACT_INPUT or EXACT_OUTPUT

Example: EXACT_INPUT
amountstringRequired

Amount in base units

Example: 1000000000000000000
tokenInstringRequired

Token to sell (address or symbol). Use 0x0000...0000 for native ETH.

Example: ETH
tokenOutstringRequired

Token to buy (address or symbol)

Example: USDC
tokenInChainIdintegerRequired

Chain ID for input token

Example: 8453
tokenOutChainIdintegerRequired

Chain ID for output token

Example: 8453
swapperstringOptional

Address of the swapper (vault address)

Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
slippageTolerancenumberOptional

Maximum slippage tolerance in percent

Example: 0.5
routingPreferencestringOptional

Routing preference: CLASSIC, BEST_PRICE, FASTEST, or BEST_PRICE_V2

Example: CLASSIC
protocolsstring[]Optional

List of protocols to include (e.g. V2, V3)

Example: ["V3"]
Responses
200

Successful quote with oracle enrichment

application/json

On-chain oracle spot-price metadata appended to DEX API responses

priceFeedExistsbooleanOptional

Whether both tokens have an active BackgeoOracle price feed

deltaBpsintegerOptional

Divergence between DEX expected output and oracle spot price, in basis points. Positive = DEX gives less than oracle. Negative = DEX gives more.

Example: 12
oracleAmountstringOptional

Expected output amount from oracle spot price, in base units (wei/smallest token unit)

Example: 2079548076
post/api/quote/uniswap
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"
}

0x API quote with oracle enrichment

get

Proxies to the 0x API v2 /swap/allowance-holder/quote endpoint and enriches the response with on-chain BackgeoOracle spot-price metadata. Returns the upstream response verbatim plus priceFeedExists, deltaBps, and oracleAmount.

Price: $0.0022 USDC per request (x402 exact scheme, eip155:8453)

Query parameters: Identical to the 0x API. All query parameters are forwarded verbatim to 0x.

Authorizations
X-PaymentstringRequired

x402 payment header. Flow:

  1. Make the request without this header → receive 402 Payment Required and, for protected routes, a PAYMENT-REQUIRED header describing accepted payment requirements
  2. Create the x402 payment payload for USDC on Base (chain 8453), typically via @x402/core and the CDP facilitator at api.cdp.coinbase.com
  3. 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.

Query parameters
chainIdintegerRequired

Chain ID

Example: 8453
sellTokenstringRequired

Token to sell (address or symbol)

Example: ETH
buyTokenstringRequired

Token to buy (address or symbol)

Example: USDC
sellAmountstringOptional

Amount to sell in base units (exact-input). Either sellAmount or buyAmount must be provided.

Example: 1000000000000000000
buyAmountstringOptional

Amount to buy in base units (exact-output). Either sellAmount or buyAmount must be provided.

Example: 2000000000
takerstringOptional

Address of the taker (vault address)

Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
slippageBpsintegerOptional

Maximum slippage tolerance in basis points (100 = 1%)

Example: 100
Responses
200

Successful quote with oracle enrichment

application/json

On-chain oracle spot-price metadata appended to DEX API responses

priceFeedExistsbooleanOptional

Whether both tokens have an active BackgeoOracle price feed

deltaBpsintegerOptional

Divergence between DEX expected output and oracle spot price, in basis points. Positive = DEX gives less than oracle. Negative = DEX gives more.

Example: 12
oracleAmountstringOptional

Expected output amount from oracle spot price, in base units (wei/smallest token unit)

Example: 2079548076
get/api/quote/0x
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