---
title: "Create Swap"
method: POST
path: "/swaps"
tags: ["Swaps"]
---

# Create Swap

`POST /swaps`

Executes a swap from the account's wallet. Crypto swaps run asynchronously; poll GET /swaps/{id} for status. A pair of fiat currency codes instead converts ledger balances to repay a negative to_token balance: by default the conversion brings that balance exactly to zero, or pass amount to repay part of the debt. Fiat conversions complete synchronously, except when funding from USD on a stablecoin-rails account, which starts an asynchronous repayment (status "processing"). The id on a pending repayment is a reference to the repayment workflow; GET /swaps/{id} reports status for crypto swaps only, so watch the account balance for settlement instead of polling.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `account_id` string, required — Business or user account ID (biz_* / user_*).
  - `amount` string, nullable — Source token amount. Required for crypto swaps. Optional for fiat pairs: the portion of the negative to_token balance to repay, which must not exceed the debt; omit to repay the full debt.
  - `from_chain` union — Source chain name or chain ID. Defaults to the source token's chain when omitted.
    - string
    - integer
  - `from_token` string, required — Source token contract address or ticker symbol, such as "USDT".
  - `slippage_bps` integer, nullable — Maximum slippage tolerance in basis points.
  - `to_chain` union — Destination chain name or chain ID. Defaults to the destination token's chain when omitted.
    - string
    - integer
  - `to_token` string, required — Destination token contract address or ticker symbol, such as "XAUT".

## Response `201`

swap created

- object
  - `account_id` string, required — Account ID that owns the wallet used for the swap.
  - `amount_in` number, nullable — Fiat pairs only: amount of the funding currency converted. Null while a stablecoin repayment is processing.
  - `amount_out` number, nullable — Fiat pairs only: amount credited in the repaid currency. Null while a stablecoin repayment is processing.
  - `amount_out_expected` string — Expected destination token amount.
  - `amount_out_min` string — Minimum destination amount after slippage.
  - `from_token` object, nullable — Fiat pairs only: the funding currency.
    - `symbol` string
  - `id` string — Swap ID. Poll `GET /swaps/:id` for status.
  - `object` 'swap', required
  - `rate` string — Quoted exchange rate used to create the swap.
  - `status` string, required — Initial swap status.
  - `to_chain` string — Destination chain for the swap.
  - `to_token` object, nullable — Fiat pairs only: the repaid currency.
    - `symbol` string

## Other responses

- `400` — Invalid Parameters
- `403` — Forbidden

## Changes

- **2026-07-26** `60bbb4a6ffbc` — 1 breaking, 7 info
  - the response property `id` became optional for the status `201`
  - added the new optional `header` request parameter `Idempotency-Key`
  - the request property `amount` became nullable
  - the request property `amount` became optional
  - …4 more

[Change history](https://skmtc.dev/whop/apis/whop-api/changes/swaps/post.md)

---

[API](https://skmtc.dev/whop/apis/whop-api.md) · [All operations](https://skmtc.dev/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/whop/whop-api/revisions/60bbb4a6ffbc/schema)
