PDF下载 下载

枚举常量

阅读 27866

OrderStatus - 委托状态

  1. enum OrderStatus
  2. {
  3. OrderStatus_Unknown = 0,
  4. OrderStatus_New = 1, //已报
  5. OrderStatus_PartiallyFilled = 2, //部成
  6. OrderStatus_Filled = 3, //已成
  7. OrderStatus_Canceled = 5, //已撤
  8. OrderStatus_PendingCancel = 6, //待撤
  9. OrderStatus_Rejected = 8, //已拒绝
  10. OrderStatus_Suspended = 9, //挂起
  11. OrderStatus_PendingNew = 10, //待报
  12. OrderStatus_Expired = 12, //已过期
  13. };

OrderSide - 委托方向

  1. enum OrderSide
  2. {
  3. OrderSide_Unknown = 0,
  4. OrderSide_Buy = 1, //买入
  5. OrderSide_Sell = 2, //卖出
  6. };

OrderType - 委托类型

  1. enum OrderType
  2. {
  3. OrderType_Unknown = 0,
  4. OrderType_Limit = 1, //限价委托
  5. OrderType_Market = 2, //市价委托
  6. OrderType_Stop = 3, //止损止盈委托
  7. };

OrderDuration - 委托时间属性

  1. enum OrderDuration
  2. {
  3. OrderDuration_Unknown = 0,
  4. OrderDuration_FAK = 1, //即时成交剩余撤销(fill and kill)
  5. OrderDuration_FOK = 2, //即时全额成交或撤销(fill or kill)
  6. OrderDuration_GFD = 3, //当日有效(good for day)
  7. OrderDuration_GFS = 4, //本节有效(good for section)
  8. OrderDuration_GTD = 5, //指定日期前有效(goodl till date)
  9. OrderDuration_GTC = 6, //撤销前有效(good till cancel)
  10. OrderDuration_GFA = 7, //集合竞价前有效(good for auction)
  11. };

OrderQualifier - 委托成交属性

  1. enum OrderQualifier
  2. {
  3. OrderQualifier_Unknown = 0,
  4. OrderQualifier_BOC = 1, //对方最优价格(best of counterparty)
  5. OrderQualifier_BOP = 2, //己方最优价格(best of party)
  6. OrderQualifier_B5TC = 3, //最优五档剩余撤销(best 5 then cancel)
  7. OrderQualifier_B5TL = 4, //最优五档剩余转限价(best 5 then limit)
  8. };

ExecType - 执行回报类型

  1. enum ExecType
  2. {
  3. ExecType_Unknown = 0,
  4. ExecType_New = 1, //已报
  5. ExecType_Canceled = 5, //已撤销
  6. ExecType_PendingCancel = 6, //待撤销
  7. ExecType_Rejected = 8, //已拒绝
  8. ExecType_Suspended = 9, //挂起
  9. ExecType_PendingNew = 10, //待报
  10. ExecType_Expired = 12, //过期
  11. ExecType_Trade = 15, //成交
  12. ExecType_OrderStatus = 18, //委托状态
  13. ExecType_CancelRejected = 19, //撤单被拒绝
  14. };

PositionEffect - 开平仓类型

  1. enum PositionEffect
  2. {
  3. PositionEffect_Unknown = 0,
  4. PositionEffect_Open = 1, //开仓
  5. PositionEffect_Close = 2, //平仓,具体语义取决于对应的交易所
  6. PositionEffect_CloseToday = 3, //平今仓
  7. PositionEffect_CloseYesterday = 4, //平昨仓
  8. };

PositionSide - 持仓方向

  1. enum PositionSide
  2. {
  3. PositionSide_Unknown = 0,
  4. PositionSide_Long = 1, //多方向
  5. PositionSide_Short = 2, //空方向
  6. };

OrderRejectReason - 订单拒绝原因

  1. enum OrderRejectReason
  2. {
  3. OrderRejectReason_Unknown = 0, //未知原因
  4. OrderRejectReason_RiskRuleCheckFailed = 1, //不符合风控规则
  5. OrderRejectReason_NoEnoughCash = 2, //资金不足
  6. OrderRejectReason_NoEnoughPosition = 3, //仓位不足
  7. OrderRejectReason_IllegalAccountId = 4, //非法账户ID
  8. OrderRejectReason_IllegalStrategyId = 5, //非法策略ID
  9. OrderRejectReason_IllegalSymbol = 6, //非法交易代码
  10. OrderRejectReason_IllegalVolume = 7, //非法委托量
  11. OrderRejectReason_IllegalPrice = 8, //非法委托价
  12. OrderRejectReason_AccountDisabled = 10, //交易账号被禁止交易
  13. OrderRejectReason_AccountDisconnected = 11, //交易账号未连接
  14. OrderRejectReason_AccountLoggedout = 12, //交易账号未登录
  15. OrderRejectReason_NotInTradingSession = 13, //非交易时段
  16. OrderRejectReason_OrderTypeNotSupported = 14, //委托类型不支持
  17. OrderRejectReason_Throttle = 15, //流控限制
  18. OrderRejectReason_SymbolSusppended = 16, //交易代码停牌
  19. OrderRejectReason_Internal = 999, //内部错误
  20. CancelOrderRejectReason_OrderFinalized = 101, //委托已完成
  21. CancelOrderRejectReason_UnknownOrder = 102, //未知委托
  22. CancelOrderRejectReason_BrokerOption = 103, //柜台设置
  23. CancelOrderRejectReason_AlreadyInPendingCancel = 104, //委托撤销中
  24. };

