From 07aa96c809d487852bae04180bd0bb356bd5b355 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 22 Sep 2022 14:26:26 -0600 Subject: [PATCH 1/2] Fix for Binance currencies --- .../API/Exchanges/BinanceGroup/BinanceGroupCommon.cs | 3 ++- .../API/{ => Exchanges}/UPbit/ExchangeUPbitAPI.cs | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename src/ExchangeSharp/API/{ => Exchanges}/UPbit/ExchangeUPbitAPI.cs (100%) diff --git a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs index 8d7ea26d..9ac02e40 100644 --- a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs +++ b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs @@ -101,7 +101,8 @@ public async Task> GetMyTradesAsync(string? mar protected override async Task> OnGetCurrenciesAsync() { - var result = await MakeJsonRequestAsync>("/capital/config/getall", BaseUrlSApi); + Dictionary payload = await GetNoncePayloadAsync(); + var result = await MakeJsonRequestAsync>("/capital/config/getall", BaseUrlSApi, payload); return result.ToDictionary(x => x.AssetCode, x => new ExchangeCurrency { diff --git a/src/ExchangeSharp/API/UPbit/ExchangeUPbitAPI.cs b/src/ExchangeSharp/API/Exchanges/UPbit/ExchangeUPbitAPI.cs similarity index 100% rename from src/ExchangeSharp/API/UPbit/ExchangeUPbitAPI.cs rename to src/ExchangeSharp/API/Exchanges/UPbit/ExchangeUPbitAPI.cs From 63b8fec761b58298583ebb544491dec5f8187efb Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 23 Sep 2022 14:32:27 -0600 Subject: [PATCH 2/2] Null key fix for binance ongetcurrencies --- .../API/Exchanges/BinanceGroup/BinanceGroupCommon.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs index 9ac02e40..4bc3d9aa 100644 --- a/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs +++ b/src/ExchangeSharp/API/Exchanges/BinanceGroup/BinanceGroupCommon.cs @@ -104,7 +104,8 @@ protected override async Task> OnG Dictionary payload = await GetNoncePayloadAsync(); var result = await MakeJsonRequestAsync>("/capital/config/getall", BaseUrlSApi, payload); - return result.ToDictionary(x => x.AssetCode, x => new ExchangeCurrency + return result.Where(x => !string.IsNullOrWhiteSpace(x.AssetCode)) + .ToDictionary(x => x.AssetCode, x => new ExchangeCurrency { Name = x.AssetCode, FullName = x.AssetName,