Binance | WebSocket チャンネルのサブスクライブ

Binance は、マーケットデータ、注文などのリアルタイムアップデートを受け取るために購読できるさまざまなチャンネルを提供しています。 以下にティッカーへの購読方法のサンプルを示します。


oClient := TsgcWebSocketClient.Create(nil);
oBinance := TsgcWSAPI_Binance.Create(nil);
oBinance.Client := oClient;
oBinance.SubscribeTicker('bnbbtc');

procedure OnMessage(Connection: TsgcWSConnection; const aText: string);
begin
// here you will receive the ticker updates
end;