Real-Time Push

PushClient is a process-wide singleton. A Tiger ID can have only one active connection; a newer connection reports ConnectionKickout to the old one. Configure TigerConfig and a complete IApiComposeCallback before connecting.

PushClient client = PushClient.GetInstance()
    .Config(config)
    .ApiComposeCallback(new PushCallback());
if (!await client.ConnectAsync())
    throw new InvalidOperationException("push connection failed");
uint requestId = client.SubscribeQuote(new HashSet<string> { "AAPL" });

The connection timeout constant is 5000 ms and retry interval is 2000 ms. Call Disconnect() on shutdown. Quote and account streams require their respective entitlements. Confirmation arrives asynchronously in SubscribeEnd; request ID 0 means the client was disconnected when called.


Did this page help you?