API Update: Introducing Request Correlation Fields to the Binary WebSocket Trading API

API Update: Introducing Request Correlation Fields to the Binary WebSocket Trading API - hình ảnh nổi bật

At BitMEX, we are committed to continually improving our platform and its infrastructure to support advanced trading capabilities for our users. As part of this ongoing effort, we are announcing an update to our binary WebSocket Trading API.

From 17 June 2026, new fields will be added to the ErrorMessage (template ID 106) and TradeExecution (template ID 105) messages in the binary WebSocket Trading API. The SBE schema version will be bumped from v5 to v6.

Effective Date and Time: 17 June 2026 at 06:00 - 09:00 UTC

What is changing?

Three new fields are being added to the binary WebSocket SBE schema (schema ID 1, version 6):

clOrdID and orderID are being added to ErrorMessage (template ID 106). When the gateway rejects a request, these fields echo back the client order ID and/or server order ID from the originating request, allowing clients to correlate error responses to the orders that caused them.

  1. Example: a client submits a NewClientOrder with clOrdID = "my-order-123" that is rejected. The ErrorMessage response will now include clOrdID = "my-order-123".

  2. requestType is being added to ErrorMessage (template ID 106). This field contains the SBE template ID of the originating request message (e.g. 100 for NewClientOrder, 101 for AmendClientOrder), matching the convention already used on RequestStatus (template ID 110).

  3. tradePool is being added to TradeExecution (template ID 105). This field indicates the pool of the counterparty order on a trade fill.

All three fields use sinceVersion=6 and presence=optional. Clients decoding messages with an older schema version (v5 or earlier) will receive the null sentinel value for these fields and should treat them as absent.

Why are we making this change?

Previously, ErrorMessage contained no reference to the request that caused it. Clients handling high-frequency order flow had no way to correlate a gateway error back to a specific order without maintaining external state. The new clOrdID, orderID, and requestType fields provide this linkage directly in the error response, consistent with how RequestStatus (template ID 110) already echoes clRequestId for subscription responses.

These are additive changes that introduce new fields without removing or modifying any existing fields. Existing integrations will be unaffected.


If you have any questions about these upcoming changes, please contact Support.

To be the first to know about our new listings, product launches, giveaways and more, we invite you to join one of our online communities and connect with other traders. For the absolute latest, follow us on Twitter, join our Telegram channel or read our blog and site announcements.