public override async Task Execute()
        {
            var          now         = _system.UtcNow;
            const string assetPairId = "LKKUSD";
            var          avg         = await GetAvg(assetPairId, CandlePriceType.Mid, now);

            if (avg == null)
            {
                return;
            }

            await _marketMakerService.ProcessNewAvgSpotRate(assetPairId, avg.Value, avg.Value);

            Trace.Write(TraceLevelGroupEnum.Trace, assetPairId, $"Avg spot quotes sent: {avg}",
                        new { avg.Value, Event = "AvgSpotRatesSent" });
        }
Beispiel #2
0
        public override async Task Execute()
        {
            var pairs = _assetPairSourceTypeService.GetPairsByQuotesSourceType(
                AssetPairQuotesSourceTypeDomainEnum.SpotAgvPrices);

            foreach (var assetPairId in pairs)
            {
                var now = _system.UtcNow;
                var avg = await GetAvg(assetPairId, CandlePriceType.Mid, now);

                if (avg == null)
                {
                    continue;
                }

                await _marketMakerService.ProcessNewAvgSpotRate(assetPairId, avg.Value, avg.Value);

                Trace.Write(TraceLevelGroupEnum.Trace, assetPairId, $"Avg spot quotes sent: {avg}",
                            new { avg.Value, Event = "AvgSpotRatesSent" });
            }
        }