private static string OpenApiExecutionTypeToString(ProtoOAExecutionType executionType) { switch (executionType) { case ProtoOAExecutionType.OrderAccepted: return("OrderAccepted"); case ProtoOAExecutionType.OrderReplaced: return("OrderAmended"); case ProtoOAExecutionType.OrderCancelRejected: return("OrderCancelRejected"); case ProtoOAExecutionType.OrderCancelled: return("OrderCancelled"); case ProtoOAExecutionType.OrderExpired: return("OrderExpired"); case ProtoOAExecutionType.OrderFilled: return("OrderFilled"); case ProtoOAExecutionType.OrderRejected: return("OrderRejected"); default: return("unknown"); } }
static string OpenApiExecutionTypeToString(ProtoOAExecutionType executionType) { switch (executionType) { case ProtoOAExecutionType.ORDER_ACCEPTED: return("OrderAccepted"); case ProtoOAExecutionType.ORDER_REPLACED: return("OrderAmended"); case ProtoOAExecutionType.ORDER_CANCEL_REJECTED: return("OrderCancelRejected"); case ProtoOAExecutionType.ORDER_CANCELLED: return("OrderCancelled"); case ProtoOAExecutionType.ORDER_EXPIRED: return("OrderExpired"); case ProtoOAExecutionType.ORDER_FILLED: return("OrderFilled"); case ProtoOAExecutionType.ORDER_REJECTED: return("OrderRejected"); default: return("unknown"); } }
public ProtoMessage CreateExecutionEvent(ProtoOAExecutionType executionType, ProtoOAOrder order, ProtoOAPosition position = null, string reasonCode = null, string clientMsgId = null) { var _msg = ProtoOAExecutionEvent.CreateBuilder(); _msg.SetExecutionType(executionType); _msg.SetOrder(order); if (position != null) { _msg.SetPosition(position); } return(CreateMessage((uint)_msg.PayloadType, _msg.Build().ToByteString(), clientMsgId)); }
public ProtoMessage CreateExecutionEvent(ProtoOAExecutionType executionType, ProtoOAOrder order, ProtoOAPosition position = null, string reasonCode = null, string clientMsgId = null) { var _msg = new ProtoOAExecutionEvent(); _msg.executionType = executionType; _msg.order = order; if (position != null) { _msg.position = position; } if (reasonCode != null) { _msg.reasonCode = reasonCode; } return(CreateMessage((uint)_msg.payloadType, Utils.Serialize <ProtoOAExecutionEvent>(_msg), clientMsgId)); }
public ProtoMessage CreateExecutionEvent(ProtoOAExecutionType executionType, ProtoOAOrder.Builder order, ProtoOAPosition.Builder position = null, string reasonCode = null, string clientMsgId = null) { return(CreateExecutionEvent(executionType, order.Build(), position == null ? null : position.Build(), reasonCode, clientMsgId)); }
public ProtoMessage CreateExecutionEvent(ProtoOAExecutionType executionType, ProtoOAOrder order, ProtoOAPosition position = null, string reasonCode = null, string clientMsgId = null) { var _msg = new ProtoOAExecutionEvent(); _msg.executionType = executionType; _msg.order = order; if (position != null) _msg.position = position; if (reasonCode != null) _msg.reasonCode = reasonCode; return CreateMessage((uint)_msg.payloadType, Utils.Serialize<ProtoOAExecutionEvent>(_msg), clientMsgId); }
static string OpenApiExecutionTypeToString(ProtoOAExecutionType executionType) { switch (executionType) { case ProtoOAExecutionType.OA_ORDER_ACCEPTED: return "OrderAccepted"; case ProtoOAExecutionType.OA_ORDER_AMENDED: return "OrderAmended"; case ProtoOAExecutionType.OA_ORDER_CANCEL_REJECTED: return "OrderCancelRejected"; case ProtoOAExecutionType.OA_ORDER_CANCELLED: return "OrderCancelled"; case ProtoOAExecutionType.OA_ORDER_EXPIRED: return "OrderExpired"; case ProtoOAExecutionType.OA_ORDER_FILLED: return "OrderFilled"; case ProtoOAExecutionType.OA_ORDER_REJECTED: return "OrderRejected"; default: return "unknown"; } }