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

# Create Swap

`POST /swaps`

Swaps one token for another from the account's wallet, or converts between fiat currencies in the account's ledger at the mid-market rate. Crypto swaps finish in the background — check the swap for its status.

## 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. For fiat pairs: the amount of from_token to convert at the mid-market rate; omit (along with to_amount) to repay the full negative to_token balance instead.
  - `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_amount` string, nullable — Fiat pairs only: sizes a partial repayment of the negative to_token balance, denominated in to_token. Must not exceed the debt. Mutually exclusive with amount.
  - `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 source currency converted. Null while a stablecoin repayment is processing.
  - `amount_out` number, nullable — Fiat pairs only: amount credited in the destination 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 source 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` 'queued' | 'working' | 'complete' | 'failed', required — Swap status. Crypto swaps start `queued`; fiat conversions return `complete`, or `working` while a stablecoin repayment settles.
  - `to_chain` string — Destination chain for the swap.
  - `to_token` object, nullable — Fiat pairs only: the destination currency.
    - `symbol` string

## Other responses

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

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/versions/866821546d67/schema)
