API Documentation & Quick Start

API Documentation & Quick Start

The ByteExchange API allows you to integrate trading, market data, and account management into your own applications.

API Types

REST API
  • Base URL: https://api.bexc.io/v1
  • Authentication: HMAC-SHA256 signed requests
  • Rate Limit: 10 requests/second (VIP 0), up to 50 req/s (VIP 5)
  • Best for: Placing orders, managing account, fetching historical data
WebSocket API
  • URL: wss://ws.bexc.io/v1
  • Authentication: Token-based
  • Best for: Real-time market data, order book updates, trade streams

Quick Start

1. Create API Keys
  1. Go to Settings > API Management.
  2. Create a key with appropriate permissions.
  3. Set IP restrictions for security.
  4. Save your API Key and Secret Key.
2. Authentication

All private endpoints require authentication. Include these headers:

  • X-BEXC-APIKEY — Your API key
  • X-BEXC-SIGNATURE — HMAC-SHA256 signature
  • X-BEXC-TIMESTAMP — Current Unix timestamp in milliseconds
3. Example — Get Account Balance

`` GET /v1/account/balance ``

4. Example — Place a Limit Order

`` POST /v1/order { "symbol": "BTCUSDT", "side": "BUY", "type": "LIMIT", "price": "65000", "quantity": "0.01" } ``

WebSocket Streams

Subscribe to real-time data:

  • ticker@BTCUSDT — 24hr ticker updates
  • depth@BTCUSDT — Order book updates
  • trade@BTCUSDT — Real-time trades
  • kline@BTCUSDT@1m — Candlestick data

Rate Limits

Endpoint TypeVIP 0VIP 3VIP 5
REST (orders)10/s20/s50/s
REST (data)20/s40/s100/s
WebSocket (subscriptions)50100200

SDKs and Libraries

ByteExchange provides official SDKs:

  • Python: pip install bexc-python
  • Node.js: npm install bexc-node
  • Java: Available on Maven Central

Full Documentation

For complete API reference including all endpoints, parameters, and response formats, visit docs.bexc.io.