If you are building automated tools, please subscribe to the BitMEX API RSS Feed for changes. The feed will be updated regularly and is the most reliable way to get downtime and update announcements.
Wallet: Below columns are removed from REST API GET /user/wallet and WebSocket API wallet topic:
prevDepositedprevWithdrawnprevTransferInprevTransferOutprevAmountprevTimestampdeltaDepositeddeltaWithdrawndeltaTransferIndeltaTransferOutdeltaAmountMargin: Below columns are removed from REST API GET /user/margin and WebSocket API margin topic:
prevStateactionpendingCredit (use wallet)pendingDebit (use wallet)confirmedDebit (use wallet)prevUnrealisedPnltaxableMarginsessionMarginvarMarginindicativeTaxunrealisedProfitsyntheticMarginmarginBalancePcntexcessMarginPcntPosition: Below columns are removed from REST API GET /position and WebSocket API position topic:
prevClosePriceopeningTimestampopeningCostopeningCommexecBuyQtyexecBuyCostexecSellQtyexecSellCostexecQtyexecCostexecCommcurrentTimestampgrossOpenCostgrossExecCostposCost2posInitposAllowancetaxableMarginsessionMargintargetExcessMarginvarMarginrealisedGrossPnlrealisedTaxunrealisedGrossPnllongBankruptshortBankrupttaxBaseindicativeTaxRateindicativeTaxunrealisedTaxsimpleQtysimpleCostsimpleValuesimplePnlsimplePnlPcntlastPrice (use instrument)lastValue (use instrument)Order: Below columns are removed from REST API GET /order and WebSocket API order topic:
simpleOrderQtyexDestinationsimpleLeavesQtysimpleCumQtymultiLegReportingTypeExecution: Below columns are removed from REST API GET /position, GET /execution/tradeHistory and WebSocket API execution topic:
underlyingLastPxlastMktsimpleOrderQtyexDestinationsimpleLeavesQtysimpleCumQtymultiLegReportingTypeInstrument: Below columns are removed from REST API GET /instrument and WebSocket API instrument topic:
inverseLegsellLegbuyLegoptionStrikePcntoptionStrikeRoundoptionStrikePriceoptionMultipliercappedinsuranceFeeopeningTimestampclosingTimestampsessionIntervalbankruptLimitDownPricebankruptLimitUpPriceprevTotalVolumeindicativeTaxRateoptionUnderlyingPriceAccount: Below columns are removed from WebSocket account topic:
makerFeeDiscounttakerFeeDiscountinsuranceFeeDiscounttimeoutTimestampWebSocket:
clOrdLinkID. Send a contingencyType of
OneCancelsTheOther on the orders. The first order that fully or partially executes (or activates
for Stop orders) will cancel all other orders with the same clOrdLinkID.contingencyType of OneTriggersTheOther on the primary order and
then subsequent orders with the same clOrdLinkID will be not be triggered until the primary order fully executes.GET /user/wallet and WebSocket API wallet topic:
prevDepositedprevWithdrawnprevTransferInprevTransferOutprevAmountprevTimestampdeltaDepositeddeltaWithdrawndeltaTransferIndeltaTransferOutdeltaAmountPOST /order/bulk and PUT /order/bulk/user/margin now has additional columns:
makerFeeDiscounttakerFeeDiscountmargin topic now has the following additional columns. They will be removed from the account topic at a later date.
makerFeeDiscounttakerFeeDiscountcurrency will be added to the following endpoints. If no currency is passed, by default XBt will be assumed.
GET /user/depositAddressGET /user/marginPOST /user/requestWithdrawalGET /user/walletGET /user/walletHistoryGET /user/walletSummaryGET /user/affiliateStatuscurrency=all will be supported for the following endpoints. An array will be returned in this case.
GET /user/marginGET /user/walletGET /user/walletHistoryGET /user/walletSummaryGET /user/affiliateStatus/user/tradingVolume endpoint. This new endpoint shows the 30 days USD average trading volume./instrument/compositeIndex now has added column indexMultiplier.
symbol parameters are no longer case-sensitive.
xbtusd), but case-insensitive when timeframes were added (like xbt:quarterly).Impact Notional: This will now increase from 0.1/Initial Margin to 0.2/Initial Margin.Index Price Protection: This will decrease from 25% to 10%./instrument/compositeIndex now has added columns sourcePrice, conversionIndex, conversionIndexPrice, and relation.
state from Open to Closed and back at the start of the hour, as the session rolls, has been removed.
Qfree threshold for the Quote/Value Ratio Trading Rule (QVR)
has been increased from 1000 to 2000.
workingIndicator boolean change) has been removed on new orders.
clOrdIDs will now be rejected.price, stopPx, orderQty, or leavesQty. If these values are unchanged,
a 400 (Bad Request) will be returned rather than a 200 (OK).execution partials. execID has been removed as an key and has had its grouped attribute removed.
authKey and authExpires commands will now return an error if the user is already authenticated.order cancel permissions may now use the Dead Man’s Switch (Auto Cancel) endpoint POST /api/v1/order/cancelAllAfter.
Documentation on using this can be found in the wsAPI docs.pegPriceType of LastPeg or MidPricePeg are no longer supported and will be rejected."execInst": "ParticipateDoNotInitiate" now have slightly different response semantics via the websocket feed.
Rather than an insert with "ordStatus": "New" and an update with "ordStatus": "Canceled" to follow, a single insert with "ordStatus": "Canceled" is now generated.750 to 1000 on GET /api/v1/trade and GET /api/v1/trade/bucketed.50.partial actions:
partial is now emitted with an empty data array to not break expected data patterns on the websocket.500 to 750.filter field has been added to 'partial' actions. See https://www.bitmex.com/app/wsAPI#Response-Format for more info.typ field has been added to GET /api/v1/user.
Trader and MarketMaker. More may be added in the future.api-expires support has been added for authenticating to the websocket. Send the api-expires header instead of api-nonce.
apiKeyExpires, which accepts [key, expires, signature].filter on "partial" actions has been removed.POST /position/leveragePOST /position/isolatePOST /position/transferPOST /position/riskLimitOrder Cancel and the
CloseexecInst remain exempt from shedding.
GET /leaderboard/name. This returns your anonymized public name for comparison
against the board.isMe has been removed from GET /leaderboard.When placing a new order that causes these caps to be exceeded, it will be rejected with the message “Too many [open|stop|contingent] orders”.
429 on connection if you exceed this limit.cancelAllAfter calls, even when initiated through the WebSocket, consume 1 token from your ratelimiter./user/affiliateStatus has a new field, referrerAccount. This may be useful for
services executing trades on behalf of users, to ensure the user was referred by that service.For over a year now, we have deprecated and throttled the /orderBook REST endpoint and ‘orderBook’ and ‘orderBook25’ WebSocket subscriptions. In its place, we have the /orderBookL2 REST endpoint and ‘orderBookL2’ subscription. These rows are keyed by price rather than level which creates much more efficient deltas.
The old orderBook feeds transmit an order of magnitude more data and are less useful. To preserve fast performance on BitMEX, they will be removed completely.
After Friday, October 6 at 12:00 UTC, the following actions will be taken:
If you use these endpoints or subscriptions, please migrate to the corresponding ‘orderBookL2’ types, which are faster and real-time.
permessage-deflate.secret. POST, PUT, and DELETE endpoints are still not accessible with an API Key.This release contains a change to how we process inputs to HTTP endpoints. For the vast majority of consumers, this change will have no effect. As always, please do not rely on undocumented behavior.
filter, symbol, etc) to BitMEX endpoints as headers is no
longer supported and was never documented.
cancelAllAfter operation was erroneously sending dates of the following format:
'Wed, 19 Jul 2017 14:56:58 GMT'
'2017-07-19T14:56:58.971Z'
POST /order/cancelAllAfter endpoint and the similar invocation
through the WebSocket.X-Ratelimit-Reset header, which now indicates the timestamp at which your ratelimiter contains enough tokens
to retry your last request.'orderCancel', has been added. This permission allows cancellation of orders
but not placement. It is meant to be mutually exclusive with the 'order' permission. Use 'orderCancel' when
building risk management applications or fail-safe daemons.401. It now
returns a 403 to indicate that the request was understood and the user was authenticated, but the user is not
authorized for the resource.instrument table will no longer emit up-to-date bidPrice, askPrice, and midPrice, instead
coalescing them on a 5-second timer. markPrice and impact*Price fields remain up to date whenever emitted.
quote subscription.This release contains a change to the format of websocket
partialactions. If your tool ignores unknown fields, no changes are necessary.
partial actions now contain filter field, which echos back the filter you used to create
the subscription. At this time, the filter’s type is {account?: number, symbol?: string}.
data were empty ([]), it was not possible to know which stream it correlated to until all partials
had been emitted.announcement subscription. Useful for hooking
into your own trading dashboard or alerting system. We use these announcements for new feature announcements
and changes.
publicNotifications, which is used for short-term messages that are intended
for users logged into the site. We may unify the two in the future. If we do, we will notify via our
blog and an announcement./instrument/compositeIndex, which shows the constituent parts of composite indices
like .BXBT and .BXBTJPY. See the Explorer
for more information and to try it out.heartbeat option has been removed for API consumers. This is due to an underlying refactor
of how BitMEX handles heartbeats due to increasingly unpredictable browser timings due to power-saving throttling
techniques used on all platforms.heartbeat, please instead set a timer to send a hybi-13 ping frame, or the literal
message ping. The server will respond with a pong frame or pong message, respectively. You can optimize
this by waiting for an interval after receiving the last message./order/closePosition is now deprecated. Please send an execInst of 'Close' to
close a position.
execInst.channelID for any query not specifying an ID.
English[1] and Chinese[2]). More to come.channelID as the last field (e.g. _:_:chat:insert:1).clOrdID on amend. To do so, on your PUT /order, specify a
origClOrdID indicating the old ID, and a clOrdID indicating the new ID.
origClOrdID is specified, the clOrdID is used as a selector. We recommend
you update your existing tools when you can./user/walletSummary endpoint. This new endpoint shows the sum of all deposits, withdrawals,
and realised PNL per contract.insuranceFee, which was a fee structure we had in early 2015.unsubscribe operation.updateRiskLimit endpoint.
id fields from Quote, Trade, and the binned versions of each._format=csv or
_format=xml.execInst of ParticipateDoNotInitiate) that would execute immediately against
the market now return with an ordStatus of Canceled rather than Rejected.GET /orderbook/L2 delivers the orderbook in a new columnar format, price descending. IDs are guaranteed
to be unique between price levels and across symbols.orderBookL2 is the new stream to diff this table. Diffs on orderBookL2 are much more
efficient.orderBook schema was keyed by level. If, for example, a new
best bid or offer was entered, all other levels would need to be updated as their position in the book had changed.
The new orderBookL2 keys on a unique symbol prefix and the price, making diffs much more efficient.orderBookL2.GET /funding. You can retrieve historical funding rates here.Close execInst. This type will cancel all other orders on execution and can
only reduce a position, not increase it. This is very useful for position close orders or Stops.GET /walletHistory now returns fee and marginBalance.GET /margin now supports an optional currency parameter. This will support future BitMEX development.
If set to All, an array of all currencies will be returned. For backcompatibility reasons, the default currency
is XBt. Existing code is not affected.GET /walletHistory now returns transactIDs per row.POST /cancelWithdrawal may now be called with a transactID at any time.fundingBaseSymbol - The base symbol that funding is calculated in. For ETHXBT, this would be .ETHPON24H,
a 24-hour snapshot of the ETH lending market.fundingQuoteSymbol- As above, but for the quote symbol. For ETHXBT, this is XBTPON24H.fundingTimestamp - The timestamp of the next funding event.fundingRate - The calculated funding rate. If positive, longs pay shorts, if negative, shorts pay longs./leaderboard. Accepts a single parameter, method, which can be
"notional" or "ROE". If you are authenticated and in the leaderboard, your position will be marked with the
flag isMe.strictTimeout option, default true. If set to false, all access tokens will be created
with the full 24-hour session length, rather than automatically renewing every 10 minutes.username rules a bit. Enjoy 2016-era additions like spaces and brackets!username on signup. It is now set to your email by default. You must now
set a unique username before chatting. This can only be set once.withdrawalCompleted email. This will automatically email users when withdrawals have
at least one block confirmation. This can be disabled via the disableEmails preference as usual.MarketIfTouched, LimitIfTouched to valid order types.id offsets to compensate for deleted rows. The start param will now start on a chat message
with the given id, if it exists. If it does not exist, it will do a simple row offset. Thanks @j8.Rebalance and Funding transactions in default filter.:bitmex: emoji./liquidation. This is similar to /order/liquidation but now has the same
filtering/sorting capabilities as other endpoints.'liquidation'. See liquidations in real-time without REST polling./insurance. By popular demand, you can see the current status of the insurance
fund (leftover funds from liquidations used to offset DPE).'insurance'. See insurance fund updates as they are posted daily./order/liquidation. This endpoint is no longer documented and will be removed in 30 days.This is a big release! We’ve been working hard in 2016 to deliver customers’ most requested features. With this update, BitMEX offers the most flexible, most complete API of any crypto exchange, with more order types, faster execution, and immediate real-time updates.
We’ve added a lot of new order endpoints, attributes, and types. Backwards compatibility was preserved - your existing software will continue to work - but if you choose to adopt the new order types, bulk ordering, and/or amending, your software may be much more resilient.
POST /api/v1/order/bulk.
(docs)
Send an array of orders and they will all be validated and executed at the same time.
If any of the orders fail to validate, none will execute.PUT /api/v1/order.
(docs)
You may now amend an existing order’s price and quantity.PUT /api/v1/order/bulk
(docs). You may now amend multiple orders.
The same behavior as bulk order placement applies.orderQty and symbol.orderQty, stopPx, and symbol.Market only
affects the behavior in thin books. Upon reaching the deepest possible price, if there is quantity left over,
a Market order will cancel the remaining quantity. MarketWithLeftOverAsLimit will keep the remaining
quantity in the books as a Limit.pegPriceType: 'TrailingStopPeg' and a pegOffsetValue: number. The pegOffsetValue is a price offset.
Use a negative pegOffsetValue for sell orders.clOrdLinkID. Send a contingencyType of
OneCancelsTheOther on the orders. The first order that fully or partially executes (or activates
for Stop orders) will cancel all other orders with the same clOrdLinkID.contingencyType of OneTriggersTheOther on the primary order and
then subsequent orders with the same clOrdLinkID will be not be triggered until the primary order fully executes.contingencyType of OneUpdatesTheOtherAbsolute on the orders. Then
as one order has a execution, other orders with the same clOrdLinkID will have their order quantity amended
down by the execution quantity.contingencyType of OneUpdatesTheOtherProportional on the orders. Then
as one order has a execution, other orders with the same clOrdLinkID will have their order quantity reduced proportionally
by the fill percentage.displayQty, where 0 <= displayQty < orderQty. A displayQty of 0 is a fully
hidden order. You may partially hide an order by choosing a non-zero displayQty. When the order is hit,
the non-hidden portion will be refilled, up to the order’s total quantity. Note that hidden orders incur the Taker fee.execInst of
ParticipateDoNotInitiate. This will cancel the order if it would execute against the market, ensuring
your order receives the Maker rebate. To prevent feeling out Hidden Orders, Post-Only Orders will still execute
against Hidden Orders, but you will receive the Maker rebate as Hidden Orders always incur the Taker fee.Day, GoodTillCancel, ImmediateOrCancel, FillOrKill.
Defaults to GoodTillCancel for Limit and StopLimit orders.simpleOrderQty instead of an orderQty to create an order denominated in the
underlying currency. Useful for e.g. opening up a position with 1 XBT of exposure without having to calculate
how many contracts it is.WebSockets: Upon subscribing to a topic, a data image is now immediately pushed to the consumer. This means
consumers no longer need to orchestrate calls to the HTTP API or use pushAccount/pushSymbol.
pushAccount/pushSymbol have been made redundant and are now deprecated. They will be removed
in a later release.Position: New endpoint: POST /api/v1/position/leverage. Accepts a symbol and leverage integer.
This is a very easy way to update a position to isolated(fixed) margining at a given leverage.
For example:
XBT24H position with a gross value of 2 XBT.50.2 XBT / 50 or 0.04 XBT to the position. The other 0.96 XBT in the user’s account
is no longer at risk.1x isolated margin. Because the position value is 2 XBT and the user only
has 1 XBT in the account, this will error and no change will occur.0.02 XBT of value, and only 0.02 XBT remains assigned, for an
effective leverage of 100x.
The user then decides to switch to 10x leverage. The system then assigns 2 XBT / 10 or 0.20 XBT to the
position. The user has 0.78 XBT of unassigned margin left.Internal: Various performance and stability improvements.
<1 sanitized to
and offers a few new styling choices, like lists and blockquotes./user/resendVerificationEmail has been moved to a POST and 404s when unsuccessful or user is
already verified. This prevents one form of user enumeration.id so liquidations can be uniquely identified.int32, int64, float, and double types instead of just number.
reverse option to GET /apiKey.DELETE /order.
GET /order/liquidations.GET /quote.GET /instrument.DELETE /order/all and no orders are open.XBT) now resolves to nearest symbol.price field on POST /order/closePosition. If sent, will execute an IOC Limit order for the opposite
of the position quantity.accountType from old Trader/Hedger model.strictIPCheck. Enable this to have tokens automatically invalidate
if used from a new IP.tradeBin1m added to websocket subjects.</p> tag in password reset email that was causing older email clients to display an incorrect link./position/transferIsolatedMargin. This will make it into the UI soon. Use this endpoint to add/remove
margin from an isolated position.['withdraw', 'order']['order'] which was
previous functionality.POST /user/disableTFA.ioc parameter on POST /order and added timeInForce.InstrumentIntervals returned from GET /instrument/activeIntervals.POST /order/closePosition to close a position with a market order. Atomic, so not stackable.noreferrer, nofollow, external rels to autogenerated chat links.stopPx for stop limit orders.POST /position/isolate to allow isolating position margin.Public change logging started in Jun 2015. Changes before this date have not yet been made public.