Beispiel #1
0
        static async Task DemoBinance(string binanceApiKey, string symbol = "BTCUSDT")
        {
            var exch = new Binance(binanceApiKey);

            var ping = await exch.Ping();

            var serverTime = await exch.ServerTime();

            var info = await exch.ExchangeInfo();

            Console.WriteLine($"ping> {ping}");
            Console.WriteLine($"serverTime> {serverTime}");
            Console.WriteLine($"info> {info}");

            var ob = await exch.OrderBook(symbol, 5);

            Console.WriteLine($"\nOrderBook>\n{ob}");

            var trades = await exch.RecentTrades(symbol, 10);

            Console.WriteLine($"\nTrades>\n{trades}");
            //var tradesHist = await exch.HistoricalTrades(symbol, 15);
            //Console.WriteLine($"\nHistorical Trades:\n{trades}");
        }