Solana swaps

Best quote: Chord's route or Jupiter's

The quote of the route that leaves the wallet with the most, its unsigned transaction, and what every route offered (compared). ok: false with quote: null and a reason is an answer (no route for this token, size or wallet), not an error.

Open to everyone since 2026-10-15, no key needed (an X-API-Key raises the rate limit). /sol/trade/config says whether the lane is on for the caller; when it is off the other routes answer 503 TRADE_NOT_ENABLED.

A quote is SOL against one token, bought or sold. For every quote Chord builds, for your wallet, the transaction of each route — direct (Chord's own router: Raydium AMM v4 / CPMM / CLMM, Orca Whirlpool, Meteora DLMM / DAMM v2, Meteora DBC, Raydium LaunchLab, pump.fun, PumpSwap; up to two pools), jupiter (Jupiter's swap API, no Jupiter fee) and jupiter_meta (Jupiter's order: Metis, its RFQ market makers, DFlow, OKX; Jupiter's fee inside the amount) — simulates each on the chain and returns the one that leaves the wallet with the most: tokens for a buy, SOL for a sell, after every fee. Ties go to direct, then jupiter. A route handing back under half of the input's market value is refused.

Amounts are base units as decimal strings: lamports for SOL, the token's smallest unit otherwise. Addresses are base58, case-sensitive. Chord takes no fee on Solana today. Nothing is signed by Chord: you sign quote.tx unchanged and send it back.

get/sol/trade/quote

Request

  • Base URL: https://api.getchord.xyz/v1
  • URL: https://api.getchord.xyz/v1/sol/trade/quote
  • Auth: none declared

Query parameters

mintstring required

Solana address, base58, case-sensitive. Never lower-case it.

The token.

side'buy' | 'sell' required

buy = SOL in, token out · sell = token in, SOL out.

amountstring required

Input in base units: lamports for a buy, the token's smallest unit for a sell.

walletstring required

Solana address, base58, case-sensitive. Never lower-case it.

The wallet that will sign: every route is simulated for it, so it must hold the input (and SOL for fees).

slippageBpsinteger

Tolerance that sets minOut.

Response

okboolean
reason'not_a_token' | 'bad_request' | 'no_pool' | 'no_template' | 'no_route' | 'wallet_cannot' | 'pool_limit' | 'no_output' | 'simulation_failed' | 'too_large' | 'error' | 'off'

Why a route has no quote. wallet_cannot (no funds, or no token account), pool_limit (a size the pool refuses, or under half the market value) and no_output are about the request; no_pool = the route does not cover this token; simulation_failed, too_large, error = the route failed; off = not asked or switched off.

detailstring
msnumber

Changes

No recorded changes to this operation across all 2 revisions of this API.