Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

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
account_id
string
required

Business or user account ID (biz_* / user_*).

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_chain

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

slippage_bps
integer | null

Maximum slippage tolerance in basis points.

to_chain

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

Response

swap created

account_id
string
required

Account ID that owns the wallet used for the swap.

id
string
required

Swap ID. Poll GET /swaps/:id for status.

object
enum<string>
required
Available options:
swap
status
string
required

Initial swap status.

amount_out_expected
string

Expected destination token amount.

amount_out_min
string

Minimum destination amount after slippage.

rate
string

Quoted exchange rate used to create the swap.

to_chain
string

Destination chain for the swap.