public void GetTradesByTimestampAsyncTest()
        {
            var client = new HitRestApi();
            var symbol = "BTCUSD";

            var response = client.GetTradesByTimestampAsync(symbol).Result;

            ResponseBasicCheck(response);

            Assert.AreNotEqual(0, response.Result.Length);
        }
        public void GetTradesByIdsAsyncLimitTest()
        {
            var client = new HitRestApi();
            var symbol = "BTCUSD";
            var limit  = 555;

            var response = client.GetTradesByTimestampAsync(symbol, limit: limit).Result;

            ResponseBasicCheck(response);

            Assert.AreEqual(limit, response.Result.Length);
        }
        public void GetTradesByIdsAsyncDescSortingTest()
        {
            var client = new HitRestApi();
            var symbol = "BTCUSD";
            var sort   = HitSort.Desc;

            var response = client.GetTradesByTimestampAsync(symbol, sort).Result;

            ResponseBasicCheck(response);

            Assert.IsTrue(response.Result.Length >= 2);
            Assert.IsTrue(response.Result[0].Timestamp < response.Result[1].Timestamp);
        }
        public void GetTradesByTimestampAsyncFromTimestampTillTimestampTest()
        {
            var client = new HitRestApi();
            var symbol = "BTCUSD";
            var from   = new DateTime(2018, 5, 5, 12, 59, 0, DateTimeKind.Utc);
            var till   = new DateTime(2018, 5, 5, 13, 0, 0, DateTimeKind.Utc);
            var expectedTradesCount = 19; // tested experimentally

            var response = client.GetTradesByTimestampAsync(symbol, from: from, till: till).Result;

            ResponseBasicCheck(response);

            Assert.AreEqual(expectedTradesCount, response.Result.Length);
        }