Exemplo n.º 1
0
        public void CrossLightningCloseTest(double volume, string direction,
                                            long?clientOrderId, string orderPriceType,
                                            string contractCode, string contractType, string pair)
        {
            var result = client.CrossLightningCloseAsync(volume, direction, clientOrderId, orderPriceType, contractCode, contractType, pair).Result;
            var strret = JsonConvert.SerializeObject(result, Formatting.Indented);

            Console.WriteLine(strret);
            Assert.Equal("ok", result.status);
            Console.WriteLine("------------");
        }
Exemplo n.º 2
0
        public void LightningCloseTest(string contractCode, double volume, string direction,
                                       long?clientOrderId = null, string orderPriceType = null)
        {
            var    result = client.IsolatedLightningCloseAsync(contractCode, volume, direction, clientOrderId, orderPriceType).Result;
            string strret = JsonConvert.SerializeObject(result, Formatting.Indented);

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

            result = client.CrossLightningCloseAsync(contractCode, volume, direction, clientOrderId, orderPriceType).Result;
            strret = JsonConvert.SerializeObject(result, Formatting.Indented);
            Console.WriteLine(strret);
            Assert.Equal("ok", result.status);
        }