---
title: "The swap operation."
method: POST
path: "/v1/brc20-swap/swap"
tags: ["BRC20-Swap"]
---

# The swap operation.

`POST /v1/brc20-swap/swap`

## Request body

- object
  - `address` string, required
  - `tickIn` string, required — Input tick
  - `tickOut` string, required — Output tick
  - `amountIn` string, required — The amount of input tick
  - `amountOut` string, required — The amount of output tick
  - `slippage` string, required
  - `exactType` 'exactIn' | 'exactOut', required
  - `ts` number, required — Timestamp (seconds)
  - `sig` string, required — User signature

## Response `200`

Default Response

- object
  - `code` number, required
  - `msg` string, required
  - `data` object, required
    - `id` string — Function id
    - `rollupInscriptionId` string — The rollup inscription id where the function is located
    - `address` string
    - `tickIn` string
    - `tickOut` string
    - `amountIn` string
    - `amountOut` string
    - `exactType` string
    - `ts` number

---

[API](https://skmtc.net/unisat/apis/unisat-wallet-openapi.md) · [All operations](https://skmtc.net/unisat/apis/unisat-wallet-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unisat/unisat-wallet-openapi/revisions/68de350419c7/schema)
