Please note BitMEX does not support old browsers.
We recommend upgrading to the latest version of Opera, Firefox, or Chrome.

BitMEX trading is not available in your region

AllXBTUSDT28571.0+0.74%XBTUSD28564.0+0.71%XBTEUR26197.0-0.08%XBTUSDTH2328669.0+0.98%XBTUSDTM2328846.0+0.89%XBTM2328804.5+0.73%XBTH2328592.5+0.73%XBTUSDTU2329488.0+25.34%XBTU2328836.0+0.54%XBTZ2329209.0+1.18%XBTJ2328719.5+0.65%ETHUSDT1801.05-0.22%ETHUSD1803.80-0.22%ETHUSD_ETH1799.75-0.35%ETHUSDH231805.45-0.28%ETHUSDTH231783.05-1.60%ETHH230.06295-1.32%ETHUSDTM231887.85+11.84%ETHM230.06301-1.67%ETHUSDM231955.25-0.24%ETHUSDH23_ETH1769.70+3.26%BMEXUSDT0.431-2.27%BMEXUSD0.429-2.72%ADAUSDT0.3792-1.56%ADAUSD0.3804-1.50%ADAM230.00001350-2.81%ADAH230.00001330-2.92%APEUSDT4.094-0.77%APTUSDT11.240-3.94%APTUSD11.295-3.38%ARBUSDT1.355+8.84%ARBUSD1.360+9.68%ARBUSDTM231.480+10.78%AVAXUSD17.485+1.46%AVAXUSDT17.300+0.95%AXSUSD8.34-2.00%BCHUSDT122.85-0.97%BCHUSD123.20-0.69%BLURUSD0.5200-5.45%BLURUSDT0.5300+0.00%BNBUSD317.42+0.39%BNBUSDT314.00-1.39%CROUSDT0.06900-0.89%CROUSD0.06892-0.12%DOGEUSDT0.07506-0.98%DOGEUSD0.07521-0.91%DOTUSDT6.139-1.98%DOTUSD6.163-0.79%EOSUSD1.1956+4.37%FLRUSDT0.0400-14.89%FLRUSD0.0380-7.32%FLRUSDTH230.0450+0.00%GMTUSDT0.3833-1.87%GMTUSD0.3871-1.22%GMXUSD75.26-3.51%GMXUSDT68.05+0.00%KLAYUSDT0.23593+9.90%KLAYUSD0.23233-0.27%LINKUSD7.354+0.42%LTCUSDT90.18-0.89%LTCUSD90.24-1.18%LUNAUSDT1.2829-1.28%LUNAUSD1.2760-2.54%MATICUSDT1.1113-2.20%NEARUSD1.957-0.76%SOLUSDT20.66-2.18%SOLUSD20.67-2.22%USDTUSDC1.0030+0.00%XRPUSDT0.5452-0.31%XRPUSD0.5429-0.71%XRPM230.00001886-4.51%XRPH230.00001888-3.13%Funding: 06:23:57 @ 0.0100%Time: 1:36:02 PM UTC
BitMEX header logo

Using the BitMEX REST API

For working code and examples, please see our HTTP Connectors on GitHub.

If you are logged in, you may access the API Key Management interface.

For a list of endpoints and return types, view the REST documentation in the API Explorer.

Specification and Clients

The BitMEX API conforms to the Swagger spec for REST endpoints. Any Swagger-compatible client can connect to the BitMEX API and execute commands.

An updated list of available clients is listed here.

Examples of basic communication to our API are in our api-connectors repository.

Note that all Bitcoin quantities are returned in Satoshis: 1 XBt (Satoshi) = 0.00000001 XBT (Bitcoin), all Tether quantities are returned in USDt: 1 USDt = 0.000001 USDT and all Ethereum are returned in gwei: 1 gwei = 0.000000001 ETH.

For other currencies, please refer to our Asset API where the relationship is represented by the scale parameter.


To access private endpoints, a permanent API key is required.

Details about authentication via API Key are available via a separate document.


Request Rate Limits

Requests to our REST API are rate limited by one or more limiters in a layered approach. The limiters implement a Token Bucket mechanism and tokens are continuously refilled.

Currently, there are two limiters in place:

  1. 120 requests per minute on all routes (reduced to 30 when unauthenticated)
  2. 10 requests per second on certain routes (see below)

Please be very careful about the number of errors your tools throw. If a large number of 4xx or 5xx responses are delivered in a short period of time, your IP address may be banned for an hour. Multiple bans in a short time will result in a weeklong ban.

Viewing Your Request Rate Limit

On each request to the API, these headers are returned:

"x-ratelimit-limit": 120
"x-ratelimit-remaining": 118
"x-ratelimit-reset": 1489791662

Use these headers to determine your current limit and remaining requests. At the UNIX timestamp designated by x-ratelimit-reset, you will have enough requests left to retry your current request. If you have not exceeded your limit, this value is always the current timestamp.

If you are limited, you will receive a 429 response and an additional header, retry-after, that indicates the number of seconds you should pause before retrying.

Second Layer Rate Limits

In addition to the first layer of rate limiting, some routes have an additional limiter that limits requests to a rate of 10 requests per second. This limit is shared across the following routes:

  • POST /api/v1/order
  • PUT /api/v1/order
  • DELETE /api/v1/order
  • DELETE /api/v1/order/all
  • POST /api/v1/position/isolate
  • POST /api/v1/position/leverage
  • POST /api/v1/position/transferMargin

