public void RESTfulMarketTradeStatusTest(string contractCode, string businessType, string contractType, string pair, string tradePartition) { var result = client.CrossGetTradeStateAsync(contractCode, businessType, contractType, pair, tradePartition).Result; string strret = JsonConvert.SerializeObject(result, Formatting.Indented); Console.WriteLine(strret); Assert.Equal("ok", result.status); if (tradePartition == null || tradePartition.ToLower() == "usdt") { foreach (var item in result.data) { Assert.Equal("USDT", item.tradePartition); } } else if (tradePartition.ToLower() == "husd") { foreach (var item in result.data) { Assert.Equal("HUSD", item.tradePartition); } } else if (tradePartition.ToLower() == "all") { string type = pair.Split("-")[1].ToUpper(); foreach (var item in result.data) { Assert.Equal(type, item.tradePartition); } } Console.WriteLine("------------"); }
public void RESTfulMarketTradeStatusTest(string contractCode) { var result = client.CrossGetTradeStateAsync(contractCode).Result; string strret = JsonConvert.SerializeObject(result, Formatting.Indented); Console.WriteLine(strret); Assert.Equal("ok", result.status); }