Required
Input token mint address
Output token mint address
Amount in smallest unit (lamports for SOL)
Click Send to try this endpoint
Get a swap quote with optimal routing
Returns the optimal swap route between two tokens. The K256 routing engine evaluates all available liquidity across supported DEXes to find the best price.
Requires a valid API key via X-API-Key header.
GET /k2/quote with URL query parametersPOST /k2/quote with JSON body (gateway convenience alias)inputMint / outputMint — SPL token mint addresses (required)amount — Amount in smallest unit (lamports for SOL, required)slippageBps — Slippage tolerance in basis points (default: 50 = 0.5%)swapMode — ExactIn (default) or ExactOutstream — Enable streaming quotes for real-time updatesmaxHops — Maximum routing hops (1–4)maxRouteSplits — Maximum parallel route splitsforceAlgorithm — Force a specific routing algorithmalgorithmMode — Algorithm selection modeauctionAlgorithms — Algorithms for auction modeauctionTimeoutMs — Timeout for auction-based routingquoteResponse object should be passed directly to /k2/swap