CashPositionChangeReason - 仓位变更原因

  1. enum CashPositionChangeReason
  2. {
  3. CashPositionChangeReason_Unknown = 0,
  4. CashPositionChangeReason_Trade = 1, //交易
  5. CashPositionChangeReason_Inout = 2, //出入金/出入持仓
  6. CashPositionChangeReason_Dividend = 3, //分红送股
  7. };

AccountState - 交易账户状态

  1. enum AccountState
  2. {
  3. State_UNKNOWN = 0, //未知
  4. State_CONNECTING = 1, //连接中
  5. State_CONNECTED = 2, //已连接
  6. State_LOGGEDIN = 3, //已登录
  7. State_DISCONNECTING = 4, //断开中
  8. State_DISCONNECTED = 5, //已断开
  9. State_ERROR = 6 //错误
  10. };

AlgoOrderStatus - 算法单状态,暂停/恢复算法单时有效

  1. enum AlgoOrderStatus
  2. {
  3. AlgoOrderStatus_Unknown = 0,
  4. AlgoOrderStatus_Resume = 1, //恢复母单
  5. AlgoOrderStatus_Pause = 2, //暂停母单
  6. AlgoOrderStatus_PauseAndCancelSubOrders = 3 //暂算母单并撤子单
  7. };

PositionSrc - 头寸来源(仅适用融券融券)

  1. enum PositionSrc
  2. {
  3. PositionSrc_Unknown = 0,
  4. PositionSrc_L1 = 1, //普通池
  5. PositionSrc_L2 = 2 //专项池
  6. };

SecurityType - 证券类型

  1. enum SecurityType
  2. {
  3. SecurityType_Unknown = 0,
  4. SecurityType_Stock = 1, //股票
  5. SecurityType_Fund = 2, //基金
  6. SecurityType_Index = 3, //指数
  7. SecurityType_Future = 4, //期货
  8. SecurityType_Option = 5, //期权
  9. SecurityType_Credit = 6, //两融
  10. SecurityType_Bond = 7, //债券
  11. SecurityType_Bond_Convertible = 8 //可债券
  12. };

OrderBusiness - 业务类型

  1. enum OrderBusiness
  2. {
  3. OrderBusiness_NORMAL = 0, //普通交易
  4. OrderBusiness_IPO_BUY = 100, //新股申购
  5. OrderBusiness_CREDIT_BOM = 200, //融资买入(buying on margin)
  6. OrderBusiness_CREDIT_SS = 201, //融券卖出(short selling)
  7. OrderBusiness_CREDIT_RSBBS = 202, //买券还券(repay share by buying share)
  8. OrderBusiness_CREDIT_RCBSS = 203, //卖券还款(repay cash by selling share)
  9. OrderBusiness_CREDIT_DRS = 204, //直接还券(directly repay share)
  10. OrderBusiness_CREDIT_DRC = 211, //直接还款(directly repay cash)
  11. OrderBusiness_CREDIT_CPOM = 205, //融资平仓(close position on margin)
  12. OrderBusiness_CREDIT_CPOSS = 206, //融券平仓(close position on short selling)
  13. OrderBusiness_CREDIT_BOC = 207, //担保品买入(buying on collateral)
  14. OrderBusiness_CREDIT_SOC = 208, //担保品卖出(selling on collateral)
  15. OrderBusiness_CREDIT_CI = 209, //担保品转入(collateral in)
  16. OrderBusiness_CREDIT_CO = 210, //担保品转出(collateral out)
  17. OrderBusiness_ETF_BUY = 301, //ETF申购(purchase)
  18. OrderBusiness_ETF_RED = 302, //ETF赎回(redemption)
  19. OrderBusiness_FUND_SUB = 303, //基金认购(subscribing)
  20. OrderBusiness_FUND_BUY = 304, //基金申购(purchase)
  21. OrderBusiness_FUND_RED = 305, //基金赎回(redemption)
  22. OrderBusiness_FUND_CONVERT = 306, //基金转换(convert)
  23. OrderBusiness_FUND_SPLIT = 307, //基金分拆(split)
  24. OrderBusiness_FUND_MERGE = 308, //基金合并(merge)
  25. OrderBusiness_BOND_RRP = 400, //债券逆回购(reverse repurchase agreement (RRP) or reverse repo)
  26. OrderBusiness_BOND_CONVERTIBLE_BUY = 401, //可转债申购(purchase)
  27. OrderBusiness_BOND_CONVERTIBLE_CALL = 402, //可转债转股
  28. OrderBusiness_BOND_CONVERTIBLE_PUT = 403, //可转债回售
  29. OrderBusiness_BOND_CONVERTIBLE_PUT_CANCEL = 404 //可转债回售撤销
  30. };
0 篇笔记