public static void PlaceMcsdModifyOrderAllocation(int quantity, Guid reqID, DateTime expiryDate) { try { if (_IsMcsdSessionUp) { using (Beltone.Services.MCDR.Proxy.McdrProxy p = new Beltone.Services.MCDR.Proxy.McdrProxy()) { List <OpVal> ops = new List <OpVal>(); ops.Add(new OpVal() { Operand = Beltone.Services.MCDR.Contract.Constants.ALLOC_REQ_FIELDS.ALLOC_QTY, Value = quantity }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.EXP_DATE, Value = expiryDate }); p.Handle(new UpdateAllocReq() { SessionKey = _clientSessionKey, ReqID = reqID, Fields = ops.ToArray() }); } } else { throw new Exception("MCSD Service is down. no sell orders can be handled !"); } } catch (Exception ex) { throw ex; } }
public static void PlaceMcsdNewOrderAllocation(int quantity, string exchange, string custodyID, string brokerCode, string unifiedCode, string securityID, Guid reqID, string AllocType, DateTime expirydate) { try { if (_IsMcsdSessionUp) { using (Beltone.Services.MCDR.Proxy.McdrProxy p = new Beltone.Services.MCDR.Proxy.McdrProxy()) { List <OpVal> ops = new List <OpVal>(); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.ALLOC_TYPE, Value = AllocType }); //Regular ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.ALLOC_QTY, Value = quantity }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.EX_CODE, Value = exchange }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.CUST_CODE, Value = custodyID }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.BROKER_CODE, Value = brokerCode }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.UNI_CODE, Value = unifiedCode }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.SEC_CODE, Value = securityID }); ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.EXP_DATE, Value = expirydate }); // ops.Add(new OpVal() { Operand = ALLOC_REQ_FIELDS.OP_TYP, Value = ALLOC_SIDE.SELL }); p.Handle(new NewAllocReq() { SessionKey = _clientSessionKey, ReqID = reqID, Fields = ops.ToArray() }); } } else { throw new Exception("MCSD Service is down. no sell orders can be handled !"); } } catch (Exception ex) { throw ex; } }