Skip to main content
POST
/
swaps
Create Swap
curl --request POST \
  --url https://{defaultHost}/swaps \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_id": "<string>",
  "amount": "<string>",
  "from_token": "<string>",
  "to_token": "<string>",
  "from_chain": "<string>",
  "to_chain": "<string>",
  "slippage_bps": 123
}
'
{
  "object": "swap",
  "id": "<string>",
  "account_id": "<string>",
  "status": "<string>",
  "to_chain": "<string>",
  "amount_out_expected": "<string>",
  "amount_out_min": "<string>",
  "rate": "<string>"
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token.

Body

application/json
account_id
string
required

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

amount
string
required

Input token amount.

from_token
string
required

Source token, by contract address or ticker symbol (e.g. "USDT").

to_token
string
required

Destination token, by contract address or ticker symbol (e.g. "XAUT").

from_chain
to_chain
slippage_bps
integer | null

Response

swap created

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

Swap ID — poll GET /swaps/{id} for status.

account_id
string
required
status
string
required
to_chain
string
amount_out_expected
string
amount_out_min
string
rate
string