diff --git a/vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp b/vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp index 6a29eb70..7c7bf54b 100644 --- a/vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp +++ b/vnpy/api/ctp/vnctp/vnctptd/vnctptd.cpp @@ -7,2221 +7,2263 @@ ///------------------------------------------------------------------------------------- ///C++的回调函数将数据保存到队列中 ///------------------------------------------------------------------------------------- - void TdApi::OnFrontConnected() { - Task task = Task(); - task.task_name = ONFRONTCONNECTED; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONFRONTCONNECTED; + this->task_queue.push(task); }; void TdApi::OnFrontDisconnected(int nReason) { - Task task = Task(); - task.task_name = ONFRONTDISCONNECTED; - task.task_id = nReason; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONFRONTDISCONNECTED; + task.task_id = nReason; + this->task_queue.push(task); }; void TdApi::OnHeartBeatWarning(int nTimeLapse) { - Task task = Task(); - task.task_name = ONHEARTBEATWARNING; - task.task_id = nTimeLapse; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONHEARTBEATWARNING; + task.task_id = nTimeLapse; + this->task_queue.push(task); }; void TdApi::OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPAUTHENTICATE; - if (pRspAuthenticateField) - { - CThostFtdcRspAuthenticateField *task_data = new CThostFtdcRspAuthenticateField(); - *task_data = *pRspAuthenticateField; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPAUTHENTICATE; + if (pRspAuthenticateField) + { + CThostFtdcRspAuthenticateField *task_data = new CThostFtdcRspAuthenticateField(); + *task_data = *pRspAuthenticateField; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPUSERLOGIN; - if (pRspUserLogin) - { - CThostFtdcRspUserLoginField *task_data = new CThostFtdcRspUserLoginField(); - *task_data = *pRspUserLogin; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPUSERLOGIN; + if (pRspUserLogin) + { + CThostFtdcRspUserLoginField *task_data = new CThostFtdcRspUserLoginField(); + *task_data = *pRspUserLogin; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPUSERLOGOUT; - if (pUserLogout) - { - CThostFtdcUserLogoutField *task_data = new CThostFtdcUserLogoutField(); - *task_data = *pUserLogout; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPUSERLOGOUT; + if (pUserLogout) + { + CThostFtdcUserLogoutField *task_data = new CThostFtdcUserLogoutField(); + *task_data = *pUserLogout; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPUSERPASSWORDUPDATE; - if (pUserPasswordUpdate) - { - CThostFtdcUserPasswordUpdateField *task_data = new CThostFtdcUserPasswordUpdateField(); - *task_data = *pUserPasswordUpdate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPUSERPASSWORDUPDATE; + if (pUserPasswordUpdate) + { + CThostFtdcUserPasswordUpdateField *task_data = new CThostFtdcUserPasswordUpdateField(); + *task_data = *pUserPasswordUpdate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPTRADINGACCOUNTPASSWORDUPDATE; - if (pTradingAccountPasswordUpdate) - { - CThostFtdcTradingAccountPasswordUpdateField *task_data = new CThostFtdcTradingAccountPasswordUpdateField(); - *task_data = *pTradingAccountPasswordUpdate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPTRADINGACCOUNTPASSWORDUPDATE; + if (pTradingAccountPasswordUpdate) + { + CThostFtdcTradingAccountPasswordUpdateField *task_data = new CThostFtdcTradingAccountPasswordUpdateField(); + *task_data = *pTradingAccountPasswordUpdate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPORDERINSERT; - if (pInputOrder) - { - CThostFtdcInputOrderField *task_data = new CThostFtdcInputOrderField(); - *task_data = *pInputOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPORDERINSERT; + if (pInputOrder) + { + CThostFtdcInputOrderField *task_data = new CThostFtdcInputOrderField(); + *task_data = *pInputOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPPARKEDORDERINSERT; - if (pParkedOrder) - { - CThostFtdcParkedOrderField *task_data = new CThostFtdcParkedOrderField(); - *task_data = *pParkedOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPPARKEDORDERINSERT; + if (pParkedOrder) + { + CThostFtdcParkedOrderField *task_data = new CThostFtdcParkedOrderField(); + *task_data = *pParkedOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPPARKEDORDERACTION; - if (pParkedOrderAction) - { - CThostFtdcParkedOrderActionField *task_data = new CThostFtdcParkedOrderActionField(); - *task_data = *pParkedOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPPARKEDORDERACTION; + if (pParkedOrderAction) + { + CThostFtdcParkedOrderActionField *task_data = new CThostFtdcParkedOrderActionField(); + *task_data = *pParkedOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPORDERACTION; - if (pInputOrderAction) - { - CThostFtdcInputOrderActionField *task_data = new CThostFtdcInputOrderActionField(); - *task_data = *pInputOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPORDERACTION; + if (pInputOrderAction) + { + CThostFtdcInputOrderActionField *task_data = new CThostFtdcInputOrderActionField(); + *task_data = *pInputOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQUERYMAXORDERVOLUME; - if (pQueryMaxOrderVolume) - { - CThostFtdcQueryMaxOrderVolumeField *task_data = new CThostFtdcQueryMaxOrderVolumeField(); - *task_data = *pQueryMaxOrderVolume; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQUERYMAXORDERVOLUME; + if (pQueryMaxOrderVolume) + { + CThostFtdcQueryMaxOrderVolumeField *task_data = new CThostFtdcQueryMaxOrderVolumeField(); + *task_data = *pQueryMaxOrderVolume; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPSETTLEMENTINFOCONFIRM; - if (pSettlementInfoConfirm) - { - CThostFtdcSettlementInfoConfirmField *task_data = new CThostFtdcSettlementInfoConfirmField(); - *task_data = *pSettlementInfoConfirm; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPSETTLEMENTINFOCONFIRM; + if (pSettlementInfoConfirm) + { + CThostFtdcSettlementInfoConfirmField *task_data = new CThostFtdcSettlementInfoConfirmField(); + *task_data = *pSettlementInfoConfirm; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPREMOVEPARKEDORDER; - if (pRemoveParkedOrder) - { - CThostFtdcRemoveParkedOrderField *task_data = new CThostFtdcRemoveParkedOrderField(); - *task_data = *pRemoveParkedOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPREMOVEPARKEDORDER; + if (pRemoveParkedOrder) + { + CThostFtdcRemoveParkedOrderField *task_data = new CThostFtdcRemoveParkedOrderField(); + *task_data = *pRemoveParkedOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPREMOVEPARKEDORDERACTION; - if (pRemoveParkedOrderAction) - { - CThostFtdcRemoveParkedOrderActionField *task_data = new CThostFtdcRemoveParkedOrderActionField(); - *task_data = *pRemoveParkedOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPREMOVEPARKEDORDERACTION; + if (pRemoveParkedOrderAction) + { + CThostFtdcRemoveParkedOrderActionField *task_data = new CThostFtdcRemoveParkedOrderActionField(); + *task_data = *pRemoveParkedOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPEXECORDERINSERT; - if (pInputExecOrder) - { - CThostFtdcInputExecOrderField *task_data = new CThostFtdcInputExecOrderField(); - *task_data = *pInputExecOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPEXECORDERINSERT; + if (pInputExecOrder) + { + CThostFtdcInputExecOrderField *task_data = new CThostFtdcInputExecOrderField(); + *task_data = *pInputExecOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPEXECORDERACTION; - if (pInputExecOrderAction) - { - CThostFtdcInputExecOrderActionField *task_data = new CThostFtdcInputExecOrderActionField(); - *task_data = *pInputExecOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPEXECORDERACTION; + if (pInputExecOrderAction) + { + CThostFtdcInputExecOrderActionField *task_data = new CThostFtdcInputExecOrderActionField(); + *task_data = *pInputExecOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPFORQUOTEINSERT; - if (pInputForQuote) - { - CThostFtdcInputForQuoteField *task_data = new CThostFtdcInputForQuoteField(); - *task_data = *pInputForQuote; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPFORQUOTEINSERT; + if (pInputForQuote) + { + CThostFtdcInputForQuoteField *task_data = new CThostFtdcInputForQuoteField(); + *task_data = *pInputForQuote; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQUOTEINSERT; - if (pInputQuote) - { - CThostFtdcInputQuoteField *task_data = new CThostFtdcInputQuoteField(); - *task_data = *pInputQuote; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQUOTEINSERT; + if (pInputQuote) + { + CThostFtdcInputQuoteField *task_data = new CThostFtdcInputQuoteField(); + *task_data = *pInputQuote; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQUOTEACTION; - if (pInputQuoteAction) - { - CThostFtdcInputQuoteActionField *task_data = new CThostFtdcInputQuoteActionField(); - *task_data = *pInputQuoteAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQUOTEACTION; + if (pInputQuoteAction) + { + CThostFtdcInputQuoteActionField *task_data = new CThostFtdcInputQuoteActionField(); + *task_data = *pInputQuoteAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPBATCHORDERACTION; - if (pInputBatchOrderAction) - { - CThostFtdcInputBatchOrderActionField *task_data = new CThostFtdcInputBatchOrderActionField(); - *task_data = *pInputBatchOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPBATCHORDERACTION; + if (pInputBatchOrderAction) + { + CThostFtdcInputBatchOrderActionField *task_data = new CThostFtdcInputBatchOrderActionField(); + *task_data = *pInputBatchOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPOPTIONSELFCLOSEINSERT; - if (pInputOptionSelfClose) - { - CThostFtdcInputOptionSelfCloseField *task_data = new CThostFtdcInputOptionSelfCloseField(); - *task_data = *pInputOptionSelfClose; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPOPTIONSELFCLOSEINSERT; + if (pInputOptionSelfClose) + { + CThostFtdcInputOptionSelfCloseField *task_data = new CThostFtdcInputOptionSelfCloseField(); + *task_data = *pInputOptionSelfClose; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPOPTIONSELFCLOSEACTION; - if (pInputOptionSelfCloseAction) - { - CThostFtdcInputOptionSelfCloseActionField *task_data = new CThostFtdcInputOptionSelfCloseActionField(); - *task_data = *pInputOptionSelfCloseAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPOPTIONSELFCLOSEACTION; + if (pInputOptionSelfCloseAction) + { + CThostFtdcInputOptionSelfCloseActionField *task_data = new CThostFtdcInputOptionSelfCloseActionField(); + *task_data = *pInputOptionSelfCloseAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPCOMBACTIONINSERT; - if (pInputCombAction) - { - CThostFtdcInputCombActionField *task_data = new CThostFtdcInputCombActionField(); - *task_data = *pInputCombAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPCOMBACTIONINSERT; + if (pInputCombAction) + { + CThostFtdcInputCombActionField *task_data = new CThostFtdcInputCombActionField(); + *task_data = *pInputCombAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYORDER; - if (pOrder) - { - CThostFtdcOrderField *task_data = new CThostFtdcOrderField(); - *task_data = *pOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYORDER; + if (pOrder) + { + CThostFtdcOrderField *task_data = new CThostFtdcOrderField(); + *task_data = *pOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRADE; - if (pTrade) - { - CThostFtdcTradeField *task_data = new CThostFtdcTradeField(); - *task_data = *pTrade; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYTRADE; + if (pTrade) + { + CThostFtdcTradeField *task_data = new CThostFtdcTradeField(); + *task_data = *pTrade; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTORPOSITION; - if (pInvestorPosition) - { - CThostFtdcInvestorPositionField *task_data = new CThostFtdcInvestorPositionField(); - *task_data = *pInvestorPosition; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINVESTORPOSITION; + if (pInvestorPosition) + { + CThostFtdcInvestorPositionField *task_data = new CThostFtdcInvestorPositionField(); + *task_data = *pInvestorPosition; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRADINGACCOUNT; - if (pTradingAccount) - { - CThostFtdcTradingAccountField *task_data = new CThostFtdcTradingAccountField(); - *task_data = *pTradingAccount; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYTRADINGACCOUNT; + if (pTradingAccount) + { + CThostFtdcTradingAccountField *task_data = new CThostFtdcTradingAccountField(); + *task_data = *pTradingAccount; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTOR; - if (pInvestor) - { - CThostFtdcInvestorField *task_data = new CThostFtdcInvestorField(); - *task_data = *pInvestor; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINVESTOR; + if (pInvestor) + { + CThostFtdcInvestorField *task_data = new CThostFtdcInvestorField(); + *task_data = *pInvestor; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRADINGCODE; - if (pTradingCode) - { - CThostFtdcTradingCodeField *task_data = new CThostFtdcTradingCodeField(); - *task_data = *pTradingCode; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYTRADINGCODE; + if (pTradingCode) + { + CThostFtdcTradingCodeField *task_data = new CThostFtdcTradingCodeField(); + *task_data = *pTradingCode; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINSTRUMENTMARGINRATE; - if (pInstrumentMarginRate) - { - CThostFtdcInstrumentMarginRateField *task_data = new CThostFtdcInstrumentMarginRateField(); - *task_data = *pInstrumentMarginRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINSTRUMENTMARGINRATE; + if (pInstrumentMarginRate) + { + CThostFtdcInstrumentMarginRateField *task_data = new CThostFtdcInstrumentMarginRateField(); + *task_data = *pInstrumentMarginRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINSTRUMENTCOMMISSIONRATE; - if (pInstrumentCommissionRate) - { - CThostFtdcInstrumentCommissionRateField *task_data = new CThostFtdcInstrumentCommissionRateField(); - *task_data = *pInstrumentCommissionRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINSTRUMENTCOMMISSIONRATE; + if (pInstrumentCommissionRate) + { + CThostFtdcInstrumentCommissionRateField *task_data = new CThostFtdcInstrumentCommissionRateField(); + *task_data = *pInstrumentCommissionRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYEXCHANGE; - if (pExchange) - { - CThostFtdcExchangeField *task_data = new CThostFtdcExchangeField(); - *task_data = *pExchange; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYEXCHANGE; + if (pExchange) + { + CThostFtdcExchangeField *task_data = new CThostFtdcExchangeField(); + *task_data = *pExchange; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYPRODUCT; - if (pProduct) - { - CThostFtdcProductField *task_data = new CThostFtdcProductField(); - *task_data = *pProduct; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYPRODUCT; + if (pProduct) + { + CThostFtdcProductField *task_data = new CThostFtdcProductField(); + *task_data = *pProduct; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINSTRUMENT; - if (pInstrument) - { - CThostFtdcInstrumentField *task_data = new CThostFtdcInstrumentField(); - *task_data = *pInstrument; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINSTRUMENT; + if (pInstrument) + { + CThostFtdcInstrumentField *task_data = new CThostFtdcInstrumentField(); + *task_data = *pInstrument; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYDEPTHMARKETDATA; - if (pDepthMarketData) - { - CThostFtdcDepthMarketDataField *task_data = new CThostFtdcDepthMarketDataField(); - *task_data = *pDepthMarketData; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYDEPTHMARKETDATA; + if (pDepthMarketData) + { + CThostFtdcDepthMarketDataField *task_data = new CThostFtdcDepthMarketDataField(); + *task_data = *pDepthMarketData; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYSETTLEMENTINFO; - if (pSettlementInfo) - { - CThostFtdcSettlementInfoField *task_data = new CThostFtdcSettlementInfoField(); - *task_data = *pSettlementInfo; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYSETTLEMENTINFO; + if (pSettlementInfo) + { + CThostFtdcSettlementInfoField *task_data = new CThostFtdcSettlementInfoField(); + *task_data = *pSettlementInfo; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRANSFERBANK; - if (pTransferBank) - { - CThostFtdcTransferBankField *task_data = new CThostFtdcTransferBankField(); - *task_data = *pTransferBank; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYTRANSFERBANK; + if (pTransferBank) + { + CThostFtdcTransferBankField *task_data = new CThostFtdcTransferBankField(); + *task_data = *pTransferBank; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTORPOSITIONDETAIL; - if (pInvestorPositionDetail) - { - CThostFtdcInvestorPositionDetailField *task_data = new CThostFtdcInvestorPositionDetailField(); - *task_data = *pInvestorPositionDetail; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINVESTORPOSITIONDETAIL; + if (pInvestorPositionDetail) + { + CThostFtdcInvestorPositionDetailField *task_data = new CThostFtdcInvestorPositionDetailField(); + *task_data = *pInvestorPositionDetail; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYNOTICE; - if (pNotice) - { - CThostFtdcNoticeField *task_data = new CThostFtdcNoticeField(); - *task_data = *pNotice; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYNOTICE; + if (pNotice) + { + CThostFtdcNoticeField *task_data = new CThostFtdcNoticeField(); + *task_data = *pNotice; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYSETTLEMENTINFOCONFIRM; - if (pSettlementInfoConfirm) - { - CThostFtdcSettlementInfoConfirmField *task_data = new CThostFtdcSettlementInfoConfirmField(); - *task_data = *pSettlementInfoConfirm; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYSETTLEMENTINFOCONFIRM; + if (pSettlementInfoConfirm) + { + CThostFtdcSettlementInfoConfirmField *task_data = new CThostFtdcSettlementInfoConfirmField(); + *task_data = *pSettlementInfoConfirm; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTORPOSITIONCOMBINEDETAIL; - if (pInvestorPositionCombineDetail) - { - CThostFtdcInvestorPositionCombineDetailField *task_data = new CThostFtdcInvestorPositionCombineDetailField(); - *task_data = *pInvestorPositionCombineDetail; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINVESTORPOSITIONCOMBINEDETAIL; + if (pInvestorPositionCombineDetail) + { + CThostFtdcInvestorPositionCombineDetailField *task_data = new CThostFtdcInvestorPositionCombineDetailField(); + *task_data = *pInvestorPositionCombineDetail; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYCFMMCTRADINGACCOUNTKEY; - if (pCFMMCTradingAccountKey) - { - CThostFtdcCFMMCTradingAccountKeyField *task_data = new CThostFtdcCFMMCTradingAccountKeyField(); - *task_data = *pCFMMCTradingAccountKey; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYCFMMCTRADINGACCOUNTKEY; + if (pCFMMCTradingAccountKey) + { + CThostFtdcCFMMCTradingAccountKeyField *task_data = new CThostFtdcCFMMCTradingAccountKeyField(); + *task_data = *pCFMMCTradingAccountKey; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYEWARRANTOFFSET; - if (pEWarrantOffset) - { - CThostFtdcEWarrantOffsetField *task_data = new CThostFtdcEWarrantOffsetField(); - *task_data = *pEWarrantOffset; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYEWARRANTOFFSET; + if (pEWarrantOffset) + { + CThostFtdcEWarrantOffsetField *task_data = new CThostFtdcEWarrantOffsetField(); + *task_data = *pEWarrantOffset; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTORPRODUCTGROUPMARGIN; - if (pInvestorProductGroupMargin) - { - CThostFtdcInvestorProductGroupMarginField *task_data = new CThostFtdcInvestorProductGroupMarginField(); - *task_data = *pInvestorProductGroupMargin; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINVESTORPRODUCTGROUPMARGIN; + if (pInvestorProductGroupMargin) + { + CThostFtdcInvestorProductGroupMarginField *task_data = new CThostFtdcInvestorProductGroupMarginField(); + *task_data = *pInvestorProductGroupMargin; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYEXCHANGEMARGINRATE; - if (pExchangeMarginRate) - { - CThostFtdcExchangeMarginRateField *task_data = new CThostFtdcExchangeMarginRateField(); - *task_data = *pExchangeMarginRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYEXCHANGEMARGINRATE; + if (pExchangeMarginRate) + { + CThostFtdcExchangeMarginRateField *task_data = new CThostFtdcExchangeMarginRateField(); + *task_data = *pExchangeMarginRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYEXCHANGEMARGINRATEADJUST; - if (pExchangeMarginRateAdjust) - { - CThostFtdcExchangeMarginRateAdjustField *task_data = new CThostFtdcExchangeMarginRateAdjustField(); - *task_data = *pExchangeMarginRateAdjust; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYEXCHANGEMARGINRATEADJUST; + if (pExchangeMarginRateAdjust) + { + CThostFtdcExchangeMarginRateAdjustField *task_data = new CThostFtdcExchangeMarginRateAdjustField(); + *task_data = *pExchangeMarginRateAdjust; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYEXCHANGERATE; - if (pExchangeRate) - { - CThostFtdcExchangeRateField *task_data = new CThostFtdcExchangeRateField(); - *task_data = *pExchangeRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYEXCHANGERATE; + if (pExchangeRate) + { + CThostFtdcExchangeRateField *task_data = new CThostFtdcExchangeRateField(); + *task_data = *pExchangeRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYSECAGENTACIDMAP; - if (pSecAgentACIDMap) - { - CThostFtdcSecAgentACIDMapField *task_data = new CThostFtdcSecAgentACIDMapField(); - *task_data = *pSecAgentACIDMap; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYSECAGENTACIDMAP; + if (pSecAgentACIDMap) + { + CThostFtdcSecAgentACIDMapField *task_data = new CThostFtdcSecAgentACIDMapField(); + *task_data = *pSecAgentACIDMap; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYPRODUCTEXCHRATE; - if (pProductExchRate) - { - CThostFtdcProductExchRateField *task_data = new CThostFtdcProductExchRateField(); - *task_data = *pProductExchRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYPRODUCTEXCHRATE; + if (pProductExchRate) + { + CThostFtdcProductExchRateField *task_data = new CThostFtdcProductExchRateField(); + *task_data = *pProductExchRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYPRODUCTGROUP; - if (pProductGroup) - { - CThostFtdcProductGroupField *task_data = new CThostFtdcProductGroupField(); - *task_data = *pProductGroup; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYPRODUCTGROUP; + if (pProductGroup) + { + CThostFtdcProductGroupField *task_data = new CThostFtdcProductGroupField(); + *task_data = *pProductGroup; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYMMINSTRUMENTCOMMISSIONRATE; - if (pMMInstrumentCommissionRate) - { - CThostFtdcMMInstrumentCommissionRateField *task_data = new CThostFtdcMMInstrumentCommissionRateField(); - *task_data = *pMMInstrumentCommissionRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYMMINSTRUMENTCOMMISSIONRATE; + if (pMMInstrumentCommissionRate) + { + CThostFtdcMMInstrumentCommissionRateField *task_data = new CThostFtdcMMInstrumentCommissionRateField(); + *task_data = *pMMInstrumentCommissionRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYMMOPTIONINSTRCOMMRATE; - if (pMMOptionInstrCommRate) - { - CThostFtdcMMOptionInstrCommRateField *task_data = new CThostFtdcMMOptionInstrCommRateField(); - *task_data = *pMMOptionInstrCommRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYMMOPTIONINSTRCOMMRATE; + if (pMMOptionInstrCommRate) + { + CThostFtdcMMOptionInstrCommRateField *task_data = new CThostFtdcMMOptionInstrCommRateField(); + *task_data = *pMMOptionInstrCommRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINSTRUMENTORDERCOMMRATE; - if (pInstrumentOrderCommRate) - { - CThostFtdcInstrumentOrderCommRateField *task_data = new CThostFtdcInstrumentOrderCommRateField(); - *task_data = *pInstrumentOrderCommRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINSTRUMENTORDERCOMMRATE; + if (pInstrumentOrderCommRate) + { + CThostFtdcInstrumentOrderCommRateField *task_data = new CThostFtdcInstrumentOrderCommRateField(); + *task_data = *pInstrumentOrderCommRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); +}; + +void TdApi::OnRspQrySecAgentTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) +{ + Task task = Task(); + task.task_name = ONRSPQRYSECAGENTTRADINGACCOUNT; + if (pTradingAccount) + { + CThostFtdcTradingAccountField *task_data = new CThostFtdcTradingAccountField(); + *task_data = *pTradingAccount; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); +}; + +void TdApi::OnRspQrySecAgentCheckMode(CThostFtdcSecAgentCheckModeField *pSecAgentCheckMode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) +{ + Task task = Task(); + task.task_name = ONRSPQRYSECAGENTCHECKMODE; + if (pSecAgentCheckMode) + { + CThostFtdcSecAgentCheckModeField *task_data = new CThostFtdcSecAgentCheckModeField(); + *task_data = *pSecAgentCheckMode; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYOPTIONINSTRTRADECOST; - if (pOptionInstrTradeCost) - { - CThostFtdcOptionInstrTradeCostField *task_data = new CThostFtdcOptionInstrTradeCostField(); - *task_data = *pOptionInstrTradeCost; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYOPTIONINSTRTRADECOST; + if (pOptionInstrTradeCost) + { + CThostFtdcOptionInstrTradeCostField *task_data = new CThostFtdcOptionInstrTradeCostField(); + *task_data = *pOptionInstrTradeCost; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYOPTIONINSTRCOMMRATE; - if (pOptionInstrCommRate) - { - CThostFtdcOptionInstrCommRateField *task_data = new CThostFtdcOptionInstrCommRateField(); - *task_data = *pOptionInstrCommRate; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYOPTIONINSTRCOMMRATE; + if (pOptionInstrCommRate) + { + CThostFtdcOptionInstrCommRateField *task_data = new CThostFtdcOptionInstrCommRateField(); + *task_data = *pOptionInstrCommRate; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYEXECORDER; - if (pExecOrder) - { - CThostFtdcExecOrderField *task_data = new CThostFtdcExecOrderField(); - *task_data = *pExecOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYEXECORDER; + if (pExecOrder) + { + CThostFtdcExecOrderField *task_data = new CThostFtdcExecOrderField(); + *task_data = *pExecOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYFORQUOTE; - if (pForQuote) - { - CThostFtdcForQuoteField *task_data = new CThostFtdcForQuoteField(); - *task_data = *pForQuote; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYFORQUOTE; + if (pForQuote) + { + CThostFtdcForQuoteField *task_data = new CThostFtdcForQuoteField(); + *task_data = *pForQuote; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYQUOTE; - if (pQuote) - { - CThostFtdcQuoteField *task_data = new CThostFtdcQuoteField(); - *task_data = *pQuote; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYQUOTE; + if (pQuote) + { + CThostFtdcQuoteField *task_data = new CThostFtdcQuoteField(); + *task_data = *pQuote; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYOPTIONSELFCLOSE; - if (pOptionSelfClose) - { - CThostFtdcOptionSelfCloseField *task_data = new CThostFtdcOptionSelfCloseField(); - *task_data = *pOptionSelfClose; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYOPTIONSELFCLOSE; + if (pOptionSelfClose) + { + CThostFtdcOptionSelfCloseField *task_data = new CThostFtdcOptionSelfCloseField(); + *task_data = *pOptionSelfClose; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryInvestUnit(CThostFtdcInvestUnitField *pInvestUnit, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTUNIT; - if (pInvestUnit) - { - CThostFtdcInvestUnitField *task_data = new CThostFtdcInvestUnitField(); - *task_data = *pInvestUnit; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYINVESTUNIT; + if (pInvestUnit) + { + CThostFtdcInvestUnitField *task_data = new CThostFtdcInvestUnitField(); + *task_data = *pInvestUnit; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYCOMBINSTRUMENTGUARD; - if (pCombInstrumentGuard) - { - CThostFtdcCombInstrumentGuardField *task_data = new CThostFtdcCombInstrumentGuardField(); - *task_data = *pCombInstrumentGuard; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYCOMBINSTRUMENTGUARD; + if (pCombInstrumentGuard) + { + CThostFtdcCombInstrumentGuardField *task_data = new CThostFtdcCombInstrumentGuardField(); + *task_data = *pCombInstrumentGuard; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYCOMBACTION; - if (pCombAction) - { - CThostFtdcCombActionField *task_data = new CThostFtdcCombActionField(); - *task_data = *pCombAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYCOMBACTION; + if (pCombAction) + { + CThostFtdcCombActionField *task_data = new CThostFtdcCombActionField(); + *task_data = *pCombAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRANSFERSERIAL; - if (pTransferSerial) - { - CThostFtdcTransferSerialField *task_data = new CThostFtdcTransferSerialField(); - *task_data = *pTransferSerial; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYTRANSFERSERIAL; + if (pTransferSerial) + { + CThostFtdcTransferSerialField *task_data = new CThostFtdcTransferSerialField(); + *task_data = *pTransferSerial; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYACCOUNTREGISTER; - if (pAccountregister) - { - CThostFtdcAccountregisterField *task_data = new CThostFtdcAccountregisterField(); - *task_data = *pAccountregister; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYACCOUNTREGISTER; + if (pAccountregister) + { + CThostFtdcAccountregisterField *task_data = new CThostFtdcAccountregisterField(); + *task_data = *pAccountregister; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPERROR; - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPERROR; + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRtnOrder(CThostFtdcOrderField *pOrder) { - Task task = Task(); - task.task_name = ONRTNORDER; - if (pOrder) - { - CThostFtdcOrderField *task_data = new CThostFtdcOrderField(); - *task_data = *pOrder; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNORDER; + if (pOrder) + { + CThostFtdcOrderField *task_data = new CThostFtdcOrderField(); + *task_data = *pOrder; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnTrade(CThostFtdcTradeField *pTrade) { - Task task = Task(); - task.task_name = ONRTNTRADE; - if (pTrade) - { - CThostFtdcTradeField *task_data = new CThostFtdcTradeField(); - *task_data = *pTrade; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNTRADE; + if (pTrade) + { + CThostFtdcTradeField *task_data = new CThostFtdcTradeField(); + *task_data = *pTrade; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNORDERINSERT; - if (pInputOrder) - { - CThostFtdcInputOrderField *task_data = new CThostFtdcInputOrderField(); - *task_data = *pInputOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNORDERINSERT; + if (pInputOrder) + { + CThostFtdcInputOrderField *task_data = new CThostFtdcInputOrderField(); + *task_data = *pInputOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNORDERACTION; - if (pOrderAction) - { - CThostFtdcOrderActionField *task_data = new CThostFtdcOrderActionField(); - *task_data = *pOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNORDERACTION; + if (pOrderAction) + { + CThostFtdcOrderActionField *task_data = new CThostFtdcOrderActionField(); + *task_data = *pOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) { - Task task = Task(); - task.task_name = ONRTNINSTRUMENTSTATUS; - if (pInstrumentStatus) - { - CThostFtdcInstrumentStatusField *task_data = new CThostFtdcInstrumentStatusField(); - *task_data = *pInstrumentStatus; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNINSTRUMENTSTATUS; + if (pInstrumentStatus) + { + CThostFtdcInstrumentStatusField *task_data = new CThostFtdcInstrumentStatusField(); + *task_data = *pInstrumentStatus; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnBulletin(CThostFtdcBulletinField *pBulletin) { - Task task = Task(); - task.task_name = ONRTNBULLETIN; - if (pBulletin) - { - CThostFtdcBulletinField *task_data = new CThostFtdcBulletinField(); - *task_data = *pBulletin; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNBULLETIN; + if (pBulletin) + { + CThostFtdcBulletinField *task_data = new CThostFtdcBulletinField(); + *task_data = *pBulletin; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) { - Task task = Task(); - task.task_name = ONRTNTRADINGNOTICE; - if (pTradingNoticeInfo) - { - CThostFtdcTradingNoticeInfoField *task_data = new CThostFtdcTradingNoticeInfoField(); - *task_data = *pTradingNoticeInfo; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNTRADINGNOTICE; + if (pTradingNoticeInfo) + { + CThostFtdcTradingNoticeInfoField *task_data = new CThostFtdcTradingNoticeInfoField(); + *task_data = *pTradingNoticeInfo; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) { - Task task = Task(); - task.task_name = ONRTNERRORCONDITIONALORDER; - if (pErrorConditionalOrder) - { - CThostFtdcErrorConditionalOrderField *task_data = new CThostFtdcErrorConditionalOrderField(); - *task_data = *pErrorConditionalOrder; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNERRORCONDITIONALORDER; + if (pErrorConditionalOrder) + { + CThostFtdcErrorConditionalOrderField *task_data = new CThostFtdcErrorConditionalOrderField(); + *task_data = *pErrorConditionalOrder; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) { - Task task = Task(); - task.task_name = ONRTNEXECORDER; - if (pExecOrder) - { - CThostFtdcExecOrderField *task_data = new CThostFtdcExecOrderField(); - *task_data = *pExecOrder; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNEXECORDER; + if (pExecOrder) + { + CThostFtdcExecOrderField *task_data = new CThostFtdcExecOrderField(); + *task_data = *pExecOrder; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNEXECORDERINSERT; - if (pInputExecOrder) - { - CThostFtdcInputExecOrderField *task_data = new CThostFtdcInputExecOrderField(); - *task_data = *pInputExecOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNEXECORDERINSERT; + if (pInputExecOrder) + { + CThostFtdcInputExecOrderField *task_data = new CThostFtdcInputExecOrderField(); + *task_data = *pInputExecOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNEXECORDERACTION; - if (pExecOrderAction) - { - CThostFtdcExecOrderActionField *task_data = new CThostFtdcExecOrderActionField(); - *task_data = *pExecOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNEXECORDERACTION; + if (pExecOrderAction) + { + CThostFtdcExecOrderActionField *task_data = new CThostFtdcExecOrderActionField(); + *task_data = *pExecOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNFORQUOTEINSERT; - if (pInputForQuote) - { - CThostFtdcInputForQuoteField *task_data = new CThostFtdcInputForQuoteField(); - *task_data = *pInputForQuote; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNFORQUOTEINSERT; + if (pInputForQuote) + { + CThostFtdcInputForQuoteField *task_data = new CThostFtdcInputForQuoteField(); + *task_data = *pInputForQuote; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRtnQuote(CThostFtdcQuoteField *pQuote) { - Task task = Task(); - task.task_name = ONRTNQUOTE; - if (pQuote) - { - CThostFtdcQuoteField *task_data = new CThostFtdcQuoteField(); - *task_data = *pQuote; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNQUOTE; + if (pQuote) + { + CThostFtdcQuoteField *task_data = new CThostFtdcQuoteField(); + *task_data = *pQuote; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNQUOTEINSERT; - if (pInputQuote) - { - CThostFtdcInputQuoteField *task_data = new CThostFtdcInputQuoteField(); - *task_data = *pInputQuote; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNQUOTEINSERT; + if (pInputQuote) + { + CThostFtdcInputQuoteField *task_data = new CThostFtdcInputQuoteField(); + *task_data = *pInputQuote; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNQUOTEACTION; - if (pQuoteAction) - { - CThostFtdcQuoteActionField *task_data = new CThostFtdcQuoteActionField(); - *task_data = *pQuoteAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNQUOTEACTION; + if (pQuoteAction) + { + CThostFtdcQuoteActionField *task_data = new CThostFtdcQuoteActionField(); + *task_data = *pQuoteAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) { - Task task = Task(); - task.task_name = ONRTNFORQUOTERSP; - if (pForQuoteRsp) - { - CThostFtdcForQuoteRspField *task_data = new CThostFtdcForQuoteRspField(); - *task_data = *pForQuoteRsp; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNFORQUOTERSP; + if (pForQuoteRsp) + { + CThostFtdcForQuoteRspField *task_data = new CThostFtdcForQuoteRspField(); + *task_data = *pForQuoteRsp; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) { - Task task = Task(); - task.task_name = ONRTNCFMMCTRADINGACCOUNTTOKEN; - if (pCFMMCTradingAccountToken) - { - CThostFtdcCFMMCTradingAccountTokenField *task_data = new CThostFtdcCFMMCTradingAccountTokenField(); - *task_data = *pCFMMCTradingAccountToken; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNCFMMCTRADINGACCOUNTTOKEN; + if (pCFMMCTradingAccountToken) + { + CThostFtdcCFMMCTradingAccountTokenField *task_data = new CThostFtdcCFMMCTradingAccountTokenField(); + *task_data = *pCFMMCTradingAccountToken; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNBATCHORDERACTION; - if (pBatchOrderAction) - { - CThostFtdcBatchOrderActionField *task_data = new CThostFtdcBatchOrderActionField(); - *task_data = *pBatchOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNBATCHORDERACTION; + if (pBatchOrderAction) + { + CThostFtdcBatchOrderActionField *task_data = new CThostFtdcBatchOrderActionField(); + *task_data = *pBatchOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRtnOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose) { - Task task = Task(); - task.task_name = ONRTNOPTIONSELFCLOSE; - if (pOptionSelfClose) - { - CThostFtdcOptionSelfCloseField *task_data = new CThostFtdcOptionSelfCloseField(); - *task_data = *pOptionSelfClose; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNOPTIONSELFCLOSE; + if (pOptionSelfClose) + { + CThostFtdcOptionSelfCloseField *task_data = new CThostFtdcOptionSelfCloseField(); + *task_data = *pOptionSelfClose; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNOPTIONSELFCLOSEINSERT; - if (pInputOptionSelfClose) - { - CThostFtdcInputOptionSelfCloseField *task_data = new CThostFtdcInputOptionSelfCloseField(); - *task_data = *pInputOptionSelfClose; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNOPTIONSELFCLOSEINSERT; + if (pInputOptionSelfClose) + { + CThostFtdcInputOptionSelfCloseField *task_data = new CThostFtdcInputOptionSelfCloseField(); + *task_data = *pInputOptionSelfClose; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNOPTIONSELFCLOSEACTION; - if (pOptionSelfCloseAction) - { - CThostFtdcOptionSelfCloseActionField *task_data = new CThostFtdcOptionSelfCloseActionField(); - *task_data = *pOptionSelfCloseAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNOPTIONSELFCLOSEACTION; + if (pOptionSelfCloseAction) + { + CThostFtdcOptionSelfCloseActionField *task_data = new CThostFtdcOptionSelfCloseActionField(); + *task_data = *pOptionSelfCloseAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRtnCombAction(CThostFtdcCombActionField *pCombAction) { - Task task = Task(); - task.task_name = ONRTNCOMBACTION; - if (pCombAction) - { - CThostFtdcCombActionField *task_data = new CThostFtdcCombActionField(); - *task_data = *pCombAction; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNCOMBACTION; + if (pCombAction) + { + CThostFtdcCombActionField *task_data = new CThostFtdcCombActionField(); + *task_data = *pCombAction; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNCOMBACTIONINSERT; - if (pInputCombAction) - { - CThostFtdcInputCombActionField *task_data = new CThostFtdcInputCombActionField(); - *task_data = *pInputCombAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNCOMBACTIONINSERT; + if (pInputCombAction) + { + CThostFtdcInputCombActionField *task_data = new CThostFtdcInputCombActionField(); + *task_data = *pInputCombAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYCONTRACTBANK; - if (pContractBank) - { - CThostFtdcContractBankField *task_data = new CThostFtdcContractBankField(); - *task_data = *pContractBank; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYCONTRACTBANK; + if (pContractBank) + { + CThostFtdcContractBankField *task_data = new CThostFtdcContractBankField(); + *task_data = *pContractBank; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYPARKEDORDER; - if (pParkedOrder) - { - CThostFtdcParkedOrderField *task_data = new CThostFtdcParkedOrderField(); - *task_data = *pParkedOrder; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYPARKEDORDER; + if (pParkedOrder) + { + CThostFtdcParkedOrderField *task_data = new CThostFtdcParkedOrderField(); + *task_data = *pParkedOrder; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYPARKEDORDERACTION; - if (pParkedOrderAction) - { - CThostFtdcParkedOrderActionField *task_data = new CThostFtdcParkedOrderActionField(); - *task_data = *pParkedOrderAction; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYPARKEDORDERACTION; + if (pParkedOrderAction) + { + CThostFtdcParkedOrderActionField *task_data = new CThostFtdcParkedOrderActionField(); + *task_data = *pParkedOrderAction; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRADINGNOTICE; - if (pTradingNotice) - { - CThostFtdcTradingNoticeField *task_data = new CThostFtdcTradingNoticeField(); - *task_data = *pTradingNotice; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYTRADINGNOTICE; + if (pTradingNotice) + { + CThostFtdcTradingNoticeField *task_data = new CThostFtdcTradingNoticeField(); + *task_data = *pTradingNotice; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYBROKERTRADINGPARAMS; - if (pBrokerTradingParams) - { - CThostFtdcBrokerTradingParamsField *task_data = new CThostFtdcBrokerTradingParamsField(); - *task_data = *pBrokerTradingParams; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYBROKERTRADINGPARAMS; + if (pBrokerTradingParams) + { + CThostFtdcBrokerTradingParamsField *task_data = new CThostFtdcBrokerTradingParamsField(); + *task_data = *pBrokerTradingParams; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYBROKERTRADINGALGOS; - if (pBrokerTradingAlgos) - { - CThostFtdcBrokerTradingAlgosField *task_data = new CThostFtdcBrokerTradingAlgosField(); - *task_data = *pBrokerTradingAlgos; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQRYBROKERTRADINGALGOS; + if (pBrokerTradingAlgos) + { + CThostFtdcBrokerTradingAlgosField *task_data = new CThostFtdcBrokerTradingAlgosField(); + *task_data = *pBrokerTradingAlgos; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQUERYCFMMCTRADINGACCOUNTTOKEN; - if (pQueryCFMMCTradingAccountToken) - { - CThostFtdcQueryCFMMCTradingAccountTokenField *task_data = new CThostFtdcQueryCFMMCTradingAccountTokenField(); - *task_data = *pQueryCFMMCTradingAccountToken; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQUERYCFMMCTRADINGACCOUNTTOKEN; + if (pQueryCFMMCTradingAccountToken) + { + CThostFtdcQueryCFMMCTradingAccountTokenField *task_data = new CThostFtdcQueryCFMMCTradingAccountTokenField(); + *task_data = *pQueryCFMMCTradingAccountToken; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) { - Task task = Task(); - task.task_name = ONRTNFROMBANKTOFUTUREBYBANK; - if (pRspTransfer) - { - CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); - *task_data = *pRspTransfer; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNFROMBANKTOFUTUREBYBANK; + if (pRspTransfer) + { + CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); + *task_data = *pRspTransfer; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) { - Task task = Task(); - task.task_name = ONRTNFROMFUTURETOBANKBYBANK; - if (pRspTransfer) - { - CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); - *task_data = *pRspTransfer; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNFROMFUTURETOBANKBYBANK; + if (pRspTransfer) + { + CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); + *task_data = *pRspTransfer; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) { - Task task = Task(); - task.task_name = ONRTNREPEALFROMBANKTOFUTUREBYBANK; - if (pRspRepeal) - { - CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); - *task_data = *pRspRepeal; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNREPEALFROMBANKTOFUTUREBYBANK; + if (pRspRepeal) + { + CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); + *task_data = *pRspRepeal; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) { - Task task = Task(); - task.task_name = ONRTNREPEALFROMFUTURETOBANKBYBANK; - if (pRspRepeal) - { - CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); - *task_data = *pRspRepeal; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNREPEALFROMFUTURETOBANKBYBANK; + if (pRspRepeal) + { + CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); + *task_data = *pRspRepeal; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) { - Task task = Task(); - task.task_name = ONRTNFROMBANKTOFUTUREBYFUTURE; - if (pRspTransfer) - { - CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); - *task_data = *pRspTransfer; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNFROMBANKTOFUTUREBYFUTURE; + if (pRspTransfer) + { + CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); + *task_data = *pRspTransfer; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) { - Task task = Task(); - task.task_name = ONRTNFROMFUTURETOBANKBYFUTURE; - if (pRspTransfer) - { - CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); - *task_data = *pRspTransfer; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNFROMFUTURETOBANKBYFUTURE; + if (pRspTransfer) + { + CThostFtdcRspTransferField *task_data = new CThostFtdcRspTransferField(); + *task_data = *pRspTransfer; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) { - Task task = Task(); - task.task_name = ONRTNREPEALFROMBANKTOFUTUREBYFUTUREMANUAL; - if (pRspRepeal) - { - CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); - *task_data = *pRspRepeal; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNREPEALFROMBANKTOFUTUREBYFUTUREMANUAL; + if (pRspRepeal) + { + CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); + *task_data = *pRspRepeal; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) { - Task task = Task(); - task.task_name = ONRTNREPEALFROMFUTURETOBANKBYFUTUREMANUAL; - if (pRspRepeal) - { - CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); - *task_data = *pRspRepeal; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNREPEALFROMFUTURETOBANKBYFUTUREMANUAL; + if (pRspRepeal) + { + CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); + *task_data = *pRspRepeal; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) { - Task task = Task(); - task.task_name = ONRTNQUERYBANKBALANCEBYFUTURE; - if (pNotifyQueryAccount) - { - CThostFtdcNotifyQueryAccountField *task_data = new CThostFtdcNotifyQueryAccountField(); - *task_data = *pNotifyQueryAccount; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNQUERYBANKBALANCEBYFUTURE; + if (pNotifyQueryAccount) + { + CThostFtdcNotifyQueryAccountField *task_data = new CThostFtdcNotifyQueryAccountField(); + *task_data = *pNotifyQueryAccount; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNBANKTOFUTUREBYFUTURE; - if (pReqTransfer) - { - CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); - *task_data = *pReqTransfer; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNBANKTOFUTUREBYFUTURE; + if (pReqTransfer) + { + CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); + *task_data = *pReqTransfer; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNFUTURETOBANKBYFUTURE; - if (pReqTransfer) - { - CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); - *task_data = *pReqTransfer; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNFUTURETOBANKBYFUTURE; + if (pReqTransfer) + { + CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); + *task_data = *pReqTransfer; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNREPEALBANKTOFUTUREBYFUTUREMANUAL; - if (pReqRepeal) - { - CThostFtdcReqRepealField *task_data = new CThostFtdcReqRepealField(); - *task_data = *pReqRepeal; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNREPEALBANKTOFUTUREBYFUTUREMANUAL; + if (pReqRepeal) + { + CThostFtdcReqRepealField *task_data = new CThostFtdcReqRepealField(); + *task_data = *pReqRepeal; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNREPEALFUTURETOBANKBYFUTUREMANUAL; - if (pReqRepeal) - { - CThostFtdcReqRepealField *task_data = new CThostFtdcReqRepealField(); - *task_data = *pReqRepeal; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNREPEALFUTURETOBANKBYFUTUREMANUAL; + if (pReqRepeal) + { + CThostFtdcReqRepealField *task_data = new CThostFtdcReqRepealField(); + *task_data = *pReqRepeal; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) { - Task task = Task(); - task.task_name = ONERRRTNQUERYBANKBALANCEBYFUTURE; - if (pReqQueryAccount) - { - CThostFtdcReqQueryAccountField *task_data = new CThostFtdcReqQueryAccountField(); - *task_data = *pReqQueryAccount; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONERRRTNQUERYBANKBALANCEBYFUTURE; + if (pReqQueryAccount) + { + CThostFtdcReqQueryAccountField *task_data = new CThostFtdcReqQueryAccountField(); + *task_data = *pReqQueryAccount; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + this->task_queue.push(task); }; void TdApi::OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) { - Task task = Task(); - task.task_name = ONRTNREPEALFROMBANKTOFUTUREBYFUTURE; - if (pRspRepeal) - { - CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); - *task_data = *pRspRepeal; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNREPEALFROMBANKTOFUTUREBYFUTURE; + if (pRspRepeal) + { + CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); + *task_data = *pRspRepeal; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) { - Task task = Task(); - task.task_name = ONRTNREPEALFROMFUTURETOBANKBYFUTURE; - if (pRspRepeal) - { - CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); - *task_data = *pRspRepeal; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNREPEALFROMFUTURETOBANKBYFUTURE; + if (pRspRepeal) + { + CThostFtdcRspRepealField *task_data = new CThostFtdcRspRepealField(); + *task_data = *pRspRepeal; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPFROMBANKTOFUTUREBYFUTURE; - if (pReqTransfer) - { - CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); - *task_data = *pReqTransfer; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPFROMBANKTOFUTUREBYFUTURE; + if (pReqTransfer) + { + CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); + *task_data = *pReqTransfer; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPFROMFUTURETOBANKBYFUTURE; - if (pReqTransfer) - { - CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); - *task_data = *pReqTransfer; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPFROMFUTURETOBANKBYFUTURE; + if (pReqTransfer) + { + CThostFtdcReqTransferField *task_data = new CThostFtdcReqTransferField(); + *task_data = *pReqTransfer; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQUERYBANKACCOUNTMONEYBYFUTURE; - if (pReqQueryAccount) - { - CThostFtdcReqQueryAccountField *task_data = new CThostFtdcReqQueryAccountField(); - *task_data = *pReqQueryAccount; - task.task_data = task_data; - } - if (pRspInfo) - { - CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); - *task_error = *pRspInfo; - task.task_error = task_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRSPQUERYBANKACCOUNTMONEYBYFUTURE; + if (pReqQueryAccount) + { + CThostFtdcReqQueryAccountField *task_data = new CThostFtdcReqQueryAccountField(); + *task_data = *pReqQueryAccount; + task.task_data = task_data; + } + if (pRspInfo) + { + CThostFtdcRspInfoField *task_error = new CThostFtdcRspInfoField(); + *task_error = *pRspInfo; + task.task_error = task_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); }; void TdApi::OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) { - Task task = Task(); - task.task_name = ONRTNOPENACCOUNTBYBANK; - if (pOpenAccount) - { - CThostFtdcOpenAccountField *task_data = new CThostFtdcOpenAccountField(); - *task_data = *pOpenAccount; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNOPENACCOUNTBYBANK; + if (pOpenAccount) + { + CThostFtdcOpenAccountField *task_data = new CThostFtdcOpenAccountField(); + *task_data = *pOpenAccount; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) { - Task task = Task(); - task.task_name = ONRTNCANCELACCOUNTBYBANK; - if (pCancelAccount) - { - CThostFtdcCancelAccountField *task_data = new CThostFtdcCancelAccountField(); - *task_data = *pCancelAccount; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNCANCELACCOUNTBYBANK; + if (pCancelAccount) + { + CThostFtdcCancelAccountField *task_data = new CThostFtdcCancelAccountField(); + *task_data = *pCancelAccount; + task.task_data = task_data; + } + this->task_queue.push(task); }; void TdApi::OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) { - Task task = Task(); - task.task_name = ONRTNCHANGEACCOUNTBYBANK; - if (pChangeAccount) - { - CThostFtdcChangeAccountField *task_data = new CThostFtdcChangeAccountField(); - *task_data = *pChangeAccount; - task.task_data = task_data; - } - this->task_queue.push(task); + Task task = Task(); + task.task_name = ONRTNCHANGEACCOUNTBYBANK; + if (pChangeAccount) + { + CThostFtdcChangeAccountField *task_data = new CThostFtdcChangeAccountField(); + *task_data = *pChangeAccount; + task.task_data = task_data; + } + this->task_queue.push(task); }; + ///------------------------------------------------------------------------------------- ///工作线程从队列中取出数据,转化为python对象后,进行推送 ///------------------------------------------------------------------------------------- @@ -2566,6 +2608,18 @@ void TdApi::processTask() break; } + case ONRSPQRYSECAGENTTRADINGACCOUNT: + { + this->processRspQrySecAgentTradingAccount(&task); + break; + } + + case ONRSPQRYSECAGENTCHECKMODE: + { + this->processRspQrySecAgentCheckMode(&task); + break; + } + case ONRSPQRYOPTIONINSTRTRADECOST: { this->processRspQryOptionInstrTradeCost(&task); @@ -2949,6 +3003,8 @@ void TdApi::processTask() this->processRtnChangeAccountByBank(&task); break; } + + }; } } @@ -2956,7 +3012,6 @@ void TdApi::processTask() { } }; - void TdApi::processFrontConnected(Task *task) { gil_scoped_acquire acquire; @@ -4825,6 +4880,100 @@ void TdApi::processRspQryInstrumentOrderCommRate(Task *task) this->onRspQryInstrumentOrderCommRate(data, error, task->task_id, task->task_last); }; +void TdApi::processRspQrySecAgentTradingAccount(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + CThostFtdcTradingAccountField *task_data = (CThostFtdcTradingAccountField*)task->task_data; + data["BrokerID"] = toUtf(task_data->BrokerID); + data["AccountID"] = toUtf(task_data->AccountID); + data["PreMortgage"] = task_data->PreMortgage; + data["PreCredit"] = task_data->PreCredit; + data["PreDeposit"] = task_data->PreDeposit; + data["PreBalance"] = task_data->PreBalance; + data["PreMargin"] = task_data->PreMargin; + data["InterestBase"] = task_data->InterestBase; + data["Interest"] = task_data->Interest; + data["Deposit"] = task_data->Deposit; + data["Withdraw"] = task_data->Withdraw; + data["FrozenMargin"] = task_data->FrozenMargin; + data["FrozenCash"] = task_data->FrozenCash; + data["FrozenCommission"] = task_data->FrozenCommission; + data["CurrMargin"] = task_data->CurrMargin; + data["CashIn"] = task_data->CashIn; + data["Commission"] = task_data->Commission; + data["CloseProfit"] = task_data->CloseProfit; + data["PositionProfit"] = task_data->PositionProfit; + data["Balance"] = task_data->Balance; + data["Available"] = task_data->Available; + data["WithdrawQuota"] = task_data->WithdrawQuota; + data["Reserve"] = task_data->Reserve; + data["TradingDay"] = toUtf(task_data->TradingDay); + data["SettlementID"] = task_data->SettlementID; + data["Credit"] = task_data->Credit; + data["Mortgage"] = task_data->Mortgage; + data["ExchangeMargin"] = task_data->ExchangeMargin; + data["DeliveryMargin"] = task_data->DeliveryMargin; + data["ExchangeDeliveryMargin"] = task_data->ExchangeDeliveryMargin; + data["ReserveBalance"] = task_data->ReserveBalance; + data["CurrencyID"] = toUtf(task_data->CurrencyID); + data["PreFundMortgageIn"] = task_data->PreFundMortgageIn; + data["PreFundMortgageOut"] = task_data->PreFundMortgageOut; + data["FundMortgageIn"] = task_data->FundMortgageIn; + data["FundMortgageOut"] = task_data->FundMortgageOut; + data["FundMortgageAvailable"] = task_data->FundMortgageAvailable; + data["MortgageableFund"] = task_data->MortgageableFund; + data["SpecProductMargin"] = task_data->SpecProductMargin; + data["SpecProductFrozenMargin"] = task_data->SpecProductFrozenMargin; + data["SpecProductCommission"] = task_data->SpecProductCommission; + data["SpecProductFrozenCommission"] = task_data->SpecProductFrozenCommission; + data["SpecProductPositionProfit"] = task_data->SpecProductPositionProfit; + data["SpecProductCloseProfit"] = task_data->SpecProductCloseProfit; + data["SpecProductPositionProfitByAlg"] = task_data->SpecProductPositionProfitByAlg; + data["SpecProductExchangeMargin"] = task_data->SpecProductExchangeMargin; + data["BizType"] = task_data->BizType; + data["FrozenSwap"] = task_data->FrozenSwap; + data["RemainSwap"] = task_data->RemainSwap; + delete task->task_data; + } + dict error; + if (task->task_error) + { + CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error; + error["ErrorID"] = task_error->ErrorID; + error["ErrorMsg"] = toUtf(task_error->ErrorMsg); + delete task->task_error; + } + this->onRspQrySecAgentTradingAccount(data, error, task->task_id, task->task_last); +}; + +void TdApi::processRspQrySecAgentCheckMode(Task *task) +{ + gil_scoped_acquire acquire; + dict data; + if (task->task_data) + { + CThostFtdcSecAgentCheckModeField *task_data = (CThostFtdcSecAgentCheckModeField*)task->task_data; + data["InvestorID"] = toUtf(task_data->InvestorID); + data["BrokerID"] = toUtf(task_data->BrokerID); + data["CurrencyID"] = toUtf(task_data->CurrencyID); + data["BrokerSecAgentID"] = toUtf(task_data->BrokerSecAgentID); + data["CheckSelfAccount"] = task_data->CheckSelfAccount; + delete task->task_data; + } + dict error; + if (task->task_error) + { + CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error; + error["ErrorID"] = task_error->ErrorID; + error["ErrorMsg"] = toUtf(task_error->ErrorMsg); + delete task->task_error; + } + this->onRspQrySecAgentCheckMode(data, error, task->task_id, task->task_last); +}; + void TdApi::processRspQryOptionInstrTradeCost(Task *task) { gil_scoped_acquire acquire; @@ -7895,1299 +8044,1321 @@ void TdApi::processRtnChangeAccountByBank(Task *task) void TdApi::createFtdcTraderApi(string pszFlowPath) { - this->api = CThostFtdcTraderApi::CreateFtdcTraderApi(pszFlowPath.c_str()); - this->api->RegisterSpi(this); + this->api = CThostFtdcTraderApi::CreateFtdcTraderApi(pszFlowPath.c_str()); + this->api->RegisterSpi(this); }; void TdApi::release() { - this->api->Release(); + this->api->Release(); }; void TdApi::init() { - this->active = true; - this->task_thread = thread(&TdApi::processTask, this); + this->active = true; + this->task_thread = thread(&TdApi::processTask, this); - this->api->Init(); + this->api->Init(); }; int TdApi::join() { - int i = this->api->Join(); - return i; + int i = this->api->Join(); + return i; }; int TdApi::exit() { - this->active = false; + this->active = false; this->task_queue.terminate(); this->task_thread.join(); - this->api->RegisterSpi(NULL); - this->api->Release(); - this->api = NULL; - return 1; + this->api->RegisterSpi(NULL); + this->api->Release(); + this->api = NULL; + return 1; }; string TdApi::getTradingDay() { - string day = this->api->GetTradingDay(); - return day; + string day = this->api->GetTradingDay(); + return day; }; void TdApi::registerFront(string pszFrontAddress) { - this->api->RegisterFront((char*)pszFrontAddress.c_str()); + this->api->RegisterFront((char*)pszFrontAddress.c_str()); }; void TdApi::subscribePrivateTopic(int nType) { - this->api->SubscribePrivateTopic((THOST_TE_RESUME_TYPE) nType); + this->api->SubscribePrivateTopic((THOST_TE_RESUME_TYPE) nType); }; void TdApi::subscribePublicTopic(int nType) { - this->api->SubscribePublicTopic((THOST_TE_RESUME_TYPE)nType); + this->api->SubscribePublicTopic((THOST_TE_RESUME_TYPE)nType); }; - int TdApi::reqAuthenticate(const dict &req, int reqid) { - CThostFtdcReqAuthenticateField myreq = CThostFtdcReqAuthenticateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - getString(req, "UserProductInfo", myreq.UserProductInfo); - getString(req, "AuthCode", myreq.AuthCode); - int i = this->api->ReqAuthenticate(&myreq, reqid); - return i; + CThostFtdcReqAuthenticateField myreq = CThostFtdcReqAuthenticateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + getString(req, "UserProductInfo", myreq.UserProductInfo); + getString(req, "AuthCode", myreq.AuthCode); + int i = this->api->ReqAuthenticate(&myreq, reqid); + return i; }; int TdApi::reqUserLogin(const dict &req, int reqid) { - CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "TradingDay", myreq.TradingDay); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - getString(req, "Password", myreq.Password); - getString(req, "UserProductInfo", myreq.UserProductInfo); - getString(req, "InterfaceProductInfo", myreq.InterfaceProductInfo); - getString(req, "ProtocolInfo", myreq.ProtocolInfo); - getString(req, "MacAddress", myreq.MacAddress); - getString(req, "OneTimePassword", myreq.OneTimePassword); - getString(req, "ClientIPAddress", myreq.ClientIPAddress); - getString(req, "LoginRemark", myreq.LoginRemark); - int i = this->api->ReqUserLogin(&myreq, reqid); - return i; + CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "TradingDay", myreq.TradingDay); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + getString(req, "Password", myreq.Password); + getString(req, "UserProductInfo", myreq.UserProductInfo); + getString(req, "InterfaceProductInfo", myreq.InterfaceProductInfo); + getString(req, "ProtocolInfo", myreq.ProtocolInfo); + getString(req, "MacAddress", myreq.MacAddress); + getString(req, "OneTimePassword", myreq.OneTimePassword); + getString(req, "ClientIPAddress", myreq.ClientIPAddress); + getString(req, "LoginRemark", myreq.LoginRemark); + int i = this->api->ReqUserLogin(&myreq, reqid); + return i; }; int TdApi::reqUserLogout(const dict &req, int reqid) { - CThostFtdcUserLogoutField myreq = CThostFtdcUserLogoutField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - int i = this->api->ReqUserLogout(&myreq, reqid); - return i; + CThostFtdcUserLogoutField myreq = CThostFtdcUserLogoutField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + int i = this->api->ReqUserLogout(&myreq, reqid); + return i; }; int TdApi::reqUserPasswordUpdate(const dict &req, int reqid) { - CThostFtdcUserPasswordUpdateField myreq = CThostFtdcUserPasswordUpdateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - getString(req, "OldPassword", myreq.OldPassword); - getString(req, "NewPassword", myreq.NewPassword); - int i = this->api->ReqUserPasswordUpdate(&myreq, reqid); - return i; + CThostFtdcUserPasswordUpdateField myreq = CThostFtdcUserPasswordUpdateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + getString(req, "OldPassword", myreq.OldPassword); + getString(req, "NewPassword", myreq.NewPassword); + int i = this->api->ReqUserPasswordUpdate(&myreq, reqid); + return i; }; int TdApi::reqTradingAccountPasswordUpdate(const dict &req, int reqid) { - CThostFtdcTradingAccountPasswordUpdateField myreq = CThostFtdcTradingAccountPasswordUpdateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "OldPassword", myreq.OldPassword); - getString(req, "NewPassword", myreq.NewPassword); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqTradingAccountPasswordUpdate(&myreq, reqid); - return i; + CThostFtdcTradingAccountPasswordUpdateField myreq = CThostFtdcTradingAccountPasswordUpdateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "OldPassword", myreq.OldPassword); + getString(req, "NewPassword", myreq.NewPassword); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqTradingAccountPasswordUpdate(&myreq, reqid); + return i; }; int TdApi::reqUserLogin2(const dict &req, int reqid) { - CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "TradingDay", myreq.TradingDay); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - getString(req, "Password", myreq.Password); - getString(req, "UserProductInfo", myreq.UserProductInfo); - getString(req, "InterfaceProductInfo", myreq.InterfaceProductInfo); - getString(req, "ProtocolInfo", myreq.ProtocolInfo); - getString(req, "MacAddress", myreq.MacAddress); - getString(req, "OneTimePassword", myreq.OneTimePassword); - getString(req, "ClientIPAddress", myreq.ClientIPAddress); - getString(req, "LoginRemark", myreq.LoginRemark); - int i = this->api->ReqUserLogin2(&myreq, reqid); - return i; + CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "TradingDay", myreq.TradingDay); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + getString(req, "Password", myreq.Password); + getString(req, "UserProductInfo", myreq.UserProductInfo); + getString(req, "InterfaceProductInfo", myreq.InterfaceProductInfo); + getString(req, "ProtocolInfo", myreq.ProtocolInfo); + getString(req, "MacAddress", myreq.MacAddress); + getString(req, "OneTimePassword", myreq.OneTimePassword); + getString(req, "ClientIPAddress", myreq.ClientIPAddress); + getString(req, "LoginRemark", myreq.LoginRemark); + int i = this->api->ReqUserLogin2(&myreq, reqid); + return i; }; int TdApi::reqUserPasswordUpdate2(const dict &req, int reqid) { - CThostFtdcUserPasswordUpdateField myreq = CThostFtdcUserPasswordUpdateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - getString(req, "OldPassword", myreq.OldPassword); - getString(req, "NewPassword", myreq.NewPassword); - int i = this->api->ReqUserPasswordUpdate2(&myreq, reqid); - return i; + CThostFtdcUserPasswordUpdateField myreq = CThostFtdcUserPasswordUpdateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + getString(req, "OldPassword", myreq.OldPassword); + getString(req, "NewPassword", myreq.NewPassword); + int i = this->api->ReqUserPasswordUpdate2(&myreq, reqid); + return i; }; int TdApi::reqOrderInsert(const dict &req, int reqid) { - CThostFtdcInputOrderField myreq = CThostFtdcInputOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "OrderRef", myreq.OrderRef); - getString(req, "UserID", myreq.UserID); - getChar(req, "OrderPriceType", &myreq.OrderPriceType); - getChar(req, "Direction", &myreq.Direction); - getString(req, "CombOffsetFlag", myreq.CombOffsetFlag); - getString(req, "CombHedgeFlag", myreq.CombHedgeFlag); - getDouble(req, "LimitPrice", &myreq.LimitPrice); - getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal); - getChar(req, "TimeCondition", &myreq.TimeCondition); - getString(req, "GTDDate", myreq.GTDDate); - getChar(req, "VolumeCondition", &myreq.VolumeCondition); - getInt(req, "MinVolume", &myreq.MinVolume); - getChar(req, "ContingentCondition", &myreq.ContingentCondition); - getDouble(req, "StopPrice", &myreq.StopPrice); - getChar(req, "ForceCloseReason", &myreq.ForceCloseReason); - getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "UserForceClose", &myreq.UserForceClose); - getInt(req, "IsSwapOrder", &myreq.IsSwapOrder); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "ClientID", myreq.ClientID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqOrderInsert(&myreq, reqid); - return i; + CThostFtdcInputOrderField myreq = CThostFtdcInputOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "OrderRef", myreq.OrderRef); + getString(req, "UserID", myreq.UserID); + getChar(req, "OrderPriceType", &myreq.OrderPriceType); + getChar(req, "Direction", &myreq.Direction); + getString(req, "CombOffsetFlag", myreq.CombOffsetFlag); + getString(req, "CombHedgeFlag", myreq.CombHedgeFlag); + getDouble(req, "LimitPrice", &myreq.LimitPrice); + getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal); + getChar(req, "TimeCondition", &myreq.TimeCondition); + getString(req, "GTDDate", myreq.GTDDate); + getChar(req, "VolumeCondition", &myreq.VolumeCondition); + getInt(req, "MinVolume", &myreq.MinVolume); + getChar(req, "ContingentCondition", &myreq.ContingentCondition); + getDouble(req, "StopPrice", &myreq.StopPrice); + getChar(req, "ForceCloseReason", &myreq.ForceCloseReason); + getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend); + getString(req, "BusinessUnit", myreq.BusinessUnit); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "UserForceClose", &myreq.UserForceClose); + getInt(req, "IsSwapOrder", &myreq.IsSwapOrder); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + getString(req, "ClientID", myreq.ClientID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqOrderInsert(&myreq, reqid); + return i; }; int TdApi::reqParkedOrderInsert(const dict &req, int reqid) { - CThostFtdcParkedOrderField myreq = CThostFtdcParkedOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "OrderRef", myreq.OrderRef); - getString(req, "UserID", myreq.UserID); - getChar(req, "OrderPriceType", &myreq.OrderPriceType); - getChar(req, "Direction", &myreq.Direction); - getString(req, "CombOffsetFlag", myreq.CombOffsetFlag); - getString(req, "CombHedgeFlag", myreq.CombHedgeFlag); - getDouble(req, "LimitPrice", &myreq.LimitPrice); - getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal); - getChar(req, "TimeCondition", &myreq.TimeCondition); - getString(req, "GTDDate", myreq.GTDDate); - getChar(req, "VolumeCondition", &myreq.VolumeCondition); - getInt(req, "MinVolume", &myreq.MinVolume); - getChar(req, "ContingentCondition", &myreq.ContingentCondition); - getDouble(req, "StopPrice", &myreq.StopPrice); - getChar(req, "ForceCloseReason", &myreq.ForceCloseReason); - getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "UserForceClose", &myreq.UserForceClose); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ParkedOrderID", myreq.ParkedOrderID); - getChar(req, "UserType", &myreq.UserType); - getChar(req, "Status", &myreq.Status); - getInt(req, "ErrorID", &myreq.ErrorID); - getString(req, "ErrorMsg", myreq.ErrorMsg); - getInt(req, "IsSwapOrder", &myreq.IsSwapOrder); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "ClientID", myreq.ClientID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqParkedOrderInsert(&myreq, reqid); - return i; + CThostFtdcParkedOrderField myreq = CThostFtdcParkedOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "OrderRef", myreq.OrderRef); + getString(req, "UserID", myreq.UserID); + getChar(req, "OrderPriceType", &myreq.OrderPriceType); + getChar(req, "Direction", &myreq.Direction); + getString(req, "CombOffsetFlag", myreq.CombOffsetFlag); + getString(req, "CombHedgeFlag", myreq.CombHedgeFlag); + getDouble(req, "LimitPrice", &myreq.LimitPrice); + getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal); + getChar(req, "TimeCondition", &myreq.TimeCondition); + getString(req, "GTDDate", myreq.GTDDate); + getChar(req, "VolumeCondition", &myreq.VolumeCondition); + getInt(req, "MinVolume", &myreq.MinVolume); + getChar(req, "ContingentCondition", &myreq.ContingentCondition); + getDouble(req, "StopPrice", &myreq.StopPrice); + getChar(req, "ForceCloseReason", &myreq.ForceCloseReason); + getInt(req, "IsAutoSuspend", &myreq.IsAutoSuspend); + getString(req, "BusinessUnit", myreq.BusinessUnit); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "UserForceClose", &myreq.UserForceClose); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "ParkedOrderID", myreq.ParkedOrderID); + getChar(req, "UserType", &myreq.UserType); + getChar(req, "Status", &myreq.Status); + getInt(req, "ErrorID", &myreq.ErrorID); + getString(req, "ErrorMsg", myreq.ErrorMsg); + getInt(req, "IsSwapOrder", &myreq.IsSwapOrder); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + getString(req, "ClientID", myreq.ClientID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqParkedOrderInsert(&myreq, reqid); + return i; }; int TdApi::reqParkedOrderAction(const dict &req, int reqid) { - CThostFtdcParkedOrderActionField myreq = CThostFtdcParkedOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "OrderActionRef", &myreq.OrderActionRef); - getString(req, "OrderRef", myreq.OrderRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "OrderSysID", myreq.OrderSysID); - getChar(req, "ActionFlag", &myreq.ActionFlag); - getDouble(req, "LimitPrice", &myreq.LimitPrice); - getInt(req, "VolumeChange", &myreq.VolumeChange); - getString(req, "UserID", myreq.UserID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ParkedOrderActionID", myreq.ParkedOrderActionID); - getChar(req, "UserType", &myreq.UserType); - getChar(req, "Status", &myreq.Status); - getInt(req, "ErrorID", &myreq.ErrorID); - getString(req, "ErrorMsg", myreq.ErrorMsg); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqParkedOrderAction(&myreq, reqid); - return i; + CThostFtdcParkedOrderActionField myreq = CThostFtdcParkedOrderActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getInt(req, "OrderActionRef", &myreq.OrderActionRef); + getString(req, "OrderRef", myreq.OrderRef); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "FrontID", &myreq.FrontID); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "OrderSysID", myreq.OrderSysID); + getChar(req, "ActionFlag", &myreq.ActionFlag); + getDouble(req, "LimitPrice", &myreq.LimitPrice); + getInt(req, "VolumeChange", &myreq.VolumeChange); + getString(req, "UserID", myreq.UserID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ParkedOrderActionID", myreq.ParkedOrderActionID); + getChar(req, "UserType", &myreq.UserType); + getChar(req, "Status", &myreq.Status); + getInt(req, "ErrorID", &myreq.ErrorID); + getString(req, "ErrorMsg", myreq.ErrorMsg); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqParkedOrderAction(&myreq, reqid); + return i; }; int TdApi::reqOrderAction(const dict &req, int reqid) { - CThostFtdcInputOrderActionField myreq = CThostFtdcInputOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "OrderActionRef", &myreq.OrderActionRef); - getString(req, "OrderRef", myreq.OrderRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "OrderSysID", myreq.OrderSysID); - getChar(req, "ActionFlag", &myreq.ActionFlag); - getDouble(req, "LimitPrice", &myreq.LimitPrice); - getInt(req, "VolumeChange", &myreq.VolumeChange); - getString(req, "UserID", myreq.UserID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqOrderAction(&myreq, reqid); - return i; + CThostFtdcInputOrderActionField myreq = CThostFtdcInputOrderActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getInt(req, "OrderActionRef", &myreq.OrderActionRef); + getString(req, "OrderRef", myreq.OrderRef); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "FrontID", &myreq.FrontID); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "OrderSysID", myreq.OrderSysID); + getChar(req, "ActionFlag", &myreq.ActionFlag); + getDouble(req, "LimitPrice", &myreq.LimitPrice); + getInt(req, "VolumeChange", &myreq.VolumeChange); + getString(req, "UserID", myreq.UserID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqOrderAction(&myreq, reqid); + return i; }; int TdApi::reqQueryMaxOrderVolume(const dict &req, int reqid) { - CThostFtdcQueryMaxOrderVolumeField myreq = CThostFtdcQueryMaxOrderVolumeField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getChar(req, "Direction", &myreq.Direction); - getChar(req, "OffsetFlag", &myreq.OffsetFlag); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getInt(req, "MaxVolume", &myreq.MaxVolume); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQueryMaxOrderVolume(&myreq, reqid); - return i; + CThostFtdcQueryMaxOrderVolumeField myreq = CThostFtdcQueryMaxOrderVolumeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getChar(req, "Direction", &myreq.Direction); + getChar(req, "OffsetFlag", &myreq.OffsetFlag); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getInt(req, "MaxVolume", &myreq.MaxVolume); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQueryMaxOrderVolume(&myreq, reqid); + return i; }; int TdApi::reqSettlementInfoConfirm(const dict &req, int reqid) { - CThostFtdcSettlementInfoConfirmField myreq = CThostFtdcSettlementInfoConfirmField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ConfirmDate", myreq.ConfirmDate); - getString(req, "ConfirmTime", myreq.ConfirmTime); - getInt(req, "SettlementID", &myreq.SettlementID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqSettlementInfoConfirm(&myreq, reqid); - return i; + CThostFtdcSettlementInfoConfirmField myreq = CThostFtdcSettlementInfoConfirmField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "ConfirmDate", myreq.ConfirmDate); + getString(req, "ConfirmTime", myreq.ConfirmTime); + getInt(req, "SettlementID", &myreq.SettlementID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqSettlementInfoConfirm(&myreq, reqid); + return i; }; int TdApi::reqRemoveParkedOrder(const dict &req, int reqid) { - CThostFtdcRemoveParkedOrderField myreq = CThostFtdcRemoveParkedOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ParkedOrderID", myreq.ParkedOrderID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqRemoveParkedOrder(&myreq, reqid); - return i; + CThostFtdcRemoveParkedOrderField myreq = CThostFtdcRemoveParkedOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "ParkedOrderID", myreq.ParkedOrderID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqRemoveParkedOrder(&myreq, reqid); + return i; }; int TdApi::reqRemoveParkedOrderAction(const dict &req, int reqid) { - CThostFtdcRemoveParkedOrderActionField myreq = CThostFtdcRemoveParkedOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ParkedOrderActionID", myreq.ParkedOrderActionID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqRemoveParkedOrderAction(&myreq, reqid); - return i; + CThostFtdcRemoveParkedOrderActionField myreq = CThostFtdcRemoveParkedOrderActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "ParkedOrderActionID", myreq.ParkedOrderActionID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqRemoveParkedOrderAction(&myreq, reqid); + return i; }; int TdApi::reqExecOrderInsert(const dict &req, int reqid) { - CThostFtdcInputExecOrderField myreq = CThostFtdcInputExecOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExecOrderRef", myreq.ExecOrderRef); - getString(req, "UserID", myreq.UserID); - getInt(req, "Volume", &myreq.Volume); - getInt(req, "RequestID", &myreq.RequestID); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getChar(req, "OffsetFlag", &myreq.OffsetFlag); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getChar(req, "ActionType", &myreq.ActionType); - getChar(req, "PosiDirection", &myreq.PosiDirection); - getChar(req, "ReservePositionFlag", &myreq.ReservePositionFlag); - getChar(req, "CloseFlag", &myreq.CloseFlag); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "ClientID", myreq.ClientID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqExecOrderInsert(&myreq, reqid); - return i; + CThostFtdcInputExecOrderField myreq = CThostFtdcInputExecOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExecOrderRef", myreq.ExecOrderRef); + getString(req, "UserID", myreq.UserID); + getInt(req, "Volume", &myreq.Volume); + getInt(req, "RequestID", &myreq.RequestID); + getString(req, "BusinessUnit", myreq.BusinessUnit); + getChar(req, "OffsetFlag", &myreq.OffsetFlag); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getChar(req, "ActionType", &myreq.ActionType); + getChar(req, "PosiDirection", &myreq.PosiDirection); + getChar(req, "ReservePositionFlag", &myreq.ReservePositionFlag); + getChar(req, "CloseFlag", &myreq.CloseFlag); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + getString(req, "ClientID", myreq.ClientID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqExecOrderInsert(&myreq, reqid); + return i; }; int TdApi::reqExecOrderAction(const dict &req, int reqid) { - CThostFtdcInputExecOrderActionField myreq = CThostFtdcInputExecOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "ExecOrderActionRef", &myreq.ExecOrderActionRef); - getString(req, "ExecOrderRef", myreq.ExecOrderRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ExecOrderSysID", myreq.ExecOrderSysID); - getChar(req, "ActionFlag", &myreq.ActionFlag); - getString(req, "UserID", myreq.UserID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqExecOrderAction(&myreq, reqid); - return i; + CThostFtdcInputExecOrderActionField myreq = CThostFtdcInputExecOrderActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getInt(req, "ExecOrderActionRef", &myreq.ExecOrderActionRef); + getString(req, "ExecOrderRef", myreq.ExecOrderRef); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "FrontID", &myreq.FrontID); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "ExecOrderSysID", myreq.ExecOrderSysID); + getChar(req, "ActionFlag", &myreq.ActionFlag); + getString(req, "UserID", myreq.UserID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqExecOrderAction(&myreq, reqid); + return i; }; int TdApi::reqForQuoteInsert(const dict &req, int reqid) { - CThostFtdcInputForQuoteField myreq = CThostFtdcInputForQuoteField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ForQuoteRef", myreq.ForQuoteRef); - getString(req, "UserID", myreq.UserID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqForQuoteInsert(&myreq, reqid); - return i; + CThostFtdcInputForQuoteField myreq = CThostFtdcInputForQuoteField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ForQuoteRef", myreq.ForQuoteRef); + getString(req, "UserID", myreq.UserID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqForQuoteInsert(&myreq, reqid); + return i; }; int TdApi::reqQuoteInsert(const dict &req, int reqid) { - CThostFtdcInputQuoteField myreq = CThostFtdcInputQuoteField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "QuoteRef", myreq.QuoteRef); - getString(req, "UserID", myreq.UserID); - getDouble(req, "AskPrice", &myreq.AskPrice); - getDouble(req, "BidPrice", &myreq.BidPrice); - getInt(req, "AskVolume", &myreq.AskVolume); - getInt(req, "BidVolume", &myreq.BidVolume); - getInt(req, "RequestID", &myreq.RequestID); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getChar(req, "AskOffsetFlag", &myreq.AskOffsetFlag); - getChar(req, "BidOffsetFlag", &myreq.BidOffsetFlag); - getChar(req, "AskHedgeFlag", &myreq.AskHedgeFlag); - getChar(req, "BidHedgeFlag", &myreq.BidHedgeFlag); - getString(req, "AskOrderRef", myreq.AskOrderRef); - getString(req, "BidOrderRef", myreq.BidOrderRef); - getString(req, "ForQuoteSysID", myreq.ForQuoteSysID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "ClientID", myreq.ClientID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqQuoteInsert(&myreq, reqid); - return i; + CThostFtdcInputQuoteField myreq = CThostFtdcInputQuoteField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "QuoteRef", myreq.QuoteRef); + getString(req, "UserID", myreq.UserID); + getDouble(req, "AskPrice", &myreq.AskPrice); + getDouble(req, "BidPrice", &myreq.BidPrice); + getInt(req, "AskVolume", &myreq.AskVolume); + getInt(req, "BidVolume", &myreq.BidVolume); + getInt(req, "RequestID", &myreq.RequestID); + getString(req, "BusinessUnit", myreq.BusinessUnit); + getChar(req, "AskOffsetFlag", &myreq.AskOffsetFlag); + getChar(req, "BidOffsetFlag", &myreq.BidOffsetFlag); + getChar(req, "AskHedgeFlag", &myreq.AskHedgeFlag); + getChar(req, "BidHedgeFlag", &myreq.BidHedgeFlag); + getString(req, "AskOrderRef", myreq.AskOrderRef); + getString(req, "BidOrderRef", myreq.BidOrderRef); + getString(req, "ForQuoteSysID", myreq.ForQuoteSysID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "ClientID", myreq.ClientID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqQuoteInsert(&myreq, reqid); + return i; }; int TdApi::reqQuoteAction(const dict &req, int reqid) { - CThostFtdcInputQuoteActionField myreq = CThostFtdcInputQuoteActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "QuoteActionRef", &myreq.QuoteActionRef); - getString(req, "QuoteRef", myreq.QuoteRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "QuoteSysID", myreq.QuoteSysID); - getChar(req, "ActionFlag", &myreq.ActionFlag); - getString(req, "UserID", myreq.UserID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "ClientID", myreq.ClientID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqQuoteAction(&myreq, reqid); - return i; + CThostFtdcInputQuoteActionField myreq = CThostFtdcInputQuoteActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getInt(req, "QuoteActionRef", &myreq.QuoteActionRef); + getString(req, "QuoteRef", myreq.QuoteRef); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "FrontID", &myreq.FrontID); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "QuoteSysID", myreq.QuoteSysID); + getChar(req, "ActionFlag", &myreq.ActionFlag); + getString(req, "UserID", myreq.UserID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "ClientID", myreq.ClientID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqQuoteAction(&myreq, reqid); + return i; }; int TdApi::reqBatchOrderAction(const dict &req, int reqid) { - CThostFtdcInputBatchOrderActionField myreq = CThostFtdcInputBatchOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "OrderActionRef", &myreq.OrderActionRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "UserID", myreq.UserID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqBatchOrderAction(&myreq, reqid); - return i; + CThostFtdcInputBatchOrderActionField myreq = CThostFtdcInputBatchOrderActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getInt(req, "OrderActionRef", &myreq.OrderActionRef); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "FrontID", &myreq.FrontID); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "UserID", myreq.UserID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqBatchOrderAction(&myreq, reqid); + return i; }; int TdApi::reqOptionSelfCloseInsert(const dict &req, int reqid) { - CThostFtdcInputOptionSelfCloseField myreq = CThostFtdcInputOptionSelfCloseField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "OptionSelfCloseRef", myreq.OptionSelfCloseRef); - getString(req, "UserID", myreq.UserID); - getInt(req, "Volume", &myreq.Volume); - getInt(req, "RequestID", &myreq.RequestID); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getChar(req, "OptSelfCloseFlag", &myreq.OptSelfCloseFlag); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "ClientID", myreq.ClientID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqOptionSelfCloseInsert(&myreq, reqid); - return i; + CThostFtdcInputOptionSelfCloseField myreq = CThostFtdcInputOptionSelfCloseField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "OptionSelfCloseRef", myreq.OptionSelfCloseRef); + getString(req, "UserID", myreq.UserID); + getInt(req, "Volume", &myreq.Volume); + getInt(req, "RequestID", &myreq.RequestID); + getString(req, "BusinessUnit", myreq.BusinessUnit); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getChar(req, "OptSelfCloseFlag", &myreq.OptSelfCloseFlag); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + getString(req, "ClientID", myreq.ClientID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqOptionSelfCloseInsert(&myreq, reqid); + return i; }; int TdApi::reqOptionSelfCloseAction(const dict &req, int reqid) { - CThostFtdcInputOptionSelfCloseActionField myreq = CThostFtdcInputOptionSelfCloseActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "OptionSelfCloseActionRef", &myreq.OptionSelfCloseActionRef); - getString(req, "OptionSelfCloseRef", myreq.OptionSelfCloseRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "OptionSelfCloseSysID", myreq.OptionSelfCloseSysID); - getChar(req, "ActionFlag", &myreq.ActionFlag); - getString(req, "UserID", myreq.UserID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqOptionSelfCloseAction(&myreq, reqid); - return i; + CThostFtdcInputOptionSelfCloseActionField myreq = CThostFtdcInputOptionSelfCloseActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getInt(req, "OptionSelfCloseActionRef", &myreq.OptionSelfCloseActionRef); + getString(req, "OptionSelfCloseRef", myreq.OptionSelfCloseRef); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "FrontID", &myreq.FrontID); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "OptionSelfCloseSysID", myreq.OptionSelfCloseSysID); + getChar(req, "ActionFlag", &myreq.ActionFlag); + getString(req, "UserID", myreq.UserID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + int i = this->api->ReqOptionSelfCloseAction(&myreq, reqid); + return i; }; int TdApi::reqCombActionInsert(const dict &req, int reqid) { - CThostFtdcInputCombActionField myreq = CThostFtdcInputCombActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "CombActionRef", myreq.CombActionRef); - getString(req, "UserID", myreq.UserID); - getChar(req, "Direction", &myreq.Direction); - getInt(req, "Volume", &myreq.Volume); - getChar(req, "CombDirection", &myreq.CombDirection); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqCombActionInsert(&myreq, reqid); - return i; + CThostFtdcInputCombActionField myreq = CThostFtdcInputCombActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "CombActionRef", myreq.CombActionRef); + getString(req, "UserID", myreq.UserID); + getChar(req, "Direction", &myreq.Direction); + getInt(req, "Volume", &myreq.Volume); + getChar(req, "CombDirection", &myreq.CombDirection); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "IPAddress", myreq.IPAddress); + getString(req, "MacAddress", myreq.MacAddress); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqCombActionInsert(&myreq, reqid); + return i; }; int TdApi::reqQryOrder(const dict &req, int reqid) { - CThostFtdcQryOrderField myreq = CThostFtdcQryOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "OrderSysID", myreq.OrderSysID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryOrder(&myreq, reqid); - return i; + CThostFtdcQryOrderField myreq = CThostFtdcQryOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "OrderSysID", myreq.OrderSysID); + getString(req, "InsertTimeStart", myreq.InsertTimeStart); + getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryOrder(&myreq, reqid); + return i; }; int TdApi::reqQryTrade(const dict &req, int reqid) { - CThostFtdcQryTradeField myreq = CThostFtdcQryTradeField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "TradeID", myreq.TradeID); - getString(req, "TradeTimeStart", myreq.TradeTimeStart); - getString(req, "TradeTimeEnd", myreq.TradeTimeEnd); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryTrade(&myreq, reqid); - return i; + CThostFtdcQryTradeField myreq = CThostFtdcQryTradeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "TradeID", myreq.TradeID); + getString(req, "TradeTimeStart", myreq.TradeTimeStart); + getString(req, "TradeTimeEnd", myreq.TradeTimeEnd); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryTrade(&myreq, reqid); + return i; }; int TdApi::reqQryInvestorPosition(const dict &req, int reqid) { - CThostFtdcQryInvestorPositionField myreq = CThostFtdcQryInvestorPositionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInvestorPosition(&myreq, reqid); - return i; + CThostFtdcQryInvestorPositionField myreq = CThostFtdcQryInvestorPositionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInvestorPosition(&myreq, reqid); + return i; }; int TdApi::reqQryTradingAccount(const dict &req, int reqid) { - CThostFtdcQryTradingAccountField myreq = CThostFtdcQryTradingAccountField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "CurrencyID", myreq.CurrencyID); - getChar(req, "BizType", &myreq.BizType); - getString(req, "AccountID", myreq.AccountID); - int i = this->api->ReqQryTradingAccount(&myreq, reqid); - return i; + CThostFtdcQryTradingAccountField myreq = CThostFtdcQryTradingAccountField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "CurrencyID", myreq.CurrencyID); + getChar(req, "BizType", &myreq.BizType); + getString(req, "AccountID", myreq.AccountID); + int i = this->api->ReqQryTradingAccount(&myreq, reqid); + return i; }; int TdApi::reqQryInvestor(const dict &req, int reqid) { - CThostFtdcQryInvestorField myreq = CThostFtdcQryInvestorField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - int i = this->api->ReqQryInvestor(&myreq, reqid); - return i; + CThostFtdcQryInvestorField myreq = CThostFtdcQryInvestorField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + int i = this->api->ReqQryInvestor(&myreq, reqid); + return i; }; int TdApi::reqQryTradingCode(const dict &req, int reqid) { - CThostFtdcQryTradingCodeField myreq = CThostFtdcQryTradingCodeField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ClientID", myreq.ClientID); - getChar(req, "ClientIDType", &myreq.ClientIDType); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryTradingCode(&myreq, reqid); - return i; + CThostFtdcQryTradingCodeField myreq = CThostFtdcQryTradingCodeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "ClientID", myreq.ClientID); + getChar(req, "ClientIDType", &myreq.ClientIDType); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryTradingCode(&myreq, reqid); + return i; }; int TdApi::reqQryInstrumentMarginRate(const dict &req, int reqid) { - CThostFtdcQryInstrumentMarginRateField myreq = CThostFtdcQryInstrumentMarginRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInstrumentMarginRate(&myreq, reqid); - return i; + CThostFtdcQryInstrumentMarginRateField myreq = CThostFtdcQryInstrumentMarginRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInstrumentMarginRate(&myreq, reqid); + return i; }; int TdApi::reqQryInstrumentCommissionRate(const dict &req, int reqid) { - CThostFtdcQryInstrumentCommissionRateField myreq = CThostFtdcQryInstrumentCommissionRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInstrumentCommissionRate(&myreq, reqid); - return i; + CThostFtdcQryInstrumentCommissionRateField myreq = CThostFtdcQryInstrumentCommissionRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInstrumentCommissionRate(&myreq, reqid); + return i; }; int TdApi::reqQryExchange(const dict &req, int reqid) { - CThostFtdcQryExchangeField myreq = CThostFtdcQryExchangeField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryExchange(&myreq, reqid); - return i; + CThostFtdcQryExchangeField myreq = CThostFtdcQryExchangeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryExchange(&myreq, reqid); + return i; }; int TdApi::reqQryProduct(const dict &req, int reqid) { - CThostFtdcQryProductField myreq = CThostFtdcQryProductField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "ProductID", myreq.ProductID); - getChar(req, "ProductClass", &myreq.ProductClass); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryProduct(&myreq, reqid); - return i; + CThostFtdcQryProductField myreq = CThostFtdcQryProductField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "ProductID", myreq.ProductID); + getChar(req, "ProductClass", &myreq.ProductClass); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryProduct(&myreq, reqid); + return i; }; int TdApi::reqQryInstrument(const dict &req, int reqid) { - CThostFtdcQryInstrumentField myreq = CThostFtdcQryInstrumentField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ExchangeInstID", myreq.ExchangeInstID); - getString(req, "ProductID", myreq.ProductID); - int i = this->api->ReqQryInstrument(&myreq, reqid); - return i; + CThostFtdcQryInstrumentField myreq = CThostFtdcQryInstrumentField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "ExchangeInstID", myreq.ExchangeInstID); + getString(req, "ProductID", myreq.ProductID); + int i = this->api->ReqQryInstrument(&myreq, reqid); + return i; }; int TdApi::reqQryDepthMarketData(const dict &req, int reqid) { - CThostFtdcQryDepthMarketDataField myreq = CThostFtdcQryDepthMarketDataField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryDepthMarketData(&myreq, reqid); - return i; + CThostFtdcQryDepthMarketDataField myreq = CThostFtdcQryDepthMarketDataField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryDepthMarketData(&myreq, reqid); + return i; }; int TdApi::reqQrySettlementInfo(const dict &req, int reqid) { - CThostFtdcQrySettlementInfoField myreq = CThostFtdcQrySettlementInfoField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "TradingDay", myreq.TradingDay); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqQrySettlementInfo(&myreq, reqid); - return i; + CThostFtdcQrySettlementInfoField myreq = CThostFtdcQrySettlementInfoField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "TradingDay", myreq.TradingDay); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqQrySettlementInfo(&myreq, reqid); + return i; }; int TdApi::reqQryTransferBank(const dict &req, int reqid) { - CThostFtdcQryTransferBankField myreq = CThostFtdcQryTransferBankField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BankID", myreq.BankID); - getString(req, "BankBrchID", myreq.BankBrchID); - int i = this->api->ReqQryTransferBank(&myreq, reqid); - return i; + CThostFtdcQryTransferBankField myreq = CThostFtdcQryTransferBankField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BankID", myreq.BankID); + getString(req, "BankBrchID", myreq.BankBrchID); + int i = this->api->ReqQryTransferBank(&myreq, reqid); + return i; }; int TdApi::reqQryInvestorPositionDetail(const dict &req, int reqid) { - CThostFtdcQryInvestorPositionDetailField myreq = CThostFtdcQryInvestorPositionDetailField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInvestorPositionDetail(&myreq, reqid); - return i; + CThostFtdcQryInvestorPositionDetailField myreq = CThostFtdcQryInvestorPositionDetailField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInvestorPositionDetail(&myreq, reqid); + return i; }; int TdApi::reqQryNotice(const dict &req, int reqid) { - CThostFtdcQryNoticeField myreq = CThostFtdcQryNoticeField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - int i = this->api->ReqQryNotice(&myreq, reqid); - return i; + CThostFtdcQryNoticeField myreq = CThostFtdcQryNoticeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + int i = this->api->ReqQryNotice(&myreq, reqid); + return i; }; int TdApi::reqQrySettlementInfoConfirm(const dict &req, int reqid) { - CThostFtdcQrySettlementInfoConfirmField myreq = CThostFtdcQrySettlementInfoConfirmField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqQrySettlementInfoConfirm(&myreq, reqid); - return i; + CThostFtdcQrySettlementInfoConfirmField myreq = CThostFtdcQrySettlementInfoConfirmField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqQrySettlementInfoConfirm(&myreq, reqid); + return i; }; int TdApi::reqQryInvestorPositionCombineDetail(const dict &req, int reqid) { - CThostFtdcQryInvestorPositionCombineDetailField myreq = CThostFtdcQryInvestorPositionCombineDetailField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "CombInstrumentID", myreq.CombInstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInvestorPositionCombineDetail(&myreq, reqid); - return i; + CThostFtdcQryInvestorPositionCombineDetailField myreq = CThostFtdcQryInvestorPositionCombineDetailField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "CombInstrumentID", myreq.CombInstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInvestorPositionCombineDetail(&myreq, reqid); + return i; }; int TdApi::reqQryCFMMCTradingAccountKey(const dict &req, int reqid) { - CThostFtdcQryCFMMCTradingAccountKeyField myreq = CThostFtdcQryCFMMCTradingAccountKeyField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - int i = this->api->ReqQryCFMMCTradingAccountKey(&myreq, reqid); - return i; + CThostFtdcQryCFMMCTradingAccountKeyField myreq = CThostFtdcQryCFMMCTradingAccountKeyField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + int i = this->api->ReqQryCFMMCTradingAccountKey(&myreq, reqid); + return i; }; int TdApi::reqQryEWarrantOffset(const dict &req, int reqid) { - CThostFtdcQryEWarrantOffsetField myreq = CThostFtdcQryEWarrantOffsetField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryEWarrantOffset(&myreq, reqid); - return i; + CThostFtdcQryEWarrantOffsetField myreq = CThostFtdcQryEWarrantOffsetField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryEWarrantOffset(&myreq, reqid); + return i; }; int TdApi::reqQryInvestorProductGroupMargin(const dict &req, int reqid) { - CThostFtdcQryInvestorProductGroupMarginField myreq = CThostFtdcQryInvestorProductGroupMarginField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ProductGroupID", myreq.ProductGroupID); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInvestorProductGroupMargin(&myreq, reqid); - return i; + CThostFtdcQryInvestorProductGroupMarginField myreq = CThostFtdcQryInvestorProductGroupMarginField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "ProductGroupID", myreq.ProductGroupID); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInvestorProductGroupMargin(&myreq, reqid); + return i; }; int TdApi::reqQryExchangeMarginRate(const dict &req, int reqid) { - CThostFtdcQryExchangeMarginRateField myreq = CThostFtdcQryExchangeMarginRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InstrumentID", myreq.InstrumentID); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryExchangeMarginRate(&myreq, reqid); - return i; + CThostFtdcQryExchangeMarginRateField myreq = CThostFtdcQryExchangeMarginRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InstrumentID", myreq.InstrumentID); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryExchangeMarginRate(&myreq, reqid); + return i; }; int TdApi::reqQryExchangeMarginRateAdjust(const dict &req, int reqid) { - CThostFtdcQryExchangeMarginRateAdjustField myreq = CThostFtdcQryExchangeMarginRateAdjustField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InstrumentID", myreq.InstrumentID); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - int i = this->api->ReqQryExchangeMarginRateAdjust(&myreq, reqid); - return i; + CThostFtdcQryExchangeMarginRateAdjustField myreq = CThostFtdcQryExchangeMarginRateAdjustField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InstrumentID", myreq.InstrumentID); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + int i = this->api->ReqQryExchangeMarginRateAdjust(&myreq, reqid); + return i; }; int TdApi::reqQryExchangeRate(const dict &req, int reqid) { - CThostFtdcQryExchangeRateField myreq = CThostFtdcQryExchangeRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "FromCurrencyID", myreq.FromCurrencyID); - getString(req, "ToCurrencyID", myreq.ToCurrencyID); - int i = this->api->ReqQryExchangeRate(&myreq, reqid); - return i; + CThostFtdcQryExchangeRateField myreq = CThostFtdcQryExchangeRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "FromCurrencyID", myreq.FromCurrencyID); + getString(req, "ToCurrencyID", myreq.ToCurrencyID); + int i = this->api->ReqQryExchangeRate(&myreq, reqid); + return i; }; int TdApi::reqQrySecAgentACIDMap(const dict &req, int reqid) { - CThostFtdcQrySecAgentACIDMapField myreq = CThostFtdcQrySecAgentACIDMapField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "UserID", myreq.UserID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqQrySecAgentACIDMap(&myreq, reqid); - return i; + CThostFtdcQrySecAgentACIDMapField myreq = CThostFtdcQrySecAgentACIDMapField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "UserID", myreq.UserID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqQrySecAgentACIDMap(&myreq, reqid); + return i; }; int TdApi::reqQryProductExchRate(const dict &req, int reqid) { - CThostFtdcQryProductExchRateField myreq = CThostFtdcQryProductExchRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "ProductID", myreq.ProductID); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryProductExchRate(&myreq, reqid); - return i; + CThostFtdcQryProductExchRateField myreq = CThostFtdcQryProductExchRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "ProductID", myreq.ProductID); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryProductExchRate(&myreq, reqid); + return i; }; int TdApi::reqQryProductGroup(const dict &req, int reqid) { - CThostFtdcQryProductGroupField myreq = CThostFtdcQryProductGroupField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "ProductID", myreq.ProductID); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryProductGroup(&myreq, reqid); - return i; + CThostFtdcQryProductGroupField myreq = CThostFtdcQryProductGroupField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "ProductID", myreq.ProductID); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryProductGroup(&myreq, reqid); + return i; }; int TdApi::reqQryMMInstrumentCommissionRate(const dict &req, int reqid) { - CThostFtdcQryMMInstrumentCommissionRateField myreq = CThostFtdcQryMMInstrumentCommissionRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - int i = this->api->ReqQryMMInstrumentCommissionRate(&myreq, reqid); - return i; + CThostFtdcQryMMInstrumentCommissionRateField myreq = CThostFtdcQryMMInstrumentCommissionRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + int i = this->api->ReqQryMMInstrumentCommissionRate(&myreq, reqid); + return i; }; int TdApi::reqQryMMOptionInstrCommRate(const dict &req, int reqid) { - CThostFtdcQryMMOptionInstrCommRateField myreq = CThostFtdcQryMMOptionInstrCommRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - int i = this->api->ReqQryMMOptionInstrCommRate(&myreq, reqid); - return i; + CThostFtdcQryMMOptionInstrCommRateField myreq = CThostFtdcQryMMOptionInstrCommRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + int i = this->api->ReqQryMMOptionInstrCommRate(&myreq, reqid); + return i; }; int TdApi::reqQryInstrumentOrderCommRate(const dict &req, int reqid) { - CThostFtdcQryInstrumentOrderCommRateField myreq = CThostFtdcQryInstrumentOrderCommRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - int i = this->api->ReqQryInstrumentOrderCommRate(&myreq, reqid); - return i; + CThostFtdcQryInstrumentOrderCommRateField myreq = CThostFtdcQryInstrumentOrderCommRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + int i = this->api->ReqQryInstrumentOrderCommRate(&myreq, reqid); + return i; +}; + +int TdApi::reqQrySecAgentTradingAccount(const dict &req, int reqid) +{ + CThostFtdcQryTradingAccountField myreq = CThostFtdcQryTradingAccountField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "CurrencyID", myreq.CurrencyID); + getChar(req, "BizType", &myreq.BizType); + getString(req, "AccountID", myreq.AccountID); + int i = this->api->ReqQrySecAgentTradingAccount(&myreq, reqid); + return i; +}; + +int TdApi::reqQrySecAgentCheckMode(const dict &req, int reqid) +{ + CThostFtdcQrySecAgentCheckModeField myreq = CThostFtdcQrySecAgentCheckModeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + int i = this->api->ReqQrySecAgentCheckMode(&myreq, reqid); + return i; }; int TdApi::reqQryOptionInstrTradeCost(const dict &req, int reqid) { - CThostFtdcQryOptionInstrTradeCostField myreq = CThostFtdcQryOptionInstrTradeCostField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getChar(req, "HedgeFlag", &myreq.HedgeFlag); - getDouble(req, "InputPrice", &myreq.InputPrice); - getDouble(req, "UnderlyingPrice", &myreq.UnderlyingPrice); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryOptionInstrTradeCost(&myreq, reqid); - return i; + CThostFtdcQryOptionInstrTradeCostField myreq = CThostFtdcQryOptionInstrTradeCostField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getChar(req, "HedgeFlag", &myreq.HedgeFlag); + getDouble(req, "InputPrice", &myreq.InputPrice); + getDouble(req, "UnderlyingPrice", &myreq.UnderlyingPrice); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryOptionInstrTradeCost(&myreq, reqid); + return i; }; int TdApi::reqQryOptionInstrCommRate(const dict &req, int reqid) { - CThostFtdcQryOptionInstrCommRateField myreq = CThostFtdcQryOptionInstrCommRateField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryOptionInstrCommRate(&myreq, reqid); - return i; + CThostFtdcQryOptionInstrCommRateField myreq = CThostFtdcQryOptionInstrCommRateField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryOptionInstrCommRate(&myreq, reqid); + return i; }; int TdApi::reqQryExecOrder(const dict &req, int reqid) { - CThostFtdcQryExecOrderField myreq = CThostFtdcQryExecOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ExecOrderSysID", myreq.ExecOrderSysID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - int i = this->api->ReqQryExecOrder(&myreq, reqid); - return i; + CThostFtdcQryExecOrderField myreq = CThostFtdcQryExecOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "ExecOrderSysID", myreq.ExecOrderSysID); + getString(req, "InsertTimeStart", myreq.InsertTimeStart); + getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); + int i = this->api->ReqQryExecOrder(&myreq, reqid); + return i; }; int TdApi::reqQryForQuote(const dict &req, int reqid) { - CThostFtdcQryForQuoteField myreq = CThostFtdcQryForQuoteField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryForQuote(&myreq, reqid); - return i; + CThostFtdcQryForQuoteField myreq = CThostFtdcQryForQuoteField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InsertTimeStart", myreq.InsertTimeStart); + getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryForQuote(&myreq, reqid); + return i; }; int TdApi::reqQryQuote(const dict &req, int reqid) { - CThostFtdcQryQuoteField myreq = CThostFtdcQryQuoteField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "QuoteSysID", myreq.QuoteSysID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryQuote(&myreq, reqid); - return i; + CThostFtdcQryQuoteField myreq = CThostFtdcQryQuoteField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "QuoteSysID", myreq.QuoteSysID); + getString(req, "InsertTimeStart", myreq.InsertTimeStart); + getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryQuote(&myreq, reqid); + return i; }; int TdApi::reqQryOptionSelfClose(const dict &req, int reqid) { - CThostFtdcQryOptionSelfCloseField myreq = CThostFtdcQryOptionSelfCloseField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "OptionSelfCloseSysID", myreq.OptionSelfCloseSysID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - int i = this->api->ReqQryOptionSelfClose(&myreq, reqid); - return i; + CThostFtdcQryOptionSelfCloseField myreq = CThostFtdcQryOptionSelfCloseField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "OptionSelfCloseSysID", myreq.OptionSelfCloseSysID); + getString(req, "InsertTimeStart", myreq.InsertTimeStart); + getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); + int i = this->api->ReqQryOptionSelfClose(&myreq, reqid); + return i; }; int TdApi::reqQryInvestUnit(const dict &req, int reqid) { - CThostFtdcQryInvestUnitField myreq = CThostFtdcQryInvestUnitField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryInvestUnit(&myreq, reqid); - return i; + CThostFtdcQryInvestUnitField myreq = CThostFtdcQryInvestUnitField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryInvestUnit(&myreq, reqid); + return i; }; int TdApi::reqQryCombInstrumentGuard(const dict &req, int reqid) { - CThostFtdcQryCombInstrumentGuardField myreq = CThostFtdcQryCombInstrumentGuardField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryCombInstrumentGuard(&myreq, reqid); - return i; + CThostFtdcQryCombInstrumentGuardField myreq = CThostFtdcQryCombInstrumentGuardField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + int i = this->api->ReqQryCombInstrumentGuard(&myreq, reqid); + return i; }; int TdApi::reqQryCombAction(const dict &req, int reqid) { - CThostFtdcQryCombActionField myreq = CThostFtdcQryCombActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryCombAction(&myreq, reqid); - return i; + CThostFtdcQryCombActionField myreq = CThostFtdcQryCombActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryCombAction(&myreq, reqid); + return i; }; int TdApi::reqQryTransferSerial(const dict &req, int reqid) { - CThostFtdcQryTransferSerialField myreq = CThostFtdcQryTransferSerialField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "BankID", myreq.BankID); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqQryTransferSerial(&myreq, reqid); - return i; + CThostFtdcQryTransferSerialField myreq = CThostFtdcQryTransferSerialField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "BankID", myreq.BankID); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqQryTransferSerial(&myreq, reqid); + return i; }; int TdApi::reqQryAccountregister(const dict &req, int reqid) { - CThostFtdcQryAccountregisterField myreq = CThostFtdcQryAccountregisterField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "AccountID", myreq.AccountID); - getString(req, "BankID", myreq.BankID); - getString(req, "BankBranchID", myreq.BankBranchID); - getString(req, "CurrencyID", myreq.CurrencyID); - int i = this->api->ReqQryAccountregister(&myreq, reqid); - return i; + CThostFtdcQryAccountregisterField myreq = CThostFtdcQryAccountregisterField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "AccountID", myreq.AccountID); + getString(req, "BankID", myreq.BankID); + getString(req, "BankBranchID", myreq.BankBranchID); + getString(req, "CurrencyID", myreq.CurrencyID); + int i = this->api->ReqQryAccountregister(&myreq, reqid); + return i; }; int TdApi::reqQryContractBank(const dict &req, int reqid) { - CThostFtdcQryContractBankField myreq = CThostFtdcQryContractBankField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "BankID", myreq.BankID); - getString(req, "BankBrchID", myreq.BankBrchID); - int i = this->api->ReqQryContractBank(&myreq, reqid); - return i; + CThostFtdcQryContractBankField myreq = CThostFtdcQryContractBankField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "BankID", myreq.BankID); + getString(req, "BankBrchID", myreq.BankBrchID); + int i = this->api->ReqQryContractBank(&myreq, reqid); + return i; }; int TdApi::reqQryParkedOrder(const dict &req, int reqid) { - CThostFtdcQryParkedOrderField myreq = CThostFtdcQryParkedOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryParkedOrder(&myreq, reqid); - return i; + CThostFtdcQryParkedOrderField myreq = CThostFtdcQryParkedOrderField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryParkedOrder(&myreq, reqid); + return i; }; int TdApi::reqQryParkedOrderAction(const dict &req, int reqid) { - CThostFtdcQryParkedOrderActionField myreq = CThostFtdcQryParkedOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryParkedOrderAction(&myreq, reqid); - return i; + CThostFtdcQryParkedOrderActionField myreq = CThostFtdcQryParkedOrderActionField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InstrumentID", myreq.InstrumentID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryParkedOrderAction(&myreq, reqid); + return i; }; int TdApi::reqQryTradingNotice(const dict &req, int reqid) { - CThostFtdcQryTradingNoticeField myreq = CThostFtdcQryTradingNoticeField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQryTradingNotice(&myreq, reqid); - return i; + CThostFtdcQryTradingNoticeField myreq = CThostFtdcQryTradingNoticeField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQryTradingNotice(&myreq, reqid); + return i; }; int TdApi::reqQryBrokerTradingParams(const dict &req, int reqid) { - CThostFtdcQryBrokerTradingParamsField myreq = CThostFtdcQryBrokerTradingParamsField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "AccountID", myreq.AccountID); - int i = this->api->ReqQryBrokerTradingParams(&myreq, reqid); - return i; + CThostFtdcQryBrokerTradingParamsField myreq = CThostFtdcQryBrokerTradingParamsField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "CurrencyID", myreq.CurrencyID); + getString(req, "AccountID", myreq.AccountID); + int i = this->api->ReqQryBrokerTradingParams(&myreq, reqid); + return i; }; int TdApi::reqQryBrokerTradingAlgos(const dict &req, int reqid) { - CThostFtdcQryBrokerTradingAlgosField myreq = CThostFtdcQryBrokerTradingAlgosField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "InstrumentID", myreq.InstrumentID); - int i = this->api->ReqQryBrokerTradingAlgos(&myreq, reqid); - return i; + CThostFtdcQryBrokerTradingAlgosField myreq = CThostFtdcQryBrokerTradingAlgosField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "ExchangeID", myreq.ExchangeID); + getString(req, "InstrumentID", myreq.InstrumentID); + int i = this->api->ReqQryBrokerTradingAlgos(&myreq, reqid); + return i; }; int TdApi::reqQueryCFMMCTradingAccountToken(const dict &req, int reqid) { - CThostFtdcQueryCFMMCTradingAccountTokenField myreq = CThostFtdcQueryCFMMCTradingAccountTokenField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - int i = this->api->ReqQueryCFMMCTradingAccountToken(&myreq, reqid); - return i; + CThostFtdcQueryCFMMCTradingAccountTokenField myreq = CThostFtdcQueryCFMMCTradingAccountTokenField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "InvestorID", myreq.InvestorID); + getString(req, "InvestUnitID", myreq.InvestUnitID); + int i = this->api->ReqQueryCFMMCTradingAccountToken(&myreq, reqid); + return i; }; int TdApi::reqFromBankToFutureByFuture(const dict &req, int reqid) { - CThostFtdcReqTransferField myreq = CThostFtdcReqTransferField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "TradeCode", myreq.TradeCode); - getString(req, "BankID", myreq.BankID); - getString(req, "BankBranchID", myreq.BankBranchID); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "BrokerBranchID", myreq.BrokerBranchID); - getString(req, "TradeDate", myreq.TradeDate); - getString(req, "TradeTime", myreq.TradeTime); - getString(req, "BankSerial", myreq.BankSerial); - getString(req, "TradingDay", myreq.TradingDay); - getInt(req, "PlateSerial", &myreq.PlateSerial); - getChar(req, "LastFragment", &myreq.LastFragment); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "CustomerName", myreq.CustomerName); - getChar(req, "IdCardType", &myreq.IdCardType); - getString(req, "IdentifiedCardNo", myreq.IdentifiedCardNo); - getChar(req, "CustType", &myreq.CustType); - getString(req, "BankAccount", myreq.BankAccount); - getString(req, "BankPassWord", myreq.BankPassWord); - getString(req, "AccountID", myreq.AccountID); - getString(req, "Password", myreq.Password); - getInt(req, "InstallID", &myreq.InstallID); - getInt(req, "FutureSerial", &myreq.FutureSerial); - getString(req, "UserID", myreq.UserID); - getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); - getString(req, "CurrencyID", myreq.CurrencyID); - getDouble(req, "TradeAmount", &myreq.TradeAmount); - getDouble(req, "FutureFetchAmount", &myreq.FutureFetchAmount); - getChar(req, "FeePayFlag", &myreq.FeePayFlag); - getDouble(req, "CustFee", &myreq.CustFee); - getDouble(req, "BrokerFee", &myreq.BrokerFee); - getString(req, "Message", myreq.Message); - getString(req, "Digest", myreq.Digest); - getChar(req, "BankAccType", &myreq.BankAccType); - getString(req, "DeviceID", myreq.DeviceID); - getChar(req, "BankSecuAccType", &myreq.BankSecuAccType); - getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); - getString(req, "BankSecuAcc", myreq.BankSecuAcc); - getChar(req, "BankPwdFlag", &myreq.BankPwdFlag); - getChar(req, "SecuPwdFlag", &myreq.SecuPwdFlag); - getString(req, "OperNo", myreq.OperNo); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "TID", &myreq.TID); - getChar(req, "TransferStatus", &myreq.TransferStatus); - getString(req, "LongCustomerName", myreq.LongCustomerName); - int i = this->api->ReqFromBankToFutureByFuture(&myreq, reqid); - return i; + CThostFtdcReqTransferField myreq = CThostFtdcReqTransferField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "TradeCode", myreq.TradeCode); + getString(req, "BankID", myreq.BankID); + getString(req, "BankBranchID", myreq.BankBranchID); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "BrokerBranchID", myreq.BrokerBranchID); + getString(req, "TradeDate", myreq.TradeDate); + getString(req, "TradeTime", myreq.TradeTime); + getString(req, "BankSerial", myreq.BankSerial); + getString(req, "TradingDay", myreq.TradingDay); + getInt(req, "PlateSerial", &myreq.PlateSerial); + getChar(req, "LastFragment", &myreq.LastFragment); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "CustomerName", myreq.CustomerName); + getChar(req, "IdCardType", &myreq.IdCardType); + getString(req, "IdentifiedCardNo", myreq.IdentifiedCardNo); + getChar(req, "CustType", &myreq.CustType); + getString(req, "BankAccount", myreq.BankAccount); + getString(req, "BankPassWord", myreq.BankPassWord); + getString(req, "AccountID", myreq.AccountID); + getString(req, "Password", myreq.Password); + getInt(req, "InstallID", &myreq.InstallID); + getInt(req, "FutureSerial", &myreq.FutureSerial); + getString(req, "UserID", myreq.UserID); + getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); + getString(req, "CurrencyID", myreq.CurrencyID); + getDouble(req, "TradeAmount", &myreq.TradeAmount); + getDouble(req, "FutureFetchAmount", &myreq.FutureFetchAmount); + getChar(req, "FeePayFlag", &myreq.FeePayFlag); + getDouble(req, "CustFee", &myreq.CustFee); + getDouble(req, "BrokerFee", &myreq.BrokerFee); + getString(req, "Message", myreq.Message); + getString(req, "Digest", myreq.Digest); + getChar(req, "BankAccType", &myreq.BankAccType); + getString(req, "DeviceID", myreq.DeviceID); + getChar(req, "BankSecuAccType", &myreq.BankSecuAccType); + getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); + getString(req, "BankSecuAcc", myreq.BankSecuAcc); + getChar(req, "BankPwdFlag", &myreq.BankPwdFlag); + getChar(req, "SecuPwdFlag", &myreq.SecuPwdFlag); + getString(req, "OperNo", myreq.OperNo); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "TID", &myreq.TID); + getChar(req, "TransferStatus", &myreq.TransferStatus); + getString(req, "LongCustomerName", myreq.LongCustomerName); + int i = this->api->ReqFromBankToFutureByFuture(&myreq, reqid); + return i; }; int TdApi::reqFromFutureToBankByFuture(const dict &req, int reqid) { - CThostFtdcReqTransferField myreq = CThostFtdcReqTransferField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "TradeCode", myreq.TradeCode); - getString(req, "BankID", myreq.BankID); - getString(req, "BankBranchID", myreq.BankBranchID); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "BrokerBranchID", myreq.BrokerBranchID); - getString(req, "TradeDate", myreq.TradeDate); - getString(req, "TradeTime", myreq.TradeTime); - getString(req, "BankSerial", myreq.BankSerial); - getString(req, "TradingDay", myreq.TradingDay); - getInt(req, "PlateSerial", &myreq.PlateSerial); - getChar(req, "LastFragment", &myreq.LastFragment); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "CustomerName", myreq.CustomerName); - getChar(req, "IdCardType", &myreq.IdCardType); - getString(req, "IdentifiedCardNo", myreq.IdentifiedCardNo); - getChar(req, "CustType", &myreq.CustType); - getString(req, "BankAccount", myreq.BankAccount); - getString(req, "BankPassWord", myreq.BankPassWord); - getString(req, "AccountID", myreq.AccountID); - getString(req, "Password", myreq.Password); - getInt(req, "InstallID", &myreq.InstallID); - getInt(req, "FutureSerial", &myreq.FutureSerial); - getString(req, "UserID", myreq.UserID); - getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); - getString(req, "CurrencyID", myreq.CurrencyID); - getDouble(req, "TradeAmount", &myreq.TradeAmount); - getDouble(req, "FutureFetchAmount", &myreq.FutureFetchAmount); - getChar(req, "FeePayFlag", &myreq.FeePayFlag); - getDouble(req, "CustFee", &myreq.CustFee); - getDouble(req, "BrokerFee", &myreq.BrokerFee); - getString(req, "Message", myreq.Message); - getString(req, "Digest", myreq.Digest); - getChar(req, "BankAccType", &myreq.BankAccType); - getString(req, "DeviceID", myreq.DeviceID); - getChar(req, "BankSecuAccType", &myreq.BankSecuAccType); - getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); - getString(req, "BankSecuAcc", myreq.BankSecuAcc); - getChar(req, "BankPwdFlag", &myreq.BankPwdFlag); - getChar(req, "SecuPwdFlag", &myreq.SecuPwdFlag); - getString(req, "OperNo", myreq.OperNo); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "TID", &myreq.TID); - getChar(req, "TransferStatus", &myreq.TransferStatus); - getString(req, "LongCustomerName", myreq.LongCustomerName); - int i = this->api->ReqFromFutureToBankByFuture(&myreq, reqid); - return i; + CThostFtdcReqTransferField myreq = CThostFtdcReqTransferField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "TradeCode", myreq.TradeCode); + getString(req, "BankID", myreq.BankID); + getString(req, "BankBranchID", myreq.BankBranchID); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "BrokerBranchID", myreq.BrokerBranchID); + getString(req, "TradeDate", myreq.TradeDate); + getString(req, "TradeTime", myreq.TradeTime); + getString(req, "BankSerial", myreq.BankSerial); + getString(req, "TradingDay", myreq.TradingDay); + getInt(req, "PlateSerial", &myreq.PlateSerial); + getChar(req, "LastFragment", &myreq.LastFragment); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "CustomerName", myreq.CustomerName); + getChar(req, "IdCardType", &myreq.IdCardType); + getString(req, "IdentifiedCardNo", myreq.IdentifiedCardNo); + getChar(req, "CustType", &myreq.CustType); + getString(req, "BankAccount", myreq.BankAccount); + getString(req, "BankPassWord", myreq.BankPassWord); + getString(req, "AccountID", myreq.AccountID); + getString(req, "Password", myreq.Password); + getInt(req, "InstallID", &myreq.InstallID); + getInt(req, "FutureSerial", &myreq.FutureSerial); + getString(req, "UserID", myreq.UserID); + getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); + getString(req, "CurrencyID", myreq.CurrencyID); + getDouble(req, "TradeAmount", &myreq.TradeAmount); + getDouble(req, "FutureFetchAmount", &myreq.FutureFetchAmount); + getChar(req, "FeePayFlag", &myreq.FeePayFlag); + getDouble(req, "CustFee", &myreq.CustFee); + getDouble(req, "BrokerFee", &myreq.BrokerFee); + getString(req, "Message", myreq.Message); + getString(req, "Digest", myreq.Digest); + getChar(req, "BankAccType", &myreq.BankAccType); + getString(req, "DeviceID", myreq.DeviceID); + getChar(req, "BankSecuAccType", &myreq.BankSecuAccType); + getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); + getString(req, "BankSecuAcc", myreq.BankSecuAcc); + getChar(req, "BankPwdFlag", &myreq.BankPwdFlag); + getChar(req, "SecuPwdFlag", &myreq.SecuPwdFlag); + getString(req, "OperNo", myreq.OperNo); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "TID", &myreq.TID); + getChar(req, "TransferStatus", &myreq.TransferStatus); + getString(req, "LongCustomerName", myreq.LongCustomerName); + int i = this->api->ReqFromFutureToBankByFuture(&myreq, reqid); + return i; }; int TdApi::reqQueryBankAccountMoneyByFuture(const dict &req, int reqid) { - CThostFtdcReqQueryAccountField myreq = CThostFtdcReqQueryAccountField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "TradeCode", myreq.TradeCode); - getString(req, "BankID", myreq.BankID); - getString(req, "BankBranchID", myreq.BankBranchID); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "BrokerBranchID", myreq.BrokerBranchID); - getString(req, "TradeDate", myreq.TradeDate); - getString(req, "TradeTime", myreq.TradeTime); - getString(req, "BankSerial", myreq.BankSerial); - getString(req, "TradingDay", myreq.TradingDay); - getInt(req, "PlateSerial", &myreq.PlateSerial); - getChar(req, "LastFragment", &myreq.LastFragment); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "CustomerName", myreq.CustomerName); - getChar(req, "IdCardType", &myreq.IdCardType); - getString(req, "IdentifiedCardNo", myreq.IdentifiedCardNo); - getChar(req, "CustType", &myreq.CustType); - getString(req, "BankAccount", myreq.BankAccount); - getString(req, "BankPassWord", myreq.BankPassWord); - getString(req, "AccountID", myreq.AccountID); - getString(req, "Password", myreq.Password); - getInt(req, "FutureSerial", &myreq.FutureSerial); - getInt(req, "InstallID", &myreq.InstallID); - getString(req, "UserID", myreq.UserID); - getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "Digest", myreq.Digest); - getChar(req, "BankAccType", &myreq.BankAccType); - getString(req, "DeviceID", myreq.DeviceID); - getChar(req, "BankSecuAccType", &myreq.BankSecuAccType); - getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); - getString(req, "BankSecuAcc", myreq.BankSecuAcc); - getChar(req, "BankPwdFlag", &myreq.BankPwdFlag); - getChar(req, "SecuPwdFlag", &myreq.SecuPwdFlag); - getString(req, "OperNo", myreq.OperNo); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "TID", &myreq.TID); - getString(req, "LongCustomerName", myreq.LongCustomerName); - int i = this->api->ReqQueryBankAccountMoneyByFuture(&myreq, reqid); - return i; + CThostFtdcReqQueryAccountField myreq = CThostFtdcReqQueryAccountField(); + memset(&myreq, 0, sizeof(myreq)); + getString(req, "TradeCode", myreq.TradeCode); + getString(req, "BankID", myreq.BankID); + getString(req, "BankBranchID", myreq.BankBranchID); + getString(req, "BrokerID", myreq.BrokerID); + getString(req, "BrokerBranchID", myreq.BrokerBranchID); + getString(req, "TradeDate", myreq.TradeDate); + getString(req, "TradeTime", myreq.TradeTime); + getString(req, "BankSerial", myreq.BankSerial); + getString(req, "TradingDay", myreq.TradingDay); + getInt(req, "PlateSerial", &myreq.PlateSerial); + getChar(req, "LastFragment", &myreq.LastFragment); + getInt(req, "SessionID", &myreq.SessionID); + getString(req, "CustomerName", myreq.CustomerName); + getChar(req, "IdCardType", &myreq.IdCardType); + getString(req, "IdentifiedCardNo", myreq.IdentifiedCardNo); + getChar(req, "CustType", &myreq.CustType); + getString(req, "BankAccount", myreq.BankAccount); + getString(req, "BankPassWord", myreq.BankPassWord); + getString(req, "AccountID", myreq.AccountID); + getString(req, "Password", myreq.Password); + getInt(req, "FutureSerial", &myreq.FutureSerial); + getInt(req, "InstallID", &myreq.InstallID); + getString(req, "UserID", myreq.UserID); + getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); + getString(req, "CurrencyID", myreq.CurrencyID); + getString(req, "Digest", myreq.Digest); + getChar(req, "BankAccType", &myreq.BankAccType); + getString(req, "DeviceID", myreq.DeviceID); + getChar(req, "BankSecuAccType", &myreq.BankSecuAccType); + getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); + getString(req, "BankSecuAcc", myreq.BankSecuAcc); + getChar(req, "BankPwdFlag", &myreq.BankPwdFlag); + getChar(req, "SecuPwdFlag", &myreq.SecuPwdFlag); + getString(req, "OperNo", myreq.OperNo); + getInt(req, "RequestID", &myreq.RequestID); + getInt(req, "TID", &myreq.TID); + getString(req, "LongCustomerName", myreq.LongCustomerName); + int i = this->api->ReqQueryBankAccountMoneyByFuture(&myreq, reqid); + return i; }; @@ -9198,1648 +9369,1680 @@ int TdApi::reqQueryBankAccountMoneyByFuture(const dict &req, int reqid) class PyTdApi : public TdApi { public: - using TdApi::TdApi; - - void onFrontConnected() override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onFrontConnected); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onFrontDisconnected(int reqid) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onFrontDisconnected, reqid); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onHeartBeatWarning(int reqid) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onHeartBeatWarning, reqid); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspAuthenticate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspAuthenticate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspUserLogin(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspUserLogin, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspUserLogout(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspUserLogout, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspUserPasswordUpdate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspUserPasswordUpdate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspTradingAccountPasswordUpdate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspTradingAccountPasswordUpdate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspOrderInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspOrderInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspParkedOrderInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspParkedOrderInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspParkedOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspOrderAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQueryMaxOrderVolume(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQueryMaxOrderVolume, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspSettlementInfoConfirm(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspSettlementInfoConfirm, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspRemoveParkedOrder(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspRemoveParkedOrder, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspRemoveParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspRemoveParkedOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspExecOrderInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspExecOrderInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspExecOrderAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspExecOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspForQuoteInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspForQuoteInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQuoteInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQuoteInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQuoteAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQuoteAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspBatchOrderAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspBatchOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspOptionSelfCloseInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspOptionSelfCloseInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspOptionSelfCloseAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspOptionSelfCloseAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspCombActionInsert(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspCombActionInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryOrder(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryOrder, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryTrade(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryTrade, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInvestorPosition(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorPosition, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryTradingAccount(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingAccount, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInvestor(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestor, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryTradingCode(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingCode, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInstrumentMarginRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrumentMarginRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInstrumentCommissionRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrumentCommissionRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryExchange(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExchange, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryProduct(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryProduct, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInstrument(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrument, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryDepthMarketData(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryDepthMarketData, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQrySettlementInfo(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQrySettlementInfo, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryTransferBank(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryTransferBank, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInvestorPositionDetail(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorPositionDetail, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryNotice(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryNotice, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQrySettlementInfoConfirm(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQrySettlementInfoConfirm, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInvestorPositionCombineDetail(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorPositionCombineDetail, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryCFMMCTradingAccountKey(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryCFMMCTradingAccountKey, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryEWarrantOffset(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryEWarrantOffset, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInvestorProductGroupMargin(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorProductGroupMargin, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryExchangeMarginRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExchangeMarginRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryExchangeMarginRateAdjust(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExchangeMarginRateAdjust, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryExchangeRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExchangeRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQrySecAgentACIDMap(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQrySecAgentACIDMap, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryProductExchRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryProductExchRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryProductGroup(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryProductGroup, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryMMInstrumentCommissionRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryMMInstrumentCommissionRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryMMOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryMMOptionInstrCommRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInstrumentOrderCommRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrumentOrderCommRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryOptionInstrTradeCost(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryOptionInstrTradeCost, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryOptionInstrCommRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryExecOrder(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExecOrder, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryForQuote(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryForQuote, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryQuote(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryQuote, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryOptionSelfClose(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryOptionSelfClose, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryInvestUnit(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestUnit, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryCombInstrumentGuard(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryCombInstrumentGuard, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryCombAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryCombAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryTransferSerial(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryTransferSerial, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryAccountregister(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountregister, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspError(const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspError, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnOrder(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnOrder, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnTrade(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnTrade, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnOrderInsert(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnOrderInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnOrderAction(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnOrderAction, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnInstrumentStatus(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnInstrumentStatus, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnBulletin(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnBulletin, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnTradingNotice(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnTradingNotice, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnErrorConditionalOrder(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnErrorConditionalOrder, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnExecOrder(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnExecOrder, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnExecOrderInsert(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnExecOrderInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnExecOrderAction(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnExecOrderAction, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnForQuoteInsert(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnForQuoteInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnQuote(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnQuote, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnQuoteInsert(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnQuoteInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnQuoteAction(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnQuoteAction, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnForQuoteRsp(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnForQuoteRsp, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnCFMMCTradingAccountToken(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnCFMMCTradingAccountToken, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnBatchOrderAction(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnBatchOrderAction, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnOptionSelfClose(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnOptionSelfClose, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnOptionSelfCloseInsert(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnOptionSelfCloseInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnOptionSelfCloseAction(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnOptionSelfCloseAction, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnCombAction(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnCombAction, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnCombActionInsert(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnCombActionInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryContractBank(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryContractBank, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryParkedOrder(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryParkedOrder, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryParkedOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryTradingNotice(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingNotice, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryBrokerTradingParams(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryBrokerTradingParams, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQryBrokerTradingAlgos(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryBrokerTradingAlgos, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQueryCFMMCTradingAccountToken(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQueryCFMMCTradingAccountToken, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnFromBankToFutureByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnFromBankToFutureByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnFromFutureToBankByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnFromFutureToBankByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnRepealFromBankToFutureByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromBankToFutureByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnRepealFromFutureToBankByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromFutureToBankByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnFromBankToFutureByFuture(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnFromBankToFutureByFuture, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnFromFutureToBankByFuture(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnFromFutureToBankByFuture, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnRepealFromBankToFutureByFutureManual(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromBankToFutureByFutureManual, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnRepealFromFutureToBankByFutureManual(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromFutureToBankByFutureManual, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnQueryBankBalanceByFuture(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnQueryBankBalanceByFuture, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnBankToFutureByFuture(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnBankToFutureByFuture, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnFutureToBankByFuture(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnFutureToBankByFuture, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnRepealBankToFutureByFutureManual(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnRepealBankToFutureByFutureManual, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnRepealFutureToBankByFutureManual(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnRepealFutureToBankByFutureManual, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onErrRtnQueryBankBalanceByFuture(const dict &data, const dict &error) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnQueryBankBalanceByFuture, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnRepealFromBankToFutureByFuture(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromBankToFutureByFuture, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnRepealFromFutureToBankByFuture(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromFutureToBankByFuture, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspFromBankToFutureByFuture(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspFromBankToFutureByFuture, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspFromFutureToBankByFuture(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspFromFutureToBankByFuture, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRspQueryBankAccountMoneyByFuture(const dict &data, const dict &error, int reqid, bool last) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQueryBankAccountMoneyByFuture, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnOpenAccountByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnOpenAccountByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnCancelAccountByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnCancelAccountByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; - - void onRtnChangeAccountByBank(const dict &data) override - { - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnChangeAccountByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } - }; + using TdApi::TdApi; + void onFrontConnected() override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onFrontConnected); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onFrontDisconnected(int reqid) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onFrontDisconnected, reqid); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onHeartBeatWarning(int reqid) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onHeartBeatWarning, reqid); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspAuthenticate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspAuthenticate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspUserLogin(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspUserLogin, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspUserLogout(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspUserLogout, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspUserPasswordUpdate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspUserPasswordUpdate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspTradingAccountPasswordUpdate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspTradingAccountPasswordUpdate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspOrderInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspParkedOrderInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspParkedOrderInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspParkedOrderAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspOrderAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOrderAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQueryMaxOrderVolume(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQueryMaxOrderVolume, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspSettlementInfoConfirm(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspSettlementInfoConfirm, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspRemoveParkedOrder(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspRemoveParkedOrder, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspRemoveParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspRemoveParkedOrderAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspExecOrderInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspExecOrderInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspExecOrderAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspExecOrderAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspForQuoteInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspForQuoteInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQuoteInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQuoteInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQuoteAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQuoteAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspBatchOrderAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspBatchOrderAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspOptionSelfCloseInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOptionSelfCloseInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspOptionSelfCloseAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspOptionSelfCloseAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspCombActionInsert(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspCombActionInsert, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryOrder(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryOrder, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryTrade(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTrade, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInvestorPosition(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorPosition, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryTradingAccount(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingAccount, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInvestor(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestor, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryTradingCode(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingCode, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInstrumentMarginRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrumentMarginRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInstrumentCommissionRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrumentCommissionRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryExchange(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryExchange, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryProduct(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryProduct, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInstrument(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrument, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryDepthMarketData(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryDepthMarketData, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQrySettlementInfo(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQrySettlementInfo, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryTransferBank(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTransferBank, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInvestorPositionDetail(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorPositionDetail, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryNotice(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryNotice, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQrySettlementInfoConfirm(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQrySettlementInfoConfirm, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInvestorPositionCombineDetail(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorPositionCombineDetail, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryCFMMCTradingAccountKey(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryCFMMCTradingAccountKey, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryEWarrantOffset(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryEWarrantOffset, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInvestorProductGroupMargin(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorProductGroupMargin, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryExchangeMarginRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryExchangeMarginRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryExchangeMarginRateAdjust(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryExchangeMarginRateAdjust, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryExchangeRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryExchangeRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQrySecAgentACIDMap(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQrySecAgentACIDMap, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryProductExchRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryProductExchRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryProductGroup(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryProductGroup, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryMMInstrumentCommissionRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryMMInstrumentCommissionRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryMMOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryMMOptionInstrCommRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInstrumentOrderCommRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInstrumentOrderCommRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQrySecAgentTradingAccount(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQrySecAgentTradingAccount, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQrySecAgentCheckMode(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQrySecAgentCheckMode, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryOptionInstrTradeCost(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryOptionInstrTradeCost, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryOptionInstrCommRate, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryExecOrder(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryExecOrder, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryForQuote(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryForQuote, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryQuote(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryQuote, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryOptionSelfClose(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryOptionSelfClose, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryInvestUnit(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestUnit, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryCombInstrumentGuard(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryCombInstrumentGuard, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryCombAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryCombAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryTransferSerial(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTransferSerial, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryAccountregister(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountregister, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspError(const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspError, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnOrder(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnOrder, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnTrade(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnTrade, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnOrderInsert(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnOrderInsert, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnOrderAction(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnOrderAction, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnInstrumentStatus(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnInstrumentStatus, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnBulletin(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnBulletin, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnTradingNotice(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnTradingNotice, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnErrorConditionalOrder(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnErrorConditionalOrder, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnExecOrder(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnExecOrder, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnExecOrderInsert(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnExecOrderInsert, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnExecOrderAction(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnExecOrderAction, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnForQuoteInsert(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnForQuoteInsert, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnQuote(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnQuote, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnQuoteInsert(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnQuoteInsert, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnQuoteAction(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnQuoteAction, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnForQuoteRsp(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnForQuoteRsp, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnCFMMCTradingAccountToken(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnCFMMCTradingAccountToken, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnBatchOrderAction(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnBatchOrderAction, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnOptionSelfClose(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnOptionSelfClose, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnOptionSelfCloseInsert(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnOptionSelfCloseInsert, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnOptionSelfCloseAction(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnOptionSelfCloseAction, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnCombAction(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnCombAction, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnCombActionInsert(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnCombActionInsert, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryContractBank(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryContractBank, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryParkedOrder(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryParkedOrder, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryParkedOrderAction, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryTradingNotice(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingNotice, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryBrokerTradingParams(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryBrokerTradingParams, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQryBrokerTradingAlgos(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQryBrokerTradingAlgos, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQueryCFMMCTradingAccountToken(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQueryCFMMCTradingAccountToken, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnFromBankToFutureByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnFromBankToFutureByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnFromFutureToBankByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnFromFutureToBankByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnRepealFromBankToFutureByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromBankToFutureByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnRepealFromFutureToBankByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromFutureToBankByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnFromBankToFutureByFuture(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnFromBankToFutureByFuture, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnFromFutureToBankByFuture(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnFromFutureToBankByFuture, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnRepealFromBankToFutureByFutureManual(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromBankToFutureByFutureManual, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnRepealFromFutureToBankByFutureManual(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromFutureToBankByFutureManual, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnQueryBankBalanceByFuture(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnQueryBankBalanceByFuture, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnBankToFutureByFuture(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnBankToFutureByFuture, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnFutureToBankByFuture(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnFutureToBankByFuture, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnRepealBankToFutureByFutureManual(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnRepealBankToFutureByFutureManual, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnRepealFutureToBankByFutureManual(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnRepealFutureToBankByFutureManual, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onErrRtnQueryBankBalanceByFuture(const dict &data, const dict &error) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onErrRtnQueryBankBalanceByFuture, data, error); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnRepealFromBankToFutureByFuture(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromBankToFutureByFuture, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnRepealFromFutureToBankByFuture(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnRepealFromFutureToBankByFuture, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspFromBankToFutureByFuture(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspFromBankToFutureByFuture, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspFromFutureToBankByFuture(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspFromFutureToBankByFuture, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRspQueryBankAccountMoneyByFuture(const dict &data, const dict &error, int reqid, bool last) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRspQueryBankAccountMoneyByFuture, data, error, reqid, last); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnOpenAccountByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnOpenAccountByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnCancelAccountByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnCancelAccountByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + void onRtnChangeAccountByBank(const dict &data) override + { + try + { + PYBIND11_OVERLOAD(void, TdApi, onRtnChangeAccountByBank, data); + } + catch (const error_already_set &e) + { + cout << e.what() << endl; + } + }; + + }; PYBIND11_MODULE(vnctptd, m) { - class_ TdApi(m, "TdApi"); - TdApi - .def(init<>()) - .def("createFtdcTraderApi", &TdApi::createFtdcTraderApi) - .def("release", &TdApi::release) - .def("init", &TdApi::init) - .def("join", &TdApi::join) - .def("exit", &TdApi::exit) - .def("getTradingDay", &TdApi::getTradingDay) - .def("registerFront", &TdApi::registerFront) - .def("subscribePublicTopic", &TdApi::subscribePublicTopic) - .def("subscribePrivateTopic", &TdApi::subscribePrivateTopic) - .def("reqAuthenticate", &TdApi::reqAuthenticate) - .def("reqUserLogin", &TdApi::reqUserLogin) - .def("reqUserLogout", &TdApi::reqUserLogout) - .def("reqUserPasswordUpdate", &TdApi::reqUserPasswordUpdate) - .def("reqTradingAccountPasswordUpdate", &TdApi::reqTradingAccountPasswordUpdate) - .def("reqUserLogin2", &TdApi::reqUserLogin2) - .def("reqUserPasswordUpdate2", &TdApi::reqUserPasswordUpdate2) - .def("reqOrderInsert", &TdApi::reqOrderInsert) - .def("reqParkedOrderInsert", &TdApi::reqParkedOrderInsert) - .def("reqParkedOrderAction", &TdApi::reqParkedOrderAction) - .def("reqOrderAction", &TdApi::reqOrderAction) - .def("reqQueryMaxOrderVolume", &TdApi::reqQueryMaxOrderVolume) - .def("reqSettlementInfoConfirm", &TdApi::reqSettlementInfoConfirm) - .def("reqRemoveParkedOrder", &TdApi::reqRemoveParkedOrder) - .def("reqRemoveParkedOrderAction", &TdApi::reqRemoveParkedOrderAction) - .def("reqExecOrderInsert", &TdApi::reqExecOrderInsert) - .def("reqExecOrderAction", &TdApi::reqExecOrderAction) - .def("reqForQuoteInsert", &TdApi::reqForQuoteInsert) - .def("reqQuoteInsert", &TdApi::reqQuoteInsert) - .def("reqQuoteAction", &TdApi::reqQuoteAction) - .def("reqBatchOrderAction", &TdApi::reqBatchOrderAction) - .def("reqOptionSelfCloseInsert", &TdApi::reqOptionSelfCloseInsert) - .def("reqOptionSelfCloseAction", &TdApi::reqOptionSelfCloseAction) - .def("reqCombActionInsert", &TdApi::reqCombActionInsert) - .def("reqQryOrder", &TdApi::reqQryOrder) - .def("reqQryTrade", &TdApi::reqQryTrade) - .def("reqQryInvestorPosition", &TdApi::reqQryInvestorPosition) - .def("reqQryTradingAccount", &TdApi::reqQryTradingAccount) - .def("reqQryInvestor", &TdApi::reqQryInvestor) - .def("reqQryTradingCode", &TdApi::reqQryTradingCode) - .def("reqQryInstrumentMarginRate", &TdApi::reqQryInstrumentMarginRate) - .def("reqQryInstrumentCommissionRate", &TdApi::reqQryInstrumentCommissionRate) - .def("reqQryExchange", &TdApi::reqQryExchange) - .def("reqQryProduct", &TdApi::reqQryProduct) - .def("reqQryInstrument", &TdApi::reqQryInstrument) - .def("reqQryDepthMarketData", &TdApi::reqQryDepthMarketData) - .def("reqQrySettlementInfo", &TdApi::reqQrySettlementInfo) - .def("reqQryTransferBank", &TdApi::reqQryTransferBank) - .def("reqQryInvestorPositionDetail", &TdApi::reqQryInvestorPositionDetail) - .def("reqQryNotice", &TdApi::reqQryNotice) - .def("reqQrySettlementInfoConfirm", &TdApi::reqQrySettlementInfoConfirm) - .def("reqQryInvestorPositionCombineDetail", &TdApi::reqQryInvestorPositionCombineDetail) - .def("reqQryCFMMCTradingAccountKey", &TdApi::reqQryCFMMCTradingAccountKey) - .def("reqQryEWarrantOffset", &TdApi::reqQryEWarrantOffset) - .def("reqQryInvestorProductGroupMargin", &TdApi::reqQryInvestorProductGroupMargin) - .def("reqQryExchangeMarginRate", &TdApi::reqQryExchangeMarginRate) - .def("reqQryExchangeMarginRateAdjust", &TdApi::reqQryExchangeMarginRateAdjust) - .def("reqQryExchangeRate", &TdApi::reqQryExchangeRate) - .def("reqQrySecAgentACIDMap", &TdApi::reqQrySecAgentACIDMap) - .def("reqQryProductExchRate", &TdApi::reqQryProductExchRate) - .def("reqQryProductGroup", &TdApi::reqQryProductGroup) - .def("reqQryMMInstrumentCommissionRate", &TdApi::reqQryMMInstrumentCommissionRate) - .def("reqQryMMOptionInstrCommRate", &TdApi::reqQryMMOptionInstrCommRate) - .def("reqQryInstrumentOrderCommRate", &TdApi::reqQryInstrumentOrderCommRate) - .def("reqQryOptionInstrTradeCost", &TdApi::reqQryOptionInstrTradeCost) - .def("reqQryOptionInstrCommRate", &TdApi::reqQryOptionInstrCommRate) - .def("reqQryExecOrder", &TdApi::reqQryExecOrder) - .def("reqQryForQuote", &TdApi::reqQryForQuote) - .def("reqQryQuote", &TdApi::reqQryQuote) - .def("reqQryOptionSelfClose", &TdApi::reqQryOptionSelfClose) - .def("reqQryInvestUnit", &TdApi::reqQryInvestUnit) - .def("reqQryCombInstrumentGuard", &TdApi::reqQryCombInstrumentGuard) - .def("reqQryCombAction", &TdApi::reqQryCombAction) - .def("reqQryTransferSerial", &TdApi::reqQryTransferSerial) - .def("reqQryAccountregister", &TdApi::reqQryAccountregister) - .def("reqQryContractBank", &TdApi::reqQryContractBank) - .def("reqQryParkedOrder", &TdApi::reqQryParkedOrder) - .def("reqQryParkedOrderAction", &TdApi::reqQryParkedOrderAction) - .def("reqQryTradingNotice", &TdApi::reqQryTradingNotice) - .def("reqQryBrokerTradingParams", &TdApi::reqQryBrokerTradingParams) - .def("reqQryBrokerTradingAlgos", &TdApi::reqQryBrokerTradingAlgos) - .def("reqQueryCFMMCTradingAccountToken", &TdApi::reqQueryCFMMCTradingAccountToken) - .def("reqFromBankToFutureByFuture", &TdApi::reqFromBankToFutureByFuture) - .def("reqFromFutureToBankByFuture", &TdApi::reqFromFutureToBankByFuture) - .def("reqQueryBankAccountMoneyByFuture", &TdApi::reqQueryBankAccountMoneyByFuture) + class_ TdApi(m, "TdApi"); + TdApi + .def(init<>()) + .def("createFtdcTraderApi", &TdApi::createFtdcTraderApi) + .def("release", &TdApi::release) + .def("init", &TdApi::init) + .def("join", &TdApi::join) + .def("exit", &TdApi::exit) + .def("getTradingDay", &TdApi::getTradingDay) + .def("registerFront", &TdApi::registerFront) + .def("subscribePublicTopic", &TdApi::subscribePublicTopic) + .def("subscribePrivateTopic", &TdApi::subscribePrivateTopic) - .def("onFrontConnected", &TdApi::onFrontConnected) - .def("onFrontDisconnected", &TdApi::onFrontDisconnected) - .def("onHeartBeatWarning", &TdApi::onHeartBeatWarning) - .def("onRspAuthenticate", &TdApi::onRspAuthenticate) - .def("onRspUserLogin", &TdApi::onRspUserLogin) - .def("onRspUserLogout", &TdApi::onRspUserLogout) - .def("onRspUserPasswordUpdate", &TdApi::onRspUserPasswordUpdate) - .def("onRspTradingAccountPasswordUpdate", &TdApi::onRspTradingAccountPasswordUpdate) - .def("onRspOrderInsert", &TdApi::onRspOrderInsert) - .def("onRspParkedOrderInsert", &TdApi::onRspParkedOrderInsert) - .def("onRspParkedOrderAction", &TdApi::onRspParkedOrderAction) - .def("onRspOrderAction", &TdApi::onRspOrderAction) - .def("onRspQueryMaxOrderVolume", &TdApi::onRspQueryMaxOrderVolume) - .def("onRspSettlementInfoConfirm", &TdApi::onRspSettlementInfoConfirm) - .def("onRspRemoveParkedOrder", &TdApi::onRspRemoveParkedOrder) - .def("onRspRemoveParkedOrderAction", &TdApi::onRspRemoveParkedOrderAction) - .def("onRspExecOrderInsert", &TdApi::onRspExecOrderInsert) - .def("onRspExecOrderAction", &TdApi::onRspExecOrderAction) - .def("onRspForQuoteInsert", &TdApi::onRspForQuoteInsert) - .def("onRspQuoteInsert", &TdApi::onRspQuoteInsert) - .def("onRspQuoteAction", &TdApi::onRspQuoteAction) - .def("onRspBatchOrderAction", &TdApi::onRspBatchOrderAction) - .def("onRspOptionSelfCloseInsert", &TdApi::onRspOptionSelfCloseInsert) - .def("onRspOptionSelfCloseAction", &TdApi::onRspOptionSelfCloseAction) - .def("onRspCombActionInsert", &TdApi::onRspCombActionInsert) - .def("onRspQryOrder", &TdApi::onRspQryOrder) - .def("onRspQryTrade", &TdApi::onRspQryTrade) - .def("onRspQryInvestorPosition", &TdApi::onRspQryInvestorPosition) - .def("onRspQryTradingAccount", &TdApi::onRspQryTradingAccount) - .def("onRspQryInvestor", &TdApi::onRspQryInvestor) - .def("onRspQryTradingCode", &TdApi::onRspQryTradingCode) - .def("onRspQryInstrumentMarginRate", &TdApi::onRspQryInstrumentMarginRate) - .def("onRspQryInstrumentCommissionRate", &TdApi::onRspQryInstrumentCommissionRate) - .def("onRspQryExchange", &TdApi::onRspQryExchange) - .def("onRspQryProduct", &TdApi::onRspQryProduct) - .def("onRspQryInstrument", &TdApi::onRspQryInstrument) - .def("onRspQryDepthMarketData", &TdApi::onRspQryDepthMarketData) - .def("onRspQrySettlementInfo", &TdApi::onRspQrySettlementInfo) - .def("onRspQryTransferBank", &TdApi::onRspQryTransferBank) - .def("onRspQryInvestorPositionDetail", &TdApi::onRspQryInvestorPositionDetail) - .def("onRspQryNotice", &TdApi::onRspQryNotice) - .def("onRspQrySettlementInfoConfirm", &TdApi::onRspQrySettlementInfoConfirm) - .def("onRspQryInvestorPositionCombineDetail", &TdApi::onRspQryInvestorPositionCombineDetail) - .def("onRspQryCFMMCTradingAccountKey", &TdApi::onRspQryCFMMCTradingAccountKey) - .def("onRspQryEWarrantOffset", &TdApi::onRspQryEWarrantOffset) - .def("onRspQryInvestorProductGroupMargin", &TdApi::onRspQryInvestorProductGroupMargin) - .def("onRspQryExchangeMarginRate", &TdApi::onRspQryExchangeMarginRate) - .def("onRspQryExchangeMarginRateAdjust", &TdApi::onRspQryExchangeMarginRateAdjust) - .def("onRspQryExchangeRate", &TdApi::onRspQryExchangeRate) - .def("onRspQrySecAgentACIDMap", &TdApi::onRspQrySecAgentACIDMap) - .def("onRspQryProductExchRate", &TdApi::onRspQryProductExchRate) - .def("onRspQryProductGroup", &TdApi::onRspQryProductGroup) - .def("onRspQryMMInstrumentCommissionRate", &TdApi::onRspQryMMInstrumentCommissionRate) - .def("onRspQryMMOptionInstrCommRate", &TdApi::onRspQryMMOptionInstrCommRate) - .def("onRspQryInstrumentOrderCommRate", &TdApi::onRspQryInstrumentOrderCommRate) - .def("onRspQryOptionInstrTradeCost", &TdApi::onRspQryOptionInstrTradeCost) - .def("onRspQryOptionInstrCommRate", &TdApi::onRspQryOptionInstrCommRate) - .def("onRspQryExecOrder", &TdApi::onRspQryExecOrder) - .def("onRspQryForQuote", &TdApi::onRspQryForQuote) - .def("onRspQryQuote", &TdApi::onRspQryQuote) - .def("onRspQryOptionSelfClose", &TdApi::onRspQryOptionSelfClose) - .def("onRspQryInvestUnit", &TdApi::onRspQryInvestUnit) - .def("onRspQryCombInstrumentGuard", &TdApi::onRspQryCombInstrumentGuard) - .def("onRspQryCombAction", &TdApi::onRspQryCombAction) - .def("onRspQryTransferSerial", &TdApi::onRspQryTransferSerial) - .def("onRspQryAccountregister", &TdApi::onRspQryAccountregister) - .def("onRspError", &TdApi::onRspError) - .def("onRtnOrder", &TdApi::onRtnOrder) - .def("onRtnTrade", &TdApi::onRtnTrade) - .def("onErrRtnOrderInsert", &TdApi::onErrRtnOrderInsert) - .def("onErrRtnOrderAction", &TdApi::onErrRtnOrderAction) - .def("onRtnInstrumentStatus", &TdApi::onRtnInstrumentStatus) - .def("onRtnBulletin", &TdApi::onRtnBulletin) - .def("onRtnTradingNotice", &TdApi::onRtnTradingNotice) - .def("onRtnErrorConditionalOrder", &TdApi::onRtnErrorConditionalOrder) - .def("onRtnExecOrder", &TdApi::onRtnExecOrder) - .def("onErrRtnExecOrderInsert", &TdApi::onErrRtnExecOrderInsert) - .def("onErrRtnExecOrderAction", &TdApi::onErrRtnExecOrderAction) - .def("onErrRtnForQuoteInsert", &TdApi::onErrRtnForQuoteInsert) - .def("onRtnQuote", &TdApi::onRtnQuote) - .def("onErrRtnQuoteInsert", &TdApi::onErrRtnQuoteInsert) - .def("onErrRtnQuoteAction", &TdApi::onErrRtnQuoteAction) - .def("onRtnForQuoteRsp", &TdApi::onRtnForQuoteRsp) - .def("onRtnCFMMCTradingAccountToken", &TdApi::onRtnCFMMCTradingAccountToken) - .def("onErrRtnBatchOrderAction", &TdApi::onErrRtnBatchOrderAction) - .def("onRtnOptionSelfClose", &TdApi::onRtnOptionSelfClose) - .def("onErrRtnOptionSelfCloseInsert", &TdApi::onErrRtnOptionSelfCloseInsert) - .def("onErrRtnOptionSelfCloseAction", &TdApi::onErrRtnOptionSelfCloseAction) - .def("onRtnCombAction", &TdApi::onRtnCombAction) - .def("onErrRtnCombActionInsert", &TdApi::onErrRtnCombActionInsert) - .def("onRspQryContractBank", &TdApi::onRspQryContractBank) - .def("onRspQryParkedOrder", &TdApi::onRspQryParkedOrder) - .def("onRspQryParkedOrderAction", &TdApi::onRspQryParkedOrderAction) - .def("onRspQryTradingNotice", &TdApi::onRspQryTradingNotice) - .def("onRspQryBrokerTradingParams", &TdApi::onRspQryBrokerTradingParams) - .def("onRspQryBrokerTradingAlgos", &TdApi::onRspQryBrokerTradingAlgos) - .def("onRspQueryCFMMCTradingAccountToken", &TdApi::onRspQueryCFMMCTradingAccountToken) - .def("onRtnFromBankToFutureByBank", &TdApi::onRtnFromBankToFutureByBank) - .def("onRtnFromFutureToBankByBank", &TdApi::onRtnFromFutureToBankByBank) - .def("onRtnRepealFromBankToFutureByBank", &TdApi::onRtnRepealFromBankToFutureByBank) - .def("onRtnRepealFromFutureToBankByBank", &TdApi::onRtnRepealFromFutureToBankByBank) - .def("onRtnFromBankToFutureByFuture", &TdApi::onRtnFromBankToFutureByFuture) - .def("onRtnFromFutureToBankByFuture", &TdApi::onRtnFromFutureToBankByFuture) - .def("onRtnRepealFromBankToFutureByFutureManual", &TdApi::onRtnRepealFromBankToFutureByFutureManual) - .def("onRtnRepealFromFutureToBankByFutureManual", &TdApi::onRtnRepealFromFutureToBankByFutureManual) - .def("onRtnQueryBankBalanceByFuture", &TdApi::onRtnQueryBankBalanceByFuture) - .def("onErrRtnBankToFutureByFuture", &TdApi::onErrRtnBankToFutureByFuture) - .def("onErrRtnFutureToBankByFuture", &TdApi::onErrRtnFutureToBankByFuture) - .def("onErrRtnRepealBankToFutureByFutureManual", &TdApi::onErrRtnRepealBankToFutureByFutureManual) - .def("onErrRtnRepealFutureToBankByFutureManual", &TdApi::onErrRtnRepealFutureToBankByFutureManual) - .def("onErrRtnQueryBankBalanceByFuture", &TdApi::onErrRtnQueryBankBalanceByFuture) - .def("onRtnRepealFromBankToFutureByFuture", &TdApi::onRtnRepealFromBankToFutureByFuture) - .def("onRtnRepealFromFutureToBankByFuture", &TdApi::onRtnRepealFromFutureToBankByFuture) - .def("onRspFromBankToFutureByFuture", &TdApi::onRspFromBankToFutureByFuture) - .def("onRspFromFutureToBankByFuture", &TdApi::onRspFromFutureToBankByFuture) - .def("onRspQueryBankAccountMoneyByFuture", &TdApi::onRspQueryBankAccountMoneyByFuture) - .def("onRtnOpenAccountByBank", &TdApi::onRtnOpenAccountByBank) - .def("onRtnCancelAccountByBank", &TdApi::onRtnCancelAccountByBank) - .def("onRtnChangeAccountByBank", &TdApi::onRtnChangeAccountByBank) - ; + .def("reqAuthenticate", &TdApi::reqAuthenticate) + .def("reqUserLogin", &TdApi::reqUserLogin) + .def("reqUserLogout", &TdApi::reqUserLogout) + .def("reqUserPasswordUpdate", &TdApi::reqUserPasswordUpdate) + .def("reqTradingAccountPasswordUpdate", &TdApi::reqTradingAccountPasswordUpdate) + .def("reqUserLogin2", &TdApi::reqUserLogin2) + .def("reqUserPasswordUpdate2", &TdApi::reqUserPasswordUpdate2) + .def("reqOrderInsert", &TdApi::reqOrderInsert) + .def("reqParkedOrderInsert", &TdApi::reqParkedOrderInsert) + .def("reqParkedOrderAction", &TdApi::reqParkedOrderAction) + .def("reqOrderAction", &TdApi::reqOrderAction) + .def("reqQueryMaxOrderVolume", &TdApi::reqQueryMaxOrderVolume) + .def("reqSettlementInfoConfirm", &TdApi::reqSettlementInfoConfirm) + .def("reqRemoveParkedOrder", &TdApi::reqRemoveParkedOrder) + .def("reqRemoveParkedOrderAction", &TdApi::reqRemoveParkedOrderAction) + .def("reqExecOrderInsert", &TdApi::reqExecOrderInsert) + .def("reqExecOrderAction", &TdApi::reqExecOrderAction) + .def("reqForQuoteInsert", &TdApi::reqForQuoteInsert) + .def("reqQuoteInsert", &TdApi::reqQuoteInsert) + .def("reqQuoteAction", &TdApi::reqQuoteAction) + .def("reqBatchOrderAction", &TdApi::reqBatchOrderAction) + .def("reqOptionSelfCloseInsert", &TdApi::reqOptionSelfCloseInsert) + .def("reqOptionSelfCloseAction", &TdApi::reqOptionSelfCloseAction) + .def("reqCombActionInsert", &TdApi::reqCombActionInsert) + .def("reqQryOrder", &TdApi::reqQryOrder) + .def("reqQryTrade", &TdApi::reqQryTrade) + .def("reqQryInvestorPosition", &TdApi::reqQryInvestorPosition) + .def("reqQryTradingAccount", &TdApi::reqQryTradingAccount) + .def("reqQryInvestor", &TdApi::reqQryInvestor) + .def("reqQryTradingCode", &TdApi::reqQryTradingCode) + .def("reqQryInstrumentMarginRate", &TdApi::reqQryInstrumentMarginRate) + .def("reqQryInstrumentCommissionRate", &TdApi::reqQryInstrumentCommissionRate) + .def("reqQryExchange", &TdApi::reqQryExchange) + .def("reqQryProduct", &TdApi::reqQryProduct) + .def("reqQryInstrument", &TdApi::reqQryInstrument) + .def("reqQryDepthMarketData", &TdApi::reqQryDepthMarketData) + .def("reqQrySettlementInfo", &TdApi::reqQrySettlementInfo) + .def("reqQryTransferBank", &TdApi::reqQryTransferBank) + .def("reqQryInvestorPositionDetail", &TdApi::reqQryInvestorPositionDetail) + .def("reqQryNotice", &TdApi::reqQryNotice) + .def("reqQrySettlementInfoConfirm", &TdApi::reqQrySettlementInfoConfirm) + .def("reqQryInvestorPositionCombineDetail", &TdApi::reqQryInvestorPositionCombineDetail) + .def("reqQryCFMMCTradingAccountKey", &TdApi::reqQryCFMMCTradingAccountKey) + .def("reqQryEWarrantOffset", &TdApi::reqQryEWarrantOffset) + .def("reqQryInvestorProductGroupMargin", &TdApi::reqQryInvestorProductGroupMargin) + .def("reqQryExchangeMarginRate", &TdApi::reqQryExchangeMarginRate) + .def("reqQryExchangeMarginRateAdjust", &TdApi::reqQryExchangeMarginRateAdjust) + .def("reqQryExchangeRate", &TdApi::reqQryExchangeRate) + .def("reqQrySecAgentACIDMap", &TdApi::reqQrySecAgentACIDMap) + .def("reqQryProductExchRate", &TdApi::reqQryProductExchRate) + .def("reqQryProductGroup", &TdApi::reqQryProductGroup) + .def("reqQryMMInstrumentCommissionRate", &TdApi::reqQryMMInstrumentCommissionRate) + .def("reqQryMMOptionInstrCommRate", &TdApi::reqQryMMOptionInstrCommRate) + .def("reqQryInstrumentOrderCommRate", &TdApi::reqQryInstrumentOrderCommRate) + .def("reqQrySecAgentTradingAccount", &TdApi::reqQrySecAgentTradingAccount) + .def("reqQrySecAgentCheckMode", &TdApi::reqQrySecAgentCheckMode) + .def("reqQryOptionInstrTradeCost", &TdApi::reqQryOptionInstrTradeCost) + .def("reqQryOptionInstrCommRate", &TdApi::reqQryOptionInstrCommRate) + .def("reqQryExecOrder", &TdApi::reqQryExecOrder) + .def("reqQryForQuote", &TdApi::reqQryForQuote) + .def("reqQryQuote", &TdApi::reqQryQuote) + .def("reqQryOptionSelfClose", &TdApi::reqQryOptionSelfClose) + .def("reqQryInvestUnit", &TdApi::reqQryInvestUnit) + .def("reqQryCombInstrumentGuard", &TdApi::reqQryCombInstrumentGuard) + .def("reqQryCombAction", &TdApi::reqQryCombAction) + .def("reqQryTransferSerial", &TdApi::reqQryTransferSerial) + .def("reqQryAccountregister", &TdApi::reqQryAccountregister) + .def("reqQryContractBank", &TdApi::reqQryContractBank) + .def("reqQryParkedOrder", &TdApi::reqQryParkedOrder) + .def("reqQryParkedOrderAction", &TdApi::reqQryParkedOrderAction) + .def("reqQryTradingNotice", &TdApi::reqQryTradingNotice) + .def("reqQryBrokerTradingParams", &TdApi::reqQryBrokerTradingParams) + .def("reqQryBrokerTradingAlgos", &TdApi::reqQryBrokerTradingAlgos) + .def("reqQueryCFMMCTradingAccountToken", &TdApi::reqQueryCFMMCTradingAccountToken) + .def("reqFromBankToFutureByFuture", &TdApi::reqFromBankToFutureByFuture) + .def("reqFromFutureToBankByFuture", &TdApi::reqFromFutureToBankByFuture) + .def("reqQueryBankAccountMoneyByFuture", &TdApi::reqQueryBankAccountMoneyByFuture) - ; + .def("onFrontConnected", &TdApi::onFrontConnected) + .def("onFrontDisconnected", &TdApi::onFrontDisconnected) + .def("onHeartBeatWarning", &TdApi::onHeartBeatWarning) + .def("onRspAuthenticate", &TdApi::onRspAuthenticate) + .def("onRspUserLogin", &TdApi::onRspUserLogin) + .def("onRspUserLogout", &TdApi::onRspUserLogout) + .def("onRspUserPasswordUpdate", &TdApi::onRspUserPasswordUpdate) + .def("onRspTradingAccountPasswordUpdate", &TdApi::onRspTradingAccountPasswordUpdate) + .def("onRspOrderInsert", &TdApi::onRspOrderInsert) + .def("onRspParkedOrderInsert", &TdApi::onRspParkedOrderInsert) + .def("onRspParkedOrderAction", &TdApi::onRspParkedOrderAction) + .def("onRspOrderAction", &TdApi::onRspOrderAction) + .def("onRspQueryMaxOrderVolume", &TdApi::onRspQueryMaxOrderVolume) + .def("onRspSettlementInfoConfirm", &TdApi::onRspSettlementInfoConfirm) + .def("onRspRemoveParkedOrder", &TdApi::onRspRemoveParkedOrder) + .def("onRspRemoveParkedOrderAction", &TdApi::onRspRemoveParkedOrderAction) + .def("onRspExecOrderInsert", &TdApi::onRspExecOrderInsert) + .def("onRspExecOrderAction", &TdApi::onRspExecOrderAction) + .def("onRspForQuoteInsert", &TdApi::onRspForQuoteInsert) + .def("onRspQuoteInsert", &TdApi::onRspQuoteInsert) + .def("onRspQuoteAction", &TdApi::onRspQuoteAction) + .def("onRspBatchOrderAction", &TdApi::onRspBatchOrderAction) + .def("onRspOptionSelfCloseInsert", &TdApi::onRspOptionSelfCloseInsert) + .def("onRspOptionSelfCloseAction", &TdApi::onRspOptionSelfCloseAction) + .def("onRspCombActionInsert", &TdApi::onRspCombActionInsert) + .def("onRspQryOrder", &TdApi::onRspQryOrder) + .def("onRspQryTrade", &TdApi::onRspQryTrade) + .def("onRspQryInvestorPosition", &TdApi::onRspQryInvestorPosition) + .def("onRspQryTradingAccount", &TdApi::onRspQryTradingAccount) + .def("onRspQryInvestor", &TdApi::onRspQryInvestor) + .def("onRspQryTradingCode", &TdApi::onRspQryTradingCode) + .def("onRspQryInstrumentMarginRate", &TdApi::onRspQryInstrumentMarginRate) + .def("onRspQryInstrumentCommissionRate", &TdApi::onRspQryInstrumentCommissionRate) + .def("onRspQryExchange", &TdApi::onRspQryExchange) + .def("onRspQryProduct", &TdApi::onRspQryProduct) + .def("onRspQryInstrument", &TdApi::onRspQryInstrument) + .def("onRspQryDepthMarketData", &TdApi::onRspQryDepthMarketData) + .def("onRspQrySettlementInfo", &TdApi::onRspQrySettlementInfo) + .def("onRspQryTransferBank", &TdApi::onRspQryTransferBank) + .def("onRspQryInvestorPositionDetail", &TdApi::onRspQryInvestorPositionDetail) + .def("onRspQryNotice", &TdApi::onRspQryNotice) + .def("onRspQrySettlementInfoConfirm", &TdApi::onRspQrySettlementInfoConfirm) + .def("onRspQryInvestorPositionCombineDetail", &TdApi::onRspQryInvestorPositionCombineDetail) + .def("onRspQryCFMMCTradingAccountKey", &TdApi::onRspQryCFMMCTradingAccountKey) + .def("onRspQryEWarrantOffset", &TdApi::onRspQryEWarrantOffset) + .def("onRspQryInvestorProductGroupMargin", &TdApi::onRspQryInvestorProductGroupMargin) + .def("onRspQryExchangeMarginRate", &TdApi::onRspQryExchangeMarginRate) + .def("onRspQryExchangeMarginRateAdjust", &TdApi::onRspQryExchangeMarginRateAdjust) + .def("onRspQryExchangeRate", &TdApi::onRspQryExchangeRate) + .def("onRspQrySecAgentACIDMap", &TdApi::onRspQrySecAgentACIDMap) + .def("onRspQryProductExchRate", &TdApi::onRspQryProductExchRate) + .def("onRspQryProductGroup", &TdApi::onRspQryProductGroup) + .def("onRspQryMMInstrumentCommissionRate", &TdApi::onRspQryMMInstrumentCommissionRate) + .def("onRspQryMMOptionInstrCommRate", &TdApi::onRspQryMMOptionInstrCommRate) + .def("onRspQryInstrumentOrderCommRate", &TdApi::onRspQryInstrumentOrderCommRate) + .def("onRspQrySecAgentTradingAccount", &TdApi::onRspQrySecAgentTradingAccount) + .def("onRspQrySecAgentCheckMode", &TdApi::onRspQrySecAgentCheckMode) + .def("onRspQryOptionInstrTradeCost", &TdApi::onRspQryOptionInstrTradeCost) + .def("onRspQryOptionInstrCommRate", &TdApi::onRspQryOptionInstrCommRate) + .def("onRspQryExecOrder", &TdApi::onRspQryExecOrder) + .def("onRspQryForQuote", &TdApi::onRspQryForQuote) + .def("onRspQryQuote", &TdApi::onRspQryQuote) + .def("onRspQryOptionSelfClose", &TdApi::onRspQryOptionSelfClose) + .def("onRspQryInvestUnit", &TdApi::onRspQryInvestUnit) + .def("onRspQryCombInstrumentGuard", &TdApi::onRspQryCombInstrumentGuard) + .def("onRspQryCombAction", &TdApi::onRspQryCombAction) + .def("onRspQryTransferSerial", &TdApi::onRspQryTransferSerial) + .def("onRspQryAccountregister", &TdApi::onRspQryAccountregister) + .def("onRspError", &TdApi::onRspError) + .def("onRtnOrder", &TdApi::onRtnOrder) + .def("onRtnTrade", &TdApi::onRtnTrade) + .def("onErrRtnOrderInsert", &TdApi::onErrRtnOrderInsert) + .def("onErrRtnOrderAction", &TdApi::onErrRtnOrderAction) + .def("onRtnInstrumentStatus", &TdApi::onRtnInstrumentStatus) + .def("onRtnBulletin", &TdApi::onRtnBulletin) + .def("onRtnTradingNotice", &TdApi::onRtnTradingNotice) + .def("onRtnErrorConditionalOrder", &TdApi::onRtnErrorConditionalOrder) + .def("onRtnExecOrder", &TdApi::onRtnExecOrder) + .def("onErrRtnExecOrderInsert", &TdApi::onErrRtnExecOrderInsert) + .def("onErrRtnExecOrderAction", &TdApi::onErrRtnExecOrderAction) + .def("onErrRtnForQuoteInsert", &TdApi::onErrRtnForQuoteInsert) + .def("onRtnQuote", &TdApi::onRtnQuote) + .def("onErrRtnQuoteInsert", &TdApi::onErrRtnQuoteInsert) + .def("onErrRtnQuoteAction", &TdApi::onErrRtnQuoteAction) + .def("onRtnForQuoteRsp", &TdApi::onRtnForQuoteRsp) + .def("onRtnCFMMCTradingAccountToken", &TdApi::onRtnCFMMCTradingAccountToken) + .def("onErrRtnBatchOrderAction", &TdApi::onErrRtnBatchOrderAction) + .def("onRtnOptionSelfClose", &TdApi::onRtnOptionSelfClose) + .def("onErrRtnOptionSelfCloseInsert", &TdApi::onErrRtnOptionSelfCloseInsert) + .def("onErrRtnOptionSelfCloseAction", &TdApi::onErrRtnOptionSelfCloseAction) + .def("onRtnCombAction", &TdApi::onRtnCombAction) + .def("onErrRtnCombActionInsert", &TdApi::onErrRtnCombActionInsert) + .def("onRspQryContractBank", &TdApi::onRspQryContractBank) + .def("onRspQryParkedOrder", &TdApi::onRspQryParkedOrder) + .def("onRspQryParkedOrderAction", &TdApi::onRspQryParkedOrderAction) + .def("onRspQryTradingNotice", &TdApi::onRspQryTradingNotice) + .def("onRspQryBrokerTradingParams", &TdApi::onRspQryBrokerTradingParams) + .def("onRspQryBrokerTradingAlgos", &TdApi::onRspQryBrokerTradingAlgos) + .def("onRspQueryCFMMCTradingAccountToken", &TdApi::onRspQueryCFMMCTradingAccountToken) + .def("onRtnFromBankToFutureByBank", &TdApi::onRtnFromBankToFutureByBank) + .def("onRtnFromFutureToBankByBank", &TdApi::onRtnFromFutureToBankByBank) + .def("onRtnRepealFromBankToFutureByBank", &TdApi::onRtnRepealFromBankToFutureByBank) + .def("onRtnRepealFromFutureToBankByBank", &TdApi::onRtnRepealFromFutureToBankByBank) + .def("onRtnFromBankToFutureByFuture", &TdApi::onRtnFromBankToFutureByFuture) + .def("onRtnFromFutureToBankByFuture", &TdApi::onRtnFromFutureToBankByFuture) + .def("onRtnRepealFromBankToFutureByFutureManual", &TdApi::onRtnRepealFromBankToFutureByFutureManual) + .def("onRtnRepealFromFutureToBankByFutureManual", &TdApi::onRtnRepealFromFutureToBankByFutureManual) + .def("onRtnQueryBankBalanceByFuture", &TdApi::onRtnQueryBankBalanceByFuture) + .def("onErrRtnBankToFutureByFuture", &TdApi::onErrRtnBankToFutureByFuture) + .def("onErrRtnFutureToBankByFuture", &TdApi::onErrRtnFutureToBankByFuture) + .def("onErrRtnRepealBankToFutureByFutureManual", &TdApi::onErrRtnRepealBankToFutureByFutureManual) + .def("onErrRtnRepealFutureToBankByFutureManual", &TdApi::onErrRtnRepealFutureToBankByFutureManual) + .def("onErrRtnQueryBankBalanceByFuture", &TdApi::onErrRtnQueryBankBalanceByFuture) + .def("onRtnRepealFromBankToFutureByFuture", &TdApi::onRtnRepealFromBankToFutureByFuture) + .def("onRtnRepealFromFutureToBankByFuture", &TdApi::onRtnRepealFromFutureToBankByFuture) + .def("onRspFromBankToFutureByFuture", &TdApi::onRspFromBankToFutureByFuture) + .def("onRspFromFutureToBankByFuture", &TdApi::onRspFromFutureToBankByFuture) + .def("onRspQueryBankAccountMoneyByFuture", &TdApi::onRspQueryBankAccountMoneyByFuture) + .def("onRtnOpenAccountByBank", &TdApi::onRtnOpenAccountByBank) + .def("onRtnCancelAccountByBank", &TdApi::onRtnCancelAccountByBank) + .def("onRtnChangeAccountByBank", &TdApi::onRtnChangeAccountByBank) + ; + + ; + + ; } diff --git a/vnpy/api/ctp/vnctp/vnctptd/vnctptd.h b/vnpy/api/ctp/vnctp/vnctptd/vnctptd.h index e31f58ef..df9d08a9 100644 --- a/vnpy/api/ctp/vnctp/vnctptd/vnctptd.h +++ b/vnpy/api/ctp/vnctp/vnctptd/vnctptd.h @@ -66,70 +66,73 @@ using namespace pybind11; #define ONRSPQRYMMINSTRUMENTCOMMISSIONRATE 52 #define ONRSPQRYMMOPTIONINSTRCOMMRATE 53 #define ONRSPQRYINSTRUMENTORDERCOMMRATE 54 -#define ONRSPQRYOPTIONINSTRTRADECOST 55 -#define ONRSPQRYOPTIONINSTRCOMMRATE 56 -#define ONRSPQRYEXECORDER 57 -#define ONRSPQRYFORQUOTE 58 -#define ONRSPQRYQUOTE 59 -#define ONRSPQRYOPTIONSELFCLOSE 60 -#define ONRSPQRYINVESTUNIT 61 -#define ONRSPQRYCOMBINSTRUMENTGUARD 62 -#define ONRSPQRYCOMBACTION 63 -#define ONRSPQRYTRANSFERSERIAL 64 -#define ONRSPQRYACCOUNTREGISTER 65 -#define ONRSPERROR 66 -#define ONRTNORDER 67 -#define ONRTNTRADE 68 -#define ONERRRTNORDERINSERT 69 -#define ONERRRTNORDERACTION 70 -#define ONRTNINSTRUMENTSTATUS 71 -#define ONRTNBULLETIN 72 -#define ONRTNTRADINGNOTICE 73 -#define ONRTNERRORCONDITIONALORDER 74 -#define ONRTNEXECORDER 75 -#define ONERRRTNEXECORDERINSERT 76 -#define ONERRRTNEXECORDERACTION 77 -#define ONERRRTNFORQUOTEINSERT 78 -#define ONRTNQUOTE 79 -#define ONERRRTNQUOTEINSERT 80 -#define ONERRRTNQUOTEACTION 81 -#define ONRTNFORQUOTERSP 82 -#define ONRTNCFMMCTRADINGACCOUNTTOKEN 83 -#define ONERRRTNBATCHORDERACTION 84 -#define ONRTNOPTIONSELFCLOSE 85 -#define ONERRRTNOPTIONSELFCLOSEINSERT 86 -#define ONERRRTNOPTIONSELFCLOSEACTION 87 -#define ONRTNCOMBACTION 88 -#define ONERRRTNCOMBACTIONINSERT 89 -#define ONRSPQRYCONTRACTBANK 90 -#define ONRSPQRYPARKEDORDER 91 -#define ONRSPQRYPARKEDORDERACTION 92 -#define ONRSPQRYTRADINGNOTICE 93 -#define ONRSPQRYBROKERTRADINGPARAMS 94 -#define ONRSPQRYBROKERTRADINGALGOS 95 -#define ONRSPQUERYCFMMCTRADINGACCOUNTTOKEN 96 -#define ONRTNFROMBANKTOFUTUREBYBANK 97 -#define ONRTNFROMFUTURETOBANKBYBANK 98 -#define ONRTNREPEALFROMBANKTOFUTUREBYBANK 99 -#define ONRTNREPEALFROMFUTURETOBANKBYBANK 100 -#define ONRTNFROMBANKTOFUTUREBYFUTURE 101 -#define ONRTNFROMFUTURETOBANKBYFUTURE 102 -#define ONRTNREPEALFROMBANKTOFUTUREBYFUTUREMANUAL 103 -#define ONRTNREPEALFROMFUTURETOBANKBYFUTUREMANUAL 104 -#define ONRTNQUERYBANKBALANCEBYFUTURE 105 -#define ONERRRTNBANKTOFUTUREBYFUTURE 106 -#define ONERRRTNFUTURETOBANKBYFUTURE 107 -#define ONERRRTNREPEALBANKTOFUTUREBYFUTUREMANUAL 108 -#define ONERRRTNREPEALFUTURETOBANKBYFUTUREMANUAL 109 -#define ONERRRTNQUERYBANKBALANCEBYFUTURE 110 -#define ONRTNREPEALFROMBANKTOFUTUREBYFUTURE 111 -#define ONRTNREPEALFROMFUTURETOBANKBYFUTURE 112 -#define ONRSPFROMBANKTOFUTUREBYFUTURE 113 -#define ONRSPFROMFUTURETOBANKBYFUTURE 114 -#define ONRSPQUERYBANKACCOUNTMONEYBYFUTURE 115 -#define ONRTNOPENACCOUNTBYBANK 116 -#define ONRTNCANCELACCOUNTBYBANK 117 -#define ONRTNCHANGEACCOUNTBYBANK 118 +#define ONRSPQRYSECAGENTTRADINGACCOUNT 55 +#define ONRSPQRYSECAGENTCHECKMODE 56 +#define ONRSPQRYOPTIONINSTRTRADECOST 57 +#define ONRSPQRYOPTIONINSTRCOMMRATE 58 +#define ONRSPQRYEXECORDER 59 +#define ONRSPQRYFORQUOTE 60 +#define ONRSPQRYQUOTE 61 +#define ONRSPQRYOPTIONSELFCLOSE 62 +#define ONRSPQRYINVESTUNIT 63 +#define ONRSPQRYCOMBINSTRUMENTGUARD 64 +#define ONRSPQRYCOMBACTION 65 +#define ONRSPQRYTRANSFERSERIAL 66 +#define ONRSPQRYACCOUNTREGISTER 67 +#define ONRSPERROR 68 +#define ONRTNORDER 69 +#define ONRTNTRADE 70 +#define ONERRRTNORDERINSERT 71 +#define ONERRRTNORDERACTION 72 +#define ONRTNINSTRUMENTSTATUS 73 +#define ONRTNBULLETIN 74 +#define ONRTNTRADINGNOTICE 75 +#define ONRTNERRORCONDITIONALORDER 76 +#define ONRTNEXECORDER 77 +#define ONERRRTNEXECORDERINSERT 78 +#define ONERRRTNEXECORDERACTION 79 +#define ONERRRTNFORQUOTEINSERT 80 +#define ONRTNQUOTE 81 +#define ONERRRTNQUOTEINSERT 82 +#define ONERRRTNQUOTEACTION 83 +#define ONRTNFORQUOTERSP 84 +#define ONRTNCFMMCTRADINGACCOUNTTOKEN 85 +#define ONERRRTNBATCHORDERACTION 86 +#define ONRTNOPTIONSELFCLOSE 87 +#define ONERRRTNOPTIONSELFCLOSEINSERT 88 +#define ONERRRTNOPTIONSELFCLOSEACTION 89 +#define ONRTNCOMBACTION 90 +#define ONERRRTNCOMBACTIONINSERT 91 +#define ONRSPQRYCONTRACTBANK 92 +#define ONRSPQRYPARKEDORDER 93 +#define ONRSPQRYPARKEDORDERACTION 94 +#define ONRSPQRYTRADINGNOTICE 95 +#define ONRSPQRYBROKERTRADINGPARAMS 96 +#define ONRSPQRYBROKERTRADINGALGOS 97 +#define ONRSPQUERYCFMMCTRADINGACCOUNTTOKEN 98 +#define ONRTNFROMBANKTOFUTUREBYBANK 99 +#define ONRTNFROMFUTURETOBANKBYBANK 100 +#define ONRTNREPEALFROMBANKTOFUTUREBYBANK 101 +#define ONRTNREPEALFROMFUTURETOBANKBYBANK 102 +#define ONRTNFROMBANKTOFUTUREBYFUTURE 103 +#define ONRTNFROMFUTURETOBANKBYFUTURE 104 +#define ONRTNREPEALFROMBANKTOFUTUREBYFUTUREMANUAL 105 +#define ONRTNREPEALFROMFUTURETOBANKBYFUTUREMANUAL 106 +#define ONRTNQUERYBANKBALANCEBYFUTURE 107 +#define ONERRRTNBANKTOFUTUREBYFUTURE 108 +#define ONERRRTNFUTURETOBANKBYFUTURE 109 +#define ONERRRTNREPEALBANKTOFUTUREBYFUTUREMANUAL 110 +#define ONERRRTNREPEALFUTURETOBANKBYFUTUREMANUAL 111 +#define ONERRRTNQUERYBANKBALANCEBYFUTURE 112 +#define ONRTNREPEALFROMBANKTOFUTUREBYFUTURE 113 +#define ONRTNREPEALFROMFUTURETOBANKBYFUTURE 114 +#define ONRSPFROMBANKTOFUTUREBYFUTURE 115 +#define ONRSPFROMFUTURETOBANKBYFUTURE 116 +#define ONRSPQUERYBANKACCOUNTMONEYBYFUTURE 117 +#define ONRTNOPENACCOUNTBYBANK 118 +#define ONRTNCANCELACCOUNTBYBANK 119 +#define ONRTNCHANGEACCOUNTBYBANK 120 + ///------------------------------------------------------------------------------------- @@ -140,398 +143,403 @@ using namespace pybind11; class TdApi : public CThostFtdcTraderSpi { private: - CThostFtdcTraderApi* api; //API对象 - thread task_thread; //工作线程指针(向python中推送数据) - TaskQueue task_queue; //任务队列 - bool active = false; //工作状态 + CThostFtdcTraderApi* api; //API对象 + thread task_thread; //工作线程指针(向python中推送数据) + TaskQueue task_queue; //任务队列 + bool active = false; //工作状态 public: - TdApi() - { - }; + TdApi() + { + }; - ~TdApi() - { - if (this->active) - { - this->exit(); - } - }; + ~TdApi() + { + if (this->active) + { + this->exit(); + } + }; - //------------------------------------------------------------------------------------- - //API回调函数 - //------------------------------------------------------------------------------------- + //------------------------------------------------------------------------------------- + //API回调函数 + //------------------------------------------------------------------------------------- - ///当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。 - virtual void OnFrontConnected() ; + ///当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。 + virtual void OnFrontConnected() ; - ///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。 - ///@param nReason 错误原因 - /// 0x1001 网络读失败 - /// 0x1002 网络写失败 - /// 0x2001 接收心跳超时 - /// 0x2002 发送心跳失败 - /// 0x2003 收到错误报文 - virtual void OnFrontDisconnected(int nReason) ; + ///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。 + ///@param nReason 错误原因 + /// 0x1001 网络读失败 + /// 0x1002 网络写失败 + /// 0x2001 接收心跳超时 + /// 0x2002 发送心跳失败 + /// 0x2003 收到错误报文 + virtual void OnFrontDisconnected(int nReason) ; - ///心跳超时警告。当长时间未收到报文时,该方法被调用。 - ///@param nTimeLapse 距离上次接收报文的时间 - virtual void OnHeartBeatWarning(int nTimeLapse) ; + ///心跳超时警告。当长时间未收到报文时,该方法被调用。 + ///@param nTimeLapse 距离上次接收报文的时间 + virtual void OnHeartBeatWarning(int nTimeLapse) ; - ///客户端认证响应 - virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///客户端认证响应 + virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///登录请求响应 - virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///登录请求响应 + virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///登出请求响应 - virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///登出请求响应 + virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///用户口令更新请求响应 - virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///用户口令更新请求响应 + virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///资金账户口令更新请求响应 - virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///资金账户口令更新请求响应 + virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///报单录入请求响应 - virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///报单录入请求响应 + virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///预埋单录入请求响应 - virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///预埋单录入请求响应 + virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///预埋撤单录入请求响应 - virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///预埋撤单录入请求响应 + virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///报单操作请求响应 - virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///报单操作请求响应 + virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///查询最大报单数量响应 - virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///查询最大报单数量响应 + virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///投资者结算结果确认响应 - virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///投资者结算结果确认响应 + virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///删除预埋单响应 - virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///删除预埋单响应 + virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///删除预埋撤单响应 - virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///删除预埋撤单响应 + virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///执行宣告录入请求响应 - virtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///执行宣告录入请求响应 + virtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///执行宣告操作请求响应 - virtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///执行宣告操作请求响应 + virtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///询价录入请求响应 - virtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///询价录入请求响应 + virtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///报价录入请求响应 - virtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///报价录入请求响应 + virtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///报价操作请求响应 - virtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///报价操作请求响应 + virtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///批量报单操作请求响应 - virtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///批量报单操作请求响应 + virtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///期权自对冲录入请求响应 - virtual void OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///期权自对冲录入请求响应 + virtual void OnRspOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///期权自对冲操作请求响应 - virtual void OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///期权自对冲操作请求响应 + virtual void OnRspOptionSelfCloseAction(CThostFtdcInputOptionSelfCloseActionField *pInputOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///申请组合录入请求响应 - virtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///申请组合录入请求响应 + virtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询报单响应 - virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询报单响应 + virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询成交响应 - virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询成交响应 + virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资者持仓响应 - virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资者持仓响应 + virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询资金账户响应 - virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询资金账户响应 + virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资者响应 - virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资者响应 + virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询交易编码响应 - virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询交易编码响应 + virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询合约保证金率响应 - virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询合约保证金率响应 + virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询合约手续费率响应 - virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询合约手续费率响应 + virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询交易所响应 - virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询交易所响应 + virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询产品响应 - virtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询产品响应 + virtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询合约响应 - virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询合约响应 + virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询行情响应 - virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询行情响应 + virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资者结算结果响应 - virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资者结算结果响应 + virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询转帐银行响应 - virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询转帐银行响应 + virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资者持仓明细响应 - virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资者持仓明细响应 + virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询客户通知响应 - virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询客户通知响应 + virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询结算信息确认响应 - virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询结算信息确认响应 + virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资者持仓明细响应 - virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资者持仓明细响应 + virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///查询保证金监管系统经纪公司资金账户密钥响应 - virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///查询保证金监管系统经纪公司资金账户密钥响应 + virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询仓单折抵信息响应 - virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询仓单折抵信息响应 + virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资者品种/跨品种保证金响应 - virtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资者品种/跨品种保证金响应 + virtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询交易所保证金率响应 - virtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询交易所保证金率响应 + virtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询交易所调整保证金率响应 - virtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询交易所调整保证金率响应 + virtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询汇率响应 - virtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询汇率响应 + virtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询二级代理操作员银期权限响应 - virtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询二级代理操作员银期权限响应 + virtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询产品报价汇率 - virtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询产品报价汇率 + virtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询产品组 - virtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询产品组 + virtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询做市商合约手续费率响应 - virtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询做市商合约手续费率响应 + virtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询做市商期权合约手续费响应 - virtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询做市商期权合约手续费响应 + virtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询报单手续费响应 - virtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询报单手续费响应 + virtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询期权交易成本响应 - virtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询资金账户响应 + virtual void OnRspQrySecAgentTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast); - ///请求查询期权合约手续费响应 - virtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询二级代理商资金校验模式响应 + virtual void OnRspQrySecAgentCheckMode(CThostFtdcSecAgentCheckModeField *pSecAgentCheckMode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast); - ///请求查询执行宣告响应 - virtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询期权交易成本响应 + virtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询询价响应 - virtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询期权合约手续费响应 + virtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询报价响应 - virtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询执行宣告响应 + virtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询期权自对冲响应 - virtual void OnRspQryOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询询价响应 + virtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询投资单元响应 - virtual void OnRspQryInvestUnit(CThostFtdcInvestUnitField *pInvestUnit, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询报价响应 + virtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询组合合约安全系数响应 - virtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询期权自对冲响应 + virtual void OnRspQryOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询申请组合响应 - virtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询投资单元响应 + virtual void OnRspQryInvestUnit(CThostFtdcInvestUnitField *pInvestUnit, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询转帐流水响应 - virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询组合合约安全系数响应 + virtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询银期签约关系响应 - virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询申请组合响应 + virtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///错误应答 - virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询转帐流水响应 + virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///报单通知 - virtual void OnRtnOrder(CThostFtdcOrderField *pOrder) ; + ///请求查询银期签约关系响应 + virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///成交通知 - virtual void OnRtnTrade(CThostFtdcTradeField *pTrade) ; + ///错误应答 + virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///报单录入错误回报 - virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) ; + ///报单通知 + virtual void OnRtnOrder(CThostFtdcOrderField *pOrder) ; - ///报单操作错误回报 - virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) ; + ///成交通知 + virtual void OnRtnTrade(CThostFtdcTradeField *pTrade) ; - ///合约交易状态通知 - virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) ; + ///报单录入错误回报 + virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) ; - ///交易所公告通知 - virtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin) ; + ///报单操作错误回报 + virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) ; - ///交易通知 - virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) ; + ///合约交易状态通知 + virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) ; - ///提示条件单校验错误 - virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) ; + ///交易所公告通知 + virtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin) ; - ///执行宣告通知 - virtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) ; + ///交易通知 + virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) ; - ///执行宣告录入错误回报 - virtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) ; + ///提示条件单校验错误 + virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) ; - ///执行宣告操作错误回报 - virtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) ; + ///执行宣告通知 + virtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) ; - ///询价录入错误回报 - virtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) ; + ///执行宣告录入错误回报 + virtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) ; - ///报价通知 - virtual void OnRtnQuote(CThostFtdcQuoteField *pQuote) ; + ///执行宣告操作错误回报 + virtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) ; - ///报价录入错误回报 - virtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) ; + ///询价录入错误回报 + virtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) ; - ///报价操作错误回报 - virtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) ; + ///报价通知 + virtual void OnRtnQuote(CThostFtdcQuoteField *pQuote) ; - ///询价通知 - virtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) ; + ///报价录入错误回报 + virtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) ; - ///保证金监控中心用户令牌 - virtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) ; + ///报价操作错误回报 + virtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) ; - ///批量报单操作错误回报 - virtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) ; + ///询价通知 + virtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) ; - ///期权自对冲通知 - virtual void OnRtnOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose) ; + ///保证金监控中心用户令牌 + virtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) ; - ///期权自对冲录入错误回报 - virtual void OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo) ; + ///批量报单操作错误回报 + virtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) ; - ///期权自对冲操作错误回报 - virtual void OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo) ; + ///期权自对冲通知 + virtual void OnRtnOptionSelfClose(CThostFtdcOptionSelfCloseField *pOptionSelfClose) ; - ///申请组合通知 - virtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction) ; + ///期权自对冲录入错误回报 + virtual void OnErrRtnOptionSelfCloseInsert(CThostFtdcInputOptionSelfCloseField *pInputOptionSelfClose, CThostFtdcRspInfoField *pRspInfo) ; - ///申请组合录入错误回报 - virtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) ; + ///期权自对冲操作错误回报 + virtual void OnErrRtnOptionSelfCloseAction(CThostFtdcOptionSelfCloseActionField *pOptionSelfCloseAction, CThostFtdcRspInfoField *pRspInfo) ; - ///请求查询签约银行响应 - virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///申请组合通知 + virtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction) ; - ///请求查询预埋单响应 - virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///申请组合录入错误回报 + virtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) ; - ///请求查询预埋撤单响应 - virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询签约银行响应 + virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询交易通知响应 - virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询预埋单响应 + virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询经纪公司交易参数响应 - virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询预埋撤单响应 + virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询经纪公司交易算法响应 - virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询交易通知响应 + virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///请求查询监控中心用户令牌 - virtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///请求查询经纪公司交易参数响应 + virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///银行发起银行资金转期货通知 - virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) ; + ///请求查询经纪公司交易算法响应 + virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///银行发起期货资金转银行通知 - virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) ; + ///请求查询监控中心用户令牌 + virtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///银行发起冲正银行转期货通知 - virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) ; + ///银行发起银行资金转期货通知 + virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) ; - ///银行发起冲正期货转银行通知 - virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) ; + ///银行发起期货资金转银行通知 + virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) ; - ///期货发起银行资金转期货通知 - virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) ; + ///银行发起冲正银行转期货通知 + virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) ; - ///期货发起期货资金转银行通知 - virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) ; + ///银行发起冲正期货转银行通知 + virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) ; - ///系统运行时期货端手工发起冲正银行转期货请求,银行处理完毕后报盘发回的通知 - virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) ; + ///期货发起银行资金转期货通知 + virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) ; - ///系统运行时期货端手工发起冲正期货转银行请求,银行处理完毕后报盘发回的通知 - virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) ; + ///期货发起期货资金转银行通知 + virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) ; - ///期货发起查询银行余额通知 - virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) ; + ///系统运行时期货端手工发起冲正银行转期货请求,银行处理完毕后报盘发回的通知 + virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) ; - ///期货发起银行资金转期货错误回报 - virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) ; + ///系统运行时期货端手工发起冲正期货转银行请求,银行处理完毕后报盘发回的通知 + virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) ; - ///期货发起期货资金转银行错误回报 - virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) ; + ///期货发起查询银行余额通知 + virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) ; - ///系统运行时期货端手工发起冲正银行转期货错误回报 - virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) ; + ///期货发起银行资金转期货错误回报 + virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) ; - ///系统运行时期货端手工发起冲正期货转银行错误回报 - virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) ; + ///期货发起期货资金转银行错误回报 + virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) ; - ///期货发起查询银行余额错误回报 - virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) ; + ///系统运行时期货端手工发起冲正银行转期货错误回报 + virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) ; - ///期货发起冲正银行转期货请求,银行处理完毕后报盘发回的通知 - virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) ; + ///系统运行时期货端手工发起冲正期货转银行错误回报 + virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) ; - ///期货发起冲正期货转银行请求,银行处理完毕后报盘发回的通知 - virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) ; + ///期货发起查询银行余额错误回报 + virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) ; - ///期货发起银行资金转期货应答 - virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///期货发起冲正银行转期货请求,银行处理完毕后报盘发回的通知 + virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) ; - ///期货发起期货资金转银行应答 - virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///期货发起冲正期货转银行请求,银行处理完毕后报盘发回的通知 + virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) ; - ///期货发起查询银行余额应答 - virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; + ///期货发起银行资金转期货应答 + virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///银行发起银期开户通知 - virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) ; + ///期货发起期货资金转银行应答 + virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///银行发起银期销户通知 - virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) ; + ///期货发起查询银行余额应答 + virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ; - ///银行发起变更银行账号通知 - virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) ; + ///银行发起银期开户通知 + virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) ; - //------------------------------------------------------------------------------------- - //task:任务 - //------------------------------------------------------------------------------------- + ///银行发起银期销户通知 + virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) ; - void processTask(); + ///银行发起变更银行账号通知 + virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) ; + + //------------------------------------------------------------------------------------- + //task:任务 + //------------------------------------------------------------------------------------- + void processTask(); void processFrontConnected(Task *task); @@ -643,6 +651,10 @@ public: void processRspQryInstrumentOrderCommRate(Task *task); + void processRspQrySecAgentTradingAccount(Task *task); + + void processRspQrySecAgentCheckMode(Task *task); + void processRspQryOptionInstrTradeCost(Task *task); void processRspQryOptionInstrCommRate(Task *task); @@ -773,13 +785,14 @@ public: - //------------------------------------------------------------------------------------- - //data:回调函数的数据字典 - //error:回调函数的错误字典 - //id:请求id - //last:是否为最后返回 - //i:整数 - //------------------------------------------------------------------------------------- + + //------------------------------------------------------------------------------------- + //data:回调函数的数据字典 + //error:回调函数的错误字典 + //id:请求id + //last:是否为最后返回 + //i:整数 + //------------------------------------------------------------------------------------- virtual void onFrontConnected() {}; virtual void onFrontDisconnected(int reqid) {}; @@ -890,6 +903,10 @@ public: virtual void onRspQryInstrumentOrderCommRate(const dict &data, const dict &error, int reqid, bool last) {}; + virtual void onRspQrySecAgentTradingAccount(const dict &data, const dict &error, int reqid, bool last) {}; + + virtual void onRspQrySecAgentCheckMode(const dict &data, const dict &error, int reqid, bool last) {}; + virtual void onRspQryOptionInstrTradeCost(const dict &data, const dict &error, int reqid, bool last) {}; virtual void onRspQryOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) {}; @@ -1019,176 +1036,181 @@ public: virtual void onRtnChangeAccountByBank(const dict &data) {}; + //------------------------------------------------------------------------------------- + //req:主动函数的请求字典 + //------------------------------------------------------------------------------------- - //------------------------------------------------------------------------------------- - //req:主动函数的请求字典 - //------------------------------------------------------------------------------------- + void createFtdcTraderApi(string pszFlowPath = ""); - void createFtdcTraderApi(string pszFlowPath = ""); + void release(); - void release(); + void init(); - void init(); + int join(); - int join(); + int exit(); - int exit(); + string getTradingDay(); - string getTradingDay(); + void registerFront(string pszFrontAddress); - void registerFront(string pszFrontAddress); + void subscribePrivateTopic(int nType); - void subscribePrivateTopic(int nType); + void subscribePublicTopic(int nType); - void subscribePublicTopic(int nType); + int reqAuthenticate(const dict &req, int reqid); - int reqAuthenticate(const dict &req, int reqid); + int reqUserLogin(const dict &req, int reqid); - int reqUserLogin(const dict &req, int reqid); + int reqUserLogout(const dict &req, int reqid); - int reqUserLogout(const dict &req, int reqid); + int reqUserPasswordUpdate(const dict &req, int reqid); - int reqUserPasswordUpdate(const dict &req, int reqid); + int reqTradingAccountPasswordUpdate(const dict &req, int reqid); - int reqTradingAccountPasswordUpdate(const dict &req, int reqid); + int reqUserLogin2(const dict &req, int reqid); - int reqUserLogin2(const dict &req, int reqid); + int reqUserPasswordUpdate2(const dict &req, int reqid); - int reqUserPasswordUpdate2(const dict &req, int reqid); + int reqOrderInsert(const dict &req, int reqid); - int reqOrderInsert(const dict &req, int reqid); + int reqParkedOrderInsert(const dict &req, int reqid); - int reqParkedOrderInsert(const dict &req, int reqid); + int reqParkedOrderAction(const dict &req, int reqid); - int reqParkedOrderAction(const dict &req, int reqid); + int reqOrderAction(const dict &req, int reqid); - int reqOrderAction(const dict &req, int reqid); + int reqQueryMaxOrderVolume(const dict &req, int reqid); - int reqQueryMaxOrderVolume(const dict &req, int reqid); + int reqSettlementInfoConfirm(const dict &req, int reqid); - int reqSettlementInfoConfirm(const dict &req, int reqid); + int reqRemoveParkedOrder(const dict &req, int reqid); - int reqRemoveParkedOrder(const dict &req, int reqid); + int reqRemoveParkedOrderAction(const dict &req, int reqid); - int reqRemoveParkedOrderAction(const dict &req, int reqid); + int reqExecOrderInsert(const dict &req, int reqid); - int reqExecOrderInsert(const dict &req, int reqid); + int reqExecOrderAction(const dict &req, int reqid); - int reqExecOrderAction(const dict &req, int reqid); + int reqForQuoteInsert(const dict &req, int reqid); - int reqForQuoteInsert(const dict &req, int reqid); + int reqQuoteInsert(const dict &req, int reqid); - int reqQuoteInsert(const dict &req, int reqid); + int reqQuoteAction(const dict &req, int reqid); - int reqQuoteAction(const dict &req, int reqid); + int reqBatchOrderAction(const dict &req, int reqid); - int reqBatchOrderAction(const dict &req, int reqid); + int reqOptionSelfCloseInsert(const dict &req, int reqid); - int reqOptionSelfCloseInsert(const dict &req, int reqid); + int reqOptionSelfCloseAction(const dict &req, int reqid); - int reqOptionSelfCloseAction(const dict &req, int reqid); + int reqCombActionInsert(const dict &req, int reqid); - int reqCombActionInsert(const dict &req, int reqid); + int reqQryOrder(const dict &req, int reqid); - int reqQryOrder(const dict &req, int reqid); + int reqQryTrade(const dict &req, int reqid); - int reqQryTrade(const dict &req, int reqid); + int reqQryInvestorPosition(const dict &req, int reqid); - int reqQryInvestorPosition(const dict &req, int reqid); + int reqQryTradingAccount(const dict &req, int reqid); - int reqQryTradingAccount(const dict &req, int reqid); + int reqQryInvestor(const dict &req, int reqid); - int reqQryInvestor(const dict &req, int reqid); + int reqQryTradingCode(const dict &req, int reqid); - int reqQryTradingCode(const dict &req, int reqid); + int reqQryInstrumentMarginRate(const dict &req, int reqid); - int reqQryInstrumentMarginRate(const dict &req, int reqid); + int reqQryInstrumentCommissionRate(const dict &req, int reqid); - int reqQryInstrumentCommissionRate(const dict &req, int reqid); + int reqQryExchange(const dict &req, int reqid); - int reqQryExchange(const dict &req, int reqid); + int reqQryProduct(const dict &req, int reqid); - int reqQryProduct(const dict &req, int reqid); + int reqQryInstrument(const dict &req, int reqid); - int reqQryInstrument(const dict &req, int reqid); + int reqQryDepthMarketData(const dict &req, int reqid); - int reqQryDepthMarketData(const dict &req, int reqid); + int reqQrySettlementInfo(const dict &req, int reqid); - int reqQrySettlementInfo(const dict &req, int reqid); + int reqQryTransferBank(const dict &req, int reqid); - int reqQryTransferBank(const dict &req, int reqid); + int reqQryInvestorPositionDetail(const dict &req, int reqid); - int reqQryInvestorPositionDetail(const dict &req, int reqid); + int reqQryNotice(const dict &req, int reqid); - int reqQryNotice(const dict &req, int reqid); + int reqQrySettlementInfoConfirm(const dict &req, int reqid); - int reqQrySettlementInfoConfirm(const dict &req, int reqid); + int reqQryInvestorPositionCombineDetail(const dict &req, int reqid); - int reqQryInvestorPositionCombineDetail(const dict &req, int reqid); + int reqQryCFMMCTradingAccountKey(const dict &req, int reqid); - int reqQryCFMMCTradingAccountKey(const dict &req, int reqid); + int reqQryEWarrantOffset(const dict &req, int reqid); - int reqQryEWarrantOffset(const dict &req, int reqid); + int reqQryInvestorProductGroupMargin(const dict &req, int reqid); - int reqQryInvestorProductGroupMargin(const dict &req, int reqid); + int reqQryExchangeMarginRate(const dict &req, int reqid); - int reqQryExchangeMarginRate(const dict &req, int reqid); + int reqQryExchangeMarginRateAdjust(const dict &req, int reqid); - int reqQryExchangeMarginRateAdjust(const dict &req, int reqid); + int reqQryExchangeRate(const dict &req, int reqid); - int reqQryExchangeRate(const dict &req, int reqid); + int reqQrySecAgentACIDMap(const dict &req, int reqid); - int reqQrySecAgentACIDMap(const dict &req, int reqid); + int reqQryProductExchRate(const dict &req, int reqid); - int reqQryProductExchRate(const dict &req, int reqid); + int reqQryProductGroup(const dict &req, int reqid); - int reqQryProductGroup(const dict &req, int reqid); + int reqQryMMInstrumentCommissionRate(const dict &req, int reqid); - int reqQryMMInstrumentCommissionRate(const dict &req, int reqid); + int reqQryMMOptionInstrCommRate(const dict &req, int reqid); - int reqQryMMOptionInstrCommRate(const dict &req, int reqid); + int reqQryInstrumentOrderCommRate(const dict &req, int reqid); - int reqQryInstrumentOrderCommRate(const dict &req, int reqid); + int reqQrySecAgentTradingAccount(const dict &req, int reqid); - int reqQryOptionInstrTradeCost(const dict &req, int reqid); + int reqQrySecAgentCheckMode(const dict &req, int reqid); - int reqQryOptionInstrCommRate(const dict &req, int reqid); + int reqQryOptionInstrTradeCost(const dict &req, int reqid); - int reqQryExecOrder(const dict &req, int reqid); + int reqQryOptionInstrCommRate(const dict &req, int reqid); - int reqQryForQuote(const dict &req, int reqid); + int reqQryExecOrder(const dict &req, int reqid); - int reqQryQuote(const dict &req, int reqid); + int reqQryForQuote(const dict &req, int reqid); - int reqQryOptionSelfClose(const dict &req, int reqid); + int reqQryQuote(const dict &req, int reqid); - int reqQryInvestUnit(const dict &req, int reqid); + int reqQryOptionSelfClose(const dict &req, int reqid); - int reqQryCombInstrumentGuard(const dict &req, int reqid); + int reqQryInvestUnit(const dict &req, int reqid); - int reqQryCombAction(const dict &req, int reqid); + int reqQryCombInstrumentGuard(const dict &req, int reqid); - int reqQryTransferSerial(const dict &req, int reqid); + int reqQryCombAction(const dict &req, int reqid); - int reqQryAccountregister(const dict &req, int reqid); + int reqQryTransferSerial(const dict &req, int reqid); - int reqQryContractBank(const dict &req, int reqid); + int reqQryAccountregister(const dict &req, int reqid); - int reqQryParkedOrder(const dict &req, int reqid); + int reqQryContractBank(const dict &req, int reqid); - int reqQryParkedOrderAction(const dict &req, int reqid); + int reqQryParkedOrder(const dict &req, int reqid); - int reqQryTradingNotice(const dict &req, int reqid); + int reqQryParkedOrderAction(const dict &req, int reqid); - int reqQryBrokerTradingParams(const dict &req, int reqid); + int reqQryTradingNotice(const dict &req, int reqid); - int reqQryBrokerTradingAlgos(const dict &req, int reqid); + int reqQryBrokerTradingParams(const dict &req, int reqid); - int reqQueryCFMMCTradingAccountToken(const dict &req, int reqid); + int reqQryBrokerTradingAlgos(const dict &req, int reqid); - int reqFromBankToFutureByFuture(const dict &req, int reqid); + int reqQueryCFMMCTradingAccountToken(const dict &req, int reqid); + + int reqFromBankToFutureByFuture(const dict &req, int reqid); + + int reqFromFutureToBankByFuture(const dict &req, int reqid); + + int reqQueryBankAccountMoneyByFuture(const dict &req, int reqid); - int reqFromFutureToBankByFuture(const dict &req, int reqid); - int reqQueryBankAccountMoneyByFuture(const dict &req, int reqid); }; diff --git a/vnpy/api/ctp/vnctpmd.pyd b/vnpy/api/ctp/vnctpmd.pyd index 55daf6f5..e85fa6e2 100644 Binary files a/vnpy/api/ctp/vnctpmd.pyd and b/vnpy/api/ctp/vnctpmd.pyd differ diff --git a/vnpy/api/ctp/vnctptd.pyd b/vnpy/api/ctp/vnctptd.pyd index df0cd159..bcaf7404 100644 Binary files a/vnpy/api/ctp/vnctptd.pyd and b/vnpy/api/ctp/vnctptd.pyd differ