Skip to main content

Base URL

All REST API endpoints are available at:
https://whitebit.com/api/v4/{endpoint}
  • Public endpoints use the GET method and accept parameters as query strings.
  • Private endpoints use the POST method and accept parameters as JSON in the request body.
  • All endpoints return time in Unix-time format and respond with JSON.

Quickstart

Prerequisites

  • A WhiteBIT account (Sign up)
  • An API key with appropriate permissions (API Settings)
  • A programming language or HTTP client (cURL, Python, JavaScript, or similar)

Step 1: First public API call

The Server Status endpoint returns the API life-state. No authentication is required. Request:
curl -X GET "https://whitebit.com/api/v4/public/ping"
Expected response:
["pong"]
A response of ["pong"] confirms the API is operational.

Step 2: Authentication setup

Private endpoints require HMAC-SHA512 signed requests. See the Authentication guide for the full signing process. WhiteBIT provides the API Quick Start Helper with examples in Python, PHP, Node.js, Go, JavaScript, Kotlin, .NET, Ruby, C++, and Rust. Required headers for private endpoints:
HeaderValue
Content-typeapplication/json
X-TXC-APIKEYThe public API key
X-TXC-PAYLOADBase64-encoded request body
X-TXC-SIGNATUREHMAC-SHA512 signature (hex encoded)

Step 3: First authenticated API call

The Main Balance endpoint retrieves the main account balance. The request body must include request (the endpoint path) and nonce (unique identifier). Request body:
{
  "request": "/api/v4/main-account/balance",
  "nonce": "1594297865000"
}
Example with cURL (replace YOUR_API_KEY and YOUR_SIGNATURE with the signed payload):
curl -X POST "https://whitebit.com/api/v4/main-account/balance" \
  -H "Content-type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: BASE64_ENCODED_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{"request":"/api/v4/main-account/balance","nonce":"1594297865000"}'
Expected response:
{
  "BTC": { "main_balance": "0" },
  "USDT": { "main_balance": "100.50" }
}
The response contains balance data for each asset. Omitted assets have a zero balance.

Rate Limits

ScopeLimit
Public REST endpoints2000 requests / 10 sec
Private REST endpointsVaries per endpoint (see individual docs)
For complete rate limits, error codes, and best practices, see Rate Limits & Error Codes.

Error Format

All V4 endpoints return errors as JSON. The format differs slightly between public and private APIs: Public endpoints:
{
  "success": false,
  "message": "ERROR MESSAGE",
  "params": []
}
Private endpoints:
{
  "code": 0,
  "message": "MESSAGE",
  "errors": {
    "PARAM1": ["MESSAGE"],
    "PARAM2": ["MESSAGE"]
  }
}

Endpoint Groups

What’s next