public void CrossGetAccountInfoTest(string marginAccount, bool beSubUid, string contractType, string pair, string tradePartition) { CrossGetAccountInfoResponse result; if (beSubUid) { result = client.CrossGetAccountInfoAsync(marginAccount, long.Parse(config["SubUid"]), contractType, pair, tradePartition).Result; } else { result = client.CrossGetAccountInfoAsync(marginAccount, null, null, null, tradePartition).Result; } string strret = JsonConvert.SerializeObject(result, Formatting.Indented); Console.WriteLine(strret); Assert.Equal("ok", result.status); foreach (var d in result.data) { foreach (var item in d.contractDetails) { Assert.Equal(marginAccount, item.tradePartition); } foreach (var item in d.futuresContractDetail) { Assert.Equal(marginAccount, item.tradePartition); } } Console.WriteLine("------------"); }
public void CrossGetAccountInfoTest(string marginAccount, bool beSubUid) { GetAccountInfoResponse result; if (beSubUid) { result = client.CrossGetAccountInfoAsync(marginAccount, long.Parse(config["SubUid"])).Result; } else { result = client.CrossGetAccountInfoAsync(marginAccount).Result; } string strret = JsonConvert.SerializeObject(result, Formatting.Indented); Console.WriteLine(strret); Assert.Equal("ok", result.status); }