From dcd4bb2e8848e9eb295f26a90befe449ff461a02 Mon Sep 17 00:00:00 2001 From: Vlad Dumitru <61616221+v36u@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:31:47 +0300 Subject: [PATCH] Use NOTIONAL or MIN_NOTIONAL (#834) --- .../Exchanges/BinanceGroup/BinanceGroupCommon.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs index eba28d9a..79b5f4d7 100644 --- a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs +++ b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs @@ -270,13 +270,18 @@ protected internal override async Task< market.PriceStepSize = priceFilter["tickSize"].ConvertInvariant(); } - // MIN_NOTIONAL - JToken? minNotionalFilter = filters?.FirstOrDefault( + // NOTIONAL or MIN_NOTIONAL + JToken? notionalFilter = + filters?.FirstOrDefault( + x => string.Equals(x["filterType"].ToStringUpperInvariant(), "NOTIONAL") + ) + ?? + filters?.FirstOrDefault( x => string.Equals(x["filterType"].ToStringUpperInvariant(), "MIN_NOTIONAL") - ); - if (minNotionalFilter != null) + ); + if (notionalFilter != null) { - market.MinTradeSizeInQuoteCurrency = minNotionalFilter[ + market.MinTradeSizeInQuoteCurrency = notionalFilter[ "minNotional" ].ConvertInvariant(); }