Skip to Content

BitMEX Data Parser & API

BitMEX is the pioneering crypto derivatives exchange that popularized the perpetual swap, and StockAPIS extracts its real-time market data — perpetual and futures prices, full order books, funding rates, open interest and OHLCV candles across XBTUSD, ETHUSD and 100+ contracts — through a single REST API. BitMEX offers an official public REST and WebSocket API, and StockAPIS normalizes it to the same schema you use for every other exchange, so you query BitMEX, Binance and Bybit identically without maintaining separate integrations.

TypeCrypto derivatives exchange (perpetuals + futures)
HQSeychelles (HDR Global Trading Ltd.)
OwnerHDR Global Trading Limited
Asset classesPerpetual swaps, Crypto futures, Leveraged derivatives, Crypto spot
CoverageXBTUSD, ETHUSD and 100+ derivatives contracts
ScalePioneer crypto derivatives venue; top-tier by perpetual swap volume
API accessOfficial API
Parse priority★★★★☆
Official sitewww.bitmex.com

Platform Overview

Market Position

  • One of the original crypto derivatives venues, credited with inventing the perpetual swap contract
  • 100+ derivatives instruments centered on XBTUSD and ETHUSD perpetuals plus dated futures
  • High-leverage products and deep derivatives liquidity make it a reference venue for funding and open-interest data
  • Official public REST + WebSocket API, complemented by StockAPIS’s unified normalization

Data Coverage

StockAPIS exposes the full BitMEX derivatives surface:

  • Market data — real-time last price, bid/ask, 24h high/low, price change and tick direction
  • Order book — live depth snapshots (orderBookL2) with configurable depth
  • Trades — recent executions with price, size and timestamp
  • OHLCV / klines — candlestick bins (1m → 1d) for historical and technical analysis
  • Perpetual & funding — funding rate, funding timestamp and predicted funding
  • Open interest — open interest, open value and total turnover per contract

Quick Start

import stockapis client = stockapis.Client(api_key="your-api-key") # Real-time ticker for a BitMEX perpetual btc = client.bitmex.get_market_data(symbol="XBTUSD") print(f"Bitcoin perp: ${btc['lastPrice']} · funding {btc['fundingRate']}")
const { StockAPIS } = require("stockapis"); const client = new StockAPIS({ apiKey: "your-api-key" }); // Live order book (top 100 levels) for the XBTUSD perpetual const book = await client.bitmex.getOrderBook({ symbol: "XBTUSD", depth: 100 }); console.log(book.bids[0], book.asks[0]);

Sample API Response

{ "success": true, "data": { "symbol": "XBTUSD", "lastPrice": 45000.0, "lastTickDirection": "PlusTick", "bidPrice": 44999.5, "askPrice": 45000.5, "prevPrice24h": 42625.0, "priceChangePercent24h": 5.56, "highPrice24h": 45500.0, "lowPrice24h": 44500.0, "volume24h": 25000.5, "turnover24h": 1125000000000.0, "openInterest": 5000000000.0, "openValue": 225000000000.0, "fundingRate": 0.0001, "fundingTimestamp": "2024-01-15T12:00:00.000Z" }, "metadata": { "source": "bitmex", "timestamp": "2024-01-15T10:30:00.000Z" } }

Use Cases

  • Derivatives trading bots — low-latency perpetual price and order-book feeds for market-making and arbitrage
  • Funding-rate strategies — track funding and open interest to run basis and carry trades
  • Quant research — historical klines and trade history for backtesting leveraged strategies
  • Cross-exchange arbitrage — compare BitMEX perpetuals against other venues on one normalized schema

Frequently Asked Questions

Does BitMEX have an official API? Yes — BitMEX provides a public REST and WebSocket API covering market data, order books and funding. StockAPIS wraps it in a unified schema so BitMEX data matches every other source you pull.

What data can I get from BitMEX through StockAPIS? Perpetual and futures prices, full order books, recent trades, OHLCV candles, funding rates, open interest and turnover across XBTUSD, ETHUSD and 100+ contracts.

Can I stream BitMEX data in real time? Yes — StockAPIS supports real-time streaming for trades, order-book depth and tickers via WebSocket, normalized to the same schema as every other exchange.

Last updated on