Exemplo n.º 1
0
        public async Task <Book> GetMarketDepth(MarketId marketId)
        {
            JObject response = await this.CallPublic <JObject>(Method.orderbook, (VoSMarketId)marketId,
                                                               DEFAULT_PRECISION);

            return(VoSParsers.ParseOrderBook(response));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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
            });
        }
Exemplo n.º 4
0
        public async Task <Dictionary <string, string> > GetWalletAddresses()
        {
            JObject response = await CallPrivate <JObject>(Method.wallet_address);

            return(VoSParsers.ParseWalletAddresses(response));
        }