Skip to main content
Place a first spot trade on the WhiteBIT API — check the Trade balance, place a limit order on BTC_USDT, verify the order, and cancel the order — in under 5 minutes.

Prerequisites

WhiteBIT has no public testnet or sandbox. All orders execute against the live orderbook. For risk-free practice, use Demo Tokens (DBTC/DUSDT) — activate from the WhiteBIT Codes page. For real-asset testing, use minimum order sizes and cancel test orders after verification.
1

Check Trade balance

Verify available funds before placing an order.
# See /api-reference/authentication for signing details.
curl -X POST https://whitebit.com/api/v4/trade-account/balance \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{"ticker":"USDT","request":"/api/v4/trade-account/balance","nonce":"1700000000000"}'
Expected response:
{
  "USDT": {
    "available": "1000.00",
    "freeze": "0"
  }
}
available = funds ready for trading. freeze = funds locked in active orders.
The cURL examples show request structure with placeholder headers. For a runnable signing implementation, use the Python tab or the API Quick Start Helper library (Python, Go, PHP, Node.js, and more).
For Go and PHP examples, see SDKs.
2

Place a limit order

Create a limit buy order on BTC_USDT. Set the price well below the current market price to avoid immediate execution — the order remains open for safe testing.
# Set price well below current market to prevent execution.
curl -X POST https://whitebit.com/api/v4/order/new \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{"market":"BTC_USDT","side":"buy","amount":"0.0001","price":"30000","request":"/api/v4/order/new","nonce":"1700000000000"}'
Expected response:
{
  "order_id": 12345678,
  "client_order_id": "",
  "market": "BTC_USDT",
  "side": "buy",
  "type": "limit",
  "timestamp": 1700000000.000,
  "amount": "0.0001",
  "price": "30000",
  "...": "..."
}
Request fields: market (trading pair), side (“buy” or “sell”), amount (quantity in the base asset), price (limit price in the quote asset). Optional: client_order_id (custom identifier), stp (self-trade prevention mode).
3

Check active orders

Verify the newly placed order appears in the active orders list.
curl -X POST https://whitebit.com/api/v4/orders \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{"market":"BTC_USDT","request":"/api/v4/orders","nonce":"1700000000000"}'
Expected response (trimmed):
[
  {
    "order_id": 12345678,
    "market": "BTC_USDT",
    "side": "buy",
    "amount": "0.0001",
    "price": "30000",
    "...": "..."
  }
]
4

Cancel the order

Cancel the limit order using the order_id returned in Step 2.
curl -X POST https://whitebit.com/api/v4/order/cancel \
  -H "Content-Type: application/json" \
  -H "X-TXC-APIKEY: YOUR_API_KEY" \
  -H "X-TXC-PAYLOAD: YOUR_PAYLOAD" \
  -H "X-TXC-SIGNATURE: YOUR_SIGNATURE" \
  -d '{"market":"BTC_USDT","order_id":12345678,"request":"/api/v4/order/cancel","nonce":"1700000000000"}'
Expected response:
{
  "order_id": 12345678,
  "market": "BTC_USDT",
  "side": "buy",
  "amount": "0.0001",
  "price": "30000",
  "...": "..."
}
The response confirms the canceled order details. The previously frozen funds return to the available Trade balance.
To verify canceled orders later, query the order history endpoint.
The Trade balance now reflects the returned funds. Explore advanced order types and automation below.
HMAC-SHA512 signing — Every private request includes three headers (X-TXC-APIKEY, X-TXC-PAYLOAD, X-TXC-SIGNATURE) proving authenticity without transmitting the API secret. The nonce field prevents replay attacks. Full signing details: Authentication.Trade balance vs Main balance — WhiteBIT separates funds into Main balance (deposits, withdrawals) and Trade balance (order placement). An explicit transfer moves funds between balances — the API never draws from Main balance automatically. Details: Balances & Transfers.The freeze field — When a limit order is accepted, the required funds move from available to freeze in the Trade balance. After cancellation, freeze returns to zero and available is restored.

What’s next

Margin & Futures Quickstart

Open a first leveraged position with up to 100x leverage.

Order Types

Explore all 6 order types including Stop-Limit and Bulk-Limit.

Trading Bot Guide

Build an automated trading system end-to-end.