Esempio n. 1
0
        private Subscription CreateSubscription()
        {
            var subscription = new Subscription();

            subscription.AddTopic("order");
            subscription.AddTopic("margin");
            subscription.AddTopic("position");
            subscription.AddTopic("execution");
            var symbols = Symbols.Select(s => s.ToString());

            foreach (var symbol in symbols)
            {
                subscription.AddTopic("trade", symbol);
                subscription.AddTopic("orderBookL2", symbol);
                foreach (var bin in TradeBins.Select(t => t.ToLabel()))
                {
                    subscription.AddTopic(bin, symbol);
                }
            }
            var indices = Indices.Select(i => i.ToIndexString());

            foreach (var index in indices)
            {
                subscription.AddTopic("tradeBin5m", index);
            }
            return(subscription);
        }