Beispiel #1
0
        public async Task <IEnumerable <ICurrencyBalance> > GetBalances()
        {
            var    timestamp   = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
            string totalParams = string.Format("timestamp={0}", timestamp);
            string sign        = CalculateSignature(totalParams, _config.Secret);

            var data = new Dictionary <string, object> {
                { "timestamp", timestamp },
                { "signature", sign }
            };

            var account = await _binance.GetAccount(_config.ApiKey, data);

            return(account.balances.Select(b => new Balance(b)));
        }