Esempio n. 1
0
        // [InlineData("HUSD")]
        public void CrossGetAccountPositionTest(string marginAccount)
        {
            var result = client.CrossGetAccountPositionAsync(marginAccount).Result;

            string strret = JsonConvert.SerializeObject(result, Formatting.Indented);

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

            string type = marginAccount.ToUpper();

            foreach (var item in result.data.contractDetail)
            {
                Assert.Equal(type, item.tradePartition);
            }
            foreach (var item in result.data.futuresContractDetail)
            {
                Assert.Equal(type, item.tradePartition);
            }
            foreach (var item in result.data.positions)
            {
                Assert.Equal(type, item.tradePartition);
            }
            Console.WriteLine("------------");
        }
        public void CrossGetAccountPositionTest(string marginAccount)
        {
            var result = client.CrossGetAccountPositionAsync(marginAccount).Result;

            string strret = JsonConvert.SerializeObject(result, Formatting.Indented);

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