> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API rate limits and error codes

> Reference for REST API rate limits, error formats, authentication error codes, and best practices.

Reference for REST API rate limits, error formats, and error codes.

## REST API rate limits

All rate limits are **per IP address**.

| Scope | Limit |
| - | - |
| Default (all endpoints) | 10,000 requests / 10 sec |
| `/api/v4/public/*` | 20,000 requests / 10 sec |
| `/api/v4/trade-account/*` | 12,000 requests / 10 sec |
| `/api/v4/main-account/*` | 1,000 requests / 10 sec |

Scope-specific limits override the default where listed. Some endpoints have tighter limits that override the defaults above. These are documented on the respective endpoint pages.

When the rate limit is exceeded, the API returns HTTP status `429` (Too Many Requests). Use exponential backoff before retrying (see Best practices below).

On private endpoints called with an API key, a `429` with code `0` can also be a nonce error. The `message` field tells the two apart: `Too many requests.` is the rate limit, and the three nonce error messages in the [Authentication error reference](#authentication-error-reference) are nonce errors. Resend a request refused for its nonce at once with a new, higher nonce, without a backoff.

## REST API error format

All v4 endpoints return errors as JSON. The format differs between public and private APIs.

### Public endpoints

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "success": false,
  "message": "ERROR MESSAGE",
  "params": []
}
```

### Private endpoints

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "code": 0,
  "message": "MESSAGE",
  "errors": {
    "PARAM1": ["MESSAGE"],
    "PARAM2": ["MESSAGE"]
  }
}
```

## Authentication error reference

The following errors are returned by private REST endpoints when the request signature or credentials are invalid, when the nonce is refused, or when the key belongs to a sub-account that is blocked or whose main account is blocked.

## HTTP status codes

## Best practices

### Retry strategy by error type

