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.
string
required
Amount to deposit, in the source 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
Expected output in the destination token’s base units, net of every fee.
string
Guaranteed floor. A fulfillment delivering less does not land.
uint32
Slippage actually applied, which may differ from the request.
string
Contract the deposit must be sent to. Program id on Solana.
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.
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.