Skip to content

A wallet's SOL and one token

GET
/sol/trade/balances
curl --request GET \
--url 'https://api.getchord.xyz/v1/sol/trade/balances?wallet=example&mint=example'

For a swap form: lamports, and the token in the wallet’s associated account (amount, what a sell spends) and in all its accounts of that mint (total).

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.

wallet
required

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

string
/^[1-9A-HJ-NP-Za-km-z]{32,44}$/
mint
required

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

string
/^[1-9A-HJ-NP-Za-km-z]{32,44}$/
Media typeapplication/json
object
wallet

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

string
/^[1-9A-HJ-NP-Za-km-z]{32,44}$/
mint

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

string
/^[1-9A-HJ-NP-Za-km-z]{32,44}$/
lamports

Base units as a decimal string (lamports for SOL).

string
/^\d+$/
token
object
amount

Base units as a decimal string (lamports for SOL).

string
/^\d+$/
total

Base units as a decimal string (lamports for SOL).

string
/^\d+$/
decimals
integer | null
slot
integer
Example
{
"wallet": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"mint": "98sMhvDwXj1RQi5c5Mndm3vPe9cBqPrbLaufMXFNMh5g",
"lamports": "11175972108683952",
"token": {
"amount": "0",
"total": "0",
"decimals": 9
},
"slot": 457371001
}

BAD_ADDRESS.

Media typeapplication/json

Every non-2xx body.

object
error
required

Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.

string
message

For humans.

string
statusCode

HTTP status, when included.

integer
Example
{
"error": "INVALID_PARAMS",
"message": "amount must be an integer string in the token's smallest unit"
}

TRADE_NOT_ENABLED (the lane is off on this deployment, or not open to this caller yet) or TRADE_UNAVAILABLE (the Solana box did not answer). Retry later; do not read it as “no route”.

Media typeapplication/json

Every non-2xx body.

object
error
required

Stable machine code, e.g. INVALID_PARAMS, NOT_READY, RATE_LIMIT_EXCEEDED.

string
message

For humans.

string
statusCode

HTTP status, when included.

integer
Example
{
"error": "INVALID_PARAMS",
"message": "amount must be an integer string in the token's smallest unit"
}