diff --git a/PoloniexApi.Net/TradingTools/Trading.cs b/PoloniexApi.Net/TradingTools/Trading.cs index 793e21f..e33762d 100644 --- a/PoloniexApi.Net/TradingTools/Trading.cs +++ b/PoloniexApi.Net/TradingTools/Trading.cs @@ -23,7 +23,7 @@ private IList GetOpenOrders(CurrencyPair currencyPair) }; var data = PostData>("returnOpenOrders", postData); - return data.Any() ? data.ToList() : new List(); + return data.Any() ? data.Select(x => (IOrder)x).ToList() : new List(); } private IList GetTrades(CurrencyPair currencyPair, DateTime startTime, DateTime endTime) diff --git a/PoloniexApi.Net/WalletTools/Wallet.cs b/PoloniexApi.Net/WalletTools/Wallet.cs index 7b921d9..b580c5e 100644 --- a/PoloniexApi.Net/WalletTools/Wallet.cs +++ b/PoloniexApi.Net/WalletTools/Wallet.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Runtime.CompilerServices; using System.Threading.Tasks; @@ -19,7 +20,8 @@ private IDictionary GetBalances() var postData = new Dictionary(); var data = PostData>("returnCompleteBalances", postData); - return data; + var result = data.ToDictionary(k => k.Key, v => v.Value as IBalance); + return result; } private IDictionary GetDepositAddresses()