Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Swap details. Source and destination currencies must differ, exactly one of source.amount / destination.amount must be provided, and exactly one of destination.walletId / destination.externalWalletId must be provided.

Swap creation payload. Source and destination currencies must differ, exactly one of source.amount / destination.amount must be set, and exactly one of destination.walletId / destination.externalWalletId must be set.

requestId
string<uuid>
required

Client-generated idempotency key. A UUID unique to this swap request.

Example:

"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"

source
object
required

Source of the swap.

destination
object
required

Destination of the swap. Provide exactly one of walletId or externalWalletId.

Response

Swap created successfully.

A token swap.

id
string

Public ID of the swap (prefixed with swap_).

Example:

"swap_7bV1aLcs3Kf9dQ2mNpXwZ"

requestId
string<uuid>

Client-generated idempotency key supplied at creation.

Example:

"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"

status
enum<string>
Available options:
DRAFT,
CREATED,
PENDING,
OPEN_QUOTE,
QUOTE_FAILED,
COMPLETED,
FAILED
Example:

"OPEN_QUOTE"

error
string | null

User-facing error summary. Null unless the swap failed.

Example:

null

errorDetails
string | null

User-facing error details. Null unless the swap failed.

Example:

null

amount
string | null

Source amount of the swap.

Example:

"100"

source
object

Resolved source of the swap.

destination
object

Resolved destination of the swap.

receipt
object

On-chain receipt for the swap.

quote
object | null

Commercial quote for the swap. Null until a quote has been generated.

createdAt
string<date-time>
Example:

"2026-07-01T10:30:00.000Z"

updatedAt
string<date-time>
Example:

"2026-07-01T10:30:00.000Z"