Пример #1
0
        public ChangeCcyPairPrice PublishInternal(ChangeCcyPairPrice @event)
        {
            Publish(@event);
            Prices.Add(@event);

            return(@event);
        }
Пример #2
0
        public ChangeCcyPairPrice Next()
        {
            var mid    = _rand.NextDouble() * 10;
            var spread = _rand.NextDouble() * 2;

            var topic = CcyPairs[_rand.Next(0, CcyPairs.Count())];

            var price = new ChangeCcyPairPrice(
                ask: mid + spread,
                bid: mid - spread,
                mid: mid,
                spread: spread,
                ccyPairId: topic,
                market: _configuration.Name
                );

            return(price);
        }