Beispiel #1
0
        protected override CurrencyPairUpdatesDto CreateResponseFromStateOfTheWorld(StateOfTheWorldContainer <string, CurrencyPair> container)
        {
            var enabledCurrencyPairs = container.StateOfTheWorld.Values.Where(x => x.IsEnabled);

            return(new CurrencyPairUpdatesDto(enabledCurrencyPairs.Select(x => new CurrencyPairUpdateDto
            {
                CurrencyPair = new CurrencyPairDto(x.Symbol, x.RatePrecision, x.PipsPosition),
                UpdateType = UpdateTypeDto.Added
            })
                                              .ToList(),
                                              true,
                                              container.IsStale));
        }
 protected override TradesDto CreateResponseFromStateOfTheWorld(StateOfTheWorldContainer <long, Trade> container)
 {
     return(new TradesDto(container.StateOfTheWorld.Values.Select(x => x.ToDto()).ToList(), true, container.IsStale));
 }