Prerequisites
- A WhiteBIT account (register)
- An API key with Trading permission (create one)
- Funds in the Trade balance (transfer from Main balance if needed — see Balances & Transfers)
- Familiarity with HMAC-SHA512 signing — see Authentication
Check Trade balance
Verify available funds before placing an order.Expected response:For Go and PHP examples, see SDKs.
- cURL
- Python
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).
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.Expected response:Request fields:
- cURL
- Python
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).Check active orders
Verify the newly placed order appears in the active orders list.Expected response (trimmed):
- cURL
- Python
Signing and balance mechanics
Signing and balance mechanics
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.