Esempio n. 1
0
        public void test_More_Buy()
        {
            int maxValue = 1000;

            fileName = "10个线程_卖吃买.txt";
            List <Order> orders = SYRequest.OureyAllOrder(userId, coinSymbol);

            foreach (var order in orders)
            {
                if (SYRequest.QureyCancelOrder(userId, order.orderId))
                {
                    Console.WriteLine("撤单成功!");
                }
            }
            object obj  = SYRequest.QureyBuy(userId, coinSymbol, "" + maxValue, "102.60");
            string time = DateTime.Now.ToString("yyy-MM-dd HH:mm:ss");

            File.AppendAllText(".\\TradeTest\\" + fileName, maxValue + "手买单已经准备完成。\r\n");
            File.AppendAllText(".\\TradeTest\\" + fileName, "开始吃盘口,分" + maxValue + "笔吃每次吃一手。\r\n");
            File.AppendAllText(".\\TradeTest\\" + fileName, "起始时间:" + time + "\r\n");
            cancelCount = maxValue / 10;
            for (int i = 1; i <= 10; i++)
            {
                th_s = new Thread(new ParameterizedThreadStart(test_More_Buy));
                th_s.Start(this);
            }
        }
Esempio n. 2
0
 protected bool CancelOrder(string _orderId)
 {
     if (SYRequest.QureyCancelOrder(userId, _orderId))
     {
         Print("撤单成功!订单编号:" + _orderId);
         return(true);
     }
     return(false);
 }
Esempio n. 3
0
        public void cancelAllOrder()
        {
            List <Order> orders = SYRequest.OureyAllOrder(userId, coinSymbol);

            foreach (var order in orders)
            {
                if (SYRequest.QureyCancelOrder(userId, order.orderId))
                {
                    Console.WriteLine("撤单成功!");
                }
            }
        }
Esempio n. 4
0
        public void test01_sell()
        {
            fileName = "1个线程_买吃卖.txt";
            List <Order> orders = SYRequest.OureyAllOrder(userId, coinSymbol);

            foreach (var order in orders)
            {
                if (SYRequest.QureyCancelOrder(userId, order.orderId))
                {
                    Console.WriteLine("撤单成功!");
                }
            }
            object obj  = SYRequest.QureySell(userId, coinSymbol, "1000", "102.60");
            string time = DateTime.Now.ToString("yyy-MM-dd HH:mm:ss");

            File.AppendAllText(".\\TradeTest\\" + fileName, "1000手买单已经准备完成。\r\n");
            File.AppendAllText(".\\TradeTest\\" + fileName, "开始吃盘口,分1000笔吃每次吃一手。\r\n");
            File.AppendAllText(".\\TradeTest\\" + fileName, "起始时间:" + time + "\r\n");

            cancelCount = 1000;
            th_s        = new Thread(new ParameterizedThreadStart(FunTest01_sell));
            th_s.Start(this);
        }