From 27594d9771b65ee9808ac062f7015fb9493fdfc5 Mon Sep 17 00:00:00 2001 From: BZ-CO <30245815+BZ-CO@users.noreply.github.com> Date: Fri, 28 Feb 2025 22:57:22 +0200 Subject: [PATCH] Fix MEXC OnGetTickersAsync OnGetTickersAsync throws InvalidDataException when new trading pair is added to the ticker, but it is missing in our ExchangeMarket cache. Same as #785 --- src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs b/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs index cbf81c13..e01b7b0b 100644 --- a/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/MEXC/ExchangeMEXCAPI.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading.Tasks; using ExchangeSharp.Models; @@ -96,6 +97,9 @@ await this.ParseTickerAsync( catch (OverflowException) { } + catch (InvalidDataException) + { + } } return tickers;