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
Input token mint address (base58-encoded public key).
Output token mint address (base58-encoded public key).
Amount in smallest token units. For FOGO (9 decimals):
1000000000 = 1 FOGO. For USDC (6 decimals): 1000000 = 1 USDC.ExactIn: amount is the exact input, output is estimated.
ExactOut: amount is the exact desired output, input is estimated.Slippage tolerance in basis points (1 bps = 0.01%). Default: 50 (0.5%).
Example
Response
Response fields
Input token mint address.
Output token mint address.
Input amount in smallest units. For
ExactIn: same as requested. For ExactOut: calculated.Output amount in smallest units. For
ExactIn: calculated. For ExactOut: same as requested.Price impact in basis points.
Human-readable price impact (e.g.,
"0.25%").Severity classification:
| Value | Range |
|---|---|
none | < 0.1% |
low | 0.1% – 1% |
moderate | 1% – 3% |
high | 3% – 5% |
extreme | > 5% |
Warning message. Empty if impact is negligible.
Total pool fee across all hops in basis points.
Array of hops in the route.
Token path from input to output. Direct:
[inputMint, outputMint]. Multi-hop: [inputMint, ...intermediates, outputMint].Number of hops. 1 = direct swap, 2+ = multi-hop.
Slippage-adjusted threshold.
ExactIn: minimum output you’ll receive. ExactOut: maximum input you’ll spend.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. ThepriceImpactWarningfield will contain a human-readable message.