KuCoin WebSocket API
Stream KuCoin spot market data (ticker, snapshot, level2, level3, match, candles) and private balance / order channels with the token-bootstrap handshake.
Stream KuCoin spot market data (ticker, snapshot, level2, level3, match, candles) and private balance / order channels with the token-bootstrap handshake.
KuCoin spot WebSocket client — ticker, snapshot, level2, level3, match, candles plus signed private balance / order channels.
TsgcWSAPI_Kucoin
Windows, macOS, Linux, iOS, Android
Standard / Professional / Enterprise
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");
Token-bootstrap handshake, spot market streams, level2/level3 incremental updates, private balance and order channels.
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.
SubscribeTicker, SubscribeSnapshot, SubscribeLevel2, SubscribeLevel3, SubscribeMatch, SubscribeCandles cover every spot public channel.
Authenticated streams (balance, orderChange, tradeOrder) open after the private connect-token flow — signed with ApiKey, ApiSecret and ApiPassPhrase.
Incremental updates over the L2/L3 channels let you reconstruct the full book locally — the component exposes both snapshot and delta events separately.
KuCoin uses application-layer ping/pong; the component answers automatically and tracks the interval the gateway negotiates at connect time.
TsgcWSAPI_Kucoin_Futures targets the futures contract gateway with the same patterns — one component class per product family.
Authoritative sources for the APIs this component implements.
컴포넌트 참조 문서로 바로 이동하고, 바로 실행 가능한 데모 프로젝트를 받고, 체험판을 다운로드해 보세요.
| 온라인 도움말 — API_Kucoin 이 컴포넌트의 전체 속성, 메서드, 이벤트 참조 문서. | 열기 | |
| 데모 프로젝트 — Demos\05.Crypto\11.Kucoin 바로 실행 가능한 예제 프로젝트예요. sgcWebSockets 패키지에 포함되어 있어요 — 아래에서 체험판을 다운로드하세요. | 열기 | |
| 기술 문서 (PDF) 기능, 빠른 시작, Delphi 및 C++ Builder 코드 샘플 및 1차 출처 참고 — 이 컴포넌트 전용. | 열기 | |
| 사용자 설명서 (PDF) 라이브러리의 모든 컴포넌트를 다루는 종합 설명서. | 열기 |