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, 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
Source-chain wallet that will sign the deposit. Omitted means refund_address. A Solana deposit that swaps first is built for this wallet’s swap authority, so another wallet cannot execute it. Screened like recipient and refund_address when it differs from refund_address. Stored with the quote, not part of the quote hash.
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
Slippage for the whole route, in basis points: min_amount_out is amount_out less this, and it is split between the source and destination legs to set min_lock_amount. Omitted means a tier is chosen for each leg. On TRADE_TYPE_EXACT_INPUT, 0 asks for a guaranteed output; see Guaranteed quotes. See Slippage.
uint32
Floor for the source swap leg, in basis points. Applies only when slippage_bps is omitted.
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 with can_sponsor enabled on the key. See PartnerApi funding.
string
With sponsor_fees, the most relay gas your funding balance covers for this quote, as a decimal string in base units of the source chain’s native asset (wei, lamports, or MIST). Gas the quote estimates above it is priced into sponsor_gas and comes out of the user’s output, and your balance is never debited more than this amount for the order. Omit it to cover the relay gas in full. Ignored without sponsor_fees.

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
The requested slippage_bps, or, when it was omitted, the gap between amount_out and min_amount_out.
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.
uint32
The guardian set whose signatures cover the contract manifest this quote’s addresses come from. The SDK checks router_address and the swap instructions’ router against the manifest from GetContracts at this index before building a deposit.
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 output is committed: min_amount_out equals amount_out. See Guaranteed quotes.
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
The sponsor_gas_max the quote was priced with, in base units of the source chain’s native asset. Present on sponsored quotes that set one.
string
EVM contract the relayed deposit executes against, and the spender the permit2 signature must authorize. Present on gasless quotes.
string
Address that pays the deposit’s gas: the fee payer of the Solana transaction, or the gas owner of the Sui transaction, sent to SubmitGaslessOrder. Present on gasless quotes from a Solana or Sui source.
uint64
Largest gas budget, in MIST, the sponsor accepts on the Sui transaction. Size the budget from a simulation of the transaction, at most 1.5 times its computation plus storage cost, and never above this cap. Present on gasless quotes from a Sui 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
srcChain
string
dstChain
string
srcToken
string
dstToken
string
amount
string
recipient
string
refundAddress
string
slippageBps
integer<int32>
Required range: x >= 0
srcSlippageBps
integer<int32>
Required range: x >= 0
referrers
object[]
gasDrop
string
gasless
boolean
sponsorFees
boolean
tradeType
enum<string>
Available options:
TRADE_TYPE_UNSPECIFIED,
TRADE_TYPE_EXACT_INPUT,
TRADE_TYPE_EXPECTED_OUTPUT,
TRADE_TYPE_EXACT_OUTPUT
supportedParamsVersion
integer<int32>
Required range: x >= 0
sponsorGasMax
string
depositor
string

Response

OK

Exactly one of crossChain, sameChainSwap is set.

crossChain
object
sameChainSwap
object