BitMEX Market Making with WebSockets and Reusable Limit Orders
Summary
This article describes an API workflow for market making on BitMEX perpetual contracts. It recommends using WebSockets for market updates and REST requests for account information, while noting that order book and account streams can be incomplete or delayed during busy markets. It also explains the platform's request limits and suggests reducing API calls by submitting bulk orders and modifying existing orders instead of repeatedly placing and canceling them.
The example maintains distant resting orders as reserves, then reprices and resizes them when needed. It treats failed amendments as possible signs that an order has already filled and refreshes positions through REST when WebSocket updates are unreliable. Error handling covers overload, invalid order status, rate limits, and account restrictions. The article offers implementation guidance rather than a tested strategy: its author says the code may be imperfect and requires adaptation. It gives no backtest or profitability evidence, and exchange latency, stream delays, and execution risk remain material limitations.
Key ideas
- The article recommends WebSockets for market data and REST calls for account state when streaming updates are unreliable.
- Bulk order submission and order amendment can reduce API request usage.
- Pre-positioned limit orders can be amended into active quotes as market prices change.
- Amendment errors may signal a completed order, but position state may need REST confirmation.
- The example is platform-specific implementation guidance and is not evidence of trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.