diff --git a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs index 605e4078..cae9a891 100644 --- a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs +++ b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs @@ -661,6 +661,7 @@ private static void ParseFees(JToken feesToken, ExchangeOrderResult result) bool currencySet = false; foreach (var trade in tradesInOrder) { + result.Fees ??= 0; result.Fees += trade["commission"].ConvertInvariant(); // TODO: Not sure how to handle commissions in different currencies, for example if you run out of BNB mid-trade @@ -1016,6 +1017,7 @@ private static void ParseAveragePriceAndFeesFromFills(ExchangeOrderResult result currencySet = true; } + result.Fees ??= 0; result.Fees += fill["commission"].ConvertInvariant(); decimal price = fill["price"].ConvertInvariant();