gitee.com/quant1x/engine@v1.8.4/trader/constants.go (about) 1 package trader 2 3 // AccountType 账号类型 4 type AccountType = int 5 6 const ( 7 FUTURE_ACCOUNT AccountType = 1 // 期货 8 SECURITY_ACCOUNT AccountType = 2 // 股票 9 CREDIT_ACCOUNT AccountType = 3 // 信用 10 FUTURE_OPTION_ACCOUNT AccountType = 5 // 期货期权 11 STOCK_OPTION_ACCOUNT AccountType = 6 // 股票期权 12 HUGANGTONG_ACCOUNT AccountType = 7 // 沪港通 13 INCOME_SWAP_ACCOUNT AccountType = 8 // 美股收益互换 14 NEW3BOARD_ACCOUNT AccountType = 10 // 全国股转账号 15 SHENGANGTONG_ACCOUNT AccountType = 11 // 深港通 16 AT_OFFSITEBANKING AccountType = 13 // 场外理财账户 17 AT_OUTTER_FUTURE AccountType = 1001 // 期货外盘 18 AT_IB AccountType = 1002 // IB 19 AT_NS_TRUSTBANK AccountType = 15001 // 场外托管 20 AT_INTERBANK AccountType = 15002 // 银行间账号 21 AT_BANK AccountType = 15003 // 银行账号 22 AT_OTC AccountType = 15005 // 场外账号 23 ) 24 25 // AccountStatus 账号状态 26 type AccountStatus = int 27 28 const ( 29 ACCOUNT_STATUS_INVALID AccountStatus = -1 // 无效 30 ACCOUNT_STATUS_OK AccountStatus = 0 // 正常 31 ACCOUNT_STATUS_WAITING_LOGIN AccountStatus = 1 // 连接中 32 ACCOUNT_STATUSING AccountStatus = 2 // 登陆中 33 ACCOUNT_STATUS_FAIL AccountStatus = 3 // 失败 34 ACCOUNT_STATUS_INITING AccountStatus = 4 // 初始化中 35 ACCOUNT_STATUS_CORRECTING AccountStatus = 5 // 数据刷新校正中 36 ACCOUNT_STATUS_CLOSED AccountStatus = 6 // 收盘后 37 ACCOUNT_STATUS_ASSIS_FAIL AccountStatus = 7 // 穿透副链接断开 38 ACCOUNT_STATUS_DISABLEBYSYS AccountStatus = 8 // 系统停用(总线使用-密码错误超限) 39 ACCOUNT_STATUS_DISABLEBYUSER AccountStatus = 9 // 用户停用(总线使用) 40 ) 41 42 // OrderType 订单类型 43 type OrderType = int 44 45 const ( 46 STOCK_BUY OrderType = 23 47 STOCK_SELL OrderType = 24 48 CREDIT_BUY OrderType = 23 // 担保品买入 49 CREDIT_SELL OrderType = 24 // 担保品卖出 50 CREDIT_FIN_BUY OrderType = 27 // 融资买入 51 CREDIT_SLO_SELL OrderType = 28 // 融券卖出 52 CREDIT_BUY_SECU_REPAY OrderType = 29 // 买券还券 53 CREDIT_DIRECT_SECU_REPAY OrderType = 30 // 直接还券 54 CREDIT_SELL_SECU_REPAY OrderType = 31 // 卖券还款 55 CREDIT_DIRECT_CASH_REPAY OrderType = 32 // 直接还款 56 CREDIT_FIN_BUY_SPECIAL OrderType = 40 // 专项融资买入 57 CREDIT_SLO_SELL_SPECIAL OrderType = 41 // 专项融券卖出 58 CREDIT_BUY_SECU_REPAY_SPECIAL OrderType = 42 // 专项买券还券 59 CREDIT_DIRECT_SECU_REPAY_SPECIAL OrderType = 43 // 专项直接还券 60 CREDIT_SELL_SECU_REPAY_SPECIAL OrderType = 44 // 专项卖券还款 61 CREDIT_DIRECT_CASH_REPAY_SPECIAL OrderType = 45 // 专项直接还款 62 ) 63 64 // PriceType 报价类型 65 type PriceType = int 66 67 const ( 68 LATEST_PRICE PriceType = 5 // 最新价 69 FIX_PRICE PriceType = 11 // 指定价/限价 70 MARKET_SH_CONVERT_5_CANCEL PriceType = 42 // 最优五档即时成交剩余撤销[上交所][股票] 71 MARKET_SH_CONVERT_5_LIMIT PriceType = 43 // 最优五档即时成交剩转限价[上交所][股票] 72 MARKET_PEER_PRICE_FIRST PriceType = 44 // 对手方最优价格委托[上交所[股票]][深交所[股票][期权]] 73 MARKET_MINE_PRICE_FIRST PriceType = 45 // 本方最优价格委托[上交所[股票]][深交所[股票][期权]] 74 MARKET_SZ_INSTBUSI_RESTCANCEL PriceType = 46 // 即时成交剩余撤销委托[深交所][股票][期权] 75 MARKET_SZ_CONVERT_5_CANCEL PriceType = 47 // 最优五档即时成交剩余撤销[深交所][股票][期权] 76 MARKET_SZ_FULL_OR_CANCEL PriceType = 48 // 全额成交或撤销委托[深交所][股票][期权] 77 ) 78 79 // OrderStatus 委托状态 80 type OrderStatus = int 81 82 const ( 83 ORDER_UNREPORTED OrderStatus = 48 // 未报 84 ORDER_WAIT_REPORTING OrderStatus = 49 // 待报 85 ORDER_REPORTED OrderStatus = 50 // 已报 86 ORDER_REPORTED_CANCEL OrderStatus = 51 // 已报待撤 87 ORDER_PARTSUCC_CANCEL OrderStatus = 52 // 部成待撤 88 ORDER_PART_CANCEL OrderStatus = 53 // 部撤 89 ORDER_CANCELED OrderStatus = 54 // 已撤 90 ORDER_PART_SUCC OrderStatus = 55 // 部成 91 ORDER_SUCCEEDED OrderStatus = 56 // 已成 92 ORDER_JUNK OrderStatus = 57 // 废单 93 ORDER_UNKNOWN OrderStatus = 255 // 未知 94 )