Balance monitoring
WhiteBIT separates funds into three account types. Each has a dedicated balance endpoint:
For an explanation of account types and how funds move between them, see Balances & Transfers.
Fetch Trade balance
- cURL
- Python
available— funds ready for trading or withdrawalfreeze— funds locked in open orders or pending operations
Real-time balance via WebSocket
REST polling provides point-in-time snapshots. For instant balance change notifications, subscribe to WebSocket account streams:Main balance does not have a WebSocket subscription channel. Monitor Main balance changes — including deposit arrivals — via webhooks for real-time notifications or REST polling of
POST /api/v4/main-account/history as a fallback.Subscribe to balance updates
The following example assumes an authenticated WebSocket session. See WebSocket Quickstart — Authenticate for private channels for the full authentication flow. Without authentication, the subscription request is rejected.Deposit and withdrawal tracking
REST polling
Query deposit and withdrawal history using the main account history endpoint: Endpoint:POST /api/v4/main-account/history
- cURL
- Python
Webhook-based monitoring
For real-time deposit and withdrawal notifications, configure webhooks. Webhook delivery includes up to 5 retries at 10-minute intervals (50-minute coverage window). Recommended reconciliation approach:- Primary: Webhooks — process events as they arrive for near-instant updates
- Fallback: REST polling — periodically query the history endpoint to catch any events missed during webhook downtime or after the 50-minute retry window expires
Order activity monitoring
Open orders
Query active orders across all markets or filter by a specific market: Endpoint:POST /api/v4/orders
- cURL
- Python
Executed orders
Query trade history for filled and canceled orders: Endpoint:POST /api/v4/trade-account/order/history
- cURL
- Python
Real-time order updates via WebSocket
For instant order state change notifications, subscribe to account streams:
For final order state with aggregate data (fully filled or canceled), see also Orders Executed.
- Python
- wscat
Polling vs WebSocket decision matrix
General guidance: Use REST for on-demand queries and historical data. Use WebSocket for any data that changes frequently and requires immediate reaction. Combine both: WebSocket for primary real-time flow, REST for startup state hydration and periodic reconciliation.
Recommended polling intervals
When using REST polling, align the interval with the use case and the endpoint rate budget. See Rate Limits & Error Codes for per-scope request limits.What’s Next
Payment Integration
Full deposit/withdrawal lifecycle, fee calculation, and reconciliation.
WebSocket Quickstart
Connection setup, authentication, and real-time data streaming.
Trading Bot
End-to-end automated trading with order management and error handling.