Uses cookie: theme=1 (dark) / theme=0 (light). Also accepts "them".
Footer links API Docs

Bitxmax API: real-time market data, developer-first docs

Build on Bitxmax.com integrations faster. This page streams crypto prices from external APIs, shows REST and WebSocket examples, and lets you switch themes via cookie for seamless UX.

Live Ticker
Connecting to live prices…
BTC/USDT
ETH/USDT
BNB/USDT
SOL/USDT

All values are fetched live from external APIs; nothing is hardcoded.

Market data

Live spot prices, 24h change, and volumes streamed from external APIs like CoinGecko and Binance. Use filters and the refresh button to refetch. No static prices are used anywhere.

Symbol Price (USDT) 24h Change 24h High 24h Low 24h Volume Source

Sources include Binance REST for tickers and CoinGecko Simple Price for fallback aggregation.

WebSocket streaming

Subscribe to live tick data over WebSocket to build real-time dashboards and trading UIs.

Binance Mini Ticker

Endpoint: wss://stream.binance.com:9443/ws

Subscription

Topic: btcusdt@miniTicker, ethusdt@miniTicker

Usage

Messages stream JSON objects with best effort frequency.

// Example JavaScript (browser)
const ws = new WebSocket('wss://stream.binance.com:9443/ws');
ws.onopen = () => {
  ws.send(JSON.stringify({
    method: 'SUBSCRIBE',
    params: ['btcusdt@miniTicker', 'ethusdt@miniTicker', 'bnbusdt@miniTicker', 'solusdt@miniTicker'],
    id: 1
  }));
};
ws.onmessage = (e) => {
  const msg = JSON.parse(e.data);
  if (msg.e === '24hrMiniTicker') {
    // msg contains s (symbol), c (close), h (high), l (low), v (volume)
    console.log('MiniTicker', msg.s, msg.c);
  }
};
Symbol Last High Low Volume Status
BTCUSDTDisconnected
ETHUSDTDisconnected
BNBUSDTDisconnected
SOLUSDTDisconnected

Click “Connect WebSocket” to subscribe to mini tickers. Data updates in real time from Binance streams.

REST endpoints

Fetch order books, recent trades, and aggregated tickers for your UI.

GET /api/v3/ticker/24hr

Returns 24 hour rolling window price change statistics on Binance; used here for live fields.

GET https://api.binance.com/api/v3/ticker/24hr?symbol=BTCUSDT
Response: { symbol, lastPrice, priceChangePercent, highPrice, lowPrice, volume, ... }
GET /simple/price

CoinGecko fallback for quick spot prices in USD with 24h change.

GET https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,binancecoin,solana&vs_currencies=usd&include_24hr_change=true
Response: { bitcoin: { usd, usd_24h_change }, ... }
POST /orders

Example authenticated order placement (pseudo). Do not send keys to the browser.

POST https://api.bitxmax.com/orders
Headers:
  X-API-KEY: <your-key>
  X-API-SIGNATURE: HMAC_SHA256(payload, secret)
  X-API-TIMESTAMP: 1736792000

Body:
  { "symbol": "BTCUSDT", "side": "BUY", "type": "LIMIT", "price": "<price-from-market>", "quantity": "0.01" }

Pagination

Use cursor-based tokens for consistent paging at scale.

Idempotency

Send an Idempotency-Key header for safe retries.

Versioning

Pin versions with Accept: application/vnd.bitxmax.v1+json.

Authentication

HMAC signatures and timestamp headers ensure request integrity.

// Pseudo-code to sign a request (Node.js)
const crypto = require('crypto');

function sign(payload, secret) {
  return crypto.createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
}
// Browser demo (no real secrets)
async function demoSign() {
  const payload = { symbol: 'BTCUSDT', side: 'BUY', ts: Date.now() };
  const secret = 'not-your-real-secret';
  const enc = new TextEncoder();
  const key = await crypto.subtle.importKey(
    'raw', enc.encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']
  );
  const sigBuf = await crypto.subtle.sign('HMAC', key, enc.encode(JSON.stringify(payload)));
  const sigHex = [...new Uint8Array(sigBuf)].map(b => b.toString(16).padStart(2, '0')).join('');
  return sigHex;
}

Rate limits

Respect public API limits. Implement adaptive backoff and caching.

Client hints

Coalesce identical concurrent requests; dedupe using a shared promise cache.

Retries

Retry with exponential backoff and jitter for 429/5xx responses.

Caching

Cache short-lived data (e.g., 2–5s) to reduce burst traffic and UI reflows.

Error handling

Normalize transport, HTTP, and schema errors into a predictable shape.

// Unified error shape
{
  "ok": false,
  "status": 429,
  "code": "RATE_LIMIT",
  "message": "Too many requests. Please retry later.",
  "retryAfter": 2.5
}

FAQ

Common questions about Bitxmax API and this live demo page.

Are prices static?

No. Every price displayed is fetched from external APIs at runtime.

How does theme work?

The page reads a cookie named theme (or them): 1=dark, 0=light.

Is this SEO-friendly?

Yes. The page is LTR English with meta tags, canonical URL, and structured data.