Beispiel #1
0
        // [InlineData(0, 1, "0", "limit", null, null, null, 20, "prev", null, "btc-usdt")]
        // [InlineData(0, 1, "0", "limit", null, null, null, 20, "prev", "BTC-HUSD", null)]
        // [InlineData(0, 1, "0", "limit", null, null, null, 20, "prev", null, "btc-husd")]
        public void CrossGetHisOrderExactTest(int tradeType, int type, string status,
                                              string order_price_type, long?start_time, long?end_time,
                                              long?from_id, int size, string direct, string contractCode, string pair)
        {
            var result = client.CrossGetHisOrderExactAsync(tradeType, type, status, order_price_type, start_time, end_time, from_id, size, direct, contractCode, pair).Result;
            var strret = JsonConvert.SerializeObject(result, Formatting.Indented);

            Console.WriteLine(strret);
            Assert.Equal("ok", result.status);
            string tp = null;

            if (pair != null)
            {
                tp = pair.Split("-")[1].ToUpper();
            }
            if (contractCode != null)
            {
                tp = contractCode.Split("-")[1].ToUpper();
            }
            foreach (var item in result.data.orders)
            {
                Assert.Equal(tp, item.tradePartition);
            }
            Console.WriteLine("------------");
        }
Beispiel #2
0
        public void GetHisOrderExactTest(string contractCode, int tradeType, int type, string status,
                                         string order_price_type, long?start_time, long?end_time,
                                         long?from_id)
        {
            var    result = client.IsolatedGetHisOrderExactAsync(contractCode, tradeType, type, status, order_price_type, start_time, end_time, from_id).Result;
            string strret = JsonConvert.SerializeObject(result, Formatting.Indented);

            Console.WriteLine(strret);
            Assert.Equal("ok", result.status);

            result = client.CrossGetHisOrderExactAsync(contractCode, tradeType, type, status, order_price_type, start_time, end_time, from_id).Result;
            strret = JsonConvert.SerializeObject(result, Formatting.Indented);
            Console.WriteLine(strret);
            Assert.Equal("ok", result.status);
        }