Trade, manage accounts, and query market data from the terminal using the WhiteBIT CLI. Built for scripting, CI/CD pipelines, and automated workflows.
The WhiteBIT CLI provides 110+ commands covering the full WhiteBIT API surface — market data, spot trading, collateral trading, lending, sub-accounts, deposits, and withdrawals — directly from the terminal.
Credentials are resolved in priority order (highest first):
Method
Best for
Persistence
Security note
CLI flags (--api-key, --api-secret)
Quick testing
None
Visible in process list
Environment variables
CI/CD, Docker, one-off scripts
Per-session
Depends on environment
Config file (~/.whitebit/config.toml)
Daily use, multiple profiles
Permanent
Set chmod 600 on the file
Store API keys securely. Do not commit ~/.whitebit/config.toml to version control. Avoid --api-key flags in production scripts — the value is visible in the process list.
# List all available marketswhitebit market info# Get 24h pricing and volume for all marketswhitebit market activity# Get order bookwhitebit market orderbook --market BTC_USDT# Get recent tradeswhitebit market trades --market BTC_USDT
# Check spot balancewhitebit spot balance# Check main account balancewhitebit account main-balance# Transfer 100 USDT from main to spotwhitebit account transfer --from main --to spot --ticker USDT --amount 100