Skip to main content
POST
Create Swap

Authorizations

Authorization
string
header
required

Secret API key from Settings → Developers → API keys. Example: Authorization: Bearer sk_test_…

Headers

Idempotency-Key
string
required

Client-generated key so retries do not create duplicate swaps.

Required string length: 1 - 128

Body

application/json
quote_id
string<uuid>
required

Id from POST /fx/quotes with purpose: swap. Must still be unexpired and unused.

Example:

"e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e"

Response

Swap (processing, completed, or failed)

object
enum<string>
required

Object type discriminator.

Available options:
swap
id
string<uuid>
required

Swap id.

status
enum<string>
required

Lifecycle status of the book-to-book transfer.

Available options:
processing,
completed,
failed,
reversed
from
string
required

Debited book currency.

to
string
required

Credited book currency.

amount_from
integer
required

Debit amount in Ledger minor units.

amount_to
integer
required

Credit amount in Ledger minor units.

stan
string
required

System trace / reference shown in statements.

origin
string

How the swap was initiated (keette for API/dashboard).

scale_from
integer

Decimal places for from.

scale_to
integer

Decimal places for to.

fx_rate
string

Applied rate as a decimal string.

quote_id
string<uuid>

Firm quote that locked the rate.

reason
string

Failure or reversal reason when applicable.

created_at
string<date-time>

Creation time (UTC).

updated_at
string<date-time>

Last status change (UTC).

completed_at
string<date-time>

When the swap finished successfully, if completed.