Example #1
0
        private async Task Balance(IExchangeAPI api, string exchange)
        {
            try
            {
                var tamounts = await api.GetAmountsAsync();

                //var ticker = await api.GetTickerAsync(symbol);
                foreach (var kv in tamounts)
                {
                    var asset  = kv.Key;
                    var amount = kv.Value;
                    Console.WriteLine("[{0,-10}]  {1}  {2:0.00000000}", exchange, asset, amount);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("***[{0}] ERROR: {1}***", exchange, ex.Message);
            }
        }