---
title: "Create code"
method: POST
path: "/api/v4/main-account/codes"
tags: ["Codes"]
---

# Create code

`POST /api/v4/main-account/codes`

The endpoint creates [WhiteBIT code](/glossary#whitebit-codes).

<Warning>
Rate limit: 1000 requests/10 sec.
</Warning>

<Note>
The API does not cache the response.
</Note>

## Request body

- object
  - `ticker` string, required — Currency's [ticker](/glossary#ticker). Example: BTC
  - `amount` string, required — Amount to transfer. Up to 18 decimal places, value greater than zero and capped at 1e17 (10^17), and not exceeding the [main balance](/glossary#balance-main).
  - `passphrase` string — Passphrase for applying [WhiteBIT codes](/glossary#whitebit-codes). Passphrase must contain only latin letters, numbers and symbols (like !@#$%^, no whitespaces). Max: 25 symbols.
  - `description` string — Additional text description for [code](/glossary#whitebit-codes). Visible only for creator. Max: 280 symbols.
  - `request` string, required — Request signature
  - `nonce` integer, required — Unique request identifier

## Response `201`

All validations succeeded and creating transaction is started

- object
  - `code` string — Generated WhiteBIT code
  - `message` string — Success message
  - `external_id` string — External identifier

## Other responses

- `400` — Request validation failed
- `422` — Inner validation failed Response error codes: - 0 - Fiat are available on the front-end only - 1 - currency is not withdrawable - 2 - specified address is invalid - 3 - amount is too small - 4 - amount is too small for the payment system - 5 - not enough balance - 6 - amount is less than or equals [fee](/glossary#fee) Code creation reserves funds through the shared withdraw processor, so insufficient balance surfaces as code 5. The minimum amount is configured **per currency** (there is no fixed global value) and a below-minimum amount surfaces as code 3.

---

[API](https://skmtc.net/whitebit/apis/whitebit-private-http-api-v4.md) · [All operations](https://skmtc.net/whitebit/apis/whitebit-private-http-api-v4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whitebit/whitebit-private-http-api-v4/revisions/76c9def9942f/schema)
