Kucoin では、マーケットデータや注文などのリアルタイム更新を取得するためにサブスクライブできるさまざまなチャンネルを提供しています。 以下に Ticker のサブスクライブ方法のサンプルを示します:
oClient := TsgcWebSocketClient.Create(nil);
oKucoin := TsgcWSAPI_Kucoin.Create(nil);
oKucoin.Client := oClient;
oKucoin.SubscribeSymbolTicker('BTC-USDT');
procedure OnMessage(Connection: TsgcWSConnection; const aText: string);
begin
// here you will receive the ticker updates
end;