Skip to main content
Find the best swap rate for a token pair. The aggregator searches across all supported DEXs and returns the optimal route.

Parameters (QuoteRequest)

Token Amounts

All amounts use the smallest token unit (no decimals):

Response (QuoteResponse)

Response Fields

RouteInfo


Firm quotes

quoteId is a short-lived commitment to this exact route and price. Pass it to sdk.swap() or sdk.instructions() within validForMs to replay the quoted route with min-out anchored to this quote; add firm: true within firmForMs for price-or-fail redemption. It is omitted when the quote can’t be pinned (e.g. split routes). See Firm quotes.

Errors

See Error Handling for details.

Notes

  • The engine automatically selects direct swap, multi-hop, or split routing based on available liquidity.
  • Multi-hop routes go through intermediate tokens (typically FOGO or USDC) when no direct pool exists.
  • Split routes divide liquidity across multiple pools for the same hop to reduce price impact.
  • otherAmountThreshold is calculated as:
    • ExactIn: amountOut * (10000 - slippageBps) / 10000
    • ExactOut: amountIn * 10000 / (10000 - slippageBps)
Last modified on August 31, 2026