On each request to these routes, the x-ratelimit-remaining-1s header will be returned with the first layer rate limit headers.

When exceeding this limit, the value for the x-ratelimit-remaining-1s header will be 0 and you will receive a 429 response along with the retry-after header.

Increasing Your Request Rate Limit

If you are running up against our limits and believe that you have a legitimate need, please Contact Support to discuss upgrading your access limits.

Before increasing your rate limits, we require that your programs at least:

  • Use the WebSocket feeds to avoid polling data.
  • Use our bulk cancel features to reduce load on the system.
    • Bulk cancels, regardless of count, always only count as one request.

When emailing us about a rate limit increase, please include:

  • Your application’s purpose and intended growth
  • Your desired rate limit
  • Acknowledgement that your program is using the API efficiently, as mentioned above.
Rate Limit Reductions

Rate limits may be reduced on individual accounts if an account is involved with malicious behaviour.

Order Count Limits

To keep an orderly market, BitMEX imposes limits on the number of open orders per account. These limits are:

  1. Maximum 200 open orders per symbol per account;
  2. Maximum 10 stop orders per symbol per account;

When placing a new order that causes these caps to be exceeded, it will be rejected with the message “Too many [open|stop] orders”.

Order Minimum Size Limits

We intentionally set the contract sizes of BitMEX products at low values to encourage traders both large and small to trade on BitMEX. However, some traders abuse this and spam the orderbook or trade feed with many small orders.

Accounts with too many open orders with a gross value less than 0.0001 XBT each will be labeled as a Spam Account.

If you are marked as a Spam Account:

  • Orders below 0.0001 XBT in value will automatically become hidden orders.
  • Hidden orders do not show in the orderbook and always pay the taker fee.
  • Post-Only spam orders will be Rejected instead of being hidden.
  • Too many spam orders may be grounds to temporarily ban an account from trading.
  • Spam Account designations are re-evaluated and lifted automatically every 24 hours if user behavior has changed.

WebSocket Limits

WebSocket Limits are documented on the WebSocket API page.


BitMEX monitors the behaviour of accounts on the platform, including those using the API.

Trading Rules

BitMEX enforces certain trading rules on the platform to discourage inefficient or undesirable behaviours. Please view our Trading Rules documentation for more details.


Accounts that consistently make a disproportionate number of order-management API requests per notional of XBT executed place unnecessary load on the system and may be banned. For example, if your account is making thousands of new/amend/cancel order API requests each day, yet not trading at all, your account may be banned.

To help keep your trading activity efficient, you may:

  • Switch off the automated system that is using the API.
  • Increase traded volume, by tightening your quotes or crossing the spread if necessary.
  • Reduce the number of requests made.

HTTP Keep-Alive

BitMEX does not support placing or canceling orders via WebSocket, only via HTTP.

Our servers support HTTP Keep-Alive and cache SSL sessions. If you keep a connection alive, you will get websocket-like latency, obviating the need to use the websocket for transactional communication.

Our Keep-Alive timeout is 90 seconds.


To help improve responsiveness during high-load periods, the BitMEX trading engine will begin load-shedding when requests reach a critical queue depth. When this happens, you will quickly receive a 503 status code with the JSON payload {"error": {"message": "The system is currently overloaded. Please try again later.", "name": "HTTPError"}}. The request will not have reached the engine, and you should retry after at least 500 milliseconds.

Learn more about how this mechanism works by visiting the load shedding reference page. We will keep clients updated as we improve peak capacity on the trading engine.


Many table endpoints take a filter parameter. This is expected to be JSON. For example, the filter query {"side":"Buy"} can be url-encoded and sent to the trade endpoint (click to run).

Most values can only be filtered by simple equality. Timestamps, which are all UTC, can be queried in many ways:

Timestamp Filters

The following fields can be passed in the "filter" param as JSON key/value pairs:

Key Description Example Example Description
"startTime" Start timestamp. "2014-12-26 11:00" On or after 11:00am on 26 December 2014.
"endTime" End timestamp. "2014-12-26 13:00" On or before 1:00pm on 26 December 2014.
"timestamp" Exact timestamp. "2014-12-26 12:00" Exactly noon on 26 December 2014.
"" Exact day. "2014-12-26" The entire day of 26 December 2014.
"timestamp.month" Exact month. "2014-12" The entire month of December 2014.
"timestamp.year" Exact year. 2014 The entire year of 2014.
"" Month of year. 12 December of each year.
"timestamp.dd" Day of month. 26 26th of each month.
"timestamp.ww" Day of week. 6 Friday of each week. 0 = Sat, 1 = Sun
"timestamp.time" Exact time. "12:00:00.000" Exactly noon of each day.
"timestamp.second" Exact second. "12:00:00" The entire second from noon of each day.
"timestamp.minute" Exact minute. "12:00" The entire minute from noon of each day.
"timestamp.hh" Hour of day. 12 12th hour of each day. (i.e. noon)
"timestamp.uu" Minute of hour. 30 30th minute of each hour.
"" Second of minute. 15 15th second of each minute.

For example, the .BVOL7D index is calculated and published on the trade feed every 5 minutes. To filter to just noon on Fridays, send the payload:

{"symbol": ".BVOL7D", "filter": {"timestamp.time":"12:00", "timestamp.ww":6}}

(Click to run)


This section has been relocated.