It looks like you're new here. If you want to get involved, click one of these buttons!
private static void initTicker()
{
ticker = new Ticker(MyAPIKey, MyAccessToken);
ticker.OnTick += OnTick;
ticker.OnReconnect += OnReconnect;
ticker.OnNoReconnect += OnNoReconnect;
ticker.OnError += OnError;
ticker.OnClose += OnClose;
ticker.OnConnect += OnConnect;
ticker.EnableReconnect(Interval: 10, Retries: 15);
ticker.Connect();
ticker.Subscribe(Tokens: Stocks.Values.ToArray());
ticker.SetMode(Tokens: Stocks.Values.ToArray(), Mode: Constants.MODE_FULL);
}
private static void OnTick(Tick tickData)
{
if (tickData.Timestamp.Value.AddSeconds(3) < DateTime.Now)
{
Logger.LogMessage(string.Format("*** Received Late Tick {0}, Time={1}, LTP={2}, Volume={3}, Buy={4}, Sell={5} . Count of late ticks={6}",
symbol, tickData.Timestamp.Value, tickData.LastPrice, tickData.Volume, tickData.BuyQuantity, tickData.SellQuantity, ++LateTickCount));
}
}