| Error type | Retry? | Strategy |
| - | - | - |
| Rate limit (`429`, `Too many requests.`) | Yes | Exponential backoff: start at 1s, double on each retry, cap at 30s. Add jitter. |
| Nonce error (`429` with a nonce error message) | Yes | Resend at once with a new, higher nonce. Do not back off. |
| Authentication error | No | Fix the root cause: check API key validity, signature computation, and header names. |
| Validation error | No | Fix the request parameters. Read the `errors` field for field-level feedback. |
| Insufficient balance | No | Check the account balance and wait for pending operations to settle. For a conversion, transfer the source currency to the Trade balance; see [Convert balances](https://docs.whitebit.com/platform/convert.md#balances). |
| Server error (5xx) | Yes | Exponential backoff. If persistent, check platform status. |
| Server error or confirm code `0` on a conversion | Only after a check | The conversion may have executed. Follow [Results and retries](https://docs.whitebit.com/platform/convert.md#results-and-retries) before converting again. |
| Timeout or server error on a transfer between balances | No | [Transfer between balances](https://docs.whitebit.com/api-reference/account-wallet/transfer-between-balances.md) takes no idempotency key, and a transfer can still complete after a timeout or a server error. A matching record in [Get transfer history](https://docs.whitebit.com/api-reference/account-wallet/get-transfer-history.md) means the transfer completed. No record can also mean the transfer is still queued, so repeat the check and do not resend automatically. A transfer that never shows is a manual check. |
| Timeout, server error or `200` on a sub-account transfer | No | [Sub-Account Transfer](https://docs.whitebit.com/api-reference/sub-accounts/sub-account-transfer.md) takes no idempotency key. A transfer can still complete after a timeout or a server error, and can still fail after a `200`. The transfer history shows that the request was received, not that the funds moved. Store a record of each transfer before the call, then read `main` for the ticker with [Sub-Account Balances](https://docs.whitebit.com/api-reference/sub-accounts/sub-account-balances.md) until it shows the transfer, and do not resend while waiting. A transfer that does not show is a manual check. |
| Timeout or server error on a withdrawal | Only after a check | Look up the stored unique withdrawal ID in the [deposit and withdrawal history](https://docs.whitebit.com/api-reference/account-wallet/get-deposit-withdraw-history.md) before sending any new withdrawal request. |

The flowchart shows the check that each operation needs after a failed request. A `429` with a nonce error message needs no check: resend the request at once with a new nonce.

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart TD
    Failed["Failed request"] --> Response{"Response"}
    Response -->|"429 rate limit, or<br/>5xx on a read-only<br/>request"| Backoff["Retry with<br/>exponential<br/>backoff"]
    Response -->|"Timeout or 5xx<br/>on a transfer"| Transfer{"Transfer type"}
    Response -->|"Error on<br/>a conversion"| Convert["Follow Results<br/>and retries on<br/>the Convert page"]
    Response -->|"Timeout or 5xx<br/>on a withdrawal"| Withdrawal["POST /api/v4/<br/>main-account/history<br/>by the stored<br/>withdrawal ID"]
    Transfer -->|"Between balances"| MainHistory["POST /api/v4/<br/>main-account/<br/>transfer/history,<br/>repeated"]
    Transfer -->|"Sub-account"| SubBalances["POST /api/v4/<br/>sub-account/balances,<br/>repeated"]
    MainHistory --> Record{"Matching<br/>record?"}
    SubBalances --> Shows{"main moved<br/>by the recorded<br/>amount?"}
    Record -->|"Yes"| NoResend["Completed,<br/>do not resend"]
    Shows -->|"Yes"| NoResend
    Record -->|"Never shows"| Manual["Manual check,<br/>no automatic resend"]
    Shows -->|"Never shows"| Manual
    Withdrawal -->|"Record found"| Status["Act on the<br/>withdrawal status"]
```

### Exponential backoff

When rate limited, wait before retrying. Double the wait time after each failed attempt (1s → 2s → 4s → 8s).

### Batch requests

Combine multiple operations when the API supports batch endpoints. Use [Bulk Limit Order](https://docs.whitebit.com/api-reference/trading/bulk-limit-order.md) to place up to 20 orders at once, or [Cancel Bulk Orders](https://docs.whitebit.com/api-reference/trading/cancel-bulk-order.md) to cancel up to 100 orders at once, instead of issuing one request per order.

### Nonce management

For private endpoints, ensure each request uses a unique, incrementing nonce. Use Unix timestamp in milliseconds when `nonceWindow` is enabled. Avoid concurrent requests with the same nonce. A refused nonce is not a rate limit: resend the request at once with a new nonce.

### Reduce REST polling

* **Use WebSocket for real-time data** — Subscribe to price, orderbook, and balance channels instead of polling REST endpoints. One WebSocket connection replaces hundreds of REST requests. See [WebSocket Quickstart](https://docs.whitebit.com/guides/websocket-quickstart.md).
* **Cache public data** — Market info, asset statuses, and fee structures change infrequently. Cache responses and refresh periodically (for example, every 60 seconds).
* **Use conditional requests** — Check local state before making API calls. Avoid redundant balance checks when no trades have executed.
* **Distribute requests** — Spread requests evenly across the 10-second window instead of sending bursts.

## Related resources

* [API Reference Overview](https://docs.whitebit.com/api-reference/overview.md) — Base URL and endpoint groups
* [Authentication](https://docs.whitebit.com/api-reference/authentication.md) — Signing and header requirements
* [WebSocket Rate Limits](https://docs.whitebit.com/websocket/rate-limits.md) — WebSocket connection limits, error codes, and timeout behavior

## Used in these guides

* [App Builders FAQ](https://docs.whitebit.com/guides/app-builders-faq.md) — per-IP rate limits when many end users share one backend.
* [Crypto-as-a-Service FAQ](https://docs.whitebit.com/guides/caas-faq.md) — common CaaS integration questions.
* [Crypto-as-a-Service integration](https://docs.whitebit.com/guides/caas-integration.md) — white-label custody and payments for platforms.
* [Copy Trading](https://docs.whitebit.com/guides/copy-trading.md) — mirror a lead trader's orders into followers' own accounts via OAuth-issued keys.
* [Market Maker integration](https://docs.whitebit.com/guides/market-maker-integration.md) — bulk quoting, RPI, kill-switch, and market-data streams.
* [On/Off-Ramp integration](https://docs.whitebit.com/guides/on-off-ramp-integration.md) — retry rules for the transfer and conversion calls of both ramp directions.
* [Partner FAQ](https://docs.whitebit.com/guides/partner-faq.md) — cross-cutting KYB, sandbox, fees, and rate-limit answers.
* [Payment Integration](https://docs.whitebit.com/guides/payment-integration.md) — crypto deposits, withdrawals, conversion, WhiteBIT Codes, and Express Withdraw.
* [Embedded Trading sub-account integration](https://docs.whitebit.com/guides/sub-account-integration.md) — managed sub-accounts, fee-share, and partner onboarding.
* [Wallet-as-a-Service integration](https://docs.whitebit.com/guides/waas-integration.md) — programmatic wallets and payouts for businesses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.