struct.go 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. // Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved.
  2. package gocctp
  3. //CThostFtdcRspUserLoginField
  4. //CThostFtdcRspInfoField
  5. //CThostFtdcDepthMarketDataField
  6. type TThostFtdcDateType [9]byte
  7. type TThostFtdcTimeType [9]byte
  8. type TThostFtdcBrokerIDType [11]byte
  9. type TThostFtdcUserIDType [16]byte
  10. type TThostFtdcSystemNameType [41]byte
  11. type TThostFtdcFrontIDType int32
  12. type TThostFtdcSessionIDType int32
  13. type TThostFtdcOrderRefType [13]byte
  14. func (b TThostFtdcDateType) String() string {
  15. c := [9]byte(b)
  16. return cstring(c[:])
  17. }
  18. func (b TThostFtdcTimeType) String() string {
  19. c := [9]byte(b)
  20. return cstring(c[:])
  21. }
  22. func (b TThostFtdcBrokerIDType) String() string {
  23. c := [11]byte(b)
  24. return cstring(c[:])
  25. }
  26. func (b TThostFtdcUserIDType) String() string {
  27. c := [16]byte(b)
  28. return cstring(c[:])
  29. }
  30. func (b TThostFtdcSystemNameType) String() string {
  31. c := [41]byte(b)
  32. return cstring(c[:])
  33. }
  34. func (b TThostFtdcOrderRefType) String() string {
  35. c := [13]byte(b)
  36. return cstring(c[:])
  37. }
  38. ///用户登录应答
  39. type CThostFtdcRspUserLoginField struct {
  40. ///交易日 c9
  41. TradingDay TThostFtdcDateType
  42. ///登录成功时间 c9
  43. LoginTime TThostFtdcTimeType
  44. ///经纪公司代码 c11
  45. BrokerID TThostFtdcBrokerIDType
  46. ///用户代码 c16
  47. UserID TThostFtdcUserIDType
  48. ///交易系统名称 c41
  49. SystemName TThostFtdcSystemNameType
  50. ///前置编号 int32
  51. FrontID TThostFtdcFrontIDType
  52. ///会话编号 int32
  53. SessionID TThostFtdcSessionIDType
  54. ///最大报单引用 c13
  55. MaxOrderRef TThostFtdcOrderRefType
  56. ///上期所时间 c9
  57. SHFETime TThostFtdcTimeType
  58. ///大商所时间 c9
  59. DCETime TThostFtdcTimeType
  60. ///郑商所时间 c9
  61. CZCETime TThostFtdcTimeType
  62. ///中金所时间 c9
  63. FFEXTime TThostFtdcTimeType
  64. }
  65. type TThostFtdcErrorIDType int32
  66. type TThostFtdcErrorMsgType [81]byte
  67. func (b TThostFtdcErrorMsgType) String() string {
  68. c := [81]byte(b)
  69. return cstring(c[:])
  70. }
  71. ///响应信息
  72. type CThostFtdcRspInfoField struct {
  73. ///错误代码
  74. ErrorID TThostFtdcErrorIDType
  75. ///错误信息
  76. ErrorMsg TThostFtdcErrorMsgType
  77. }
  78. type TThostFtdcInstrumentIDType [31]byte
  79. type TThostFtdcExchangeIDType [9]byte
  80. type TThostFtdcExchangeInstIDType [31]byte
  81. type TThostFtdcPriceType float64
  82. type TThostFtdcLargeVolumeType float64
  83. type TThostFtdcVolumeType int32
  84. type TThostFtdcMoneyType float64
  85. type TThostFtdcRatioType float64
  86. type TThostFtdcMillisecType int32
  87. func (b TThostFtdcInstrumentIDType) String() string {
  88. c := [31]byte(b)
  89. return cstring(c[:])
  90. }
  91. func (b TThostFtdcExchangeIDType) String() string {
  92. c := [9]byte(b)
  93. return cstring(c[:])
  94. }
  95. func (b TThostFtdcExchangeInstIDType) String() string {
  96. c := [31]byte(b)
  97. return cstring(c[:])
  98. }
  99. ///深度行情
  100. type CThostFtdcDepthMarketDataField struct {
  101. ///交易日
  102. TradingDay TThostFtdcDateType
  103. ///合约代码
  104. InstrumentID TThostFtdcInstrumentIDType
  105. ///交易所代码
  106. ExchangeID TThostFtdcExchangeIDType
  107. ///合约在交易所的代码
  108. ExchangeInstID TThostFtdcExchangeInstIDType
  109. ///最新价
  110. LastPrice TThostFtdcPriceType
  111. ///上次结算价
  112. PreSettlementPrice TThostFtdcPriceType
  113. ///昨收盘
  114. PreClosePrice TThostFtdcPriceType
  115. ///昨持仓量
  116. PreOpenInterest TThostFtdcLargeVolumeType
  117. ///今开盘
  118. OpenPrice TThostFtdcPriceType
  119. ///最高价
  120. HighestPrice TThostFtdcPriceType
  121. ///最低价
  122. LowestPrice TThostFtdcPriceType
  123. ///数量
  124. Volume TThostFtdcVolumeType
  125. _ int32
  126. ///成交金额
  127. Turnover TThostFtdcMoneyType
  128. ///持仓量
  129. OpenInterest TThostFtdcLargeVolumeType
  130. ///今收盘
  131. ClosePrice TThostFtdcPriceType
  132. ///本次结算价
  133. SettlementPrice TThostFtdcPriceType
  134. ///涨停板价
  135. UpperLimitPrice TThostFtdcPriceType
  136. ///跌停板价
  137. LowerLimitPrice TThostFtdcPriceType
  138. ///昨虚实度
  139. PreDelta TThostFtdcRatioType
  140. ///今虚实度
  141. CurrDelta TThostFtdcRatioType
  142. ///最后修改时间
  143. UpdateTime TThostFtdcTimeType
  144. ///最后修改毫秒
  145. UpdateMillisec TThostFtdcMillisecType
  146. ///申买价一
  147. BidPrice1 TThostFtdcPriceType
  148. ///申买量一
  149. BidVolume1 TThostFtdcVolumeType
  150. _ int32
  151. ///申卖价一
  152. AskPrice1 TThostFtdcPriceType
  153. ///申卖量一
  154. AskVolume1 TThostFtdcVolumeType
  155. _ int32
  156. ///申买价二
  157. BidPrice2 TThostFtdcPriceType
  158. ///申买量二
  159. BidVolume2 TThostFtdcVolumeType
  160. _ int32
  161. ///申卖价二
  162. AskPrice2 TThostFtdcPriceType
  163. ///申卖量二
  164. AskVolume2 TThostFtdcVolumeType
  165. _ int32
  166. ///申买价三
  167. BidPrice3 TThostFtdcPriceType
  168. ///申买量三
  169. BidVolume3 TThostFtdcVolumeType
  170. _ int32
  171. ///申卖价三
  172. AskPrice3 TThostFtdcPriceType
  173. ///申卖量三
  174. AskVolume3 TThostFtdcVolumeType
  175. _ int32
  176. ///申买价四
  177. BidPrice4 TThostFtdcPriceType
  178. ///申买量四
  179. BidVolume4 TThostFtdcVolumeType
  180. _ int32
  181. ///申卖价四
  182. AskPrice4 TThostFtdcPriceType
  183. ///申卖量四
  184. AskVolume4 TThostFtdcVolumeType
  185. _ int32
  186. ///申买价五
  187. BidPrice5 TThostFtdcPriceType
  188. ///申买量五
  189. BidVolume5 TThostFtdcVolumeType
  190. _ int32
  191. ///申卖价五
  192. AskPrice5 TThostFtdcPriceType
  193. ///申卖量五
  194. AskVolume5 TThostFtdcVolumeType
  195. _ int32
  196. ///当日均价
  197. AveragePrice TThostFtdcPriceType
  198. }
  199. type TThostFtdcInvestorIDType [13]byte
  200. func (b TThostFtdcInvestorIDType) String() string {
  201. c := [13]byte(b)
  202. return cstring(c[:])
  203. }
  204. type TThostFtdcOrderActionRefType int32
  205. type TThostFtdcRequestIDType int32
  206. type TThostFtdcOrderSysIDType [21]byte
  207. func (b TThostFtdcOrderSysIDType) String() string {
  208. c := [21]byte(b)
  209. return cstring(c[:])
  210. }
  211. type TThostFtdcActionFlagType byte
  212. type TThostFtdcTraderIDType [21]byte
  213. func (b TThostFtdcTraderIDType) String() string {
  214. c := [21]byte(b)
  215. return cstring(c[:])
  216. }
  217. type TThostFtdcInstallIDType int32
  218. type TThostFtdcOrderLocalIDType [13]byte
  219. func (b TThostFtdcOrderLocalIDType) String() string {
  220. c := [13]byte(b)
  221. return cstring(c[:])
  222. }
  223. type TThostFtdcParticipantIDType [11]byte
  224. func (b TThostFtdcParticipantIDType) String() string {
  225. c := [11]byte(b)
  226. return cstring(c[:])
  227. }
  228. type TThostFtdcClientIDType [11]byte
  229. func (b TThostFtdcClientIDType) String() string {
  230. c := [11]byte(b)
  231. return cstring(c[:])
  232. }
  233. type TThostFtdcBusinessUnitType [21]byte
  234. func (b TThostFtdcBusinessUnitType) String() string {
  235. c := [21]byte(b)
  236. return cstring(c[:])
  237. }
  238. type TThostFtdcOrderActionStatusType byte
  239. type CThostFtdcOrderActionField struct {
  240. BrokerID TThostFtdcBrokerIDType
  241. InvestorID TThostFtdcInvestorIDType
  242. OrderActionRef TThostFtdcOrderActionRefType
  243. OrderRef TThostFtdcOrderRefType
  244. RequestID TThostFtdcRequestIDType
  245. FrontID TThostFtdcFrontIDType
  246. SessionID TThostFtdcSessionIDType
  247. ExchangeID TThostFtdcExchangeIDType
  248. OrderSysID TThostFtdcOrderSysIDType
  249. ActionFlag TThostFtdcActionFlagType
  250. LimitPrice TThostFtdcPriceType
  251. VolumeChange TThostFtdcVolumeType
  252. ActionDate TThostFtdcDateType
  253. ActionTime TThostFtdcTimeType
  254. TraderID TThostFtdcTraderIDType
  255. InstallID TThostFtdcInstallIDType
  256. OrderLocalID TThostFtdcOrderLocalIDType
  257. ActionLocalID TThostFtdcOrderLocalIDType
  258. ParticipantID TThostFtdcParticipantIDType
  259. ClientID TThostFtdcClientIDType
  260. BusinessUnit TThostFtdcBusinessUnitType
  261. OrderActionStatus TThostFtdcOrderActionStatusType
  262. UserID TThostFtdcUserIDType
  263. StatusMsg TThostFtdcErrorMsgType
  264. InstrumentID TThostFtdcInstrumentIDType
  265. }
  266. type TThostFtdcOrderPriceTypeType byte
  267. type TThostFtdcDirectionType byte
  268. type TThostFtdcTimeConditionType byte
  269. type TThostFtdcVolumeConditionType byte
  270. type TThostFtdcContingentConditionType byte
  271. type TThostFtdcForceCloseReasonType byte
  272. type TThostFtdcBoolType int32
  273. type TThostFtdcCombOffsetFlagType [5]byte
  274. func (b TThostFtdcCombOffsetFlagType) String() string {
  275. c := [5]byte(b)
  276. return cstring(c[:])
  277. }
  278. type TThostFtdcCombHedgeFlagType [5]byte
  279. func (b TThostFtdcCombHedgeFlagType) String() string {
  280. c := [5]byte(b)
  281. return cstring(c[:])
  282. }
  283. type CThostFtdcInputOrderField struct {
  284. BrokerID TThostFtdcBrokerIDType
  285. InvestorID TThostFtdcInvestorIDType
  286. InstrumentID TThostFtdcInstrumentIDType
  287. OrderRef TThostFtdcOrderRefType
  288. UserID TThostFtdcUserIDType
  289. OrderPriceType TThostFtdcOrderPriceTypeType
  290. Direction TThostFtdcDirectionType
  291. CombOffsetFlag TThostFtdcCombOffsetFlagType
  292. CombHedgeFlag TThostFtdcCombHedgeFlagType
  293. LimitPrice TThostFtdcPriceType
  294. VolumeTotalOriginal TThostFtdcVolumeType
  295. TimeCondition TThostFtdcTimeConditionType
  296. GTDDate TThostFtdcDateType
  297. VolumeCondition TThostFtdcVolumeConditionType
  298. MinVolume TThostFtdcVolumeType
  299. ContingentCondition TThostFtdcContingentConditionType
  300. StopPrice TThostFtdcPriceType
  301. ForceCloseReason TThostFtdcForceCloseReasonType
  302. IsAutoSuspend TThostFtdcBoolType
  303. BusinessUnit TThostFtdcBusinessUnitType
  304. RequestID TThostFtdcRequestIDType
  305. UserForceClose TThostFtdcBoolType
  306. IsSwapOrder TThostFtdcBoolType
  307. }
  308. type CThostFtdcInputOrderActionField struct {
  309. BrokerID TThostFtdcBrokerIDType
  310. InvestorID TThostFtdcInvestorIDType
  311. OrderActionRef TThostFtdcOrderActionRefType
  312. OrderRef TThostFtdcOrderRefType
  313. RequestID TThostFtdcRequestIDType
  314. FrontID TThostFtdcFrontIDType
  315. SessionID TThostFtdcSessionIDType
  316. ExchangeID TThostFtdcExchangeIDType
  317. OrderSysID TThostFtdcOrderSysIDType
  318. ActionFlag TThostFtdcActionFlagType
  319. LimitPrice TThostFtdcPriceType
  320. VolumeChange TThostFtdcVolumeType
  321. UserID TThostFtdcUserIDType
  322. InstrumentID TThostFtdcInstrumentIDType
  323. }
  324. type TThostFtdcProductClassType byte
  325. type TThostFtdcYearType int32
  326. type TThostFtdcMonthType int32
  327. type TThostFtdcVolumeMultipleType int32
  328. type TThostFtdcInstLifePhaseType byte
  329. type TThostFtdcPositionTypeType byte
  330. type TThostFtdcPositionDateTypeType byte
  331. type TThostFtdcInstrumentNameType [21]byte
  332. func (b TThostFtdcInstrumentNameType) String() string {
  333. c := [21]byte(b)
  334. return cstring(c[:])
  335. }
  336. type CThostFtdcInstrumentField struct {
  337. InstrumentID TThostFtdcInstrumentIDType
  338. ExchangeID TThostFtdcExchangeIDType
  339. InstrumentName TThostFtdcInstrumentNameType
  340. ExchangeInstID TThostFtdcExchangeInstIDType
  341. ProductID TThostFtdcInstrumentIDType
  342. ProductClass TThostFtdcProductClassType
  343. DeliveryYear TThostFtdcYearType
  344. DeliveryMonth TThostFtdcMonthType
  345. MaxMarketOrderVolume TThostFtdcVolumeType
  346. MinMarketOrderVolume TThostFtdcVolumeType
  347. MaxLimitOrderVolume TThostFtdcVolumeType
  348. MinLimitOrderVolume TThostFtdcVolumeType
  349. VolumeMultiple TThostFtdcVolumeMultipleType
  350. PriceTick TThostFtdcPriceType
  351. CreateDate TThostFtdcDateType
  352. OpenDate TThostFtdcDateType
  353. ExpireDate TThostFtdcDateType
  354. StartDelivDate TThostFtdcDateType
  355. EndDelivDate TThostFtdcDateType
  356. InstLifePhase TThostFtdcInstLifePhaseType
  357. IsTrading TThostFtdcBoolType
  358. PositionType TThostFtdcPositionTypeType
  359. PositionDateType TThostFtdcPositionDateTypeType
  360. LongMarginRatio TThostFtdcRatioType
  361. ShortMarginRatio TThostFtdcRatioType
  362. }
  363. type TThostFtdcInvestorRangeType byte
  364. type CThostFtdcInstrumentCommissionRateField struct {
  365. InstrumentID TThostFtdcInstrumentIDType
  366. InvestorRange TThostFtdcInvestorRangeType
  367. BrokerID TThostFtdcBrokerIDType
  368. InvestorID TThostFtdcInvestorIDType
  369. OpenRatioByMoney TThostFtdcRatioType
  370. OpenRatioByVolume TThostFtdcRatioType
  371. CloseRatioByMoney TThostFtdcRatioType
  372. CloseRatioByVolume TThostFtdcRatioType
  373. CloseTodayRatioByMoney TThostFtdcRatioType
  374. CloseTodayRatioByVolume TThostFtdcRatioType
  375. }
  376. type TThostFtdcHedgeFlagType byte
  377. type CThostFtdcInstrumentMarginRateField struct {
  378. InstrumentID TThostFtdcInstrumentIDType
  379. InvestorRange TThostFtdcInvestorRangeType
  380. BrokerID TThostFtdcBrokerIDType
  381. InvestorID TThostFtdcInvestorIDType
  382. HedgeFlag TThostFtdcHedgeFlagType
  383. LongMarginRatioByMoney TThostFtdcRatioType
  384. LongMarginRatioByVolume TThostFtdcMoneyType
  385. ShortMarginRatioByMoney TThostFtdcRatioType
  386. ShortMarginRatioByVolume TThostFtdcMoneyType
  387. IsRelative TThostFtdcBoolType
  388. }
  389. type CThostFtdcQueryMaxOrderVolumeField struct {
  390. ///经纪公司代码
  391. BrokerID TThostFtdcBrokerIDType
  392. ///投资者代码
  393. InvestorID TThostFtdcInvestorIDType
  394. ///合约代码
  395. InstrumentID TThostFtdcInstrumentIDType
  396. ///买卖方向
  397. Direction TThostFtdcDirectionType
  398. ///开平标志
  399. OffsetFlag TThostFtdcOffsetFlagType
  400. ///投机套保标志
  401. HedgeFlag TThostFtdcHedgeFlagType
  402. ///最大允许报单数量
  403. MaxVolume TThostFtdcVolumeType
  404. }
  405. type TThostFtdcPosiDirectionType byte
  406. type TThostFtdcPositionDateType byte
  407. type TThostFtdcSettlementIDType int32
  408. type CThostFtdcInvestorPositionField struct {
  409. InstrumentID TThostFtdcInstrumentIDType
  410. BrokerID TThostFtdcBrokerIDType
  411. InvestorID TThostFtdcInvestorIDType
  412. PosiDirection TThostFtdcPosiDirectionType
  413. HedgeFlag TThostFtdcHedgeFlagType
  414. PositionDate TThostFtdcPositionDateType
  415. YdPosition TThostFtdcVolumeType
  416. Position TThostFtdcVolumeType
  417. LongFrozen TThostFtdcVolumeType
  418. ShortFrozen TThostFtdcVolumeType
  419. _ int32
  420. LongFrozenAmount TThostFtdcMoneyType
  421. ShortFrozenAmount TThostFtdcMoneyType
  422. OpenVolume TThostFtdcVolumeType
  423. CloseVolume TThostFtdcVolumeType
  424. OpenAmount TThostFtdcMoneyType
  425. CloseAmount TThostFtdcMoneyType
  426. PositionCost TThostFtdcMoneyType
  427. PreMargin TThostFtdcMoneyType
  428. UseMargin TThostFtdcMoneyType
  429. FrozenMargin TThostFtdcMoneyType
  430. FrozenCash TThostFtdcMoneyType
  431. FrozenCommission TThostFtdcMoneyType
  432. CashIn TThostFtdcMoneyType
  433. Commission TThostFtdcMoneyType
  434. CloseProfit TThostFtdcMoneyType
  435. PositionProfit TThostFtdcMoneyType
  436. PreSettlementPrice TThostFtdcPriceType
  437. SettlementPrice TThostFtdcPriceType
  438. TradingDay TThostFtdcDateType
  439. SettlementID TThostFtdcSettlementIDType
  440. OpenCost TThostFtdcMoneyType
  441. ExchangeMargin TThostFtdcMoneyType
  442. CombPosition TThostFtdcVolumeType
  443. CombLongFrozen TThostFtdcVolumeType
  444. CombShortFrozen TThostFtdcVolumeType
  445. _ int32
  446. CloseProfitByDate TThostFtdcMoneyType
  447. CloseProfitByTrade TThostFtdcMoneyType
  448. TodayPosition TThostFtdcVolumeType
  449. _ int32
  450. MarginRateByMoney TThostFtdcRatioType
  451. MarginRateByVolume TThostFtdcRatioType
  452. }
  453. type TThostFtdcTradeTypeType byte
  454. type TThostFtdcTradeIDType [21]byte
  455. func (b TThostFtdcTradeIDType) String() string {
  456. c := [21]byte(b)
  457. return cstring(c[:])
  458. }
  459. type CThostFtdcInvestorPositionDetailField struct {
  460. InstrumentID TThostFtdcInstrumentIDType
  461. BrokerID TThostFtdcBrokerIDType
  462. InvestorID TThostFtdcInvestorIDType
  463. HedgeFlag TThostFtdcHedgeFlagType
  464. Direction TThostFtdcDirectionType
  465. OpenDate TThostFtdcDateType
  466. TradeID TThostFtdcTradeIDType
  467. Volume TThostFtdcVolumeType
  468. _ int32
  469. OpenPrice TThostFtdcPriceType
  470. TradingDay TThostFtdcDateType
  471. SettlementID TThostFtdcSettlementIDType
  472. TradeType TThostFtdcTradeTypeType
  473. CombInstrumentID TThostFtdcInstrumentIDType
  474. ExchangeID TThostFtdcExchangeIDType
  475. _ int32
  476. CloseProfitByDate TThostFtdcMoneyType
  477. CloseProfitByTrade TThostFtdcMoneyType
  478. PositionProfitByDate TThostFtdcMoneyType
  479. PositionProfitByTrade TThostFtdcMoneyType
  480. Margin TThostFtdcMoneyType
  481. ExchMargin TThostFtdcMoneyType
  482. MarginRateByMoney TThostFtdcRatioType
  483. MarginRateByVolume TThostFtdcRatioType
  484. LastSettlementPrice TThostFtdcPriceType
  485. SettlementPrice TThostFtdcPriceType
  486. CloseVolume TThostFtdcVolumeType
  487. _ int32
  488. CloseAmount TThostFtdcMoneyType
  489. }
  490. type TThostFtdcSequenceNoType int32
  491. type TThostFtdcOrderTypeType byte
  492. type TThostFtdcOrderStatusType byte
  493. type TThostFtdcOrderSourceType byte
  494. type TThostFtdcOrderSubmitStatusType byte
  495. type TThostFtdcProductInfoType [11]byte
  496. func (b TThostFtdcProductInfoType) String() string {
  497. c := [11]byte(b)
  498. return cstring(c[:])
  499. }
  500. type CThostFtdcOrderField struct {
  501. BrokerID TThostFtdcBrokerIDType
  502. InvestorID TThostFtdcInvestorIDType
  503. InstrumentID TThostFtdcInstrumentIDType
  504. OrderRef TThostFtdcOrderRefType
  505. UserID TThostFtdcUserIDType
  506. OrderPriceType TThostFtdcOrderPriceTypeType
  507. Direction TThostFtdcDirectionType
  508. CombOffsetFlag TThostFtdcCombOffsetFlagType
  509. CombHedgeFlag TThostFtdcCombHedgeFlagType
  510. LimitPrice TThostFtdcPriceType
  511. VolumeTotalOriginal TThostFtdcVolumeType
  512. TimeCondition TThostFtdcTimeConditionType
  513. GTDDate TThostFtdcDateType
  514. VolumeCondition TThostFtdcVolumeConditionType
  515. MinVolume TThostFtdcVolumeType
  516. ContingentCondition TThostFtdcContingentConditionType
  517. StopPrice TThostFtdcPriceType
  518. ForceCloseReason TThostFtdcForceCloseReasonType
  519. IsAutoSuspend TThostFtdcBoolType
  520. BusinessUnit TThostFtdcBusinessUnitType
  521. RequestID TThostFtdcRequestIDType
  522. OrderLocalID TThostFtdcOrderLocalIDType
  523. ExchangeID TThostFtdcExchangeIDType
  524. ParticipantID TThostFtdcParticipantIDType
  525. ClientID TThostFtdcClientIDType
  526. ExchangeInstID TThostFtdcExchangeInstIDType
  527. TraderID TThostFtdcTraderIDType
  528. InstallID TThostFtdcInstallIDType
  529. OrderSubmitStatus TThostFtdcOrderSubmitStatusType
  530. NotifySequence TThostFtdcSequenceNoType
  531. TradingDay TThostFtdcDateType
  532. SettlementID TThostFtdcSettlementIDType
  533. OrderSysID TThostFtdcOrderSysIDType
  534. OrderSource TThostFtdcOrderSourceType
  535. OrderStatus TThostFtdcOrderStatusType
  536. OrderType TThostFtdcOrderTypeType
  537. VolumeTraded TThostFtdcVolumeType
  538. VolumeTotal TThostFtdcVolumeType
  539. InsertDate TThostFtdcDateType
  540. InsertTime TThostFtdcTimeType
  541. ActiveTime TThostFtdcTimeType
  542. SuspendTime TThostFtdcTimeType
  543. UpdateTime TThostFtdcTimeType
  544. CancelTime TThostFtdcTimeType
  545. ActiveTraderID TThostFtdcTraderIDType
  546. ClearingPartID TThostFtdcParticipantIDType
  547. SequenceNo TThostFtdcSequenceNoType
  548. FrontID TThostFtdcFrontIDType
  549. SessionID TThostFtdcSessionIDType
  550. UserProductInfo TThostFtdcProductInfoType
  551. StatusMsg TThostFtdcErrorMsgType
  552. UserForceClose TThostFtdcBoolType
  553. ActiveUserID TThostFtdcUserIDType
  554. BrokerOrderSeq TThostFtdcSequenceNoType
  555. RelativeOrderSysID TThostFtdcOrderSysIDType
  556. ZCETotalTradedVolume TThostFtdcVolumeType
  557. IsSwapOrder TThostFtdcBoolType
  558. }
  559. type TThostFtdcTradeSourceType byte
  560. type TThostFtdcPriceSourceType byte
  561. type TThostFtdcOffsetFlagType byte
  562. type TThostFtdcTradingRoleType byte
  563. type CThostFtdcTradeField struct {
  564. BrokerID TThostFtdcBrokerIDType
  565. InvestorID TThostFtdcInvestorIDType
  566. InstrumentID TThostFtdcInstrumentIDType
  567. OrderRef TThostFtdcOrderRefType
  568. UserID TThostFtdcUserIDType
  569. ExchangeID TThostFtdcExchangeIDType
  570. TradeID TThostFtdcTradeIDType
  571. Direction TThostFtdcDirectionType
  572. OrderSysID TThostFtdcOrderSysIDType
  573. ParticipantID TThostFtdcParticipantIDType
  574. ClientID TThostFtdcClientIDType
  575. TradingRole TThostFtdcTradingRoleType
  576. ExchangeInstID TThostFtdcExchangeInstIDType
  577. OffsetFlag TThostFtdcOffsetFlagType
  578. HedgeFlag TThostFtdcHedgeFlagType
  579. Price TThostFtdcPriceType
  580. Volume TThostFtdcVolumeType
  581. TradeDate TThostFtdcDateType
  582. TradeTime TThostFtdcTimeType
  583. TradeType TThostFtdcTradeTypeType
  584. PriceSource TThostFtdcPriceSourceType
  585. TraderID TThostFtdcTraderIDType
  586. OrderLocalID TThostFtdcOrderLocalIDType
  587. ClearingPartID TThostFtdcParticipantIDType
  588. BusinessUnit TThostFtdcBusinessUnitType
  589. SequenceNo TThostFtdcSequenceNoType
  590. TradingDay TThostFtdcDateType
  591. SettlementID TThostFtdcSettlementIDType
  592. BrokerOrderSeq TThostFtdcSequenceNoType
  593. TradeSource TThostFtdcTradeSourceType
  594. }
  595. type TThostFtdcAccountIDType [13]byte
  596. func (b TThostFtdcAccountIDType) String() string {
  597. c := [13]byte(b)
  598. return cstring(c[:])
  599. }
  600. type CThostFtdcTradingAccountField struct {
  601. BrokerID TThostFtdcBrokerIDType
  602. AccountID TThostFtdcAccountIDType
  603. PreMortgage TThostFtdcMoneyType
  604. PreCredit TThostFtdcMoneyType
  605. PreDeposit TThostFtdcMoneyType
  606. PreBalance TThostFtdcMoneyType
  607. PreMargin TThostFtdcMoneyType
  608. InterestBase TThostFtdcMoneyType
  609. Interest TThostFtdcMoneyType
  610. Deposit TThostFtdcMoneyType
  611. Withdraw TThostFtdcMoneyType
  612. FrozenMargin TThostFtdcMoneyType
  613. FrozenCash TThostFtdcMoneyType
  614. FrozenCommission TThostFtdcMoneyType
  615. CurrMargin TThostFtdcMoneyType
  616. CashIn TThostFtdcMoneyType
  617. Commission TThostFtdcMoneyType
  618. CloseProfit TThostFtdcMoneyType
  619. PositionProfit TThostFtdcMoneyType
  620. Balance TThostFtdcMoneyType
  621. Available TThostFtdcMoneyType
  622. WithdrawQuota TThostFtdcMoneyType
  623. Reserve TThostFtdcMoneyType
  624. TradingDay TThostFtdcDateType
  625. SettlementID TThostFtdcSettlementIDType
  626. Credit TThostFtdcMoneyType
  627. Mortgage TThostFtdcMoneyType
  628. ExchangeMargin TThostFtdcMoneyType
  629. DeliveryMargin TThostFtdcMoneyType
  630. ExchangeDeliveryMargin TThostFtdcMoneyType
  631. }
  632. type TThostFtdcInstStatusEnterReasonType byte
  633. type TThostFtdcTradingSegmentSNType int32
  634. type TThostFtdcInstrumentStatusType byte
  635. type TThostFtdcSettlementGroupIDType [9]byte
  636. func (b TThostFtdcSettlementGroupIDType) String() string {
  637. c := [9]byte(b)
  638. return cstring(c[:])
  639. }
  640. type CThostFtdcInstrumentStatusField struct {
  641. ExchangeID TThostFtdcExchangeIDType
  642. ExchangeInstID TThostFtdcExchangeInstIDType
  643. SettlementGroupID TThostFtdcSettlementGroupIDType
  644. InstrumentID TThostFtdcInstrumentIDType
  645. InstrumentStatus TThostFtdcInstrumentStatusType
  646. TradingSegmentSN TThostFtdcTradingSegmentSNType
  647. EnterTime TThostFtdcTimeType
  648. EnterReason TThostFtdcInstStatusEnterReasonType
  649. }
  650. type TThostFtdcExchangeNameType [61]byte
  651. func (t TThostFtdcExchangeNameType) String() string {
  652. return cstring(t[:])
  653. }
  654. type CThostFtdcExchangeField struct {
  655. ExchangeID TThostFtdcExchangeIDType
  656. ExchangeName TThostFtdcExchangeNameType
  657. ExchangeProperty byte
  658. }
  659. func cstring(s []byte) string {
  660. for i := range s {
  661. if s[i] == 0 {
  662. return string(s[0:i])
  663. }
  664. }
  665. return string(s)
  666. }