---
title: "Create a swap"
method: POST
path: "/v2/wallets/swaps"
tags: ["Token Swap"]
---

# Create a swap

`POST /v2/wallets/swaps`

Create a swap request to exchange one cryptocurrency for another within the same chain.

## Request body

- CreateWalletSwap
  - `requestId` string, uuid, required — Unique identifier for the swap request (recommend using uuid v4)
  - `source` object, required — Source wallet information for the swap
    - `userId` string, uuid, required — User ID of the source wallet owner
    - `chain` 'POLYGON' | 'ETHEREUM' | 'SOLANA', required — Blockchain network for the source wallet
    - `currency` 'usdc' | 'usdt', required — Source cryptocurrency to swap from
    - `amount` string — Amount to swap (either source.amount or destination.amount must be provided)
  - `destination` object, required — Destination wallet information for the swap
    - `userId` string, uuid — User ID of the destination wallet owner
    - `externalWalletId` string, uuid — External wallet ID (Exclude with userId)
    - `walletAddress` string — Wallet address (Exclude with userId)
    - `chain` 'POLYGON' | 'ETHEREUM' | 'SOLANA', required — Blockchain network for the destination wallet
    - `currency` 'usdc' | 'usdt' | 'usdg', required — Destination cryptocurrency to swap to
    - `amount` string — Amount to receive (either source.amount or destination.amount must be provided)

## Response `200`

Success

- WalletSwapObject
  - `transferType` string
  - `transferDetails` WalletSwapDetailsObject
    - `id` string, uuid
    - `requestId` string, uuid
    - `status` 'PENDING' | 'COMPLETED' | 'FAILED' | 'CANCELLED'
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `source` WalletSwapSourceObject
      - `currency` string
      - `amount` number
      - `chain` string
      - `userId` string, uuid
    - `destination` WalletSwapDestinationObject
      - `currency` string
      - `userId` string, uuid
      - `externalWalletId` string, uuid, nullable
      - `amount` number, nullable
      - `chain` string
      - `walletAddress` string
    - `error` string, nullable
    - `errorDetails` string, nullable
    - `quoteInformation` WalletSwapQuoteInformationObject
      - `sendGross` WalletSwapAmountObject
        - `amount` string
        - `currency` string
      - `sendNet` WalletSwapAmountObject
        - `amount` string
        - `currency` string
      - `receiveGross` WalletSwapAmountObject
        - `amount` string
        - `currency` string
      - `receiveNet` WalletSwapAmountObject
        - `amount` string
        - `currency` string
      - `rate` string
      - `expiresAt` string, date-time
    - `billingInformation` WalletSwapBillingInformationObject
      - `fees` WalletSwapFeeObject[]
        - `id` string, uuid
        - `amount` number
        - `currency` string
        - `type` 'EXCHANGE_FEE' | 'GAS_FEE'
        - `timing` 'ON_INVOICE' | 'ON_TRANSACTION'

## Other responses

- `401` — Unauthorized
- `404` — Resource not found
- `500` — Internal Server Error

---

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