Exemplo n.º 1
0
        /// <inheritdoc />
        public void Ingest(QuoteTick tick)
        {
            var keyBidPrices = KeyProvider.GetPricesKey(tick.Symbol, PriceType.Bid);
            var keyAskPrices = KeyProvider.GetPricesKey(tick.Symbol, PriceType.Ask);
            var keyBidSizes  = KeyProvider.GetSizesKey(tick.Symbol, PriceType.Bid);
            var keyAskSizes  = KeyProvider.GetSizesKey(tick.Symbol, PriceType.Ask);

            this.CheckPricesTimeSeries(keyBidPrices, tick.Symbol, PriceType.Bid);
            this.CheckPricesTimeSeries(keyAskPrices, tick.Symbol, PriceType.Ask);
            this.CheckSizesTimeSeries(keyBidSizes, tick.Symbol, PriceType.Bid);
            this.CheckSizesTimeSeries(keyAskSizes, tick.Symbol, PriceType.Ask);

            var timestamp = new TimeStamp(tick.Timestamp.ToInstant().ToUnixTimeMilliseconds());

            IReadOnlyCollection <(string, TimeStamp, double)> input = new (string, TimeStamp, double)[]