Esempio n. 1
0
        /// <summary>
        /// Get a list of KuCoin V1 historical orders.
        /// </summary>
        /// <param name="pair">Trading pair</param>
        /// <param name="side">Trade side</param>
        /// <param name="startDate">Start Date</param>
        /// <param name="endDate">End Date</param>
        /// <param name="page">page number</param>
        /// <param name="pageSize">page size</param>
        /// <returns>Paged list of Orders</returns>
        public static async Task <PagedResponse <List <HistoricOrder> > > GetHistoricOrders(this IKuCoinDotNet service, string pair, Side?side, DateTime?startDate, DateTime?endDate, int page = 0, int pageSize = 0)
        {
            var _dtHelper = new DateTimeHelper();
            var startAt   = startDate != null?_dtHelper.LocalToUnixTime((DateTime)startDate) : 0;

            var endAt = endDate != null?_dtHelper.LocalToUnixTime((DateTime)endDate) : 0;

            return(await service.GetHistoricOrders(pair, side, startAt, endAt, page, pageSize));
        }
        public void GetHistoricOrders_Test()
        {
            var start = new DateTime(2018, 10, 1);
            var end   = new DateTime(2018, 12, 31);

            var orders = _service.GetHistoricOrders(start, end).Result;

            Assert.NotNull(orders);
        }
Esempio n. 3
0
 /// <summary>
 /// Get a list of KuCoin V1 historical orders.
 /// </summary>
 /// <param name="pair">Trading pair</param>
 /// <param name="side">Trade side</param>
 /// <param name="page">page number</param>
 /// <param name="pageSize">page size</param>
 /// <returns>Paged list of Orders</returns>
 public static async Task <PagedResponse <List <HistoricOrder> > > GetHistoricOrders(this IKuCoinDotNet service, string pair, Side side, int page = 0, int pageSize = 0)
 {
     return(await service.GetHistoricOrders(pair : pair, side : side, page : page, pageSize : pageSize));
 }