public void RESTfulMarketBatchFundingRateTest(string contractCode, string tradePartition) { var result = client.GetBatchFundingRateAsync(contractCode, 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 = contractCode.Split("-")[1].ToUpper(); foreach (var item in result.data) { Assert.Equal(type, item.tradePartition); } } Console.WriteLine("------------"); }
public void RESTfulMarketBatchFundingRateTest(string contractCode) { var result = client.GetBatchFundingRateAsync(contractCode).Result; string strret = JsonConvert.SerializeObject(result, Formatting.Indented); Console.WriteLine(strret); Assert.Equal("ok", result.status); }