const.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. // Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved.
  2. package gocctp
  3. const (
  4. _QUANTBOXC2CTP_SEPS_ = ",;"
  5. )
  6. const (
  7. E_uninit = iota
  8. E_inited
  9. E_unconnected
  10. E_connecting
  11. E_connected
  12. E_authing
  13. E_authed
  14. E_logining
  15. E_logined
  16. E_confirming
  17. E_confirmed
  18. E_conn_max
  19. )
  20. const (
  21. T_Md = iota
  22. T_Td
  23. )
  24. const (
  25. EXP_Normal = '0'
  26. EXP_GenOrderByTrade = '1'
  27. )
  28. const (
  29. THOST_TERT_RESTART = iota
  30. THOST_TERT_RESUME
  31. THOST_TERT_QUICK
  32. )
  33. //OffsetFlagType
  34. const (
  35. /// 开仓
  36. OFT_Open = '0'
  37. /// 平仓
  38. OFT_Close = '1'
  39. /// 强平
  40. OFT_ForceClose = '2'
  41. /// 平今
  42. OFT_CloseToday = '3'
  43. /// 平昨
  44. OFT_CloseYesterday = '4'
  45. /// 强减
  46. OFT_ForceOff = '5'
  47. /// 本地强平
  48. OFT_LocalForceClose = '6'
  49. )
  50. //DirectionType
  51. const (
  52. DIRE_Buy = '0'
  53. DIRE_Sell = '1'
  54. )
  55. //OrderPriceTypeType
  56. const (
  57. /// 任意价
  58. OPTT_AnyPrice = '1'
  59. /// 限价
  60. OPTT_LimitPrice = '2'
  61. /// 最优价
  62. OPTT_BestPrice = '3'
  63. /// 最新价
  64. OPTT_LastPrice = '4'
  65. /// 最新价浮动上浮1个ticks
  66. OPTT_LastPricePlusOneTicks = '5'
  67. /// 最新价浮动上浮2个ticks
  68. OPTT_LastPricePlusTwoTicks = '6'
  69. /// 最新价浮动上浮3个ticks
  70. OPTT_LastPricePlusThreeTicks = '7'
  71. /// 卖一价
  72. OPTT_AskPrice1 = '8'
  73. /// 卖一价浮动上浮1个ticks
  74. OPTT_AskPrice1PlusOneTicks = '9'
  75. /// 卖一价浮动上浮2个ticks
  76. OPTT_AskPrice1PlusTwoTicks = 'A'
  77. /// 卖一价浮动上浮3个ticks
  78. OPTT_AskPrice1PlusThreeTicks = 'B'
  79. /// 买一价
  80. OPTT_BidPrice1 = 'C'
  81. /// 买一价浮动上浮1个ticks
  82. OPTT_BidPrice1PlusOneTicks = 'D'
  83. /// 买一价浮动上浮2个ticks
  84. OPTT_BidPrice1PlusTwoTicks = 'E'
  85. /// 买一价浮动上浮3个ticks
  86. OPTT_BidPrice1PlusThreeTicks = 'F'
  87. )
  88. //TimeConditionType
  89. const (
  90. /// 立即完成,否则撤销
  91. TCT_IOC = '1'
  92. /// 本节有效
  93. TCT_GFS = '2'
  94. /// 当日有效
  95. TCT_GFD = '3'
  96. /// 指定日期前有效
  97. TCT_GTD = '4'
  98. /// 撤销前有效
  99. TCT_GTC = '5'
  100. /// 集合竞价有效
  101. TCT_GFA = '6'
  102. )
  103. ///EnumVolumeConditionType 成交量类型类型
  104. const (
  105. /// 任何数量
  106. AV = '1'
  107. /// 最小数量
  108. MV = '2'
  109. /// 全部数量
  110. CV = '3'
  111. )
  112. ///ContingentConditionType是一个触发条件类型
  113. const (
  114. /// 立即
  115. CCT_Immediately = '1'
  116. /// 止损
  117. CCT_Touch = '2'
  118. /// 止赢
  119. CCT_TouchProfit = '3'
  120. /// 预埋单
  121. CCT_ParkedOrder = '4'
  122. /// 最新价大于条件价
  123. CCT_LastPriceGreaterThanStopPrice = '5'
  124. /// 最新价大于等于条件价
  125. CCT_LastPriceGreaterEqualStopPrice = '6'
  126. /// 最新价小于条件价
  127. CCT_LastPriceLesserThanStopPrice = '7'
  128. /// 最新价小于等于条件价
  129. CCT_LastPriceLesserEqualStopPrice = '8'
  130. /// 卖一价大于条件价
  131. CCT_AskPriceGreaterThanStopPrice = '9'
  132. /// 卖一价大于等于条件价
  133. CCT_AskPriceGreaterEqualStopPrice = 'A'
  134. /// 卖一价小于条件价
  135. CCT_AskPriceLesserThanStopPrice = 'B'
  136. /// 卖一价小于等于条件价
  137. CCT_AskPriceLesserEqualStopPrice = 'C'
  138. /// 买一价大于条件价
  139. CCT_BidPriceGreaterThanStopPrice = 'D'
  140. /// 买一价大于等于条件价
  141. CCT_BidPriceGreaterEqualStopPrice = 'E'
  142. /// 买一价小于条件价
  143. CCT_BidPriceLesserThanStopPrice = 'F'
  144. /// 买一价小于等于条件价
  145. CCT_BidPriceLesserEqualStopPrice = 'H'
  146. )
  147. const (
  148. ///投机
  149. THOST_FTDC_HF_Speculation = '1'
  150. ///套利
  151. THOST_FTDC_HF_Arbitrage = '2'
  152. ///套保
  153. THOST_FTDC_HF_Hedge = '3'
  154. )