BitMEX WebSocket API
Stream BitMEX derivatives data (orderBookL2, quote, trade, funding) and authenticated account/order/position channels from a typed Delphi component.
Stream BitMEX derivatives data (orderBookL2, quote, trade, funding) and authenticated account/order/position channels from a typed Delphi component.
BitMEX derivatives WebSocket API client — full Level 2 order book, trade tape, quote stream and HMAC-signed private channels.
TsgcWSAPI_Bitmex
Windows, macOS, Linux, iOS, Android
Standard / Professional / Enterprise
Pair the component with a TsgcWebSocketClient, set Bitmex.ApiKey / Bitmex.ApiSecret for signed streams, then subscribe to instrument channels.
uses
sgcWebSocket, sgcWebSocket_API_Bitmex;
var
WSClient: TsgcWebSocketClient;
Bitmex: TsgcWSAPI_Bitmex;
begin
WSClient := TsgcWebSocketClient.Create(nil);
Bitmex := TsgcWSAPI_Bitmex.Create(nil);
Bitmex.Client := WSClient;
Bitmex.Bitmex.ApiKey := 'your-api-key';
Bitmex.Bitmex.ApiSecret := 'your-api-secret';
WSClient.Active := True;
Bitmex.SubscribeQuote('XBTUSD');
Bitmex.SubscribeTrade('XBTUSD');
Bitmex.SubscribeOrderBookL2('XBTUSD');
end;
// uses: sgcWebSocket, sgcWebSocket_API_Bitmex
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_Bitmex *Bitmex = new TsgcWSAPI_Bitmex(this);
Bitmex->Client = WSClient;
WSClient->Active = true;
Bitmex->SubscribeQuote("XBTUSD");
Bitmex->SubscribeTrade("XBTUSD");
Bitmex->SubscribeOrderBookL2("XBTUSD");
Level 2 book snapshots and deltas, trade tape, quote stream, instrument metadata, plus authenticated execution and margin channels.
SubscribeQuote, SubscribeTrade, SubscribeOrderBookL2, SubscribeOrderBook10, SubscribeInstrument, SubscribeFunding, SubscribeLiquidation cover the full BitMEX market surface.
OrderBookL2 publishes the partial snapshot then per-row insert / update / delete deltas. Apply each delta to maintain a synchronised local book.
Set Bitmex.ApiKey and Bitmex.ApiSecret then subscribe to position, execution, order, margin, wallet — the component signs each request with HMAC-SHA256.
Toggle Bitmex.TestNet to switch the WebSocket endpoint to testnet.bitmex.com for sandbox testing.
Each channel:symbol pair routes through its own event so a single component can multiplex hundreds of subscribed contracts on one connection.
Bind to the underlying TsgcWebSocketClient for HeartBeat (ping/pong every 5s) and WatchDog auto-reconnect with state restoration.
Authoritative sources for the APIs this component implements.
컴포넌트 참조 문서로 바로 이동하고, 바로 실행 가능한 데모 프로젝트를 받고, 체험판을 다운로드해 보세요.
| 온라인 도움말 — API_Bitmex 이 컴포넌트의 전체 속성, 메서드, 이벤트 참조 문서. | 열기 | |
| 데모 프로젝트 — Demos\05.Crypto\06.Bitmex 바로 실행 가능한 예제 프로젝트예요. sgcWebSockets 패키지에 포함되어 있어요 — 아래에서 체험판을 다운로드하세요. | 열기 | |
| 기술 문서 (PDF) 기능, 빠른 시작, Delphi 및 C++ Builder 코드 샘플 및 1차 출처 참고 — 이 컴포넌트 전용. | 열기 | |
| 사용자 설명서 (PDF) 라이브러리의 모든 컴포넌트를 다루는 종합 설명서. | 열기 |