AllXBTUSD2322.1+10.47%XBTM172419.4+11.12%ETHM170.07893+5.68%XBJM17299000+7.67%XRPM170.00013992+1.86%LTCM170.01422+13.22%XMRM170.023601+21.30%ETC7D0.005200+24.16%ZECM170.112000+16.65%DASHM170.071574+15.45%GNOM170.098414+4.70%REP7D0.013250+47.22%FCTM170.006555+11.38%XBCM1715500.0+0.03%B_SEGWITZ1740.00-20.00%B_BLOCKSZ1740.00+0.00%.BXBT2308.19+9.85%.XBTCNY15638.87+5.96%.XBTJPY296873.49+7.89%.ETHXBT0.07400+1.65%.ZECXBT0.1126980+17.69%.BVOL24H4.35-37.23%Funding: @ -0.0249%Time:

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.


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

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


Note that all Bitcoin quantities are returned in Satoshis: 1 XBt (Satoshi) = 0.00000001 XBT (Bitcoin).


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:

Rate Limits

Requests to our REST API are rate limited to 300 requests per 5 minutes. This counter is reset every 5 minutes.

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 may be banned for an hour. Multiple bans in a short time will result in a week ban.

Viewing Your Rate Limit

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

"x-ratelimit-limit": 300
"x-ratelimit-remaining": 297
"x-ratelimit-reset": 1489791662

Use these headers to determine your current limit and remaining requests. At the UNIX timestamp designated by x-ratelimit-reset, your remaining requests will reset back to its previous max.

Increasing Your Rate Limit

If you are running up against our limits and believe that you have a legitimate need, please email us at 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 order, bulk amend, and bulk cancel features to reduce load on the system.
    • Due to how BitMEX does real-time auditing, risk checks, and margining, orders submitted, amended, and canceled in bulk are faster to execute. For this reason, bulk actions are ratelimited at 1/10 the normal rate!
    • Bulk cancels, regardless of count, always only count as one request.

When emailing us about a ratelimit 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.

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.

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)