public string ReplaceOrder(string ordID, int qty, double new_price) { var p = stOrdMaint.GetOrderInfo(ordID); structSTIOrder norder = new structSTIOrder(); if (new_price == p.fLmtPrice) { return("Same_price"); } norder.bstrAccount = p.bstrAccount; norder.nPriceType = p.nPriceType; norder.nQuantity = qty; norder.bstrSymbol = p.bstrSymbol; norder.bstrSide = p.bstrSide; norder.bstrDestination = p.bstrDestination; norder.bstrSide = p.bstrSide; norder.fLmtPrice = new_price; norder.nDisplay = p.nDisplay; norder.bstrTif = p.bstrTif; norder.bstrClOrderId = norder.bstrSymbol + norder.bstrSide + norder.bstrDestination + norder.fLmtPrice + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second + DateTime.Now.Millisecond; var newID = norder.bstrClOrderId; int res = stiOrder.ReplaceOrderStruct(norder, 0, ordID); if (res != 0) { Console.WriteLine("replace " + norder.bstrSymbol + " status: " + res); } string _return = newID + ";" + res; return(_return); }
public int OrderStatus(string order_id) { return(stOrdMaint_req.GetOrderInfo(order_id).nOrderStatus); }