Bitmex API

Cryptocurrency / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

BitMEX is a derivatives exchange specializing in perpetual swaps and futures contracts for Bitcoin and other cryptocurrencies. Its REST API exposes real-time market data including instrument details, order book depth, and recent trade history with no authentication required for public endpoints. The authenticated trading API supports order management and position tracking for leveraged products.

💡

Beginner Tip

Use the testnet at https://testnet.bitmex.com/api/v1/ to safely experiment with order placement before touching real funds — testnet accounts can be funded with fake Bitcoin. For read-only market data you do not need an API key at all.

Available Data

coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply
stock price and symbol

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

symbol Unique identifier for the instrument, e.g., XBTUSD.
lastPrice Price of the last matched trade.
bidPrice Best bid price currently in the order book.
askPrice Best ask price currently in the order book.
volume24h Number of contracts traded in the last 24 hours.
fundingRate Current funding rate for perpetual swap instruments.

Implementation Example

const url = "https://www.bitmex.com/app/apiOverview";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 Invalid instrument BitMEX instrument symbols have a specific format like XBTUSD or ETHUSD, not BTC.
Call /api/v1/instrument/active first to get a list of all valid live instrument symbols.
429 Rate limit exceeded The API enforces a request limit of 120 per minute for unauthenticated calls.
Track the remaining limit in the X-RateLimit-Remaining response header and throttle before it hits zero.
Response data is an array of arrays for bulk endpoints Some endpoints return columnar format by default to reduce payload size.
Ensure you are using the REST endpoint rather than the WebSocket stream if you need standard JSON objects.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →