ThostFtdcTraderApi.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. /////////////////////////////////////////////////////////////////////////
  2. ///@system 新一代交易所系统
  3. ///@company 上海期货信息技术有限公司
  4. ///@file ThostFtdcTraderApi.h
  5. ///@brief 定义了客户端接口
  6. ///@history
  7. ///20060106 赵鸿昊 创建该文件
  8. /////////////////////////////////////////////////////////////////////////
  9. #if !defined(THOST_FTDCTRADERAPI_H)
  10. #define THOST_FTDCTRADERAPI_H
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif // _MSC_VER > 1000
  14. #include "ThostFtdcUserApiStruct.h"
  15. #pragma clang diagnostic ignored "-Wdocumentation"
  16. #if defined(ISLIB) && defined(WIN32)
  17. #ifdef LIB_TRADER_API_EXPORT
  18. #define TRADER_API_EXPORT __declspec(dllexport)
  19. #else
  20. #define TRADER_API_EXPORT __declspec(dllimport)
  21. #endif
  22. #else
  23. #define TRADER_API_EXPORT
  24. #endif
  25. class CThostFtdcTraderSpi
  26. {
  27. public:
  28. ///当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。
  29. virtual void OnFrontConnected(){};
  30. ///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。
  31. ///@param nReason 错误原因
  32. /// 0x1001 网络读失败
  33. /// 0x1002 网络写失败
  34. /// 0x2001 接收心跳超时
  35. /// 0x2002 发送心跳失败
  36. /// 0x2003 收到错误报文
  37. virtual void OnFrontDisconnected(int nReason){};
  38. ///心跳超时警告。当长时间未收到报文时,该方法被调用。
  39. ///@param nTimeLapse 距离上次接收报文的时间
  40. virtual void OnHeartBeatWarning(int nTimeLapse){};
  41. ///客户端认证响应
  42. virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  43. ///登录请求响应
  44. virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  45. ///登出请求响应
  46. virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  47. ///用户口令更新请求响应
  48. virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  49. ///资金账户口令更新请求响应
  50. virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  51. ///查询用户当前支持的认证模式的回复
  52. virtual void OnRspUserAuthMethod(CThostFtdcRspUserAuthMethodField *pRspUserAuthMethod, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  53. ///获取图形验证码请求的回复
  54. virtual void OnRspGenUserCaptcha(CThostFtdcRspGenUserCaptchaField *pRspGenUserCaptcha, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  55. ///获取短信验证码请求的回复
  56. virtual void OnRspGenUserText(CThostFtdcRspGenUserTextField *pRspGenUserText, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  57. ///报单录入请求响应
  58. virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  59. ///预埋单录入请求响应
  60. virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  61. ///预埋撤单录入请求响应
  62. virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  63. ///报单操作请求响应
  64. virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  65. ///查询最大报单数量响应
  66. virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  67. ///投资者结算结果确认响应
  68. virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  69. ///删除预埋单响应
  70. virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  71. ///删除预埋撤单响应
  72. virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  73. ///执行宣告录入请求响应
  74. virtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  75. ///执行宣告操作请求响应
  76. virtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  77. ///询价录入请求响应
  78. virtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  79. ///报价录入请求响应
  80. virtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  81. ///报价操作请求响应
  82. virtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  83. ///批量报单操作请求响应
  84. virtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  85. ///期权自对冲录入请求响应
  86. virtual void OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  87. ///期权自对冲操作请求响应
  88. virtual void OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  89. ///申请组合录入请求响应
  90. virtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  91. ///请求查询报单响应
  92. virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  93. ///请求查询成交响应
  94. virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  95. ///请求查询投资者持仓响应
  96. virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  97. ///请求查询资金账户响应
  98. virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  99. ///请求查询投资者响应
  100. virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  101. ///请求查询交易编码响应
  102. virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  103. ///请求查询合约保证金率响应
  104. virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  105. ///请求查询合约手续费率响应
  106. virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  107. ///请求查询交易所响应
  108. virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  109. ///请求查询产品响应
  110. virtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  111. ///请求查询合约响应
  112. virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  113. ///请求查询行情响应
  114. virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  115. ///请求查询投资者结算结果响应
  116. virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  117. ///请求查询转帐银行响应
  118. virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  119. ///请求查询投资者持仓明细响应
  120. virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  121. ///请求查询客户通知响应
  122. virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  123. ///请求查询结算信息确认响应
  124. virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  125. ///请求查询投资者持仓明细响应
  126. virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  127. ///查询保证金监管系统经纪公司资金账户密钥响应
  128. virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  129. ///请求查询仓单折抵信息响应
  130. virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  131. ///请求查询投资者品种/跨品种保证金响应
  132. virtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  133. ///请求查询交易所保证金率响应
  134. virtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  135. ///请求查询交易所调整保证金率响应
  136. virtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  137. ///请求查询汇率响应
  138. virtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  139. ///请求查询二级代理操作员银期权限响应
  140. virtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  141. ///请求查询产品报价汇率
  142. virtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  143. ///请求查询产品组
  144. virtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  145. ///请求查询做市商合约手续费率响应
  146. virtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  147. ///请求查询做市商期权合约手续费响应
  148. virtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  149. ///请求查询报单手续费响应
  150. virtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  151. ///请求查询资金账户响应
  152. virtual void OnRspQrySecAgentTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  153. ///请求查询二级代理商资金校验模式响应
  154. virtual void OnRspQrySecAgentCheckMode(CThostFtdcSecAgentCheckModeField *pSecAgentCheckMode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  155. ///请求查询二级代理商信息响应
  156. virtual void OnRspQrySecAgentTradeInfo(CThostFtdcSecAgentTradeInfoField *pSecAgentTradeInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  157. ///请求查询期权交易成本响应
  158. virtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  159. ///请求查询期权合约手续费响应
  160. virtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  161. ///请求查询执行宣告响应
  162. virtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  163. ///请求查询询价响应
  164. virtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  165. ///请求查询报价响应
  166. virtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  167. ///请求查询期权自对冲响应
  168. virtual void OnRspQryOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  169. ///请求查询投资单元响应
  170. virtual void OnRspQryInvestUnit(CThostFtdcInvestUnitField *pInvestUnit, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  171. ///请求查询组合合约安全系数响应
  172. virtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  173. ///请求查询申请组合响应
  174. virtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  175. ///请求查询转帐流水响应
  176. virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  177. ///请求查询银期签约关系响应
  178. virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  179. ///错误应答
  180. virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  181. ///报单通知
  182. virtual void OnRtnOrder(CThostFtdcOrderField *pOrder) {};
  183. ///成交通知
  184. virtual void OnRtnTrade(CThostFtdcTradeField *pTrade) {};
  185. ///报单录入错误回报
  186. virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) {};
  187. ///报单操作错误回报
  188. virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) {};
  189. ///合约交易状态通知
  190. virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) {};
  191. ///交易所公告通知
  192. virtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin) {};
  193. ///交易通知
  194. virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) {};
  195. ///提示条件单校验错误
  196. virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) {};
  197. ///执行宣告通知
  198. virtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) {};
  199. ///执行宣告录入错误回报
  200. virtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) {};
  201. ///执行宣告操作错误回报
  202. virtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) {};
  203. ///询价录入错误回报
  204. virtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) {};
  205. ///报价通知
  206. virtual void OnRtnQuote(CThostFtdcQuoteField *pQuote) {};
  207. ///报价录入错误回报
  208. virtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) {};
  209. ///报价操作错误回报
  210. virtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) {};
  211. ///询价通知
  212. virtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) {};
  213. ///保证金监控中心用户令牌
  214. virtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) {};
  215. ///批量报单操作错误回报
  216. virtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) {};
  217. ///期权自对冲通知
  218. virtual void OnRtnOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose) {};
  219. ///期权自对冲录入错误回报
  220. virtual void OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo) {};
  221. ///期权自对冲操作错误回报
  222. virtual void OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo) {};
  223. ///申请组合通知
  224. virtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction) {};
  225. ///申请组合录入错误回报
  226. virtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) {};
  227. ///请求查询签约银行响应
  228. virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  229. ///请求查询预埋单响应
  230. virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  231. ///请求查询预埋撤单响应
  232. virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  233. ///请求查询交易通知响应
  234. virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  235. ///请求查询经纪公司交易参数响应
  236. virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  237. ///请求查询经纪公司交易算法响应
  238. virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  239. ///请求查询监控中心用户令牌
  240. virtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  241. ///银行发起银行资金转期货通知
  242. virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) {};
  243. ///银行发起期货资金转银行通知
  244. virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) {};
  245. ///银行发起冲正银行转期货通知
  246. virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) {};
  247. ///银行发起冲正期货转银行通知
  248. virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) {};
  249. ///期货发起银行资金转期货通知
  250. virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) {};
  251. ///期货发起期货资金转银行通知
  252. virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) {};
  253. ///系统运行时期货端手工发起冲正银行转期货请求,银行处理完毕后报盘发回的通知
  254. virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {};
  255. ///系统运行时期货端手工发起冲正期货转银行请求,银行处理完毕后报盘发回的通知
  256. virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {};
  257. ///期货发起查询银行余额通知
  258. virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) {};
  259. ///期货发起银行资金转期货错误回报
  260. virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {};
  261. ///期货发起期货资金转银行错误回报
  262. virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {};
  263. ///系统运行时期货端手工发起冲正银行转期货错误回报
  264. virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {};
  265. ///系统运行时期货端手工发起冲正期货转银行错误回报
  266. virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {};
  267. ///期货发起查询银行余额错误回报
  268. virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) {};
  269. ///期货发起冲正银行转期货请求,银行处理完毕后报盘发回的通知
  270. virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) {};
  271. ///期货发起冲正期货转银行请求,银行处理完毕后报盘发回的通知
  272. virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) {};
  273. ///期货发起银行资金转期货应答
  274. virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  275. ///期货发起期货资金转银行应答
  276. virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  277. ///期货发起查询银行余额应答
  278. virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
  279. ///银行发起银期开户通知
  280. virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) {};
  281. ///银行发起银期销户通知
  282. virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) {};
  283. ///银行发起变更银行账号通知
  284. virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) {};
  285. };
  286. class TRADER_API_EXPORT CThostFtdcTraderApi
  287. {
  288. public:
  289. ///创建TraderApi
  290. ///@param pszFlowPath 存贮订阅信息文件的目录,默认为当前目录
  291. ///@return 创建出的UserApi
  292. static CThostFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = "");
  293. ///获取API的版本信息
  294. ///@retrun 获取到的版本号
  295. static const char *GetApiVersion();
  296. ///删除接口对象本身
  297. ///@remark 不再使用本接口对象时,调用该函数删除接口对象
  298. virtual void Release() = 0;
  299. ///初始化
  300. ///@remark 初始化运行环境,只有调用后,接口才开始工作
  301. virtual void Init() = 0;
  302. ///等待接口线程结束运行
  303. ///@return 线程退出代码
  304. virtual int Join() = 0;
  305. ///获取当前交易日
  306. ///@retrun 获取到的交易日
  307. ///@remark 只有登录成功后,才能得到正确的交易日
  308. virtual const char *GetTradingDay() = 0;
  309. ///注册前置机网络地址
  310. ///@param pszFrontAddress:前置机网络地址。
  311. ///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:17001”。
  312. ///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。
  313. virtual void RegisterFront(char *pszFrontAddress) = 0;
  314. ///注册名字服务器网络地址
  315. ///@param pszNsAddress:名字服务器网络地址。
  316. ///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:12001”。
  317. ///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。
  318. ///@remark RegisterNameServer优先于RegisterFront
  319. virtual void RegisterNameServer(char *pszNsAddress) = 0;
  320. ///注册名字服务器用户信息
  321. ///@param pFensUserInfo:用户信息。
  322. virtual void RegisterFensUserInfo(CThostFtdcFensUserInfoField * pFensUserInfo) = 0;
  323. ///注册回调接口
  324. ///@param pSpi 派生自回调接口类的实例
  325. virtual void RegisterSpi(CThostFtdcTraderSpi *pSpi) = 0;
  326. ///订阅私有流。
  327. ///@param nResumeType 私有流重传方式
  328. /// THOST_TERT_RESTART:从本交易日开始重传
  329. /// THOST_TERT_RESUME:从上次收到的续传
  330. /// THOST_TERT_QUICK:只传送登录后私有流的内容
  331. ///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。
  332. virtual void SubscribePrivateTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;
  333. ///订阅公共流。
  334. ///@param nResumeType 公共流重传方式
  335. /// THOST_TERT_RESTART:从本交易日开始重传
  336. /// THOST_TERT_RESUME:从上次收到的续传
  337. /// THOST_TERT_QUICK:只传送登录后公共流的内容
  338. ///@remark 该方法要在Init方法前调用。若不调用则不会收到公共流的数据。
  339. virtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;
  340. ///客户端认证请求
  341. virtual int ReqAuthenticate(CThostFtdcReqAuthenticateField *pReqAuthenticateField, int nRequestID) = 0;
  342. ///注册用户终端信息,用于中继服务器多连接模式
  343. ///需要在终端认证成功后,用户登录前调用该接口
  344. virtual int RegisterUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;
  345. ///上报用户终端信息,用于中继服务器操作员登录模式
  346. ///操作员登录后,可以多次调用该接口上报客户信息
  347. virtual int SubmitUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;
  348. ///用户登录请求
  349. virtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID, TThostFtdcSystemInfoLenType length, TThostFtdcClientSystemInfoType systemInfo) = 0;
  350. ///登出请求
  351. virtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0;
  352. ///用户口令更新请求
  353. virtual int ReqUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0;
  354. ///资金账户口令更新请求
  355. virtual int ReqTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, int nRequestID) = 0;
  356. ///查询用户当前支持的认证模式
  357. virtual int ReqUserAuthMethod(CThostFtdcReqUserAuthMethodField *pReqUserAuthMethod, int nRequestID) = 0;
  358. ///用户发出获取图形验证码请求
  359. virtual int ReqGenUserCaptcha(CThostFtdcReqGenUserCaptchaField *pReqGenUserCaptcha, int nRequestID) = 0;
  360. ///用户发出获取短信验证码请求
  361. virtual int ReqGenUserText(CThostFtdcReqGenUserTextField *pReqGenUserText, int nRequestID) = 0;
  362. ///用户发出带有图片验证码的登陆请求
  363. virtual int ReqUserLoginWithCaptcha(CThostFtdcReqUserLoginWithCaptchaField *pReqUserLoginWithCaptcha, int nRequestID) = 0;
  364. ///用户发出带有短信验证码的登陆请求
  365. virtual int ReqUserLoginWithText(CThostFtdcReqUserLoginWithTextField *pReqUserLoginWithText, int nRequestID) = 0;
  366. ///用户发出带有动态口令的登陆请求
  367. virtual int ReqUserLoginWithOTP(CThostFtdcReqUserLoginWithOTPField *pReqUserLoginWithOTP, int nRequestID) = 0;
  368. ///报单录入请求
  369. virtual int ReqOrderInsert(CThostFtdcInputOrderField *pInputOrder, int nRequestID) = 0;
  370. ///预埋单录入请求
  371. virtual int ReqParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, int nRequestID) = 0;
  372. ///预埋撤单录入请求
  373. virtual int ReqParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, int nRequestID) = 0;
  374. ///报单操作请求
  375. virtual int ReqOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, int nRequestID) = 0;
  376. ///查询最大报单数量请求
  377. virtual int ReqQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, int nRequestID) = 0;
  378. ///投资者结算结果确认
  379. virtual int ReqSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, int nRequestID) = 0;
  380. ///请求删除预埋单
  381. virtual int ReqRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, int nRequestID) = 0;
  382. ///请求删除预埋撤单
  383. virtual int ReqRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, int nRequestID) = 0;
  384. ///执行宣告录入请求
  385. virtual int ReqExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, int nRequestID) = 0;
  386. ///执行宣告操作请求
  387. virtual int ReqExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, int nRequestID) = 0;
  388. ///询价录入请求
  389. virtual int ReqForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, int nRequestID) = 0;
  390. ///报价录入请求
  391. virtual int ReqQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, int nRequestID) = 0;
  392. ///报价操作请求
  393. virtual int ReqQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, int nRequestID) = 0;
  394. ///批量报单操作请求
  395. virtual int ReqBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, int nRequestID) = 0;
  396. ///期权自对冲录入请求
  397. virtual int ReqOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, int nRequestID) = 0;
  398. ///期权自对冲操作请求
  399. virtual int ReqOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, int nRequestID) = 0;
  400. ///申请组合录入请求
  401. virtual int ReqCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, int nRequestID) = 0;
  402. ///请求查询报单
  403. virtual int ReqQryOrder(CThostFtdcQryOrderField *pQryOrder, int nRequestID) = 0;
  404. ///请求查询成交
  405. virtual int ReqQryTrade(CThostFtdcQryTradeField *pQryTrade, int nRequestID) = 0;
  406. ///请求查询投资者持仓
  407. virtual int ReqQryInvestorPosition(CThostFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0;
  408. ///请求查询资金账户
  409. virtual int ReqQryTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;
  410. ///请求查询投资者
  411. virtual int ReqQryInvestor(CThostFtdcQryInvestorField *pQryInvestor, int nRequestID) = 0;
  412. ///请求查询交易编码
  413. virtual int ReqQryTradingCode(CThostFtdcQryTradingCodeField *pQryTradingCode, int nRequestID) = 0;
  414. ///请求查询合约保证金率
  415. virtual int ReqQryInstrumentMarginRate(CThostFtdcQryInstrumentMarginRateField *pQryInstrumentMarginRate, int nRequestID) = 0;
  416. ///请求查询合约手续费率
  417. virtual int ReqQryInstrumentCommissionRate(CThostFtdcQryInstrumentCommissionRateField *pQryInstrumentCommissionRate, int nRequestID) = 0;
  418. ///请求查询交易所
  419. virtual int ReqQryExchange(CThostFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;
  420. ///请求查询产品
  421. virtual int ReqQryProduct(CThostFtdcQryProductField *pQryProduct, int nRequestID) = 0;
  422. ///请求查询合约
  423. virtual int ReqQryInstrument(CThostFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0;
  424. ///请求查询行情
  425. virtual int ReqQryDepthMarketData(CThostFtdcQryDepthMarketDataField *pQryDepthMarketData, int nRequestID) = 0;
  426. ///请求查询投资者结算结果
  427. virtual int ReqQrySettlementInfo(CThostFtdcQrySettlementInfoField *pQrySettlementInfo, int nRequestID) = 0;
  428. ///请求查询转帐银行
  429. virtual int ReqQryTransferBank(CThostFtdcQryTransferBankField *pQryTransferBank, int nRequestID) = 0;
  430. ///请求查询投资者持仓明细
  431. virtual int ReqQryInvestorPositionDetail(CThostFtdcQryInvestorPositionDetailField *pQryInvestorPositionDetail, int nRequestID) = 0;
  432. ///请求查询客户通知
  433. virtual int ReqQryNotice(CThostFtdcQryNoticeField *pQryNotice, int nRequestID) = 0;
  434. ///请求查询结算信息确认
  435. virtual int ReqQrySettlementInfoConfirm(CThostFtdcQrySettlementInfoConfirmField *pQrySettlementInfoConfirm, int nRequestID) = 0;
  436. ///请求查询投资者持仓明细
  437. virtual int ReqQryInvestorPositionCombineDetail(CThostFtdcQryInvestorPositionCombineDetailField *pQryInvestorPositionCombineDetail, int nRequestID) = 0;
  438. ///请求查询保证金监管系统经纪公司资金账户密钥
  439. virtual int ReqQryCFMMCTradingAccountKey(CThostFtdcQryCFMMCTradingAccountKeyField *pQryCFMMCTradingAccountKey, int nRequestID) = 0;
  440. ///请求查询仓单折抵信息
  441. virtual int ReqQryEWarrantOffset(CThostFtdcQryEWarrantOffsetField *pQryEWarrantOffset, int nRequestID) = 0;
  442. ///请求查询投资者品种/跨品种保证金
  443. virtual int ReqQryInvestorProductGroupMargin(CThostFtdcQryInvestorProductGroupMarginField *pQryInvestorProductGroupMargin, int nRequestID) = 0;
  444. ///请求查询交易所保证金率
  445. virtual int ReqQryExchangeMarginRate(CThostFtdcQryExchangeMarginRateField *pQryExchangeMarginRate, int nRequestID) = 0;
  446. ///请求查询交易所调整保证金率
  447. virtual int ReqQryExchangeMarginRateAdjust(CThostFtdcQryExchangeMarginRateAdjustField *pQryExchangeMarginRateAdjust, int nRequestID) = 0;
  448. ///请求查询汇率
  449. virtual int ReqQryExchangeRate(CThostFtdcQryExchangeRateField *pQryExchangeRate, int nRequestID) = 0;
  450. ///请求查询二级代理操作员银期权限
  451. virtual int ReqQrySecAgentACIDMap(CThostFtdcQrySecAgentACIDMapField *pQrySecAgentACIDMap, int nRequestID) = 0;
  452. ///请求查询产品报价汇率
  453. virtual int ReqQryProductExchRate(CThostFtdcQryProductExchRateField *pQryProductExchRate, int nRequestID) = 0;
  454. ///请求查询产品组
  455. virtual int ReqQryProductGroup(CThostFtdcQryProductGroupField *pQryProductGroup, int nRequestID) = 0;
  456. ///请求查询做市商合约手续费率
  457. virtual int ReqQryMMInstrumentCommissionRate(CThostFtdcQryMMInstrumentCommissionRateField *pQryMMInstrumentCommissionRate, int nRequestID) = 0;
  458. ///请求查询做市商期权合约手续费
  459. virtual int ReqQryMMOptionInstrCommRate(CThostFtdcQryMMOptionInstrCommRateField *pQryMMOptionInstrCommRate, int nRequestID) = 0;
  460. ///请求查询报单手续费
  461. virtual int ReqQryInstrumentOrderCommRate(CThostFtdcQryInstrumentOrderCommRateField *pQryInstrumentOrderCommRate, int nRequestID) = 0;
  462. ///请求查询资金账户
  463. virtual int ReqQrySecAgentTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0;
  464. ///请求查询二级代理商资金校验模式
  465. virtual int ReqQrySecAgentCheckMode(CThostFtdcQrySecAgentCheckModeField *pQrySecAgentCheckMode, int nRequestID) = 0;
  466. ///请求查询二级代理商信息
  467. virtual int ReqQrySecAgentTradeInfo(CThostFtdcQrySecAgentTradeInfoField *pQrySecAgentTradeInfo, int nRequestID) = 0;
  468. ///请求查询期权交易成本
  469. virtual int ReqQryOptionInstrTradeCost(CThostFtdcQryOptionInstrTradeCostField *pQryOptionInstrTradeCost, int nRequestID) = 0;
  470. ///请求查询期权合约手续费
  471. virtual int ReqQryOptionInstrCommRate(CThostFtdcQryOptionInstrCommRateField *pQryOptionInstrCommRate, int nRequestID) = 0;
  472. ///请求查询执行宣告
  473. virtual int ReqQryExecOrder(CThostFtdcQryExecOrderField *pQryExecOrder, int nRequestID) = 0;
  474. ///请求查询询价
  475. virtual int ReqQryForQuote(CThostFtdcQryForQuoteField *pQryForQuote, int nRequestID) = 0;
  476. ///请求查询报价
  477. virtual int ReqQryQuote(CThostFtdcQryQuoteField *pQryQuote, int nRequestID) = 0;
  478. ///请求查询期权自对冲
  479. virtual int ReqQryOptionSelfClose(CThostFtdcQryOptionSelfCloseField *pQryOptionSelfClose, int nRequestID) = 0;
  480. ///请求查询投资单元
  481. virtual int ReqQryInvestUnit(CThostFtdcQryInvestUnitField *pQryInvestUnit, int nRequestID) = 0;
  482. ///请求查询组合合约安全系数
  483. virtual int ReqQryCombInstrumentGuard(CThostFtdcQryCombInstrumentGuardField *pQryCombInstrumentGuard, int nRequestID) = 0;
  484. ///请求查询申请组合
  485. virtual int ReqQryCombAction(CThostFtdcQryCombActionField *pQryCombAction, int nRequestID) = 0;
  486. ///请求查询转帐流水
  487. virtual int ReqQryTransferSerial(CThostFtdcQryTransferSerialField *pQryTransferSerial, int nRequestID) = 0;
  488. ///请求查询银期签约关系
  489. virtual int ReqQryAccountregister(CThostFtdcQryAccountregisterField *pQryAccountregister, int nRequestID) = 0;
  490. ///请求查询签约银行
  491. virtual int ReqQryContractBank(CThostFtdcQryContractBankField *pQryContractBank, int nRequestID) = 0;
  492. ///请求查询预埋单
  493. virtual int ReqQryParkedOrder(CThostFtdcQryParkedOrderField *pQryParkedOrder, int nRequestID) = 0;
  494. ///请求查询预埋撤单
  495. virtual int ReqQryParkedOrderAction(CThostFtdcQryParkedOrderActionField *pQryParkedOrderAction, int nRequestID) = 0;
  496. ///请求查询交易通知
  497. virtual int ReqQryTradingNotice(CThostFtdcQryTradingNoticeField *pQryTradingNotice, int nRequestID) = 0;
  498. ///请求查询经纪公司交易参数
  499. virtual int ReqQryBrokerTradingParams(CThostFtdcQryBrokerTradingParamsField *pQryBrokerTradingParams, int nRequestID) = 0;
  500. ///请求查询经纪公司交易算法
  501. virtual int ReqQryBrokerTradingAlgos(CThostFtdcQryBrokerTradingAlgosField *pQryBrokerTradingAlgos, int nRequestID) = 0;
  502. ///请求查询监控中心用户令牌
  503. virtual int ReqQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, int nRequestID) = 0;
  504. ///期货发起银行资金转期货请求
  505. virtual int ReqFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;
  506. ///期货发起期货资金转银行请求
  507. virtual int ReqFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;
  508. ///期货发起查询银行余额请求
  509. virtual int ReqQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, int nRequestID) = 0;
  510. protected:
  511. ~CThostFtdcTraderApi(){};
  512. };
  513. #endif