Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Secret API key (sk_*) or JWT public key (pk_jwt_*).

Headers

x-field-names
enum<string>
default:long

Select long (full) or short (abbreviated) field names. HTTP defaults to long. Takes precedence over fields. See Response Format.

Available options:
long,
short

Query Parameters

fields
enum<string>
default:long

Same as x-field-names. Use long or short. HTTP defaults to long. Ignored when the header is set. field_names is accepted as an alias.

Available options:
long,
short

Body

application/json
chain_id
integer<int64>
required

Chain id. Use -1 for Solana or an EVM chain id such as 4663.

Example:

4663

token_in
string
required

Sell token address. Use the chain's native token identifier for native swaps.

token_out
string
required

Buy token address. Use the chain's native token identifier for native swaps.

wallet_address
string | null

Wallet that supplies the sell token and signs the returned transaction.

recipient_address
string | null

Optional wallet that receives the buy token. Defaults to wallet_address.

amount
string | null

Amount in normal token units, for example 1.5. For exact_in it is the amount you sell; for exact_out it is the amount you buy. Use exactly one of amount, amount_raw or amount_usd.

amount_raw
string | null

Amount in the token's smallest unit (no decimals). For exact_in it is the amount you sell; for exact_out it is the amount you buy. Use exactly one of amount, amount_raw or amount_usd.

amount_usd
string | null

Solana only: USD value of token_in to sell. On EVM chains use amount or amount_raw.

minimum_amount_out_raw
string | null

Optional minimum amount to receive, in the buy token's smallest unit. The stricter of this and the slippage-based minimum is used. On EVM, taxes charged by the buy token itself may still reduce what arrives.

maximum_amount_in_raw
string | null

exact_out only: maximum amount to spend, in the sell token's smallest unit. Can only make the slippage protection stricter.

slippage_bps
integer<int32> | null

Slippage tolerance in basis points. 100 means 1%.

Required range: x >= 0
direction
enum<string>

exact_in (default): you set how much you sell. exact_out: you set how much you want to receive.

Available options:
exact_in,
exact_out
excluded_protocols
string[]

Protocols to exclude when selecting a route.

only_protocols
string[]

Protocols to allow when selecting a route. Leave empty to allow any.

only_routers
string[]

Solana only: limit which routing providers may be used. Leave empty on EVM chains.

from_pool_id
string | null

Force the first hop to use this pool. The rest of the route is found for you. If no route uses this pool, the request fails.

to_pool_id
string | null

Force the last hop to use this pool. The rest of the route is found for you. Can be combined with from_pool_id.

use_rpc
boolean

Solana only: price the swap from the very latest on-chain pool data. Slower. Try it if a swap fails because pool data changed. Default false.

split_steps
integer<int32> | null

Controls splitting a trade across several routes for a better price. Omit to let us split large trades automatically. 0 disables splitting. 2-20 sets how finely the split is searched (higher is finer). All splits run in one transaction and are listed in route.splits. A value other than 0 is not allowed with exact_out, from_pool_id/to_pool_id, or some single-protocol trades.

Required range: x >= 0
restrict_intermediate_tokens
boolean | null

When true (default), routes only pass through major tokens such as the native token, its wrapped form, stablecoins, and the main trading pair of the tokens you're swapping. Set false to allow any token in the middle of the route.

max_accounts
integer<int32> | null

Solana only: maximum number of accounts the transaction may use, from 24 to 64 (default 64). Lower it if you add your own instructions to the same transaction.

Required range: x >= 0
max_market_impact_bps
integer<int32> | null

Optional price impact limit in basis points (100 = 1%). Not available on EVM chains.

Required range: x >= 0
sell_entire_balance
boolean | null

Sell the wallet's whole balance of token_in at the moment the trade executes. Not available on EVM chains or with exact_out.

fee_bps
integer<int32> | null

Optional referral fee in basis points, paid to fee_wallet. Not available on EVM chains or with exact_out.

Required range: x >= 0
fee_wallet
string | null

Wallet that receives referral fees when fee_bps is set.

prioritization_fee_lamports

Solana priority fee budget.

dynamic_compute_unit_limit
boolean | null

Solana only: add a compute unit limit sized for this swap to the transaction. Default true.

jito_tip_lamports
string | null

Solana Jito tip in lamports.

multi_lander
boolean | null

Solana only: prepare the transaction for sending through several landing services. Use with lander_tip_lamports.

lander_tip_lamports
string | null

Solana per-lander tip in lamports.

payer_address
string | null

Solana fee payer. When different from wallet_address, it also signs.

close_authority
string | null

Solana close authority for token accounts created during the swap.

destination_wallet
string | null

Solana token output recipient.

swap_recipient_address
string | null

Solana only: wallet that must receive the final output. The swap fails if the output goes elsewhere.

deadline_unix_seconds
integer<int64> | null

Optional execution deadline in Unix seconds.

Required range: x >= 0
idempotency_key
string | null

Caller-supplied key used to make repeated requests safe.

metadata
null | object

Caller metadata echoed in trade tracking records.

Response

Swap quote

request_id
string<uuid>
required
chain_id
string
required
chain
enum<string>
required
Available options:
evm,
solana
token_in
object
required

Basic token details. Fields we don't know are null.

token_out
object
required

Basic token details. Fields we don't know are null.

route
object
required
expires_at
string<date-time>
required
warnings
string[]
required
direction
enum<string>
Available options:
exact_in,
exact_out
amount
string | null

Amount you sell, in normal token units. Exact for exact_in; an estimate for exact_out.

amount_raw
string | null

Amount you sell, in the sell token's smallest unit. For exact_out the most you can spend is in maximum_amount_in_raw.

amount_usd
number<double> | null
estimated_amount_out
string | null
estimated_amount_out_raw
string | null
estimated_amount_out_usd
number<double> | null
price_impact_pct
number<double> | null

How much worse your rate is than the current market price because of the size of your trade, in percent. Fees are not included.

value_change_pct
number<double> | null

USD value you receive compared with the USD value you pay, in percent, including fees and price impact. Negative means you receive less value than you pay.

minimum_amount_out_raw
string | null
maximum_amount_in_raw
string | null
slippage_bps
integer<int32> | null
Required range: x >= 0
pool_fee_bps
integer<int32> | null
Required range: x >= 0
fee
null | object
evm
null | object
solana
null | object
context_slot
integer<int64> | null

Solana only: the slot the quote was priced at.

Required range: x >= 0
evm_routing
null | object

EVM only: full route details and the simulation result, when available.

compute_ms
number<double> | null

Time taken to find the route, in milliseconds.

Last modified on October 15, 2026