KuCoin WebSocket API

Stream KuCoin spot market data (ticker, snapshot, level2, level3, match, candles) and private balance / order channels with the token-bootstrap handshake.

TsgcWSAPI_Kucoin

KuCoin spot WebSocket client — ticker, snapshot, level2, level3, match, candles plus signed private balance / order channels.

Klasa komponentu

TsgcWSAPI_Kucoin

Platformy

Windows, macOS, Linux, iOS, Android

Edycja

Standard / Professional / Enterprise

Upuść komponent, ustaw klucze, subskrybuj

Set Kucoin.ApiKey / Kucoin.ApiSecret / Kucoin.ApiPassPhrase, pair with a TsgcWebSocketClient, and let the component perform the public/private token bootstrap.

uses
  sgcWebSocket, sgcWebSocket_API_Kucoin;

var
  WSClient: TsgcWebSocketClient;
  KuCoin: TsgcWSAPI_Kucoin;
begin
  WSClient := TsgcWebSocketClient.Create(nil);

  KuCoin := TsgcWSAPI_Kucoin.Create(nil);
  KuCoin.Client := WSClient;
  KuCoin.Kucoin.ApiKey         := 'your-api-key';
  KuCoin.Kucoin.ApiSecret      := 'your-api-secret';
  KuCoin.Kucoin.ApiPassPhrase  := 'your-pass-phrase';

  WSClient.Active := True;

  KuCoin.SubscribeTicker('BTC-USDT');
  KuCoin.SubscribeLevel2('BTC-USDT');
  KuCoin.SubscribeMatch('BTC-USDT');
end;
// uses: sgcWebSocket, sgcWebSocket_API_Kucoin
TsgcWebSocketClient *WSClient = new TsgcWebSocketClient(this);
TsgcWSAPI_Kucoin *KuCoin = new TsgcWSAPI_Kucoin(this);
KuCoin->Client = WSClient;

WSClient->Active = true;
KuCoin->SubscribeTicker("BTC-USDT");
KuCoin->SubscribeLevel2("BTC-USDT");

Co jest w środku

Token-bootstrap handshake, spot market streams, level2/level3 incremental updates, private balance and order channels.

Token-bootstrap handshake

KuCoin requires a one-shot REST call to obtain a connect-token and endpoint before opening the WebSocket. The component performs that step transparently before connecting.

Spot streams

SubscribeTicker, SubscribeSnapshot, SubscribeLevel2, SubscribeLevel3, SubscribeMatch, SubscribeCandles cover every spot public channel.

Private channels

Authenticated streams (balance, orderChange, tradeOrder) open after the private connect-token flow — signed with ApiKey, ApiSecret and ApiPassPhrase.

Level 2 / Level 3 deltas

Incremental updates over the L2/L3 channels let you reconstruct the full book locally — the component exposes both snapshot and delta events separately.

Heartbeats

KuCoin uses application-layer ping/pong; the component answers automatically and tracks the interval the gateway negotiates at connect time.

Futures sibling

TsgcWSAPI_Kucoin_Futures targets the futures contract gateway with the same patterns — one component class per product family.

Specyfikacje i źródła

Autorytatywne źródła API implementowanych przez ten komponent.

Dokumentacja i wersje demo

Deep-link do dokumentacji komponentu, gotowy do uruchomienia projekt demonstracyjny i pobranie wersji próbnej.

Pomoc online — API_Kucoin Pełna dokumentacja właściwości, metod i zdarzeń tego komponentu.
Projekt demonstracyjny — Demos\05.Crypto\11.Kucoin Gotowy do uruchomienia projekt przykładowy. Dostarczany wewnątrz pakietu sgcWebSockets — pobierz wersję próbną poniżej.
Dokument techniczny (PDF) Funkcje, szybki start, przykłady kodu dla Delphi i C++ Builder oraz odniesienia do źródeł pierwotnych — tylko ten komponent.
Podręcznik użytkownika (PDF) Kompleksowy podręcznik obejmujący każdy komponent biblioteki.

Ready to Trade on KuCoin?

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