Ejemplo n.º 1
0
        /// <summary>
        /// Get all open orders
        /// </summary>
        /// <param name="pair">Trading pair</param>
        /// <param name="side">Trade side</param>
        /// <param name="type">Order Type</param>
        /// <param name="startDate">Start Date (Unix time)</param>
        /// <param name="endDate">End Date (Unix time)</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 <Order> > > GetOpenOrders(this IKuCoinDotNet service, string pair, Side?side, OrderType?type, 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.GetOrders(OrderStatus.active, pair, side, type, startAt, endAt, page, pageSize));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get all open orders
 /// </summary>
 /// <param name="pair">Trading pair</param>
 /// <param name="side">Trade side</param>
 /// <param name="type">Order Type</param>
 /// <param name="startAt">Start Date (Unix time)</param>
 /// <param name="endAt">End Date (Unix time)</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 <Order> > > GetOpenOrders(this IKuCoinDotNet service, string pair, Side?side, OrderType?type, long startAt, long endAt, int page = 0, int pageSize = 0)
 {
     return(await service.GetOrders(OrderStatus.active, pair, side, type, startAt, endAt, page, pageSize));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Get all open 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 <Order> > > GetOpenOrders(this IKuCoinDotNet service, string pair, Side side, int page = 0, int pageSize = 0)
 {
     return(await service.GetOrders(OrderStatus.active, pair : pair, side : side, page : 0, pageSize : 0));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Get all open orders
 /// </summary>
 /// <param name="page">page number</param>
 /// <param name="pageSize">page size</param>
 /// <returns>Paged list of Orders</returns>
 public static async Task <PagedResponse <List <Order> > > GetOpenOrders(this IKuCoinDotNet service, int page = 0, int pageSize = 0)
 {
     return(await service.GetOrders(status : OrderStatus.active, page : page, pageSize : pageSize));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Get all orders
 /// </summary>
 /// <param name="pair">Trading pair</param>
 /// <param name="status">Order status</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 <Order> > > GetOrders(this IKuCoinDotNet service, string pair, OrderStatus status, int page = 0, int pageSize = 0)
 {
     return(await service.GetOrders(pair : pair, status : status, page : page, pageSize : pageSize));
 }
        public void GetOrders_Test()
        {
            var orders = _service.GetOrders().Result;

            Assert.NotNull(orders);
        }