AllXBTUSD929.10-5.00%XBTH17928.11-3.14%XBTM17928.87-3.55%ETHJ170.05225+3.55%XBCH176372.4-3.44%XBCM176360.0-2.34%DASHJ170.105100-0.11%XMRJ170.021810-0.91%XBJH17104184-4.08%XBJM17103043-5.83%ETC7D0.002571+1.18%XRP7D0.00001010-2.60%FCT7D0.003973+6.94%LTC7D0.00438+1.86%ZECH170.069999-0.57%ZECM170.074000-1.33%REP7D0.008937-5.49%.BXBT932.18-4.61%.XBT931.75-4.59%.XBTCNY6441.00-3.86%.XBTJPY103429.00-4.63%.ETHXBT0.05205+5.15%.ZECXBT0.0680000-0.57%.BVOL24H6.22+32.62%Funding: @ -0.1005%Time:

Reference Connectors

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

Using the BitMEX REST API

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)