123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- // Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved.
- package gocctp
- const (
- _QUANTBOXC2CTP_SEPS_ = ",;"
- )
- const (
- E_uninit = iota
- E_inited
- E_unconnected
- E_connecting
- E_connected
- E_authing
- E_authed
- E_logining
- E_logined
- E_confirming
- E_confirmed
- E_conn_max
- )
- const (
- T_Md = iota
- T_Td
- )
- const (
- EXP_Normal = '0'
- EXP_GenOrderByTrade = '1'
- )
- const (
- THOST_TERT_RESTART = iota
- THOST_TERT_RESUME
- THOST_TERT_QUICK
- )
- //OffsetFlagType
- const (
- /// 开仓
- OFT_Open = '0'
- /// 平仓
- OFT_Close = '1'
- /// 强平
- OFT_ForceClose = '2'
- /// 平今
- OFT_CloseToday = '3'
- /// 平昨
- OFT_CloseYesterday = '4'
- /// 强减
- OFT_ForceOff = '5'
- /// 本地强平
- OFT_LocalForceClose = '6'
- )
- //DirectionType
- const (
- DIRE_Buy = '0'
- DIRE_Sell = '1'
- )
- //OrderPriceTypeType
- const (
- /// 任意价
- OPTT_AnyPrice = '1'
- /// 限价
- OPTT_LimitPrice = '2'
- /// 最优价
- OPTT_BestPrice = '3'
- /// 最新价
- OPTT_LastPrice = '4'
- /// 最新价浮动上浮1个ticks
- OPTT_LastPricePlusOneTicks = '5'
- /// 最新价浮动上浮2个ticks
- OPTT_LastPricePlusTwoTicks = '6'
- /// 最新价浮动上浮3个ticks
- OPTT_LastPricePlusThreeTicks = '7'
- /// 卖一价
- OPTT_AskPrice1 = '8'
- /// 卖一价浮动上浮1个ticks
- OPTT_AskPrice1PlusOneTicks = '9'
- /// 卖一价浮动上浮2个ticks
- OPTT_AskPrice1PlusTwoTicks = 'A'
- /// 卖一价浮动上浮3个ticks
- OPTT_AskPrice1PlusThreeTicks = 'B'
- /// 买一价
- OPTT_BidPrice1 = 'C'
- /// 买一价浮动上浮1个ticks
- OPTT_BidPrice1PlusOneTicks = 'D'
- /// 买一价浮动上浮2个ticks
- OPTT_BidPrice1PlusTwoTicks = 'E'
- /// 买一价浮动上浮3个ticks
- OPTT_BidPrice1PlusThreeTicks = 'F'
- )
- //TimeConditionType
- const (
- /// 立即完成,否则撤销
- TCT_IOC = '1'
- /// 本节有效
- TCT_GFS = '2'
- /// 当日有效
- TCT_GFD = '3'
- /// 指定日期前有效
- TCT_GTD = '4'
- /// 撤销前有效
- TCT_GTC = '5'
- /// 集合竞价有效
- TCT_GFA = '6'
- )
- ///EnumVolumeConditionType 成交量类型类型
- const (
- /// 任何数量
- AV = '1'
- /// 最小数量
- MV = '2'
- /// 全部数量
- CV = '3'
- )
- ///ContingentConditionType是一个触发条件类型
- const (
- /// 立即
- CCT_Immediately = '1'
- /// 止损
- CCT_Touch = '2'
- /// 止赢
- CCT_TouchProfit = '3'
- /// 预埋单
- CCT_ParkedOrder = '4'
- /// 最新价大于条件价
- CCT_LastPriceGreaterThanStopPrice = '5'
- /// 最新价大于等于条件价
- CCT_LastPriceGreaterEqualStopPrice = '6'
- /// 最新价小于条件价
- CCT_LastPriceLesserThanStopPrice = '7'
- /// 最新价小于等于条件价
- CCT_LastPriceLesserEqualStopPrice = '8'
- /// 卖一价大于条件价
- CCT_AskPriceGreaterThanStopPrice = '9'
- /// 卖一价大于等于条件价
- CCT_AskPriceGreaterEqualStopPrice = 'A'
- /// 卖一价小于条件价
- CCT_AskPriceLesserThanStopPrice = 'B'
- /// 卖一价小于等于条件价
- CCT_AskPriceLesserEqualStopPrice = 'C'
- /// 买一价大于条件价
- CCT_BidPriceGreaterThanStopPrice = 'D'
- /// 买一价大于等于条件价
- CCT_BidPriceGreaterEqualStopPrice = 'E'
- /// 买一价小于条件价
- CCT_BidPriceLesserThanStopPrice = 'F'
- /// 买一价小于等于条件价
- CCT_BidPriceLesserEqualStopPrice = 'H'
- )
- const (
- ///投机
- THOST_FTDC_HF_Speculation = '1'
- ///套利
- THOST_FTDC_HF_Arbitrage = '2'
- ///套保
- THOST_FTDC_HF_Hedge = '3'
- )
|