POST
GetQuote
Runs the pricing pipeline, stores the canonical order parameters, and returns their keccak hash. Call it when the user is ready to deposit; use PreviewQuote for prices that update as they type.

Request

string
required
Source chain name, lowercase. Equal to dst_chain for a same-chain swap.
string
required
Destination chain name, lowercase.
string
required
Source token address. The zero address is the native asset on EVM chains.
string
required
Destination token address.
TradeType
required
Which side of the trade amount fixes and whether the output is guaranteed: TRADE_TYPE_EXACT_INPUT, TRADE_TYPE_EXPECTED_OUTPUT, TRADE_TYPE_EXACT_INPUT_GUARANTEED_OUTPUT, or TRADE_TYPE_EXACT_OUTPUT. TRADE_TYPE_UNSPECIFIED is rejected. See Trade types.
string
required
For exact input, the amount to deposit in the source token’s base units. For expected output, the desired output in the destination token’s base units.
string
required
Address receiving on the destination chain, in that chain’s address format.
string
required
Source-chain address a refund is paid to if the order cannot be fulfilled.
string
required
Native asset to deliver on the destination chain, in base units. Empty string for none. Capped by the chain’s max_gas_drop.
uint32
Floor for the destination swap leg, in basis points. Omitted means a tier is chosen for the pair.
uint32
Floor for the source swap leg, in basis points.
Referrer[]
Referrer addresses and their basis points. Priced into the quote as referrer_fee.
bool
Request a gasless quote: the deposit is signed off chain and relayed by the operator, whose gas cost is priced in as sponsor_gas. Only for cross-chain quotes from a non-native source token on a chain where GetChains reports gasless: true. See SubmitGaslessOrder.
bool
With gasless, charge the relay gas to your partner funding balance instead of the user’s output. Requires an x-api-key belonging to a funded partner. See PartnerApi funding.

Response

QuoteResponse is a oneof with two cases, cross_chain and same_chain_swap. Both carry the fields below; cross_chain additionally carries the gasless fields.
string
Keccak hash of the stored order parameters. The deposit carries it, and it identifies the order everywhere afterwards.
string
Deposit amount in the source token’s base units. Echoes the request for exact input; the solved input for expected output.
string
Expected output in the destination token’s base units, net of every fee. On an expected-output quote this can differ from the requested amount by a few basis points.
string
Guaranteed floor. A fulfillment delivering less does not land.
uint32
Slippage actually applied, which may differ from the request.
FeeBreakdown
Itemized costs. See types.
string
Contract the deposit must be sent to. Program id on Solana.
OrderParams
The full bound parameter set. Needed to build the deposit call. See types.
string
Notional input value in USD micros. Absent when a price is unavailable.
string
Notional output value in USD micros. Absent when a price is unavailable.
uint64
Estimated seconds from deposit to fulfillment, the median over recent orders on the same chain pair and route type. Absent when there is no history and no configured default for the destination chain.
string
RFC 3339 timestamp, 30 minutes after the quote was issued. Informational: the price is not adjusted afterwards, so clients should re-quote instead of depositing past it. A deposit that still lands is processed at the quoted terms while the quote is retained.
On cross_chain only:
bool
The quote was priced for gasless submission. Deposit it through SubmitGaslessOrder, not a wallet transaction.
bool
The relay gas is charged to the partner’s funding balance rather than the user’s output.
string
EVM contract the relayed deposit executes against, and the spender the permit2 signature must authorize. Present on gasless quotes.
string
Solana account that pays the transaction fee. Set it as the fee payer of the transaction sent to SubmitGaslessOrder. Present on gasless quotes from a Solana source.

Example

Errors

Full messages in Error handling.

Headers

x-api-key
string

Optional. Without a key the request is rate limited per client IP and quotes carry extra spread.

Body

application/json
src_chain
string
dst_chain
string
src_token
string
dst_token
string
amount
string
recipient
string
refund_address
string
slippage_bps
integer<int32>
Required range: x >= 0
src_slippage_bps
integer<int32>
Required range: x >= 0
referrers
object[]
gas_drop
string
gasless
boolean
sponsor_fees
boolean
trade_type
enum<string>
Available options:
TRADE_TYPE_UNSPECIFIED,
TRADE_TYPE_EXACT_INPUT,
TRADE_TYPE_EXPECTED_OUTPUT,
TRADE_TYPE_EXACT_INPUT_GUARANTEED_OUTPUT,
TRADE_TYPE_EXACT_OUTPUT
supported_params_version
integer<int32>
Required range: x >= 0

Response

OK

Exactly one of cross_chain, same_chain_swap is set.

cross_chain
object
same_chain_swap
object