API Trading

Access our powerful trading API for algorithmic trading, automated strategies, and institutional-grade trading solutions on BitTest Platform.

Get API Access

Powerful Trading API

High Performance

Sub-millisecond latency with 99.99% uptime for mission-critical trading applications.

Secure & Reliable

Bank-grade security with comprehensive authentication and rate limiting.

Real-time Data

Live market data, order book updates, and trade execution notifications.

API Endpoints

REST API

GET /api/v1/tickerPublic
POST /api/v1/ordersPrivate
GET /api/v1/accountPrivate
GET /api/v1/historyPrivate

WebSocket API

wss://api.bittest.com/wsReal-time
ticker.btcPublic
orderbook.btcPublic
user.ordersPrivate

Code Examples

Python Example

import requests
import hmac
import hashlib
import time

def get_ticker(symbol):
    url = "https://api.bittest.com/v1/ticker"
    params = {"symbol": symbol}
    response = requests.get(url, params=params)
    return response.json()

def place_order(api_key, secret, symbol, side, amount, price):
    url = "https://api.bittest.com/v1/orders"
    timestamp = str(int(time.time() * 1000))
    
    message = f"{timestamp}POST/v1/orders"
    signature = hmac.new(
        secret.encode(),
        message.encode(),
        hashlib.sha256
    ).hexdigest()
    
    headers = {
        "X-API-Key": api_key,
        "X-Timestamp": timestamp,
        "X-Signature": signature
    }
    
    data = {
        "symbol": symbol,
        "side": side,
        "amount": amount,
        "price": price
    }
    
    response = requests.post(url, json=data, headers=headers)
    return response.json()

JavaScript Example

const crypto = require('crypto');
const axios = require('axios');

class BitTestAPI {
  constructor(apiKey, secret) {
    this.apiKey = apiKey;
    this.secret = secret;
    this.baseURL = 'https://api.bittest.com/v1';
  }

  async getTicker(symbol) {
    const response = await axios.get(`${this.baseURL}/ticker`, {
      params: { symbol }
    });
    return response.data;
  }

  async placeOrder(symbol, side, amount, price) {
    const timestamp = Date.now().toString();
    const message = `${timestamp}POST/v1/orders`;
    const signature = crypto
      .createHmac('sha256', this.secret)
      .update(message)
      .digest('hex');

    const response = await axios.post(`${this.baseURL}/orders`, {
      symbol,
      side,
      amount,
      price
    }, {
      headers: {
        'X-API-Key': this.apiKey,
        'X-Timestamp': timestamp,
        'X-Signature': signature
      }
    });

    return response.data;
  }
}

Rate Limits & Pricing

Free Tier

$0

Perfect for getting started

  • • 100 requests/minute
  • • Basic market data
  • • Standard support
  • • REST API only

Pro Tier

$99/mo

For active traders

  • • 1,000 requests/minute
  • • Real-time WebSocket
  • • Priority support
  • • Advanced order types

Enterprise

Custom

For institutions

  • • Unlimited requests
  • • Dedicated support
  • • Custom endpoints
  • • SLA guarantee

API Documentation

Getting Started

Learn the basics of our API with step-by-step tutorials and examples.

View Documentation →

SDKs & Libraries

Official SDKs for Python, JavaScript, Java, and more programming languages.

Download SDKs →

Start Building with Our API

Join BitTest Platform and start building powerful trading applications.