> ## 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.

# Private HTTP API Authentication

> Authenticate with WhiteBIT private HTTP API endpoints using API keys and HMAC-SHA512 signatures.

Base URL

:

## Overview

The Authentication guide explains how to authenticate with WhiteBIT’s private HTTP API endpoints, which require authentication for security purposes.

## Getting Started

### Setting Up API Keys

**Step 1**

Navigate to [WhiteBIT API Settings](https://whitebit.com/settings/api)

**Step 2**

Select the appropriate configuration tab for API keys

> [!NOTE]
>
> Different API keys provide access to different API endpoints

**Step 3**

Generate a new API key

**Step 4**

**Recommended Security Measures:**

* Enable IP restrictions (specify up to 50 trusted IPs)
* Enable Endpoint access restrictions (select only necessary endpoints)

> [!NOTE]
>
> Keys other than webhook keys auto-deactivate after 14 days of inactivity — reactivate at
> [whitebit.com/settings/api](https://whitebit.com/settings/api). For a sub-account key, the `isEnabled` field of
> [List Sub-Account API Keys](https://docs.whitebit.com/api-reference/sub-accounts/list-sub-account-api-keys.md) shows the state, and
> [Reset Sub-Account API Key](https://docs.whitebit.com/api-reference/sub-accounts/reset-sub-account-api-key.md) switches the key back on.
> Enable 2FA before key creation, and use separate keys per application with minimal permissions.

## Authentication Requirements

All authenticated requests must:

1. Use the `POST` HTTP method
2. Include specific body data
3. Contain required headers

### Body Data Format

The request body must be a JSON object containing:

| Field | Description | Example |
| - | - | - |
| `request` | Request path without domain name | `'/api/v4/trade-account/balance'` |
| `nonce` | An incrementing number larger than previous requests | `1594297865000` |
| `nonceWindow` | Optional boolean to enable time-based nonce validation | `true` |
| Request-specific parameters | Additional parameters required by the endpoint | `"ticker": "BTC"` |

**Example Request Body:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
    "request": "/api/v4/trade-account/balance",
    "nonce": 1594297865000,
    "nonceWindow": true,
    "ticker": "BTC"
}
```

#### About Nonce Values

* Use the Unix timestamp in milliseconds for nonce values
* Ensure each nonce is larger than previous requests
* When `nonceWindow` is enabled:
  * Provide Unix timestamp in milliseconds as the nonce
  * Timestamp must be within ±5 seconds of server time
  * Each nonce must be unique to prevent double processing
  * Useful for high-frequency trading systems with concurrent requests

### Required Headers

Every authenticated request requires these headers:

Create the signature using: `hex(HMAC_SHA512(payload, key=api_secret))`

## Implementation Examples

For a raw HMAC-SHA512 signing walkthrough with curl and Python examples, see [First API Call](https://docs.whitebit.com/guides/first-api-call.md). Official SDKs for Go, Python, and PHP are listed on the [SDKs page](https://docs.whitebit.com/sdks.md).

## Common Errors

For rate limits and REST error format, see [Rate limits and error codes](https://docs.whitebit.com/api-reference/rate-limits.md).

## Testing in the API playground

<Snippet file="private-api-playground-testing.mdx" />

## Related resources

* [API Reference Overview](https://docs.whitebit.com/api-reference/overview.md) — Base URL, rate limits, and error format
* [Market Data overview](https://docs.whitebit.com/api-reference/market-data/overview.md) — Public endpoints (no authentication)
* [Spot Trading overview](https://docs.whitebit.com/api-reference/trading/spot-overview.md) — Private trading endpoints
* [OAuth Overview](https://docs.whitebit.com/platform/oauth/overview.md) — Third-party application authorization for ecosystem partners

## Used in these guides

* [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.
* [Fast API Key integration](https://docs.whitebit.com/guides/fast-api-key-integration.md) — OAuth-issued API keys created on behalf of end users.
* [Market Maker integration](https://docs.whitebit.com/guides/market-maker-integration.md) — bulk quoting, RPI, kill-switch, and market-data streams.
* [On/Off-Ramp overview](https://docs.whitebit.com/guides/on-off-ramp-overview.md) — corporate fiat ↔ crypto over EUR/SEPA rails, program-level.
* [On/Off-Ramp integration](https://docs.whitebit.com/guides/on-off-ramp-integration.md) — corporate fiat ↔ crypto over EUR/SEPA rails.
* [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.
* [Yield-as-a-Service integration](https://docs.whitebit.com/guides/yaas-integration.md) — offer Crypto Lending yield to end users via per-user sub-accounts.


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