@page "/SpotClient" @using CryptoExchange.Net.SharedApis @inject IEnumerable restClients

ETH-BTC prices:

@foreach(var price in _prices.OrderBy(p => p.Key)) {
@price.Key: @price.Value
} @code{ private Dictionary _prices = new Dictionary(); protected override async Task OnInitializedAsync() { var symbol = new SharedSymbol(TradingMode.Spot, "ETH", "BTC"); var tasks = restClients.Select(x => x.GetSpotTickerAsync(new GetTickerRequest(symbol))); await Task.WhenAll(tasks); foreach (var ticker in tasks.Select(x => x.Result)) { if (ticker.Success) _prices.Add(ticker.Exchange, ticker.Data.LastPrice); } } }