For AI agents: visit https://docs-en.itigerup.com/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
IApiComposeCallback extends ISubscribeApiCallback; an implementation must provide every signature below. Quote, account, and subscription callbacks receive the model declared in their signature; connection and heartbeat callbacks receive primitive parameters or no parameters.
using TigerOpenAPI.Push;
using TigerOpenAPI.Push.Model;
using TigerOpenAPI.Quote.Pb;
sealed class PushCallback : IApiComposeCallback
{
public void OrderStatusChange(OrderStatusData data) { }
public void OrderTransactionChange(OrderTransactionData data) { }
public void PositionChange(PositionData data) { }
public void AssetChange(AssetData data) { }
public void TradeTickChange(TradeTick data) { }
public void FullTickChange(TickData data) { }
public void QuoteChange(QuoteBasicData data) { }
public void QuoteAskBidChange(QuoteBBOData data) { }
public void OptionChange(QuoteBasicData data) { }
public void OptionAskBidChange(QuoteBBOData data) { }
public void FutureChange(QuoteBasicData data) { }
public void FutureAskBidChange(QuoteBBOData data) { }
public void DepthQuoteChange(QuoteDepthData data) { }
public void KlineChange(KlineData data) { }
public void StockTopPush(StockTopData data) { }
public void OptionTopPush(OptionTopData data) { }
public void SubscribeEnd(int id, string subject, string result) { }
public void CancelSubscribeEnd(int id, string subject, string result) { }
public void GetSubscribedSymbolEnd(SubscribedSymbol subscribedSymbol) { }
public void Error(string errorMsg) { }
public void Error(int id, int errorCode, string errorMsg) { }
public void ConnectionClosed() { }
public void ConnectionKickout(int errorCode, string errorMsg) { }
public void ConnectionAck() { }
public void ConnectionAck(int serverSendInterval, int serverReceiveInterval) { }
public void HearBeat(string heartBeatContent) { }
public void ServerHeartBeatTimeOut(string channelId) { }
}
Quote/option/future basic and BBO updates use separate callbacks. With UseFullTick=true, ticks go to FullTickChange(TickData); otherwise they go to TradeTickChange(TradeTick). Avoid blocking the callback thread.
Each callback receives the concrete data object shown in its signature; there is no common outer object. A subscribe or cancel command's uint return value correlates with the id in SubscribeEnd or CancelSubscribeEnd. Their result value is JSON; read its code field and require code == 0 for business success. GetSubscribedSymbolEnd receives only SubscribedSymbol and has no request ID, so the value returned by GetSubscribedSymbols() cannot be correlated with that callback.
Callback Payload Fields
The tables below list the available callback-object fields. For a field marked “Optional,” first check the corresponding Has... property; other value-type fields use their CLR default when absent.
Connection and Heartbeat Callbacks
Callback
Parameter
Type
Description
ConnectionClosed()
None
-
The connection closed; no payload
ConnectionKickout(int errorCode, string errorMsg)
errorCode / errorMsg
int / string
Error code and message when a new connection for the same Tiger ID replaces this connection
ConnectionAck()
None
-
Connection acknowledgement received; no payload
ConnectionAck(int serverSendInterval, int serverReceiveInterval)
serverSendInterval / serverReceiveInterval
int / int
Send and receive intervals the SDK uses to configure connection heartbeats, both in milliseconds
HearBeat(string heartBeatContent)
heartBeatContent
string
Server heartbeat content
ServerHeartBeatTimeOut(string channelId)
channelId
string
Identifier of the connection whose heartbeat timed out