예제 #1
0
        /*private bool callback(IEnumerable<ExchangeTrade> trades)
         *      {
         *              trades.ToList().ForEach(t => t.Print());
         *              return true;
         *      }*/

        public void Candles(IExchangeAPI api, string global_symbol)
        {
            var      symbol    = api.GlobalSymbolToExchangeSymbol(global_symbol);
            int?     limit     = null;
            DateTime?startDate = null;
            DateTime?endDate   = null;
            var      candles   = api.GetCandles(symbol, 60, startDate, endDate, limit);

            foreach (var c in candles)
            {
                Console.WriteLine("{0} {1} [{2} {3}] o:{4} h:{5} l:{6} c:{7} vol:{8}", c.Timestamp, c.PeriodSeconds, c.ExchangeName, c.Name, c.OpenPrice, c.HighPrice, c.LowPrice, c.ClosePrice, c.BaseVolume);
            }
        }