private static bool CheckForFinish(trade.OrderSubmitStatusType submitStatus, trade.OrderStatusType statusType) { switch (submitStatus) { case trade.OrderSubmitStatusType.INSERT_SUBMITTED: case trade.OrderSubmitStatusType.ACCEPTED: { switch (statusType) { case trade.OrderStatusType.ALL_TRADED: case trade.OrderStatusType.ORDER_CANCELED: return(true); } } break; default: return(false); } return(false); }
public static string GetStatus(trade.OrderSubmitStatusType submitStatus, trade.OrderStatusType statusType) { string status = "未知"; switch (submitStatus) { case trade.OrderSubmitStatusType.NOT_SUBMITTED: status = "未提交"; break; case trade.OrderSubmitStatusType.INSERT_SUBMITTED: case trade.OrderSubmitStatusType.ACCEPTED: { if (submitStatus == trade.OrderSubmitStatusType.INSERT_SUBMITTED) { status = "委托已提交"; } else if (submitStatus == trade.OrderSubmitStatusType.ACCEPTED) { status = "委托被接受"; } switch (statusType) { case trade.OrderStatusType.ALL_TRADED: status = "全部成交"; break; case trade.OrderStatusType.PART_TRADED_QUEUEING: case trade.OrderStatusType.PART_TRADED_NOT_QUEUEING: status = "部分成交"; break; case trade.OrderStatusType.NO_TRADE_QUEUEING: case trade.OrderStatusType.NO_TRADE_NOT_QUEUEING: status = "未成交"; break; case trade.OrderStatusType.ORDER_CANCELED: status = "委托已取消"; break; case trade.OrderStatusType.ORDER_NOT_TOUCHED: status = "委托未触发"; break; case trade.OrderStatusType.ORDER_TOUCHED: status = "委托已触发"; break; case trade.OrderStatusType.STATUS_UNKNOWN: default: break; } } break; case trade.OrderSubmitStatusType.CANCEL_SUBMITTED: status = "取消已提交"; break; case trade.OrderSubmitStatusType.MODIFY_SUBMITTED: status = "修改已提交"; break; case trade.OrderSubmitStatusType.INSERT_REJECTED: status = "委托被拒绝"; break; case trade.OrderSubmitStatusType.CANCEL_REJECTED: status = "取消被拒绝"; break; case trade.OrderSubmitStatusType.MODIFY_REJECTED: status = "修改被拒绝"; break; default: break; } return(status); }