From b528b78c85b65d25c91ea36bfdeb811b65acbbf9 Mon Sep 17 00:00:00 2001 From: JKorf Date: Sun, 29 Sep 2024 12:42:40 +0200 Subject: [PATCH] Limit shared GetBalance result to Exchange balances to prevent duplicate asset balances --- Bitfinex.Net/Clients/SpotApi/BitfinexRestClientSpotApiShared.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bitfinex.Net/Clients/SpotApi/BitfinexRestClientSpotApiShared.cs b/Bitfinex.Net/Clients/SpotApi/BitfinexRestClientSpotApiShared.cs index 965fd4f..5350d2a 100644 --- a/Bitfinex.Net/Clients/SpotApi/BitfinexRestClientSpotApiShared.cs +++ b/Bitfinex.Net/Clients/SpotApi/BitfinexRestClientSpotApiShared.cs @@ -283,7 +283,7 @@ async Task>> IBalanceRestClient.Get if (!result) return result.AsExchangeResult>(Exchange, null, default); - return result.AsExchangeResult>(Exchange, SupportedTradingModes, result.Data.Select(x => new SharedBalance(x.Asset, x.Available ?? 0, x.Total)).ToArray()); + return result.AsExchangeResult>(Exchange, SupportedTradingModes, result.Data.Where(x => x.Type == WalletType.Exchange).Select(x => new SharedBalance(x.Asset, x.Available ?? 0, x.Total)).ToArray()); } #endregion