Use this file to discover all available pages before exploring further.
Place a limit order on BTC_USDT against the live orderbook with HMAC-SHA512 signing. The four-step block below uses a price far below market, so the order opens but does not fill — safe for testing without risking a fill.
Funds in the Trade balance (transfer from Main balance if needed — see Balances & Transfers)
Familiarity with HMAC-SHA512 signing — see Authentication
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.
cURL
Python
# 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"}'
import base64import hashlibimport hmacimport jsonimport timeimport requestsAPI_KEY = "YOUR_API_KEY" # Replace with actual API keyAPI_SECRET = "YOUR_SECRET" # Replace with actual API secretBASE_URL = "https://whitebit.com"def send_request(path, data=None): if data is None: data = {} data["request"] = path data["nonce"] = str(int(time.time() * 1000)) data_json = json.dumps(data) payload_b64 = base64.b64encode(data_json.encode()).decode() signature = hmac.new( API_SECRET.encode(), payload_b64.encode(), hashlib.sha512 ).hexdigest() headers = { "Content-Type": "application/json", "X-TXC-APIKEY": API_KEY, "X-TXC-PAYLOAD": payload_b64, "X-TXC-SIGNATURE": signature, } return requests.post(BASE_URL + path, headers=headers, data=data_json).json()# Check USDT balancebalance = send_request("/api/v4/trade-account/balance", {"ticker": "USDT"})print(balance)
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).
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.
cURL
Python
# 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"}'
order = send_request("/api/v4/order/new", { "market": "BTC_USDT", "side": "buy", "amount": "0.0001", "price": "30000" # Well below market — adjust if needed})print(order)orderId = order.get("orderId")print(f"Order ID: {orderId}")
Request fields: market (trading pair), side (“buy” or “sell”), amount (quantity in the base asset), price (limit price in the quote asset). Optional: clientOrderId (custom identifier), stp (self-trade prevention mode).
3
Check active orders
Verify the newly placed order appears in the active orders list.
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.
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. 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. Details: Balances & Transfers.