v8

OpenAPI 3.1.02026-08-033623795.0 MB
Swaps

Create Swap Quote

Previews the price of a swap. No funds move and nothing is saved.

post/swaps/quote

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

amountstring required

Source token amount.

from_addressstring nullable

Source wallet address used for the quote.

from_tokenstring required

Source token contract address or ticker symbol, such as "USDT".

metadataobject

Metadata to include with the quote response.

slippage_bpsinteger nullable

Maximum slippage tolerance in basis points.

to_addressstring nullable

Destination wallet address used for the quote.

to_tokenstring required

Destination token contract address or ticker symbol, such as "XAUT".

Response

swap quote created

amount_instring required

Source token amount used for the quote.

amount_outstring required

Estimated destination token amount.

amount_out_minstring

Minimum destination amount after slippage.

bridge_feestring nullable

Estimated bridge fee for cross-chain swaps.

estimated_duration_secondsinteger nullable

Estimated time for the swap to complete.

fee_bpsinteger required

Whop fee in basis points.

from_addressstring nullable

Source wallet address used for the quote.

from_tokenobject required

Resolved source token details.

metadataobject required

Metadata from the request.

object'swap_quote' required
ratestring required

Quoted exchange rate.

requires_token_approvalboolean nullable

Whether the source token needs approval before swapping.

to_addressstring nullable

Destination wallet address used for the quote.

to_tokenobject required

Resolved destination token details.