Create a swap
Create a token swap. A swap exchanges one stablecoin for another between a source wallet and a destination wallet (owned by a user or an external wallet).
The source and destination currency must be different. Provide exactly one of
source.amount or destination.amount — the other side is derived from the quote.
Provide exactly one of destination.walletId or destination.externalWalletId.
Depending on the pricing model, the swap may be created directly or returned in an
OPEN_QUOTE state that must be accepted before execution.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
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.
Response
Swap created successfully.
A token swap.
Public ID of the swap (prefixed with swap_).
"swap_7bV1aLcs3Kf9dQ2mNpXwZ"
Client-generated idempotency key supplied at creation.
"a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
DRAFT, CREATED, PENDING, OPEN_QUOTE, QUOTE_FAILED, COMPLETED, FAILED "OPEN_QUOTE"
User-facing error summary. Null unless the swap failed.
null
User-facing error details. Null unless the swap failed.
null
Source amount of the swap.
"100"
Resolved source of the swap.
Resolved destination of the swap.
On-chain receipt for the swap.
Commercial quote for the swap. Null until a quote has been generated.
"2026-07-01T10:30:00.000Z"
"2026-07-01T10:30:00.000Z"