Skip to main content

Get Quote

GET /api/v1/quote returns the best swap route for a token pair, including estimated amounts, price impact, fee breakdown, and route details.

Parameters

string
required
Input token mint address (base58-encoded public key).
string
required
Output token mint address (base58-encoded public key).
string
required
Amount in smallest token units. For FOGO (9 decimals): 1000000000 = 1 FOGO. For USDC (6 decimals): 1000000 = 1 USDC.
string
required
ExactIn: amount is the exact input, output is estimated. ExactOut: amount is the exact desired output, input is estimated.
integer
default:"50"
Slippage tolerance in basis points (1 bps = 0.01%). Default: 50 (0.5%).

Example

Response

Response fields

string
Input token mint address.
string
Output token mint address.
string
Input amount in smallest units. For ExactIn: same as requested. For ExactOut: calculated.
string
Output amount in smallest units. For ExactIn: calculated. For ExactOut: same as requested.
integer
Price impact in basis points.
string
Human-readable price impact (e.g., "0.25%").
string
Severity classification:
string
Warning message. Empty if impact is negligible.
integer
Total pool fee across all hops in basis points.
RouteInfo[]
Array of hops in the route.
string[]
Token path from input to output. Direct: [inputMint, outputMint]. Multi-hop: [inputMint, ...intermediates, outputMint].
integer
Number of hops. 1 = direct swap, 2+ = multi-hop.
string
Slippage-adjusted threshold. ExactIn: minimum output you’ll receive. ExactOut: maximum input you’ll spend.
string
Firm-quote commitment ID. Pass it to POST /swap or POST /instructions to replay this exact route with min-out anchored to this price. Omitted when the quote can’t be pinned (e.g. split routes). See Firm quotes.
integer
How long quoteId stays redeemable, in milliseconds.
integer
How long quoteId stays redeemable with firm: true (price-or-fail), in milliseconds.

Price impact guidance

  • none / low: Safe to proceed.
  • moderate: Consider splitting into smaller trades.
  • high / extreme: Large trade relative to available liquidity. Review carefully before proceeding. The priceImpactWarning field will contain a human-readable message.
Last modified on August 31, 2026