Skip to main content
POST
JavaScript

Headers

Idempotency-Key
string

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

Maximum string length: 255
Example:

"d9105228-4a08-46b1-8b91-42fed586d383"

Body

application/json
amount
string
required

Source token amount.

from_token
string
required

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

to_token
string
required

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

from_address
string | null

Source wallet address used for the quote.

from_chain

Source chain name or chain ID. Defaults to the source token's chain when omitted.

metadata
object

Metadata to include with the quote response.

slippage_bps
integer | null

Maximum slippage tolerance in basis points.

to_address
string | null

Destination wallet address used for the quote.

to_chain

Destination chain name or chain ID. Defaults to the destination token's chain when omitted.

Response

swap quote created

amount_in
string
required

Source token amount used for the quote.

amount_out
string
required

Estimated destination token amount.

fee_bps
integer
required

Whop fee in basis points.

from_token
object
required

Resolved source token details.

metadata
object
required

Metadata from the request.

object
enum<string>
required
Available options:
swap_quote
rate
string
required

Quoted exchange rate.

to_token
object
required

Resolved destination token details.

amount_out_min
string

Minimum destination amount after slippage.

bridge_fee
string | null

Estimated bridge fee for cross-chain swaps.

estimated_duration_seconds
integer | null

Estimated time for the swap to complete.

from_address
string | null

Source wallet address used for the quote.

requires_token_approval
boolean | null

Whether the source token needs approval before swapping.

to_address
string | null

Destination wallet address used for the quote.