Skip to main content
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.

Prerequisites

  • A WhiteBIT account with an API key for authenticated commands — see Authentication
Public market data commands (market, server) require no account or API key.

Install the CLI

Quick start

Authentication

Credentials are resolved in priority order (highest first):
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.

Config file

Create ~/.whitebit/config.toml with one or more named profiles:
Switch profiles with --profile:

Commands

Examples

Market data

Account and balance

Spot trading

JSON output and scripting

Shell completion

To load automatically, add source ~/.bash_completion to ~/.bashrc.

Global options

Exit codes

Security best practices

  • Never commit credentials to version control.
  • Use environment variables for CI/CD pipelines.
  • Set restrictive file permissions: chmod 600 ~/.whitebit/config.toml.
  • Use API key restrictions in the WhiteBIT dashboard — IP whitelist and read-only scope when appropriate.
  • Avoid --api-key and --api-secret flags in production scripts — values are visible in the process list.

What’s next