BitMEX WebSocket API

Stream BitMEX derivatives data (orderBookL2, quote, trade, funding) and authenticated account/order/position channels from a typed Delphi component.

TsgcWSAPI_Bitmex

BitMEX derivatives WebSocket API client — full Level 2 order book, trade tape, quote stream and HMAC-signed private channels.

컴포넌트 클래스

TsgcWSAPI_Bitmex

프로토콜

BitMEX WebSocket API

플랫폼

Windows, macOS, Linux, iOS, Android

에디션

Standard / Professional / Enterprise

Drop the component, set keys, subscribe

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.

Public market data

SubscribeQuote, SubscribeTrade, SubscribeOrderBookL2, SubscribeOrderBook10, SubscribeInstrument, SubscribeFunding, SubscribeLiquidation cover the full BitMEX market surface.

Level 2 book delta

OrderBookL2 publishes the partial snapshot then per-row insert / update / delete deltas. Apply each delta to maintain a synchronised local book.

Authenticated channels

Set Bitmex.ApiKey and Bitmex.ApiSecret then subscribe to position, execution, order, margin, wallet — the component signs each request with HMAC-SHA256.

TestNet support

Toggle Bitmex.TestNet to switch the WebSocket endpoint to testnet.bitmex.com for sandbox testing.

Per-symbol routing

Each channel:symbol pair routes through its own event so a single component can multiplex hundreds of subscribed contracts on one connection.

Heartbeat & reconnection

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) 라이브러리의 모든 컴포넌트를 다루는 종합 설명서.

Ready to Trade on BitMEX?

Download the free trial and stream BitMEX derivatives data into your Delphi applications.