Beispiel #1
0
 /// <summary>
 /// Create request for order cancellation
 /// </summary>
 /// <param name="order"></param>
 /// <returns></returns>
 public static Message CreateOrderCancelRequest(Order order)
 {
     QuickFix.FIX44.OrderCancelRequest OrderCancelRequest = new QuickFix.FIX44.OrderCancelRequest();
     OrderCancelRequest.Set(new ClOrdID(GetFreeID));
     OrderCancelRequest.Set(new OrigClOrdID(order.ClientOrderID.ToString()));
     OrderCancelRequest.Set(new Side(order.Side));
     OrderCancelRequest.Set(TradeSymbol);
     OrderCancelRequest.Set(new TransactTime(DateTime.Now));
     return(OrderCancelRequest);
 }
Beispiel #2
0
 /**
  * 取消订单请求
  */
 public static Message createOrderCancelRequest()
 {
     QuickFix.FIX44.OrderCancelRequest OrderCancelRequest = new QuickFix.FIX44.OrderCancelRequest();
     OrderCancelRequest.Set(new ClOrdID("QQAAAA"));
     OrderCancelRequest.Set(new OrigClOrdID("110296341"));//订单编号
     OrderCancelRequest.Set(new Side('1'));				//1买入;2卖出
     OrderCancelRequest.Set(new Symbol("LTC/CNY"));		//BTC/CNY or LTC/CNY
     OrderCancelRequest.Set(new TransactTime(DateTime.Now));
     return OrderCancelRequest;
 }
Beispiel #3
0
 /**
  * 取消订单请求
  */
 public static Message createOrderCancelRequest()
 {
     QuickFix.FIX44.OrderCancelRequest OrderCancelRequest = new QuickFix.FIX44.OrderCancelRequest();
     OrderCancelRequest.Set(new ClOrdID("QQAAAA"));
     OrderCancelRequest.Set(new OrigClOrdID("110296341"));    //订单编号
     OrderCancelRequest.Set(new Side('1'));                   //1买入;2卖出
     OrderCancelRequest.Set(new Symbol("LTC/CNY"));           //BTC/CNY or LTC/CNY
     OrderCancelRequest.Set(new TransactTime(DateTime.Now));
     return(OrderCancelRequest);
 }
Beispiel #4
0
        public static Message CreateOrderCancelRequest(int orderID)
        {
            QuickFix.FIX44.OrderCancelRequest orderCancelRequest = new QuickFix.FIX44.OrderCancelRequest();
            orderCancelRequest.Set(new ClOrdID("123"));

            return(orderCancelRequest);
        }
Beispiel #5
0
        private QuickFix.FIX44.OrderCancelRequest QueryOrderCancelRequest44()
        {
            QuickFix.FIX44.OrderCancelRequest orderCancelRequest = new QuickFix.FIX44.OrderCancelRequest(
                QueryOrigClOrdID(),
                QueryClOrdID(),
                QuerySymbol(),
                QuerySide(),
                new TransactTime(DateTime.Now));

            orderCancelRequest.Set(QueryOrderQty());
            return(orderCancelRequest);
        }
Beispiel #6
0
 public void OrderCancelRequest(string strOrigClOrdID, char chSide)
 {
     try
     {
         if (m_SessionID == null)
         {
             return;
         }
         string strCIOrdID = "KYO" + DateTime.UtcNow.ToString("yyyyMMddHHmmssffff");
         QuickFix.FIX44.OrderCancelRequest orderCancelRequest = new QuickFix.FIX44.OrderCancelRequest();
         orderCancelRequest.Set(new OrigClOrdID(strOrigClOrdID));
         orderCancelRequest.Set(new ClOrdID(strCIOrdID));
         orderCancelRequest.Set(new Side(chSide));
         orderCancelRequest.Set(new TransactTime(DateTime.UtcNow));
         Session.SendToTarget(orderCancelRequest, m_SessionID);
         Logger.Instance().Log($"REQUEST (OrderCancelRequest) => {orderCancelRequest.ToString()}");
     }
     catch (Exception ex)
     {
         Logger.Instance().LogToFile(ex.ToString());
     }
 }
Beispiel #7
0
        private QuickFix.FIX44.OrderCancelRequest QueryOrderCancelRequest44()
        {
            QuickFix.FIX44.OrderCancelRequest orderCancelRequest = new QuickFix.FIX44.OrderCancelRequest(
                QueryOrigClOrdID(),
                QueryClOrdID(),
                QuerySymbol(),
                QuerySide(),
                new TransactTime(DateTime.Now));

            orderCancelRequest.Set(QueryOrderQty());
            return orderCancelRequest;
        }