public async Task <Book> GetMarketDepth(MarketId marketId) { JObject response = await this.CallPublic <JObject>(Method.orderbook, (VoSMarketId)marketId, DEFAULT_PRECISION); return(VoSParsers.ParseOrderBook(response)); }
internal static List <Wallet> ParseWallets(JObject walletsJson) { List <Wallet> wallets = new List <Wallet>(); foreach (JProperty wallet in walletsJson.Properties()) { string currencyCode = wallet.Name; wallets.Add(new Wallet(currencyCode, VoSParsers.ParseCurrencyObject(wallet.Value <JObject>("balance")))); } return(wallets); }
public static VoSAccountInfo Parse(JObject accountInfoJson) { DateTime created = VoSParsers.ParseTime(accountInfoJson.Value <int>("created")); Dictionary <string, decimal> tradeFees = VoSParsers.ParseCurrencyValueObj(accountInfoJson.Value <JObject>("trade_fee")); Dictionary <string, decimal> monthlyVolume = VoSParsers.ParseCurrencyValueObj(accountInfoJson.Value <JObject>("monthly_volume")); List <Wallet> wallets = ParseWallets(accountInfoJson.Value <JObject>("wallets")); return(new VoSAccountInfo(wallets) { AccountId = accountInfoJson.Value <string>("account_id"), Created = created, TradeFees = tradeFees, MonthlyVolume = monthlyVolume }); }
public async Task <Dictionary <string, string> > GetWalletAddresses() { JObject response = await CallPrivate <JObject>(Method.wallet_address); return(VoSParsers.ParseWalletAddresses(response)); }