Kraken WebSocket API

Subscribe to Kraken v2 public channels (ticker, book, trade, ohlc, spread) and authenticated private channels (openOrders, ownTrades) from a typed Delphi component.

TsgcWSAPI_Kraken

Kraken WebSocket v2 client — ticker, book, trade, ohlc and spread channels plus signed openOrders / ownTrades private streams.

컴포넌트 클래스

TsgcWSAPI_Kraken

프로토콜

Kraken WebSocket v2

플랫폼

Windows, macOS, Linux, iOS, Android

에디션

Standard / Professional / Enterprise

Drop the component, set keys, subscribe

Pair with a TsgcWebSocketClient, fetch a WebSocket token if you need private channels, then subscribe to public or authenticated streams.

uses
  sgcWebSocket, sgcWebSocket_API_Kraken;

var
  WSClient: TsgcWebSocketClient;
  Kraken: TsgcWSAPI_Kraken;
begin
  WSClient := TsgcWebSocketClient.Create(nil);

  Kraken := TsgcWSAPI_Kraken.Create(nil);
  Kraken.Client := WSClient;
  Kraken.Kraken.ApiKey    := 'your-api-key';
  Kraken.Kraken.ApiSecret := 'your-api-secret';

  WSClient.Active := True;

  Kraken.SubscribeTicker(['XBT/USD']);
  Kraken.SubscribeBook(['XBT/USD'], 25);
  Kraken.SubscribeTrade(['XBT/USD']);
end;
// uses: sgcWebSocket, sgcWebSocket_API_Kraken
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_Kraken *Kraken = new TsgcWSAPI_Kraken(this);
Kraken->Client = WSClient;

WSClient->Active = true;
Kraken->SubscribeTicker(OPENARRAY(UnicodeString, ("XBT/USD")));
Kraken->SubscribeBook(OPENARRAY(UnicodeString, ("XBT/USD")), 25);

내부 구성

Per-symbol ticker, book deltas, ohlc, spread and trade streams, plus the signed openOrders / ownTrades channels.

v2 public channels

SubscribeTicker, SubscribeBook, SubscribeTrade, SubscribeOHLC, SubscribeSpread and SubscribeInstrument cover every Kraken WebSocket v2 public channel.

Private channels

SubscribeOpenOrders, SubscribeOwnTrades, SubscribeBalances open authenticated streams — the component obtains the WebSocket token via the signed REST call automatically.

Multi-pair arrays

Every subscribe call accepts an array of symbols so one connection multiplexes any number of pairs.

Order management

The v2 RPC verbs (add_order, cancel_order, cancel_all, edit_order, batch_add, batch_cancel) are exposed as typed methods.

Snapshot then deltas

Book subscriptions deliver an initial snapshot followed by incremental updates — ideal for maintaining a synchronised local order book.

Sequence numbers

Kraken v2 messages carry a sequence_num inside the relevant channels — the component watches for gaps and signals via OnException if resubscription is needed.

사양 및 참조 문서

Authoritative sources for the APIs this component implements.

문서 및 데모

컴포넌트 참조 문서로 바로 이동하고, 바로 실행 가능한 데모 프로젝트를 받고, 체험판을 다운로드해 보세요.

온라인 도움말 — API_Kraken 이 컴포넌트의 전체 속성, 메서드, 이벤트 참조 문서.
데모 프로젝트 — Demos\05.Crypto\08.Kraken 바로 실행 가능한 예제 프로젝트예요. sgcWebSockets 패키지에 포함되어 있어요 — 아래에서 체험판을 다운로드하세요.
기술 문서 (PDF) 기능, 빠른 시작, Delphi 및 C++ Builder 코드 샘플 및 1차 출처 참고 — 이 컴포넌트 전용.
사용자 설명서 (PDF) 라이브러리의 모든 컴포넌트를 다루는 종합 설명서.

Ready to Trade on Kraken?

Download the free trial and stream Kraken market data and account events from Delphi.