From 5aaf7cfd383e6dd10bc18ef35dd264ad381e8351 Mon Sep 17 00:00:00 2001 From: BZ-CO <30245815+BZ-CO@users.noreply.github.com> Date: Thu, 22 Sep 2022 23:26:49 +0300 Subject: [PATCH] fix Binance OnGetTickersAsync Fix for #785 --- .../API/Exchanges/BinanceGroup/BinanceGroupCommon.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs index 8d7ea26d..d0fc3ea8 100644 --- a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs +++ b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs @@ -241,8 +241,15 @@ protected override async Task>> JToken obj = await MakeJsonRequestAsync("/ticker/24hr", BaseUrlApi); foreach (JToken child in obj) { - string marketSymbol = child["symbol"].ToStringInvariant(); - tickers.Add(new KeyValuePair(marketSymbol, await ParseTickerAsync(marketSymbol, child))); + var marketSymbol = child["symbol"].ToStringInvariant(); + try + { + tickers.Add(new KeyValuePair(marketSymbol, await ParseTickerAsync(marketSymbol, child))); + } + catch + { + // ignored + } } return tickers; }