public async Task <MarketPrices> GetAsync(Network network, IEnumerable <AssetPair> pairs, PricingProviderContext context = null) { var t = GetTask(network, pairs, context); if (t == null) { return(null); } return(await t.ConfigureAwait(false)); }
public async Task <MarketPrices> GetAsync(Dictionary <Network, UniqueList <AssetPair> > pairsByNetwork, PricingProviderContext context = null) { var t = pairsByNetwork.Select(x => GetTask(x.Key, x.Value, context)); var r = await t.WhenAll().ConfigureAwait(false); return(new MarketPrices(r)); }