diff --git a/vnpy/api/sec/generator/Sec_constant.py b/vnpy/api/sec/generator/Sec_constant.py deleted file mode 100644 index 501eb354..00000000 --- a/vnpy/api/sec/generator/Sec_constant.py +++ /dev/null @@ -1,1292 +0,0 @@ -THOST_FTDC_EXP_Normal = '0' -THOST_FTDC_EXP_GenOrderByTrade = '1' -THOST_FTDC_ICT_EID = '0' -THOST_FTDC_ICT_IDCard = '1' -THOST_FTDC_ICT_OfficerIDCard = '2' -THOST_FTDC_ICT_PoliceIDCard = '3' -THOST_FTDC_ICT_SoldierIDCard = '4' -THOST_FTDC_ICT_HouseholdRegister = '5' -THOST_FTDC_ICT_Passport = '6' -THOST_FTDC_ICT_TaiwanCompatriotIDCard = '7' -THOST_FTDC_ICT_HomeComingCard = '8' -THOST_FTDC_ICT_LicenseNo = '9' -THOST_FTDC_ICT_TaxNo = 'A' -THOST_FTDC_ICT_HMMainlandTravelPermit = 'B' -THOST_FTDC_ICT_TwMainlandTravelPermit = 'C' -THOST_FTDC_ICT_DrivingLicense = 'D' -THOST_FTDC_ICT_SocialID = 'F' -THOST_FTDC_ICT_LocalID = 'G' -THOST_FTDC_ICT_BusinessRegistration = 'H' -THOST_FTDC_ICT_HKMCIDCard = 'I' -THOST_FTDC_ICT_AccountsPermits = 'J' -THOST_FTDC_ICT_OtherCard = 'x' -THOST_FTDC_IR_All = '1' -THOST_FTDC_IR_Group = '2' -THOST_FTDC_IR_Single = '3' -THOST_FTDC_DR_All = '1' -THOST_FTDC_DR_Group = '2' -THOST_FTDC_DR_Single = '3' -THOST_FTDC_DS_Asynchronous = '1' -THOST_FTDC_DS_Synchronizing = '2' -THOST_FTDC_DS_Synchronized = '3' -THOST_FTDC_BDS_Synchronized = '1' -THOST_FTDC_BDS_Synchronizing = '2' -THOST_FTDC_ECS_NoConnection = '1' -THOST_FTDC_ECS_QryInstrumentSent = '2' -THOST_FTDC_ECS_GotInformation = '9' -THOST_FTDC_TCS_NotConnected = '1' -THOST_FTDC_TCS_Connected = '2' -THOST_FTDC_TCS_QryInstrumentSent = '3' -THOST_FTDC_TCS_SubPrivateFlow = '4' -THOST_FTDC_FC_DataAsync = '1' -THOST_FTDC_FC_ForceUserLogout = '2' -THOST_FTDC_FC_UserPasswordUpdate = '3' -THOST_FTDC_FC_BrokerPasswordUpdate = '4' -THOST_FTDC_FC_InvestorPasswordUpdate = '5' -THOST_FTDC_FC_OrderInsert = '6' -THOST_FTDC_FC_OrderAction = '7' -THOST_FTDC_FC_SyncSystemData = '8' -THOST_FTDC_FC_SyncBrokerData = '9' -THOST_FTDC_FC_BachSyncBrokerData = 'A' -THOST_FTDC_FC_SuperQuery = 'B' -THOST_FTDC_FC_ParkedOrderInsert = 'C' -THOST_FTDC_FC_ParkedOrderAction = 'D' -THOST_FTDC_FC_SyncOTP = 'E' -THOST_FTDC_FC_DeleteOrder = 'F' -THOST_FTDC_BFC_ForceUserLogout = '1' -THOST_FTDC_BFC_UserPasswordUpdate = '2' -THOST_FTDC_BFC_SyncBrokerData = '3' -THOST_FTDC_BFC_BachSyncBrokerData = '4' -THOST_FTDC_BFC_OrderInsert = '5' -THOST_FTDC_BFC_OrderAction = '6' -THOST_FTDC_BFC_AllQuery = '7' -THOST_FTDC_BFC_log = 'a' -THOST_FTDC_BFC_BaseQry = 'b' -THOST_FTDC_BFC_TradeQry = 'c' -THOST_FTDC_BFC_Trade = 'd' -THOST_FTDC_BFC_Virement = 'e' -THOST_FTDC_BFC_Risk = 'f' -THOST_FTDC_BFC_Session = 'g' -THOST_FTDC_BFC_RiskNoticeCtl = 'h' -THOST_FTDC_BFC_RiskNotice = 'i' -THOST_FTDC_BFC_BrokerDeposit = 'j' -THOST_FTDC_BFC_QueryFund = 'k' -THOST_FTDC_BFC_QueryOrder = 'l' -THOST_FTDC_BFC_QueryTrade = 'm' -THOST_FTDC_BFC_QueryPosition = 'n' -THOST_FTDC_BFC_QueryMarketData = 'o' -THOST_FTDC_BFC_QueryUserEvent = 'p' -THOST_FTDC_BFC_QueryRiskNotify = 'q' -THOST_FTDC_BFC_QueryFundChange = 'r' -THOST_FTDC_BFC_QueryInvestor = 's' -THOST_FTDC_BFC_QueryTradingCode = 't' -THOST_FTDC_BFC_ForceClose = 'u' -THOST_FTDC_BFC_PressTest = 'v' -THOST_FTDC_BFC_RemainCalc = 'w' -THOST_FTDC_BFC_NetPositionInd = 'x' -THOST_FTDC_BFC_RiskPredict = 'y' -THOST_FTDC_BFC_DataExport = 'z' -THOST_FTDC_BFC_RiskTargetSetup = 'A' -THOST_FTDC_BFC_MarketDataWarn = 'B' -THOST_FTDC_BFC_QryBizNotice = 'C' -THOST_FTDC_BFC_CfgBizNotice = 'D' -THOST_FTDC_BFC_SyncOTP = 'E' -THOST_FTDC_BFC_SendBizNotice = 'F' -THOST_FTDC_BFC_CfgRiskLevelStd = 'G' -THOST_FTDC_BFC_TbCommand = 'H' -THOST_FTDC_BFC_DeleteOrder = 'J' -THOST_FTDC_BFC_ParkedOrderInsert = 'K' -THOST_FTDC_BFC_ParkedOrderAction = 'L' -THOST_FTDC_BFC_ExecOrderNoCheck = 'M' -THOST_FTDC_BFC_Designate = 'N' -THOST_FTDC_BFC_StockDisposal = 'O' -THOST_FTDC_BFC_BrokerDepositWarn = 'Q' -THOST_FTDC_BFC_CoverWarn = 'S' -THOST_FTDC_BFC_PreExecOrder = 'T' -THOST_FTDC_BFC_ExecOrderRisk = 'P' -THOST_FTDC_BFC_PosiLimitWarn = 'U' -THOST_FTDC_BFC_QryPosiLimit = 'V' -THOST_FTDC_BFC_FBSign = 'W' -THOST_FTDC_BFC_FBAccount = 'X' -THOST_FTDC_BFC_QryCoverLack = 'Y' -THOST_FTDC_OAS_Submitted = 'a' -THOST_FTDC_OAS_Accepted = 'b' -THOST_FTDC_OAS_Rejected = 'c' -THOST_FTDC_OST_AllTraded = '0' -THOST_FTDC_OST_PartTradedQueueing = '1' -THOST_FTDC_OST_PartTradedNotQueueing = '2' -THOST_FTDC_OST_NoTradeQueueing = '3' -THOST_FTDC_OST_NoTradeNotQueueing = '4' -THOST_FTDC_OST_Canceled = '5' -THOST_FTDC_OST_Unknown = 'a' -THOST_FTDC_OST_NotTouched = 'b' -THOST_FTDC_OST_Touched = 'c' -THOST_FTDC_OSS_InsertSubmitted = '0' -THOST_FTDC_OSS_CancelSubmitted = '1' -THOST_FTDC_OSS_ModifySubmitted = '2' -THOST_FTDC_OSS_Accepted = '3' -THOST_FTDC_OSS_InsertRejected = '4' -THOST_FTDC_OSS_CancelRejected = '5' -THOST_FTDC_OSS_ModifyRejected = '6' -THOST_FTDC_PSD_Today = '1' -THOST_FTDC_PSD_History = '2' -THOST_FTDC_PDT_UseHistory = '1' -THOST_FTDC_PDT_NoUseHistory = '2' -THOST_FTDC_ER_Broker = '1' -THOST_FTDC_ER_Host = '2' -THOST_FTDC_ER_Maker = '3' -THOST_FTDC_PC_Futures = '1' -THOST_FTDC_PC_Options = '2' -THOST_FTDC_PC_Combination = '3' -THOST_FTDC_PC_Spot = '4' -THOST_FTDC_PC_EFP = '5' -THOST_FTDC_PC_SpotOption = '6' -THOST_FTDC_PC_ETFOption = '7' -THOST_FTDC_PC_Stock = '8' -THOST_FTDC_IP_NotStart = '0' -THOST_FTDC_IP_Started = '1' -THOST_FTDC_IP_Pause = '2' -THOST_FTDC_IP_Expired = '3' -THOST_FTDC_D_Buy = '0' -THOST_FTDC_D_Sell = '1' -THOST_FTDC_PT_Net = '1' -THOST_FTDC_PT_Gross = '2' -THOST_FTDC_PD_Net = '1' -THOST_FTDC_PD_Long = '2' -THOST_FTDC_PD_Short = '3' -THOST_FTDC_SS_NonActive = '1' -THOST_FTDC_SS_Startup = '2' -THOST_FTDC_SS_Operating = '3' -THOST_FTDC_SS_Settlement = '4' -THOST_FTDC_SS_SettlementFinished = '5' -THOST_FTDC_RA_Trade = '0' -THOST_FTDC_RA_Settlement = '1' -THOST_FTDC_HF_Speculation = '1' -THOST_FTDC_HF_Arbitrage = '2' -THOST_FTDC_HF_Hedge = '3' -THOST_FTDC_HF_Covered = '4' -THOST_FTDC_HF_MarketMaker = '5' -THOST_FTDC_BHF_Speculation = '1' -THOST_FTDC_BHF_Arbitrage = '2' -THOST_FTDC_BHF_Hedge = '3' -THOST_FTDC_CIDT_Speculation = '1' -THOST_FTDC_CIDT_Arbitrage = '2' -THOST_FTDC_CIDT_Hedge = '3' -THOST_FTDC_CIDT_MarketMaker = '5' -THOST_FTDC_OPT_AnyPrice = '1' -THOST_FTDC_OPT_LimitPrice = '2' -THOST_FTDC_OPT_BestPrice = '3' -THOST_FTDC_OPT_LastPrice = '4' -THOST_FTDC_OPT_LastPricePlusOneTicks = '5' -THOST_FTDC_OPT_LastPricePlusTwoTicks = '6' -THOST_FTDC_OPT_LastPricePlusThreeTicks = '7' -THOST_FTDC_OPT_AskPrice1 = '8' -THOST_FTDC_OPT_AskPrice1PlusOneTicks = '9' -THOST_FTDC_OPT_AskPrice1PlusTwoTicks = 'A' -THOST_FTDC_OPT_AskPrice1PlusThreeTicks = 'B' -THOST_FTDC_OPT_BidPrice1 = 'C' -THOST_FTDC_OPT_BidPrice1PlusOneTicks = 'D' -THOST_FTDC_OPT_BidPrice1PlusTwoTicks = 'E' -THOST_FTDC_OPT_BidPrice1PlusThreeTicks = 'F' -THOST_FTDC_OPT_FiveLevelPrice = 'G' -THOST_FTDC_OPT_BestPriceThisSide = 'H' -THOST_FTDC_OF_Open = '0' -THOST_FTDC_OF_Close = '1' -THOST_FTDC_OF_ForceClose = '2' -THOST_FTDC_OF_CloseToday = '3' -THOST_FTDC_OF_CloseYesterday = '4' -THOST_FTDC_OF_ForceOff = '5' -THOST_FTDC_OF_LocalForceClose = '6' -THOST_FTDC_FCC_NotForceClose = '0' -THOST_FTDC_FCC_LackDeposit = '1' -THOST_FTDC_FCC_ClientOverPositionLimit = '2' -THOST_FTDC_FCC_MemberOverPositionLimit = '3' -THOST_FTDC_FCC_NotMultiple = '4' -THOST_FTDC_FCC_Violation = '5' -THOST_FTDC_FCC_Other = '6' -THOST_FTDC_FCC_PersonDeliv = '7' -THOST_FTDC_ORDT_Normal = '0' -THOST_FTDC_ORDT_DeriveFromQuote = '1' -THOST_FTDC_ORDT_DeriveFromCombination = '2' -THOST_FTDC_ORDT_Combination = '3' -THOST_FTDC_ORDT_ConditionalOrder = '4' -THOST_FTDC_ORDT_Swap = '5' -THOST_FTDC_TC_IOC = '1' -THOST_FTDC_TC_GFS = '2' -THOST_FTDC_TC_GFD = '3' -THOST_FTDC_TC_GTD = '4' -THOST_FTDC_TC_GTC = '5' -THOST_FTDC_TC_GFA = '6' -THOST_FTDC_VC_AV = '1' -THOST_FTDC_VC_MV = '2' -THOST_FTDC_VC_CV = '3' -THOST_FTDC_CC_Immediately = '1' -THOST_FTDC_CC_Touch = '2' -THOST_FTDC_CC_TouchProfit = '3' -THOST_FTDC_CC_ParkedOrder = '4' -THOST_FTDC_CC_LastPriceGreaterThanStopPrice = '5' -THOST_FTDC_CC_LastPriceGreaterEqualStopPrice = '6' -THOST_FTDC_CC_LastPriceLesserThanStopPrice = '7' -THOST_FTDC_CC_LastPriceLesserEqualStopPrice = '8' -THOST_FTDC_CC_AskPriceGreaterThanStopPrice = '9' -THOST_FTDC_CC_AskPriceGreaterEqualStopPrice = 'A' -THOST_FTDC_CC_AskPriceLesserThanStopPrice = 'B' -THOST_FTDC_CC_AskPriceLesserEqualStopPrice = 'C' -THOST_FTDC_CC_BidPriceGreaterThanStopPrice = 'D' -THOST_FTDC_CC_BidPriceGreaterEqualStopPrice = 'E' -THOST_FTDC_CC_BidPriceLesserThanStopPrice = 'F' -THOST_FTDC_CC_BidPriceLesserEqualStopPrice = 'H' -THOST_FTDC_AF_Delete = '0' -THOST_FTDC_AF_Modify = '3' -THOST_FTDC_TR_Allow = '0' -THOST_FTDC_TR_CloseOnly = '1' -THOST_FTDC_TR_Forbidden = '2' -THOST_FTDC_OSRC_Participant = '0' -THOST_FTDC_OSRC_Administrator = '1' -THOST_FTDC_TRDT_SplitCombination = '#' -THOST_FTDC_TRDT_Common = '0' -THOST_FTDC_TRDT_OptionsExecution = '1' -THOST_FTDC_TRDT_OTC = '2' -THOST_FTDC_TRDT_EFPDerived = '3' -THOST_FTDC_TRDT_CombinationDerived = '4' -THOST_FTDC_PSRC_LastPrice = '0' -THOST_FTDC_PSRC_Buy = '1' -THOST_FTDC_PSRC_Sell = '2' -THOST_FTDC_IS_BeforeTrading = '0' -THOST_FTDC_IS_NoTrading = '1' -THOST_FTDC_IS_Continous = '2' -THOST_FTDC_IS_AuctionOrdering = '3' -THOST_FTDC_IS_AuctionBalance = '4' -THOST_FTDC_IS_AuctionMatch = '5' -THOST_FTDC_IS_Closed = '6' -THOST_FTDC_IS_Auction = '7' -THOST_FTDC_IS_BusinessSuspension = '8' -THOST_FTDC_IS_VolatilityInterrupt = '9' -THOST_FTDC_IS_TemporarySuspension = 'a' -THOST_FTDC_IS_AuctionAfterClosed = 'b' -THOST_FTDC_IS_ResumableFusing = 'c' -THOST_FTDC_IS_UnResumableFusing = 'd' -THOST_FTDC_IS_TradingAfterClosed = 'e' -THOST_FTDC_IER_Automatic = '1' -THOST_FTDC_IER_Manual = '2' -THOST_FTDC_IER_Fuse = '3' -THOST_FTDC_BS_NoUpload = '1' -THOST_FTDC_BS_Uploaded = '2' -THOST_FTDC_BS_Failed = '3' -THOST_FTDC_RS_All = '1' -THOST_FTDC_RS_ByProduct = '2' -THOST_FTDC_RP_ByVolume = '1' -THOST_FTDC_RP_ByFeeOnHand = '2' -THOST_FTDC_RL_Level1 = '1' -THOST_FTDC_RL_Level2 = '2' -THOST_FTDC_RL_Level3 = '3' -THOST_FTDC_RL_Level4 = '4' -THOST_FTDC_RL_Level5 = '5' -THOST_FTDC_RL_Level6 = '6' -THOST_FTDC_RL_Level7 = '7' -THOST_FTDC_RL_Level8 = '8' -THOST_FTDC_RL_Level9 = '9' -THOST_FTDC_RSD_ByPeriod = '1' -THOST_FTDC_RSD_ByStandard = '2' -THOST_FTDC_MT_Out = '0' -THOST_FTDC_MT_In = '1' -THOST_FTDC_ISPI_MortgageRatio = '4' -THOST_FTDC_ISPI_MarginWay = '5' -THOST_FTDC_ISPI_BillDeposit = '9' -THOST_FTDC_ESPI_MortgageRatio = '1' -THOST_FTDC_ESPI_OtherFundItem = '2' -THOST_FTDC_ESPI_OtherFundImport = '3' -THOST_FTDC_ESPI_CFFEXMinPrepa = '6' -THOST_FTDC_ESPI_CZCESettlementType = '7' -THOST_FTDC_ESPI_ExchDelivFeeMode = '9' -THOST_FTDC_ESPI_DelivFeeMode = '0' -THOST_FTDC_ESPI_CZCEComMarginType = 'A' -THOST_FTDC_ESPI_DceComMarginType = 'B' -THOST_FTDC_ESPI_OptOutDisCountRate = 'a' -THOST_FTDC_ESPI_OptMiniGuarantee = 'b' -THOST_FTDC_SPI_InvestorIDMinLength = '1' -THOST_FTDC_SPI_AccountIDMinLength = '2' -THOST_FTDC_SPI_UserRightLogon = '3' -THOST_FTDC_SPI_SettlementBillTrade = '4' -THOST_FTDC_SPI_TradingCode = '5' -THOST_FTDC_SPI_CheckFund = '6' -THOST_FTDC_SPI_CommModelRight = '7' -THOST_FTDC_SPI_MarginModelRight = '9' -THOST_FTDC_SPI_IsStandardActive = '8' -THOST_FTDC_SPI_UploadSettlementFile = 'U' -THOST_FTDC_SPI_DownloadCSRCFile = 'D' -THOST_FTDC_SPI_SettlementBillFile = 'S' -THOST_FTDC_SPI_CSRCOthersFile = 'C' -THOST_FTDC_SPI_InvestorPhoto = 'P' -THOST_FTDC_SPI_CSRCData = 'R' -THOST_FTDC_SPI_InvestorPwdModel = 'I' -THOST_FTDC_SPI_CFFEXInvestorSettleFile = 'F' -THOST_FTDC_SPI_InvestorIDType = 'a' -THOST_FTDC_SPI_FreezeMaxReMain = 'r' -THOST_FTDC_SPI_IsSync = 'A' -THOST_FTDC_SPI_RelieveOpenLimit = 'O' -THOST_FTDC_SPI_IsStandardFreeze = 'X' -THOST_FTDC_SPI_CZCENormalProductHedge = 'B' -THOST_FTDC_TPID_EncryptionStandard = 'E' -THOST_FTDC_TPID_RiskMode = 'R' -THOST_FTDC_TPID_RiskModeGlobal = 'G' -THOST_FTDC_TPID_modeEncode = 'P' -THOST_FTDC_TPID_tickMode = 'T' -THOST_FTDC_TPID_SingleUserSessionMaxNum = 'S' -THOST_FTDC_TPID_LoginFailMaxNum = 'L' -THOST_FTDC_TPID_IsAuthForce = 'A' -THOST_FTDC_TPID_IsPosiFreeze = 'F' -THOST_FTDC_TPID_IsPosiLimit = 'M' -THOST_FTDC_TPID_ForQuoteTimeInterval = 'Q' -THOST_FTDC_TPID_IsFuturePosiLimit = 'B' -THOST_FTDC_TPID_IsFutureOrderFreq = 'C' -THOST_FTDC_TPID_IsOrderTypeLimit = 'D' -THOST_FTDC_TPID_IsCheckBankAcc = 'I' -THOST_FTDC_TPID_IsExecOrderProfit = 'H' -THOST_FTDC_TPID_PasswordDeadLine = 'J' -THOST_FTDC_TPID_IsStrongPassword = 'K' -THOST_FTDC_TPID_IsSmsCode = 'N' -THOST_FTDC_TPID_BalanceMorgage = 'a' -THOST_FTDC_TPID_MinPwdLen = 'O' -THOST_FTDC_TPID_LoginFailMaxNumForIP = 'U' -THOST_FTDC_TPID_PasswordPeriod = 'V' -THOST_FTDC_FI_SettlementFund = 'F' -THOST_FTDC_FI_Trade = 'T' -THOST_FTDC_FI_InvestorPosition = 'P' -THOST_FTDC_FI_SubEntryFund = 'O' -THOST_FTDC_FI_CZCECombinationPos = 'C' -THOST_FTDC_FI_CSRCData = 'R' -THOST_FTDC_FI_CZCEClose = 'L' -THOST_FTDC_FI_CZCENoClose = 'N' -THOST_FTDC_FI_PositionDtl = 'D' -THOST_FTDC_FI_OptionStrike = 'S' -THOST_FTDC_FI_SettlementPriceComparison = 'M' -THOST_FTDC_FI_NonTradePosChange = 'B' -THOST_FTDC_FUT_Settlement = '0' -THOST_FTDC_FUT_Check = '1' -THOST_FTDC_FFT_Txt = '0' -THOST_FTDC_FFT_Zip = '1' -THOST_FTDC_FFT_DBF = '2' -THOST_FTDC_FUS_SucceedUpload = '1' -THOST_FTDC_FUS_FailedUpload = '2' -THOST_FTDC_FUS_SucceedLoad = '3' -THOST_FTDC_FUS_PartSucceedLoad = '4' -THOST_FTDC_FUS_FailedLoad = '5' -THOST_FTDC_TD_Out = '0' -THOST_FTDC_TD_In = '1' -THOST_FTDC_SC_NoSpecialRule = '0' -THOST_FTDC_SC_NoSpringFestival = '1' -THOST_FTDC_IPT_LastSettlement = '1' -THOST_FTDC_IPT_LaseClose = '2' -THOST_FTDC_PLP_Active = '1' -THOST_FTDC_PLP_NonActive = '2' -THOST_FTDC_PLP_Canceled = '3' -THOST_FTDC_DM_CashDeliv = '1' -THOST_FTDC_DM_CommodityDeliv = '2' -THOST_FTDC_FIOT_FundIO = '1' -THOST_FTDC_FIOT_Transfer = '2' -THOST_FTDC_FIOT_SwapCurrency = '3' -THOST_FTDC_FT_Deposite = '1' -THOST_FTDC_FT_ItemFund = '2' -THOST_FTDC_FT_Company = '3' -THOST_FTDC_FT_InnerTransfer = '4' -THOST_FTDC_FD_In = '1' -THOST_FTDC_FD_Out = '2' -THOST_FTDC_FS_Record = '1' -THOST_FTDC_FS_Check = '2' -THOST_FTDC_FS_Charge = '3' -THOST_FTDC_PS_None = '1' -THOST_FTDC_PS_Publishing = '2' -THOST_FTDC_PS_Published = '3' -THOST_FTDC_ES_NonActive = '1' -THOST_FTDC_ES_Startup = '2' -THOST_FTDC_ES_Initialize = '3' -THOST_FTDC_ES_Initialized = '4' -THOST_FTDC_ES_Close = '5' -THOST_FTDC_ES_Closed = '6' -THOST_FTDC_ES_Settlement = '7' -THOST_FTDC_STS_Initialize = '0' -THOST_FTDC_STS_Settlementing = '1' -THOST_FTDC_STS_Settlemented = '2' -THOST_FTDC_STS_Finished = '3' -THOST_FTDC_CT_Person = '0' -THOST_FTDC_CT_Company = '1' -THOST_FTDC_CT_Fund = '2' -THOST_FTDC_CT_SpecialOrgan = '3' -THOST_FTDC_CT_Asset = '4' -THOST_FTDC_BT_Trade = '0' -THOST_FTDC_BT_TradeSettle = '1' -THOST_FTDC_FAS_Low = '1' -THOST_FTDC_FAS_Normal = '2' -THOST_FTDC_FAS_Focus = '3' -THOST_FTDC_FAS_Risk = '4' -THOST_FTDC_FAS_ByTrade = '1' -THOST_FTDC_FAS_ByDeliv = '2' -THOST_FTDC_FAS_None = '3' -THOST_FTDC_FAS_FixFee = '4' -THOST_FTDC_PWDT_Trade = '1' -THOST_FTDC_PWDT_Account = '2' -THOST_FTDC_AG_All = '1' -THOST_FTDC_AG_OnlyLost = '2' -THOST_FTDC_AG_OnlyGain = '3' -THOST_FTDC_AG_None = '4' -THOST_FTDC_ICP_Include = '0' -THOST_FTDC_ICP_NotInclude = '2' -THOST_FTDC_AWT_Enable = '0' -THOST_FTDC_AWT_Disable = '2' -THOST_FTDC_AWT_NoHoldEnable = '3' -THOST_FTDC_FPWD_UnCheck = '0' -THOST_FTDC_FPWD_Check = '1' -THOST_FTDC_TT_BankToFuture = '0' -THOST_FTDC_TT_FutureToBank = '1' -THOST_FTDC_TVF_Invalid = '0' -THOST_FTDC_TVF_Valid = '1' -THOST_FTDC_TVF_Reverse = '2' -THOST_FTDC_BC_BankFu = '0' -THOST_FTDC_BC_BankSe = '1' -THOST_FTDC_RN_CD = '0' -THOST_FTDC_RN_ZT = '1' -THOST_FTDC_RN_QT = '2' -THOST_FTDC_SEX_None = '0' -THOST_FTDC_SEX_Man = '1' -THOST_FTDC_SEX_Woman = '2' -THOST_FTDC_UT_Investor = '0' -THOST_FTDC_UT_Operator = '1' -THOST_FTDC_UT_SuperUser = '2' -THOST_FTDC_RATETYPE_MarginRate = '2' -THOST_FTDC_NOTETYPE_TradeSettleBill = '1' -THOST_FTDC_NOTETYPE_TradeSettleMonth = '2' -THOST_FTDC_NOTETYPE_CallMarginNotes = '3' -THOST_FTDC_NOTETYPE_ForceCloseNotes = '4' -THOST_FTDC_NOTETYPE_TradeNotes = '5' -THOST_FTDC_NOTETYPE_DelivNotes = '6' -THOST_FTDC_SBS_Day = '1' -THOST_FTDC_SBS_Volume = '2' -THOST_FTDC_ST_Day = '0' -THOST_FTDC_ST_Month = '1' -THOST_FTDC_URT_Logon = '1' -THOST_FTDC_URT_Transfer = '2' -THOST_FTDC_URT_EMail = '3' -THOST_FTDC_URT_Fax = '4' -THOST_FTDC_URT_ConditionOrder = '5' -THOST_FTDC_MPT_PreSettlementPrice = '1' -THOST_FTDC_MPT_SettlementPrice = '2' -THOST_FTDC_MPT_AveragePrice = '3' -THOST_FTDC_MPT_OpenPrice = '4' -THOST_FTDC_BGS_None = '0' -THOST_FTDC_BGS_NoGenerated = '1' -THOST_FTDC_BGS_Generated = '2' -THOST_FTDC_AT_HandlePositionAlgo = '1' -THOST_FTDC_AT_FindMarginRateAlgo = '2' -THOST_FTDC_HPA_Base = '1' -THOST_FTDC_HPA_DCE = '2' -THOST_FTDC_HPA_CZCE = '3' -THOST_FTDC_FMRA_Base = '1' -THOST_FTDC_FMRA_DCE = '2' -THOST_FTDC_FMRA_CZCE = '3' -THOST_FTDC_HTAA_Base = '1' -THOST_FTDC_HTAA_DCE = '2' -THOST_FTDC_HTAA_CZCE = '3' -THOST_FTDC_PST_Order = '1' -THOST_FTDC_PST_Open = '2' -THOST_FTDC_PST_Fund = '3' -THOST_FTDC_PST_Settlement = '4' -THOST_FTDC_PST_Company = '5' -THOST_FTDC_PST_Corporation = '6' -THOST_FTDC_PST_LinkMan = '7' -THOST_FTDC_PST_Ledger = '8' -THOST_FTDC_PST_Trustee = '9' -THOST_FTDC_PST_TrusteeCorporation = 'A' -THOST_FTDC_PST_TrusteeOpen = 'B' -THOST_FTDC_PST_TrusteeContact = 'C' -THOST_FTDC_PST_ForeignerRefer = 'D' -THOST_FTDC_PST_CorporationRefer = 'E' -THOST_FTDC_QIR_All = '1' -THOST_FTDC_QIR_Group = '2' -THOST_FTDC_QIR_Single = '3' -THOST_FTDC_IRS_Normal = '1' -THOST_FTDC_IRS_Warn = '2' -THOST_FTDC_IRS_Call = '3' -THOST_FTDC_IRS_Force = '4' -THOST_FTDC_IRS_Exception = '5' -THOST_FTDC_UET_Login = '1' -THOST_FTDC_UET_Logout = '2' -THOST_FTDC_UET_Trading = '3' -THOST_FTDC_UET_TradingError = '4' -THOST_FTDC_UET_UpdatePassword = '5' -THOST_FTDC_UET_Authenticate = '6' -THOST_FTDC_UET_SmsCode = '7' -THOST_FTDC_UET_Other = '9' -THOST_FTDC_ICS_Close = '0' -THOST_FTDC_ICS_CloseToday = '1' -THOST_FTDC_SM_Non = '0' -THOST_FTDC_SM_Instrument = '1' -THOST_FTDC_SM_Product = '2' -THOST_FTDC_SM_Investor = '3' -THOST_FTDC_PAOS_NotSend = '1' -THOST_FTDC_PAOS_Send = '2' -THOST_FTDC_PAOS_Deleted = '3' -THOST_FTDC_VDS_Dealing = '1' -THOST_FTDC_VDS_DeaclSucceed = '2' -THOST_FTDC_ORGS_Standard = '0' -THOST_FTDC_ORGS_ESunny = '1' -THOST_FTDC_ORGS_KingStarV6 = '2' -THOST_FTDC_VTS_NaturalDeal = '0' -THOST_FTDC_VTS_SucceedEnd = '1' -THOST_FTDC_VTS_FailedEND = '2' -THOST_FTDC_VTS_Exception = '3' -THOST_FTDC_VTS_ManualDeal = '4' -THOST_FTDC_VTS_MesException = '5' -THOST_FTDC_VTS_SysException = '6' -THOST_FTDC_VBAT_BankBook = '1' -THOST_FTDC_VBAT_BankCard = '2' -THOST_FTDC_VBAT_CreditCard = '3' -THOST_FTDC_VMS_Natural = '0' -THOST_FTDC_VMS_Canceled = '9' -THOST_FTDC_VAA_NoAvailAbility = '0' -THOST_FTDC_VAA_AvailAbility = '1' -THOST_FTDC_VAA_Repeal = '2' -THOST_FTDC_VTC_BankBankToFuture = '102001' -THOST_FTDC_VTC_BankFutureToBank = '102002' -THOST_FTDC_VTC_FutureBankToFuture = '202001' -THOST_FTDC_VTC_FutureFutureToBank = '202002' -THOST_FTDC_GEN_Program = '0' -THOST_FTDC_GEN_HandWork = '1' -THOST_FTDC_CFMMCKK_REQUEST = 'R' -THOST_FTDC_CFMMCKK_AUTO = 'A' -THOST_FTDC_CFMMCKK_MANUAL = 'M' -THOST_FTDC_CFT_IDCard = '0' -THOST_FTDC_CFT_Passport = '1' -THOST_FTDC_CFT_OfficerIDCard = '2' -THOST_FTDC_CFT_SoldierIDCard = '3' -THOST_FTDC_CFT_HomeComingCard = '4' -THOST_FTDC_CFT_HouseholdRegister = '5' -THOST_FTDC_CFT_LicenseNo = '6' -THOST_FTDC_CFT_InstitutionCodeCard = '7' -THOST_FTDC_CFT_TempLicenseNo = '8' -THOST_FTDC_CFT_NoEnterpriseLicenseNo = '9' -THOST_FTDC_CFT_OtherCard = 'x' -THOST_FTDC_CFT_SuperDepAgree = 'a' -THOST_FTDC_FBC_Others = '0' -THOST_FTDC_FBC_TransferDetails = '1' -THOST_FTDC_FBC_CustAccStatus = '2' -THOST_FTDC_FBC_AccountTradeDetails = '3' -THOST_FTDC_FBC_FutureAccountChangeInfoDetails = '4' -THOST_FTDC_FBC_CustMoneyDetail = '5' -THOST_FTDC_FBC_CustCancelAccountInfo = '6' -THOST_FTDC_FBC_CustMoneyResult = '7' -THOST_FTDC_FBC_OthersExceptionResult = '8' -THOST_FTDC_FBC_CustInterestNetMoneyDetails = '9' -THOST_FTDC_FBC_CustMoneySendAndReceiveDetails = 'a' -THOST_FTDC_FBC_CorporationMoneyTotal = 'b' -THOST_FTDC_FBC_MainbodyMoneyTotal = 'c' -THOST_FTDC_FBC_MainPartMonitorData = 'd' -THOST_FTDC_FBC_PreparationMoney = 'e' -THOST_FTDC_FBC_BankMoneyMonitorData = 'f' -THOST_FTDC_CEC_Exchange = '1' -THOST_FTDC_CEC_Cash = '2' -THOST_FTDC_YNI_Yes = '0' -THOST_FTDC_YNI_No = '1' -THOST_FTDC_BLT_CurrentMoney = '0' -THOST_FTDC_BLT_UsableMoney = '1' -THOST_FTDC_BLT_FetchableMoney = '2' -THOST_FTDC_BLT_FreezeMoney = '3' -THOST_FTDC_GD_Unknown = '0' -THOST_FTDC_GD_Male = '1' -THOST_FTDC_GD_Female = '2' -THOST_FTDC_FPF_BEN = '0' -THOST_FTDC_FPF_OUR = '1' -THOST_FTDC_FPF_SHA = '2' -THOST_FTDC_PWKT_ExchangeKey = '0' -THOST_FTDC_PWKT_PassWordKey = '1' -THOST_FTDC_PWKT_MACKey = '2' -THOST_FTDC_PWKT_MessageKey = '3' -THOST_FTDC_PWT_Query = '0' -THOST_FTDC_PWT_Fetch = '1' -THOST_FTDC_PWT_Transfer = '2' -THOST_FTDC_PWT_Trade = '3' -THOST_FTDC_EM_NoEncry = '0' -THOST_FTDC_EM_DES = '1' -THOST_FTDC_EM_3DES = '2' -THOST_FTDC_BRF_BankNotNeedRepeal = '0' -THOST_FTDC_BRF_BankWaitingRepeal = '1' -THOST_FTDC_BRF_BankBeenRepealed = '2' -THOST_FTDC_BRORF_BrokerNotNeedRepeal = '0' -THOST_FTDC_BRORF_BrokerWaitingRepeal = '1' -THOST_FTDC_BRORF_BrokerBeenRepealed = '2' -THOST_FTDC_TS_Bank = '0' -THOST_FTDC_TS_Future = '1' -THOST_FTDC_TS_Store = '2' -THOST_FTDC_LF_Yes = '0' -THOST_FTDC_LF_No = '1' -THOST_FTDC_BAS_Normal = '0' -THOST_FTDC_BAS_Freeze = '1' -THOST_FTDC_BAS_ReportLoss = '2' -THOST_FTDC_MAS_Normal = '0' -THOST_FTDC_MAS_Cancel = '1' -THOST_FTDC_MSS_Point = '0' -THOST_FTDC_MSS_PrePoint = '1' -THOST_FTDC_MSS_CancelPoint = '2' -THOST_FTDC_SYT_FutureBankTransfer = '0' -THOST_FTDC_SYT_StockBankTransfer = '1' -THOST_FTDC_SYT_TheThirdPartStore = '2' -THOST_FTDC_TEF_NormalProcessing = '0' -THOST_FTDC_TEF_Success = '1' -THOST_FTDC_TEF_Failed = '2' -THOST_FTDC_TEF_Abnormal = '3' -THOST_FTDC_TEF_ManualProcessedForException = '4' -THOST_FTDC_TEF_CommuFailedNeedManualProcess = '5' -THOST_FTDC_TEF_SysErrorNeedManualProcess = '6' -THOST_FTDC_PSS_NotProcess = '0' -THOST_FTDC_PSS_StartProcess = '1' -THOST_FTDC_PSS_Finished = '2' -THOST_FTDC_CUSTT_Person = '0' -THOST_FTDC_CUSTT_Institution = '1' -THOST_FTDC_FBTTD_FromBankToFuture = '1' -THOST_FTDC_FBTTD_FromFutureToBank = '2' -THOST_FTDC_OOD_Open = '1' -THOST_FTDC_OOD_Destroy = '0' -THOST_FTDC_OOD_ReserveOpen = '2' -THOST_FTDC_OOD_ForceClose = '5' -THOST_FTDC_AVAF_Invalid = '0' -THOST_FTDC_AVAF_Valid = '1' -THOST_FTDC_AVAF_Repeal = '2' -THOST_FTDC_OT_Bank = '1' -THOST_FTDC_OT_Future = '2' -THOST_FTDC_OT_PlateForm = '9' -THOST_FTDC_OL_HeadQuarters = '1' -THOST_FTDC_OL_Branch = '2' -THOST_FTDC_PID_FutureProtocal = '0' -THOST_FTDC_PID_ICBCProtocal = '1' -THOST_FTDC_PID_ABCProtocal = '2' -THOST_FTDC_PID_CBCProtocal = '3' -THOST_FTDC_PID_CCBProtocal = '4' -THOST_FTDC_PID_BOCOMProtocal = '5' -THOST_FTDC_PID_FBTPlateFormProtocal = 'X' -THOST_FTDC_CM_ShortConnect = '0' -THOST_FTDC_CM_LongConnect = '1' -THOST_FTDC_SRM_ASync = '0' -THOST_FTDC_SRM_Sync = '1' -THOST_FTDC_BAT_BankBook = '1' -THOST_FTDC_BAT_SavingCard = '2' -THOST_FTDC_BAT_CreditCard = '3' -THOST_FTDC_FAT_BankBook = '1' -THOST_FTDC_FAT_SavingCard = '2' -THOST_FTDC_FAT_CreditCard = '3' -THOST_FTDC_OS_Ready = '0' -THOST_FTDC_OS_CheckIn = '1' -THOST_FTDC_OS_CheckOut = '2' -THOST_FTDC_OS_CheckFileArrived = '3' -THOST_FTDC_OS_CheckDetail = '4' -THOST_FTDC_OS_DayEndClean = '5' -THOST_FTDC_OS_CheckFileReady = '6' -THOST_FTDC_OS_TotalFileArrived = '7' -THOST_FTDC_OS_Invalid = '9' -THOST_FTDC_CCBFM_ByAmount = '1' -THOST_FTDC_CCBFM_ByMonth = '2' -THOST_FTDC_CAPIT_Client = '1' -THOST_FTDC_CAPIT_Server = '2' -THOST_FTDC_CAPIT_UserApi = '3' -THOST_FTDC_LS_Connected = '1' -THOST_FTDC_LS_Disconnected = '2' -THOST_FTDC_BPWDF_NoCheck = '0' -THOST_FTDC_BPWDF_BlankCheck = '1' -THOST_FTDC_BPWDF_EncryptCheck = '2' -THOST_FTDC_SAT_AccountID = '1' -THOST_FTDC_SAT_CardID = '2' -THOST_FTDC_SAT_SHStockholderID = '3' -THOST_FTDC_SAT_SZStockholderID = '4' -THOST_FTDC_TRFS_Normal = '0' -THOST_FTDC_TRFS_Repealed = '1' -THOST_FTDC_SPTYPE_Broker = '0' -THOST_FTDC_SPTYPE_Bank = '1' -THOST_FTDC_REQRSP_Request = '0' -THOST_FTDC_REQRSP_Response = '1' -THOST_FTDC_FBTUET_SignIn = '0' -THOST_FTDC_FBTUET_FromBankToFuture = '1' -THOST_FTDC_FBTUET_FromFutureToBank = '2' -THOST_FTDC_FBTUET_OpenAccount = '3' -THOST_FTDC_FBTUET_CancelAccount = '4' -THOST_FTDC_FBTUET_ChangeAccount = '5' -THOST_FTDC_FBTUET_RepealFromBankToFuture = '6' -THOST_FTDC_FBTUET_RepealFromFutureToBank = '7' -THOST_FTDC_FBTUET_QueryBankAccount = '8' -THOST_FTDC_FBTUET_QueryFutureAccount = '9' -THOST_FTDC_FBTUET_SignOut = 'A' -THOST_FTDC_FBTUET_SyncKey = 'B' -THOST_FTDC_FBTUET_ReserveOpenAccount = 'C' -THOST_FTDC_FBTUET_ReserveOpenAccountConfirm = 'D' -THOST_FTDC_FBTUET_SecuritiesDepositInterest = 'E' -THOST_FTDC_FBTUET_DayEndFileReady = 'F' -THOST_FTDC_FBTUET_Other = 'Z' -THOST_FTDC_DBOP_Insert = '0' -THOST_FTDC_DBOP_Update = '1' -THOST_FTDC_DBOP_Delete = '2' -THOST_FTDC_SYNF_Yes = '0' -THOST_FTDC_SYNF_No = '1' -THOST_FTDC_SYNT_OneOffSync = '0' -THOST_FTDC_SYNT_TimerSync = '1' -THOST_FTDC_SYNT_TimerFullSync = '2' -THOST_FTDC_FBEDIR_Settlement = '0' -THOST_FTDC_FBEDIR_Sale = '1' -THOST_FTDC_FBERES_Success = '0' -THOST_FTDC_FBERES_InsufficientBalance = '1' -THOST_FTDC_FBERES_UnknownTrading = '8' -THOST_FTDC_FBERES_Fail = 'x' -THOST_FTDC_FBEES_Normal = '0' -THOST_FTDC_FBEES_ReExchange = '1' -THOST_FTDC_FBEFG_DataPackage = '0' -THOST_FTDC_FBEFG_File = '1' -THOST_FTDC_FBEAT_NotTrade = '0' -THOST_FTDC_FBEAT_Trade = '1' -THOST_FTDC_FBEUET_SignIn = '0' -THOST_FTDC_FBEUET_Exchange = '1' -THOST_FTDC_FBEUET_ReExchange = '2' -THOST_FTDC_FBEUET_QueryBankAccount = '3' -THOST_FTDC_FBEUET_QueryExchDetial = '4' -THOST_FTDC_FBEUET_QueryExchSummary = '5' -THOST_FTDC_FBEUET_QueryExchRate = '6' -THOST_FTDC_FBEUET_CheckBankAccount = '7' -THOST_FTDC_FBEUET_SignOut = '8' -THOST_FTDC_FBEUET_Other = 'Z' -THOST_FTDC_FBERF_UnProcessed = '0' -THOST_FTDC_FBERF_WaitSend = '1' -THOST_FTDC_FBERF_SendSuccess = '2' -THOST_FTDC_FBERF_SendFailed = '3' -THOST_FTDC_FBERF_WaitReSend = '4' -THOST_FTDC_NC_NOERROR = '0' -THOST_FTDC_NC_Warn = '1' -THOST_FTDC_NC_Call = '2' -THOST_FTDC_NC_Force = '3' -THOST_FTDC_NC_CHUANCANG = '4' -THOST_FTDC_NC_Exception = '5' -THOST_FTDC_FCT_Manual = '0' -THOST_FTDC_FCT_Single = '1' -THOST_FTDC_FCT_Group = '2' -THOST_FTDC_RNM_System = '0' -THOST_FTDC_RNM_SMS = '1' -THOST_FTDC_RNM_EMail = '2' -THOST_FTDC_RNM_Manual = '3' -THOST_FTDC_RNS_NotGen = '0' -THOST_FTDC_RNS_Generated = '1' -THOST_FTDC_RNS_SendError = '2' -THOST_FTDC_RNS_SendOk = '3' -THOST_FTDC_RNS_Received = '4' -THOST_FTDC_RNS_Confirmed = '5' -THOST_FTDC_RUE_ExportData = '0' -THOST_FTDC_COST_LastPriceAsc = '0' -THOST_FTDC_COST_LastPriceDesc = '1' -THOST_FTDC_COST_AskPriceAsc = '2' -THOST_FTDC_COST_AskPriceDesc = '3' -THOST_FTDC_COST_BidPriceAsc = '4' -THOST_FTDC_COST_BidPriceDesc = '5' -THOST_FTDC_UOAST_NoSend = '0' -THOST_FTDC_UOAST_Sended = '1' -THOST_FTDC_UOAST_Generated = '2' -THOST_FTDC_UOAST_SendFail = '3' -THOST_FTDC_UOAST_Success = '4' -THOST_FTDC_UOAST_Fail = '5' -THOST_FTDC_UOAST_Cancel = '6' -THOST_FTDC_UOACS_NoApply = '1' -THOST_FTDC_UOACS_Submited = '2' -THOST_FTDC_UOACS_Sended = '3' -THOST_FTDC_UOACS_Success = '4' -THOST_FTDC_UOACS_Refuse = '5' -THOST_FTDC_UOACS_Cancel = '6' -THOST_FTDC_QT_Radio = '1' -THOST_FTDC_QT_Option = '2' -THOST_FTDC_QT_Blank = '3' -THOST_FTDC_BT_Request = '1' -THOST_FTDC_BT_Response = '2' -THOST_FTDC_BT_Notice = '3' -THOST_FTDC_CRC_Success = '0' -THOST_FTDC_CRC_Working = '1' -THOST_FTDC_CRC_InfoFail = '2' -THOST_FTDC_CRC_IDCardFail = '3' -THOST_FTDC_CRC_OtherFail = '4' -THOST_FTDC_CfMMCCT_All = '0' -THOST_FTDC_CfMMCCT_Person = '1' -THOST_FTDC_CfMMCCT_Company = '2' -THOST_FTDC_CfMMCCT_Other = '3' -THOST_FTDC_CfMMCCT_SpecialOrgan = '4' -THOST_FTDC_CfMMCCT_Asset = '5' -THOST_FTDC_EIDT_SHFE = 'S' -THOST_FTDC_EIDT_CZCE = 'Z' -THOST_FTDC_EIDT_DCE = 'D' -THOST_FTDC_EIDT_CFFEX = 'J' -THOST_FTDC_EIDT_INE = 'N' -THOST_FTDC_EIDT_SSE = 'A' -THOST_FTDC_EIDT_SZSE = 'E' -THOST_FTDC_ECIDT_Hedge = '1' -THOST_FTDC_ECIDT_Arbitrage = '2' -THOST_FTDC_ECIDT_Speculation = '3' -THOST_FTDC_UF_NoUpdate = '0' -THOST_FTDC_UF_Success = '1' -THOST_FTDC_UF_Fail = '2' -THOST_FTDC_UF_TCSuccess = '3' -THOST_FTDC_UF_TCFail = '4' -THOST_FTDC_UF_Cancel = '5' -THOST_FTDC_AOID_OpenInvestor = '1' -THOST_FTDC_AOID_ModifyIDCard = '2' -THOST_FTDC_AOID_ModifyNoIDCard = '3' -THOST_FTDC_AOID_ApplyTradingCode = '4' -THOST_FTDC_AOID_CancelTradingCode = '5' -THOST_FTDC_AOID_CancelInvestor = '6' -THOST_FTDC_AOID_FreezeAccount = '8' -THOST_FTDC_AOID_ActiveFreezeAccount = '9' -THOST_FTDC_ASID_NoComplete = '1' -THOST_FTDC_ASID_Submited = '2' -THOST_FTDC_ASID_Checked = '3' -THOST_FTDC_ASID_Refused = '4' -THOST_FTDC_ASID_Deleted = '5' -THOST_FTDC_UOASM_ByAPI = '1' -THOST_FTDC_UOASM_ByFile = '2' -THOST_FTDC_EvM_ADD = '1' -THOST_FTDC_EvM_UPDATE = '2' -THOST_FTDC_EvM_DELETE = '3' -THOST_FTDC_EvM_CHECK = '4' -THOST_FTDC_EvM_COPY = '5' -THOST_FTDC_EvM_CANCEL = '6' -THOST_FTDC_EvM_Reverse = '7' -THOST_FTDC_UOAA_ASR = '1' -THOST_FTDC_UOAA_ASNR = '2' -THOST_FTDC_UOAA_NSAR = '3' -THOST_FTDC_UOAA_NSR = '4' -THOST_FTDC_EvM_InvestorGroupFlow = '1' -THOST_FTDC_EvM_InvestorRate = '2' -THOST_FTDC_EvM_InvestorCommRateModel = '3' -THOST_FTDC_CL_Zero = '0' -THOST_FTDC_CL_One = '1' -THOST_FTDC_CL_Two = '2' -THOST_FTDC_CHS_Init = '0' -THOST_FTDC_CHS_Checking = '1' -THOST_FTDC_CHS_Checked = '2' -THOST_FTDC_CHS_Refuse = '3' -THOST_FTDC_CHS_Cancel = '4' -THOST_FTDC_CHU_Unused = '0' -THOST_FTDC_CHU_Used = '1' -THOST_FTDC_CHU_Fail = '2' -THOST_FTDC_BAO_ByAccProperty = '0' -THOST_FTDC_BAO_ByFBTransfer = '1' -THOST_FTDC_MBTS_ByInstrument = '0' -THOST_FTDC_MBTS_ByDayInsPrc = '1' -THOST_FTDC_MBTS_ByDayIns = '2' -THOST_FTDC_FTC_BankLaunchBankToBroker = '102001' -THOST_FTDC_FTC_BrokerLaunchBankToBroker = '202001' -THOST_FTDC_FTC_BankLaunchBrokerToBank = '102002' -THOST_FTDC_FTC_BrokerLaunchBrokerToBank = '202002' -THOST_FTDC_OTP_NONE = '0' -THOST_FTDC_OTP_TOTP = '1' -THOST_FTDC_OTPS_Unused = '0' -THOST_FTDC_OTPS_Used = '1' -THOST_FTDC_OTPS_Disuse = '2' -THOST_FTDC_BUT_Investor = '1' -THOST_FTDC_BUT_BrokerUser = '2' -THOST_FTDC_FUTT_Commodity = '1' -THOST_FTDC_FUTT_Financial = '2' -THOST_FTDC_FET_Restriction = '0' -THOST_FTDC_FET_TodayRestriction = '1' -THOST_FTDC_FET_Transfer = '2' -THOST_FTDC_FET_Credit = '3' -THOST_FTDC_FET_InvestorWithdrawAlm = '4' -THOST_FTDC_FET_BankRestriction = '5' -THOST_FTDC_FET_Accountregister = '6' -THOST_FTDC_FET_ExchangeFundIO = '7' -THOST_FTDC_FET_InvestorFundIO = '8' -THOST_FTDC_AST_FBTransfer = '0' -THOST_FTDC_AST_ManualEntry = '1' -THOST_FTDC_CST_UnifyAccount = '0' -THOST_FTDC_CST_ManualEntry = '1' -THOST_FTDC_UR_All = '0' -THOST_FTDC_UR_Single = '1' -THOST_FTDC_BG_Investor = '2' -THOST_FTDC_BG_Group = '1' -THOST_FTDC_TSSM_Instrument = '1' -THOST_FTDC_TSSM_Product = '2' -THOST_FTDC_TSSM_Exchange = '3' -THOST_FTDC_ESM_Relative = '1' -THOST_FTDC_ESM_Typical = '2' -THOST_FTDC_RIR_All = '1' -THOST_FTDC_RIR_Model = '2' -THOST_FTDC_RIR_Single = '3' -THOST_FTDC_SDS_Initialize = '0' -THOST_FTDC_SDS_Settlementing = '1' -THOST_FTDC_SDS_Settlemented = '2' -THOST_FTDC_TSRC_NORMAL = '0' -THOST_FTDC_TSRC_QUERY = '1' -THOST_FTDC_FSM_Product = '1' -THOST_FTDC_FSM_Exchange = '2' -THOST_FTDC_FSM_All = '3' -THOST_FTDC_BIR_Property = '1' -THOST_FTDC_BIR_All = '2' -THOST_FTDC_PIR_All = '1' -THOST_FTDC_PIR_Property = '2' -THOST_FTDC_PIR_Single = '3' -THOST_FTDC_FIS_NoCreate = '0' -THOST_FTDC_FIS_Created = '1' -THOST_FTDC_FIS_Failed = '2' -THOST_FTDC_FGS_FileTransmit = '0' -THOST_FTDC_FGS_FileGen = '1' -THOST_FTDC_SoM_Add = '1' -THOST_FTDC_SoM_Update = '2' -THOST_FTDC_SoM_Delete = '3' -THOST_FTDC_SoM_Copy = '4' -THOST_FTDC_SoM_AcTive = '5' -THOST_FTDC_SoM_CanCel = '6' -THOST_FTDC_SoM_ReSet = '7' -THOST_FTDC_SoT_UpdatePassword = '0' -THOST_FTDC_SoT_UserDepartment = '1' -THOST_FTDC_SoT_RoleManager = '2' -THOST_FTDC_SoT_RoleFunction = '3' -THOST_FTDC_SoT_BaseParam = '4' -THOST_FTDC_SoT_SetUserID = '5' -THOST_FTDC_SoT_SetUserRole = '6' -THOST_FTDC_SoT_UserIpRestriction = '7' -THOST_FTDC_SoT_DepartmentManager = '8' -THOST_FTDC_SoT_DepartmentCopy = '9' -THOST_FTDC_SoT_Tradingcode = 'A' -THOST_FTDC_SoT_InvestorStatus = 'B' -THOST_FTDC_SoT_InvestorAuthority = 'C' -THOST_FTDC_SoT_PropertySet = 'D' -THOST_FTDC_SoT_ReSetInvestorPasswd = 'E' -THOST_FTDC_SoT_InvestorPersonalityInfo = 'F' -THOST_FTDC_CSRCQ_Current = '0' -THOST_FTDC_CSRCQ_History = '1' -THOST_FTDC_FRS_Normal = '1' -THOST_FTDC_FRS_Freeze = '0' -THOST_FTDC_STST_Standard = '0' -THOST_FTDC_STST_NonStandard = '1' -THOST_FTDC_RPT_Freeze = '1' -THOST_FTDC_RPT_FreezeActive = '2' -THOST_FTDC_RPT_OpenLimit = '3' -THOST_FTDC_RPT_RelieveOpenLimit = '4' -THOST_FTDC_AMLDS_Normal = '0' -THOST_FTDC_AMLDS_Deleted = '1' -THOST_FTDC_AMLCHS_Init = '0' -THOST_FTDC_AMLCHS_Checking = '1' -THOST_FTDC_AMLCHS_Checked = '2' -THOST_FTDC_AMLCHS_RefuseReport = '3' -THOST_FTDC_AMLDT_DrawDay = '0' -THOST_FTDC_AMLDT_TouchDay = '1' -THOST_FTDC_AMLCL_CheckLevel0 = '0' -THOST_FTDC_AMLCL_CheckLevel1 = '1' -THOST_FTDC_AMLCL_CheckLevel2 = '2' -THOST_FTDC_AMLCL_CheckLevel3 = '3' -THOST_FTDC_EFT_CSV = '0' -THOST_FTDC_EFT_EXCEL = '1' -THOST_FTDC_EFT_DBF = '2' -THOST_FTDC_SMT_Before = '1' -THOST_FTDC_SMT_Settlement = '2' -THOST_FTDC_SMT_After = '3' -THOST_FTDC_SMT_Settlemented = '4' -THOST_FTDC_SML_Must = '1' -THOST_FTDC_SML_Alarm = '2' -THOST_FTDC_SML_Prompt = '3' -THOST_FTDC_SML_Ignore = '4' -THOST_FTDC_SMG_Exhcange = '1' -THOST_FTDC_SMG_ASP = '2' -THOST_FTDC_SMG_CSRC = '3' -THOST_FTDC_LUT_Repeatable = '1' -THOST_FTDC_LUT_Unrepeatable = '2' -THOST_FTDC_DAR_Settle = '1' -THOST_FTDC_DAR_Exchange = '2' -THOST_FTDC_DAR_CSRC = '3' -THOST_FTDC_MGT_ExchMarginRate = '0' -THOST_FTDC_MGT_InstrMarginRate = '1' -THOST_FTDC_MGT_InstrMarginRateTrade = '2' -THOST_FTDC_ACT_Intraday = '1' -THOST_FTDC_ACT_Long = '2' -THOST_FTDC_MRT_Exchange = '1' -THOST_FTDC_MRT_Investor = '2' -THOST_FTDC_MRT_InvestorTrade = '3' -THOST_FTDC_BUS_UnBak = '0' -THOST_FTDC_BUS_BakUp = '1' -THOST_FTDC_BUS_BakUped = '2' -THOST_FTDC_BUS_BakFail = '3' -THOST_FTDC_SIS_UnInitialize = '0' -THOST_FTDC_SIS_Initialize = '1' -THOST_FTDC_SIS_Initialized = '2' -THOST_FTDC_SRS_NoCreate = '0' -THOST_FTDC_SRS_Create = '1' -THOST_FTDC_SRS_Created = '2' -THOST_FTDC_SRS_CreateFail = '3' -THOST_FTDC_SSS_UnSaveData = '0' -THOST_FTDC_SSS_SaveDatad = '1' -THOST_FTDC_SAS_UnArchived = '0' -THOST_FTDC_SAS_Archiving = '1' -THOST_FTDC_SAS_Archived = '2' -THOST_FTDC_SAS_ArchiveFail = '3' -THOST_FTDC_CTPT_Unkown = '0' -THOST_FTDC_CTPT_MainCenter = '1' -THOST_FTDC_CTPT_BackUp = '2' -THOST_FTDC_CDT_Normal = '0' -THOST_FTDC_CDT_SpecFirst = '1' -THOST_FTDC_MFUR_None = '0' -THOST_FTDC_MFUR_Margin = '1' -THOST_FTDC_MFUR_All = '2' -THOST_FTDC_SPT_CzceHedge = '1' -THOST_FTDC_SPT_IneForeignCurrency = '2' -THOST_FTDC_SPT_DceOpenClose = '3' -THOST_FTDC_FMT_Mortgage = '1' -THOST_FTDC_FMT_Redemption = '2' -THOST_FTDC_ASPI_BaseMargin = '1' -THOST_FTDC_ASPI_LowestInterest = '2' -THOST_FTDC_FMD_In = '1' -THOST_FTDC_FMD_Out = '2' -THOST_FTDC_BT_Profit = '0' -THOST_FTDC_BT_Loss = '1' -THOST_FTDC_BT_Other = 'Z' -THOST_FTDC_SST_Manual = '0' -THOST_FTDC_SST_Automatic = '1' -THOST_FTDC_CED_Settlement = '0' -THOST_FTDC_CED_Sale = '1' -THOST_FTDC_CSS_Entry = '1' -THOST_FTDC_CSS_Approve = '2' -THOST_FTDC_CSS_Refuse = '3' -THOST_FTDC_CSS_Revoke = '4' -THOST_FTDC_CSS_Send = '5' -THOST_FTDC_CSS_Success = '6' -THOST_FTDC_CSS_Failure = '7' -THOST_FTDC_REQF_NoSend = '0' -THOST_FTDC_REQF_SendSuccess = '1' -THOST_FTDC_REQF_SendFailed = '2' -THOST_FTDC_REQF_WaitReSend = '3' -THOST_FTDC_RESF_Success = '0' -THOST_FTDC_RESF_InsuffiCient = '1' -THOST_FTDC_RESF_UnKnown = '8' -THOST_FTDC_EXS_Before = '0' -THOST_FTDC_EXS_After = '1' -THOST_FTDC_CR_Domestic = '1' -THOST_FTDC_CR_GMT = '2' -THOST_FTDC_CR_Foreign = '3' -THOST_FTDC_HB_No = '0' -THOST_FTDC_HB_Yes = '1' -THOST_FTDC_SM_Normal = '1' -THOST_FTDC_SM_Emerge = '2' -THOST_FTDC_SM_Restore = '3' -THOST_FTDC_TPT_Full = '1' -THOST_FTDC_TPT_Increment = '2' -THOST_FTDC_TPT_BackUp = '3' -THOST_FTDC_LM_Trade = '0' -THOST_FTDC_LM_Transfer = '1' -THOST_FTDC_CPT_Instrument = '1' -THOST_FTDC_CPT_Margin = '2' -THOST_FTDC_HT_Yes = '1' -THOST_FTDC_HT_No = '0' -THOST_FTDC_AMT_Bank = '1' -THOST_FTDC_AMT_Securities = '2' -THOST_FTDC_AMT_Fund = '3' -THOST_FTDC_AMT_Insurance = '4' -THOST_FTDC_AMT_Trust = '5' -THOST_FTDC_AMT_Other = '9' -THOST_FTDC_CFIOT_FundIO = '0' -THOST_FTDC_CFIOT_SwapCurrency = '1' -THOST_FTDC_CAT_Futures = '1' -THOST_FTDC_CAT_AssetmgrFuture = '2' -THOST_FTDC_CAT_AssetmgrTrustee = '3' -THOST_FTDC_CAT_AssetmgrTransfer = '4' -THOST_FTDC_LT_Chinese = '1' -THOST_FTDC_LT_English = '2' -THOST_FTDC_AMCT_Person = '1' -THOST_FTDC_AMCT_Organ = '2' -THOST_FTDC_AMCT_SpecialOrgan = '4' -THOST_FTDC_ASST_Futures = '3' -THOST_FTDC_ASST_SpecialOrgan = '4' -THOST_FTDC_CIT_HasExch = '0' -THOST_FTDC_CIT_HasATP = '1' -THOST_FTDC_CIT_HasDiff = '2' -THOST_FTDC_DT_HandDeliv = '1' -THOST_FTDC_DT_PersonDeliv = '2' -THOST_FTDC_MMSA_NO = '0' -THOST_FTDC_MMSA_YES = '1' -THOST_FTDC_CACT_Person = '0' -THOST_FTDC_CACT_Company = '1' -THOST_FTDC_CACT_Other = '2' -THOST_FTDC_UOAAT_Futures = '1' -THOST_FTDC_UOAAT_SpecialOrgan = '2' -THOST_FTDC_DEN_Buy = '0' -THOST_FTDC_DEN_Sell = '1' -THOST_FTDC_OFEN_Open = '0' -THOST_FTDC_OFEN_Close = '1' -THOST_FTDC_OFEN_ForceClose = '2' -THOST_FTDC_OFEN_CloseToday = '3' -THOST_FTDC_OFEN_CloseYesterday = '4' -THOST_FTDC_OFEN_ForceOff = '5' -THOST_FTDC_OFEN_LocalForceClose = '6' -THOST_FTDC_HFEN_Speculation = '1' -THOST_FTDC_HFEN_Arbitrage = '2' -THOST_FTDC_HFEN_Hedge = '3' -THOST_FTDC_FIOTEN_FundIO = '1' -THOST_FTDC_FIOTEN_Transfer = '2' -THOST_FTDC_FIOTEN_SwapCurrency = '3' -THOST_FTDC_FTEN_Deposite = '1' -THOST_FTDC_FTEN_ItemFund = '2' -THOST_FTDC_FTEN_Company = '3' -THOST_FTDC_FTEN_InnerTransfer = '4' -THOST_FTDC_FDEN_In = '1' -THOST_FTDC_FDEN_Out = '2' -THOST_FTDC_FMDEN_In = '1' -THOST_FTDC_FMDEN_Out = '2' -THOST_FTDC_CP_CallOptions = '1' -THOST_FTDC_CP_PutOptions = '2' -THOST_FTDC_STM_Continental = '0' -THOST_FTDC_STM_American = '1' -THOST_FTDC_STM_Bermuda = '2' -THOST_FTDC_STT_Hedge = '0' -THOST_FTDC_STT_Match = '1' -THOST_FTDC_APPT_NotStrikeNum = '4' -THOST_FTDC_GUDS_Gen = '0' -THOST_FTDC_GUDS_Hand = '1' -THOST_FTDC_OER_NoExec = 'n' -THOST_FTDC_OER_Canceled = 'c' -THOST_FTDC_OER_OK = '0' -THOST_FTDC_OER_NoPosition = '1' -THOST_FTDC_OER_NoDeposit = '2' -THOST_FTDC_OER_NoParticipant = '3' -THOST_FTDC_OER_NoClient = '4' -THOST_FTDC_OER_NoInstrument = '6' -THOST_FTDC_OER_NoRight = '7' -THOST_FTDC_OER_InvalidVolume = '8' -THOST_FTDC_OER_NoEnoughHistoryTrade = '9' -THOST_FTDC_OER_Unknown = 'a' -THOST_FTDC_COMBT_Future = '0' -THOST_FTDC_COMBT_BUL = '1' -THOST_FTDC_COMBT_BER = '2' -THOST_FTDC_COMBT_STD = '3' -THOST_FTDC_COMBT_STG = '4' -THOST_FTDC_COMBT_PRT = '5' -THOST_FTDC_COMBT_CLD = '6' -THOST_FTDC_ORPT_PreSettlementPrice = '1' -THOST_FTDC_ORPT_OpenPrice = '4' -THOST_FTDC_ORPT_MaxPreSettlementPrice = '5' -THOST_FTDC_ORPT_MaxPreSettlementWithLastPrice = '7' -THOST_FTDC_ORPT_MaxPreSettlementWithMaxLastPrice = '9' -THOST_FTDC_BLAG_Default = '1' -THOST_FTDC_BLAG_IncludeOptValLost = '2' -THOST_FTDC_ACTP_Exec = '1' -THOST_FTDC_ACTP_Abandon = '2' -THOST_FTDC_FQST_Submitted = 'a' -THOST_FTDC_FQST_Accepted = 'b' -THOST_FTDC_FQST_Rejected = 'c' -THOST_FTDC_VM_Absolute = '0' -THOST_FTDC_VM_Ratio = '1' -THOST_FTDC_EOPF_Reserve = '0' -THOST_FTDC_EOPF_UnReserve = '1' -THOST_FTDC_EOCF_AutoClose = '0' -THOST_FTDC_EOCF_NotToClose = '1' -THOST_FTDC_PTE_Futures = '1' -THOST_FTDC_PTE_Options = '2' -THOST_FTDC_CUFN_CUFN_O = 'O' -THOST_FTDC_CUFN_CUFN_T = 'T' -THOST_FTDC_CUFN_CUFN_P = 'P' -THOST_FTDC_CUFN_CUFN_N = 'N' -THOST_FTDC_CUFN_CUFN_L = 'L' -THOST_FTDC_CUFN_CUFN_F = 'F' -THOST_FTDC_CUFN_CUFN_C = 'C' -THOST_FTDC_CUFN_CUFN_M = 'M' -THOST_FTDC_DUFN_DUFN_O = 'O' -THOST_FTDC_DUFN_DUFN_T = 'T' -THOST_FTDC_DUFN_DUFN_P = 'P' -THOST_FTDC_DUFN_DUFN_F = 'F' -THOST_FTDC_DUFN_DUFN_C = 'C' -THOST_FTDC_DUFN_DUFN_D = 'D' -THOST_FTDC_DUFN_DUFN_M = 'M' -THOST_FTDC_DUFN_DUFN_S = 'S' -THOST_FTDC_SUFN_SUFN_O = 'O' -THOST_FTDC_SUFN_SUFN_T = 'T' -THOST_FTDC_SUFN_SUFN_P = 'P' -THOST_FTDC_SUFN_SUFN_F = 'F' -THOST_FTDC_CFUFN_SUFN_T = 'T' -THOST_FTDC_CFUFN_SUFN_P = 'P' -THOST_FTDC_CFUFN_SUFN_F = 'F' -THOST_FTDC_CFUFN_SUFN_S = 'S' -THOST_FTDC_CMDR_Comb = '0' -THOST_FTDC_CMDR_UnComb = '1' -THOST_FTDC_LCKT_Lock = '1' -THOST_FTDC_LCKT_Unlock = '2' -THOST_FTDC_BZTP_Future = '1' -THOST_FTDC_BZTP_Stock = '2' -THOST_FTDC_DSTP_Register = '1' -THOST_FTDC_DSTP_Cancel = '2' -THOST_FTDC_FRTP_Init = '1' -THOST_FTDC_FRTP_Lock = '2' -THOST_FTDC_FRTP_Exec = '3' -THOST_FTDC_FRTP_Check = '4' -THOST_FTDC_FRTP_ExecFreeze = '5' -THOST_FTDC_FZTP_Freeze = '1' -THOST_FTDC_FZTP_Unfreeze = '2' -THOST_FTDC_FZTP_Force = '3' -THOST_FTDC_TSTP_Unknow = '0' -THOST_FTDC_TSTP_Future = '1' -THOST_FTDC_TSTP_IShare = '2' -THOST_FTDC_STPT_ToBroker = '1' -THOST_FTDC_STPT_ToInvestor = '2' -THOST_FTDC_SDPS_Submitted = 'a' -THOST_FTDC_SDPS_Accepted = 'b' -THOST_FTDC_SDPS_Rejected = 'c' -THOST_FTDC_SDPS_Cancelled = 'd' -THOST_FTDC_ISTR_Limit = '1' -THOST_FTDC_ISTR_Limit_FOK = '2' -THOST_FTDC_ISTR_Market_RemainLimit = '3' -THOST_FTDC_ISTR_Market_FAK = '4' -THOST_FTDC_ISTR_Market_FOK = '5' -THOST_FTDC_ISTR_Lock = '6' -THOST_FTDC_ISTR_Unlock = '7' -THOST_FTDC_IVLV_FirstLevel = '1' -THOST_FTDC_IVLV_SecondLevel = '2' -THOST_FTDC_IVLV_ThirdLevel = '3' -THOST_FTDC_STOV_RealValue = '1' -THOST_FTDC_STOV_ProfitValue = '2' -THOST_FTDC_STOV_RealRatio = '3' -THOST_FTDC_STOV_ProfitRatio = '4' -THOST_FTDC_SSCS_NotSend = '0' -THOST_FTDC_SSCS_SendSuccess = '1' -THOST_FTDC_SSCS_SendFail = '2' -THOST_FTDC_WPSR_Lib = '1' -THOST_FTDC_WPSR_Manual = '2' -THOST_FTDC_OSCF_CloseSelfOptionPosition = '1' -THOST_FTDC_OSCF_ReserveOptionPosition = '2' -THOST_FTDC_OSCF_SellCloseSelfFuturePosition = '3' -THOST_FTDC_APP_TYPE_Investor = '1' -THOST_FTDC_APP_TYPE_InvestorRelay = '2' -THOST_FTDC_APP_TYPE_OperatorRelay = '3' -THOST_FTDC_APP_TYPE_UnKnown = '4' -THOST_FTDC_ROAST_Processing = '0' -THOST_FTDC_ROAST_Cancelled = '1' -THOST_FTDC_ROAST_Opened = '2' -THOST_FTDC_ROAST_Invalid = '3' -THOST_FTDC_SITP_Unsettled = '0' -THOST_FTDC_SITP_Batch = '1' -THOST_FTDC_SITP_CancelAccount = '2' -THOST_FTDC_SITP_Other = '3' -THOST_FTDC_ISU_UnSuccess = '0' -THOST_FTDC_ISU_Success = '1' -THOST_FTDC_SFSPTYPE_Broker = '0' -THOST_FTDC_SFSPTYPE_Bank = '1' -THOST_FTDC_SFFBTTD_FromBankToFuture = '1' -THOST_FTDC_SFFBTTD_FromFutureToBank = '2' -THOST_FTDC_SFCRF_Cash = '0' -THOST_FTDC_SFCRF_Remit = '1' -THOST_FTDC_SFSTS_Normal = '0' -THOST_FTDC_SFSTS_Cancel = '1' -THOST_FTDC_SFBSF_Sell = '0' -THOST_FTDC_SFBSF_Buy = '1' -THOST_FTDC_SFICT_IDCard = '0' -THOST_FTDC_SFICT_Passport = '1' -THOST_FTDC_SFICT_LicenseNo = '2' -THOST_FTDC_SFICT_OfficerIDCard = '3' -THOST_FTDC_SFICT_SoldierIDCard = '4' -THOST_FTDC_SFICT_HMTMainlandTravelPermit = '5' -THOST_FTDC_SFICT_TmpIDCard = '6' -THOST_FTDC_SFICT_HouseholdRegister = '7' -THOST_FTDC_SFICT_PoliceIDCard = '8' -THOST_FTDC_SFICT_EID = '9' -THOST_FTDC_SFICT_Government = 'A' -THOST_FTDC_SFICT_SocialOrg = 'B' -THOST_FTDC_SFICT_Army = 'C' -THOST_FTDC_SFICT_ArmedPolice = 'D' -THOST_FTDC_SFICT_SubOrganization = 'E' -THOST_FTDC_SFICT_PermanantResidence = 'F' -THOST_FTDC_SFICT_BorderEntryPermit = 'G' -THOST_FTDC_SFMKID_SH = '0' -THOST_FTDC_SFMKID_SZ = '1' diff --git a/vnpy/api/sec/generator/Sec_md_header_define.h b/vnpy/api/sec/generator/Sec_md_header_define.h deleted file mode 100644 index 2660f33d..00000000 --- a/vnpy/api/sec/generator/Sec_md_header_define.h +++ /dev/null @@ -1,12 +0,0 @@ -#define ONFRONTCONNECTED 0 -#define ONFRONTDISCONNECTED 1 -#define ONHEARTBEATWARNING 2 -#define ONRSPUSERLOGIN 3 -#define ONRSPUSERLOGOUT 4 -#define ONRSPERROR 5 -#define ONRSPSUBMARKETDATA 6 -#define ONRSPUNSUBMARKETDATA 7 -#define ONRSPSUBFORQUOTERSP 8 -#define ONRSPUNSUBFORQUOTERSP 9 -#define ONRTNDEPTHMARKETDATA 10 -#define ONRTNFORQUOTERSP 11 diff --git a/vnpy/api/sec/generator/Sec_md_header_function.h b/vnpy/api/sec/generator/Sec_md_header_function.h deleted file mode 100644 index 482250f8..00000000 --- a/vnpy/api/sec/generator/Sec_md_header_function.h +++ /dev/null @@ -1,4 +0,0 @@ -int reqUserLogin(const dict &req, int reqid); - -int reqUserLogout(const dict &req, int reqid); - diff --git a/vnpy/api/sec/generator/Sec_md_header_on.h b/vnpy/api/sec/generator/Sec_md_header_on.h deleted file mode 100644 index c0dbe668..00000000 --- a/vnpy/api/sec/generator/Sec_md_header_on.h +++ /dev/null @@ -1,24 +0,0 @@ -virtual void onFrontConnected() {}; - -virtual void onFrontDisconnected(int reqid) {}; - -virtual void onHeartBeatWarning(int reqid) {}; - -virtual void onRspUserLogin(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspUserLogout(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspError(const dict &error, int reqid, bool last) {}; - -virtual void onRspSubMarketData(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspUnSubMarketData(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspUnSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRtnDepthMarketData(const dict &data) {}; - -virtual void onRtnForQuoteRsp(const dict &data) {}; - diff --git a/vnpy/api/sec/generator/Sec_md_header_process.h b/vnpy/api/sec/generator/Sec_md_header_process.h deleted file mode 100644 index f0142875..00000000 --- a/vnpy/api/sec/generator/Sec_md_header_process.h +++ /dev/null @@ -1,24 +0,0 @@ -void processFrontConnected(Task *task); - -void processFrontDisconnected(Task *task); - -void processHeartBeatWarning(Task *task); - -void processRspUserLogin(Task *task); - -void processRspUserLogout(Task *task); - -void processRspError(Task *task); - -void processRspSubMarketData(Task *task); - -void processRspUnSubMarketData(Task *task); - -void processRspSubForQuoteRsp(Task *task); - -void processRspUnSubForQuoteRsp(Task *task); - -void processRtnDepthMarketData(Task *task); - -void processRtnForQuoteRsp(Task *task); - diff --git a/vnpy/api/sec/generator/Sec_md_source_function.cpp b/vnpy/api/sec/generator/Sec_md_source_function.cpp deleted file mode 100644 index a2de4589..00000000 --- a/vnpy/api/sec/generator/Sec_md_source_function.cpp +++ /dev/null @@ -1,30 +0,0 @@ -int MdApi::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); - getInt(req, "ClientIPPort", &myreq.ClientIPPort); - int i = this->api->ReqUserLogin(&myreq, reqid); - return i; -}; - -int MdApi::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; -}; - diff --git a/vnpy/api/sec/generator/Sec_md_source_module.cpp b/vnpy/api/sec/generator/Sec_md_source_module.cpp deleted file mode 100644 index eed36147..00000000 --- a/vnpy/api/sec/generator/Sec_md_source_module.cpp +++ /dev/null @@ -1,16 +0,0 @@ -.def("reqUserLogin", &MdApi::reqUserLogin) -.def("reqUserLogout", &MdApi::reqUserLogout) - -.def("onFrontConnected", &MdApi::onFrontConnected) -.def("onFrontDisconnected", &MdApi::onFrontDisconnected) -.def("onHeartBeatWarning", &MdApi::onHeartBeatWarning) -.def("onRspUserLogin", &MdApi::onRspUserLogin) -.def("onRspUserLogout", &MdApi::onRspUserLogout) -.def("onRspError", &MdApi::onRspError) -.def("onRspSubMarketData", &MdApi::onRspSubMarketData) -.def("onRspUnSubMarketData", &MdApi::onRspUnSubMarketData) -.def("onRspSubForQuoteRsp", &MdApi::onRspSubForQuoteRsp) -.def("onRspUnSubForQuoteRsp", &MdApi::onRspUnSubForQuoteRsp) -.def("onRtnDepthMarketData", &MdApi::onRtnDepthMarketData) -.def("onRtnForQuoteRsp", &MdApi::onRtnForQuoteRsp) -; diff --git a/vnpy/api/sec/generator/Sec_md_source_on.cpp b/vnpy/api/sec/generator/Sec_md_source_on.cpp deleted file mode 100644 index b9185795..00000000 --- a/vnpy/api/sec/generator/Sec_md_source_on.cpp +++ /dev/null @@ -1,144 +0,0 @@ -void onFrontConnected() override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onFrontConnected); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onFrontDisconnected(int reqid) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onFrontDisconnected, reqid); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onHeartBeatWarning(int reqid) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onHeartBeatWarning, reqid); - } - 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, MdApi, 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, MdApi, onRspUserLogout, 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, MdApi, onRspError, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspSubMarketData(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onRspSubMarketData, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspUnSubMarketData(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onRspUnSubMarketData, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onRspSubForQuoteRsp, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspUnSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onRspUnSubForQuoteRsp, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRtnDepthMarketData(const dict &data) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onRtnDepthMarketData, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRtnForQuoteRsp(const dict &data) override -{ - try - { - PYBIND11_OVERLOAD(void, MdApi, onRtnForQuoteRsp, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - diff --git a/vnpy/api/sec/generator/Sec_md_source_process.cpp b/vnpy/api/sec/generator/Sec_md_source_process.cpp deleted file mode 100644 index bdf740a1..00000000 --- a/vnpy/api/sec/generator/Sec_md_source_process.cpp +++ /dev/null @@ -1,245 +0,0 @@ -void MdApi::processFrontConnected(Task *task) -{ - gil_scoped_acquire acquire; - this->onFrontConnected(); -}; - -void MdApi::processFrontDisconnected(Task *task) -{ - gil_scoped_acquire acquire; - this->onFrontDisconnected(task->task_id); -}; - -void MdApi::processHeartBeatWarning(Task *task) -{ - gil_scoped_acquire acquire; - this->onHeartBeatWarning(task->task_id); -}; - -void MdApi::processRspUserLogin(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspUserLoginField *task_data = (CThostFtdcRspUserLoginField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["LoginTime"] = toUtf(task_data->LoginTime); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - data["SystemName"] = toUtf(task_data->SystemName); - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["MaxOrderRef"] = toUtf(task_data->MaxOrderRef); - data["SHFETime"] = toUtf(task_data->SHFETime); - data["DCETime"] = toUtf(task_data->DCETime); - data["CZCETime"] = toUtf(task_data->CZCETime); - data["FFEXTime"] = toUtf(task_data->FFEXTime); - data["INETime"] = toUtf(task_data->INETime); - delete 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_error; - } - this->onRspUserLogin(data, error, task->task_id, task->task_last); -}; - -void MdApi::processRspUserLogout(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcUserLogoutField *task_data = (CThostFtdcUserLogoutField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - delete 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_error; - } - this->onRspUserLogout(data, error, task->task_id, task->task_last); -}; - -void MdApi::processRspError(Task *task) -{ - gil_scoped_acquire acquire; - 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_error; - } - this->onRspError(error, task->task_id, task->task_last); -}; - -void MdApi::processRspSubMarketData(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - delete 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_error; - } - this->onRspSubMarketData(data, error, task->task_id, task->task_last); -}; - -void MdApi::processRspUnSubMarketData(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - delete 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_error; - } - this->onRspUnSubMarketData(data, error, task->task_id, task->task_last); -}; - -void MdApi::processRspSubForQuoteRsp(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - delete 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_error; - } - this->onRspSubForQuoteRsp(data, error, task->task_id, task->task_last); -}; - -void MdApi::processRspUnSubForQuoteRsp(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - delete 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_error; - } - this->onRspUnSubForQuoteRsp(data, error, task->task_id, task->task_last); -}; - -void MdApi::processRtnDepthMarketData(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcDepthMarketDataField *task_data = (CThostFtdcDepthMarketDataField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["LastPrice"] = task_data->LastPrice; - data["PreSettlementPrice"] = task_data->PreSettlementPrice; - data["PreClosePrice"] = task_data->PreClosePrice; - data["PreOpenInterest"] = task_data->PreOpenInterest; - data["OpenPrice"] = task_data->OpenPrice; - data["HighestPrice"] = task_data->HighestPrice; - data["LowestPrice"] = task_data->LowestPrice; - data["Volume"] = task_data->Volume; - data["Turnover"] = task_data->Turnover; - data["OpenInterest"] = task_data->OpenInterest; - data["ClosePrice"] = task_data->ClosePrice; - data["SettlementPrice"] = task_data->SettlementPrice; - data["UpperLimitPrice"] = task_data->UpperLimitPrice; - data["LowerLimitPrice"] = task_data->LowerLimitPrice; - data["PreDelta"] = task_data->PreDelta; - data["CurrDelta"] = task_data->CurrDelta; - data["UpdateTime"] = toUtf(task_data->UpdateTime); - data["UpdateMillisec"] = task_data->UpdateMillisec; - data["BidPrice1"] = task_data->BidPrice1; - data["BidVolume1"] = task_data->BidVolume1; - data["AskPrice1"] = task_data->AskPrice1; - data["AskVolume1"] = task_data->AskVolume1; - data["BidPrice2"] = task_data->BidPrice2; - data["BidVolume2"] = task_data->BidVolume2; - data["AskPrice2"] = task_data->AskPrice2; - data["AskVolume2"] = task_data->AskVolume2; - data["BidPrice3"] = task_data->BidPrice3; - data["BidVolume3"] = task_data->BidVolume3; - data["AskPrice3"] = task_data->AskPrice3; - data["AskVolume3"] = task_data->AskVolume3; - data["BidPrice4"] = task_data->BidPrice4; - data["BidVolume4"] = task_data->BidVolume4; - data["AskPrice4"] = task_data->AskPrice4; - data["AskVolume4"] = task_data->AskVolume4; - data["BidPrice5"] = task_data->BidPrice5; - data["BidVolume5"] = task_data->BidVolume5; - data["AskPrice5"] = task_data->AskPrice5; - data["AskVolume5"] = task_data->AskVolume5; - data["AveragePrice"] = task_data->AveragePrice; - data["ActionDay"] = toUtf(task_data->ActionDay); - delete task_data; - } - this->onRtnDepthMarketData(data); -}; - -void MdApi::processRtnForQuoteRsp(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcForQuoteRspField *task_data = (CThostFtdcForQuoteRspField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID); - data["ForQuoteTime"] = toUtf(task_data->ForQuoteTime); - data["ActionDay"] = toUtf(task_data->ActionDay); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete task_data; - } - this->onRtnForQuoteRsp(data); -}; - diff --git a/vnpy/api/sec/generator/Sec_md_source_switch.cpp b/vnpy/api/sec/generator/Sec_md_source_switch.cpp deleted file mode 100644 index 4095ad46..00000000 --- a/vnpy/api/sec/generator/Sec_md_source_switch.cpp +++ /dev/null @@ -1,72 +0,0 @@ -case ONFRONTCONNECTED: -{ - this->processFrontConnected(&task); - break; -} - -case ONFRONTDISCONNECTED: -{ - this->processFrontDisconnected(&task); - break; -} - -case ONHEARTBEATWARNING: -{ - this->processHeartBeatWarning(&task); - break; -} - -case ONRSPUSERLOGIN: -{ - this->processRspUserLogin(&task); - break; -} - -case ONRSPUSERLOGOUT: -{ - this->processRspUserLogout(&task); - break; -} - -case ONRSPERROR: -{ - this->processRspError(&task); - break; -} - -case ONRSPSUBMARKETDATA: -{ - this->processRspSubMarketData(&task); - break; -} - -case ONRSPUNSUBMARKETDATA: -{ - this->processRspUnSubMarketData(&task); - break; -} - -case ONRSPSUBFORQUOTERSP: -{ - this->processRspSubForQuoteRsp(&task); - break; -} - -case ONRSPUNSUBFORQUOTERSP: -{ - this->processRspUnSubForQuoteRsp(&task); - break; -} - -case ONRTNDEPTHMARKETDATA: -{ - this->processRtnDepthMarketData(&task); - break; -} - -case ONRTNFORQUOTERSP: -{ - this->processRtnForQuoteRsp(&task); - break; -} - diff --git a/vnpy/api/sec/generator/Sec_md_source_task.cpp b/vnpy/api/sec/generator/Sec_md_source_task.cpp deleted file mode 100644 index 93287c1b..00000000 --- a/vnpy/api/sec/generator/Sec_md_source_task.cpp +++ /dev/null @@ -1,190 +0,0 @@ -void MdApi::OnFrontConnected() -{ - Task task = Task(); - task.task_name = ONFRONTCONNECTED; - this->task_queue.push(task); -}; - -void MdApi::OnFrontDisconnected(int nReason) -{ - Task task = Task(); - task.task_name = ONFRONTDISCONNECTED; - task.task_id = nReason; - this->task_queue.push(task); -}; - -void MdApi::OnHeartBeatWarning(int nTimeLapse) -{ - Task task = Task(); - task.task_name = ONHEARTBEATWARNING; - task.task_id = nTimeLapse; - this->task_queue.push(task); -}; - -void MdApi::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); -}; - -void MdApi::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); -}; - -void MdApi::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); -}; - -void MdApi::OnRspSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPSUBMARKETDATA; - if (pSpecificInstrument) - { - CThostFtdcSpecificInstrumentField *task_data = new CThostFtdcSpecificInstrumentField(); - *task_data = *pSpecificInstrument; - 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 MdApi::OnRspUnSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPUNSUBMARKETDATA; - if (pSpecificInstrument) - { - CThostFtdcSpecificInstrumentField *task_data = new CThostFtdcSpecificInstrumentField(); - *task_data = *pSpecificInstrument; - 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 MdApi::OnRspSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPSUBFORQUOTERSP; - if (pSpecificInstrument) - { - CThostFtdcSpecificInstrumentField *task_data = new CThostFtdcSpecificInstrumentField(); - *task_data = *pSpecificInstrument; - 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 MdApi::OnRspUnSubForQuoteRsp(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPUNSUBFORQUOTERSP; - if (pSpecificInstrument) - { - CThostFtdcSpecificInstrumentField *task_data = new CThostFtdcSpecificInstrumentField(); - *task_data = *pSpecificInstrument; - 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 MdApi::OnRtnDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData) -{ - Task task = Task(); - task.task_name = ONRTNDEPTHMARKETDATA; - if (pDepthMarketData) - { - CThostFtdcDepthMarketDataField *task_data = new CThostFtdcDepthMarketDataField(); - *task_data = *pDepthMarketData; - task.task_data = task_data; - } - this->task_queue.push(task); -}; - -void MdApi::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); -}; - diff --git a/vnpy/api/sec/generator/Sec_struct.py b/vnpy/api/sec/generator/Sec_struct.py deleted file mode 100644 index bb9352b8..00000000 --- a/vnpy/api/sec/generator/Sec_struct.py +++ /dev/null @@ -1,5894 +0,0 @@ -CThostFtdcDisseminationField = { - "SequenceSeries": "int", - "SequenceNo": "int", -} - -CThostFtdcReqUserLoginField = { - "TradingDay": "string", - "BrokerID": "string", - "UserID": "string", - "Password": "string", - "UserProductInfo": "string", - "InterfaceProductInfo": "string", - "ProtocolInfo": "string", - "MacAddress": "string", - "OneTimePassword": "string", - "ClientIPAddress": "string", - "LoginRemark": "string", - "ClientIPPort": "int", -} - -CThostFtdcRspUserLoginField = { - "TradingDay": "string", - "LoginTime": "string", - "BrokerID": "string", - "UserID": "string", - "SystemName": "string", - "FrontID": "int", - "SessionID": "int", - "MaxOrderRef": "string", - "SHFETime": "string", - "DCETime": "string", - "CZCETime": "string", - "FFEXTime": "string", - "INETime": "string", -} - -CThostFtdcUserLogoutField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcForceUserLogoutField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcReqAuthenticateField = { - "BrokerID": "string", - "UserID": "string", - "UserProductInfo": "string", - "AuthCode": "string", - "AppID": "string", -} - -CThostFtdcRspAuthenticateField = { - "BrokerID": "string", - "UserID": "string", - "UserProductInfo": "string", - "AppID": "string", - "AppType": "char", -} - -CThostFtdcAuthenticationInfoField = { - "BrokerID": "string", - "UserID": "string", - "UserProductInfo": "string", - "AuthInfo": "string", - "IsResult": "int", - "AppID": "string", - "AppType": "char", -} - -CThostFtdcRspUserLoginSafelyField = { - "TradingDay": "string", - "LoginTime": "string", - "BrokerID": "string", - "UserID": "string", - "SystemName": "string", - "FrontID": "int", - "SessionID": "int", - "MaxOrderRef": "string", - "SHFETime": "string", - "DCETime": "string", - "CZCETime": "string", - "FFEXTime": "string", - "INETime": "string", - "RandomString": "string", -} - -CThostFtdcTransferHeaderField = { - "Version": "string", - "TradeCode": "string", - "TradeDate": "string", - "TradeTime": "string", - "TradeSerial": "string", - "FutureID": "string", - "BankID": "string", - "BankBrchID": "string", - "OperNo": "string", - "DeviceID": "string", - "RecordNum": "string", - "SessionID": "int", - "RequestID": "int", -} - -CThostFtdcTransferBankToFutureReqField = { - "FutureAccount": "string", - "FuturePwdFlag": "char", - "FutureAccPwd": "string", - "TradeAmt": "double", - "CustFee": "double", - "CurrencyCode": "string", -} - -CThostFtdcTransferBankToFutureRspField = { - "RetCode": "string", - "RetInfo": "string", - "FutureAccount": "string", - "TradeAmt": "double", - "CustFee": "double", - "CurrencyCode": "string", -} - -CThostFtdcTransferFutureToBankReqField = { - "FutureAccount": "string", - "FuturePwdFlag": "char", - "FutureAccPwd": "string", - "TradeAmt": "double", - "CustFee": "double", - "CurrencyCode": "string", -} - -CThostFtdcTransferFutureToBankRspField = { - "RetCode": "string", - "RetInfo": "string", - "FutureAccount": "string", - "TradeAmt": "double", - "CustFee": "double", - "CurrencyCode": "string", -} - -CThostFtdcTransferQryBankReqField = { - "FutureAccount": "string", - "FuturePwdFlag": "char", - "FutureAccPwd": "string", - "CurrencyCode": "string", -} - -CThostFtdcTransferQryBankRspField = { - "RetCode": "string", - "RetInfo": "string", - "FutureAccount": "string", - "TradeAmt": "double", - "UseAmt": "double", - "FetchAmt": "double", - "CurrencyCode": "string", -} - -CThostFtdcTransferQryDetailReqField = { - "FutureAccount": "string", -} - -CThostFtdcTransferQryDetailRspField = { - "TradeDate": "string", - "TradeTime": "string", - "TradeCode": "string", - "FutureSerial": "int", - "FutureID": "string", - "FutureAccount": "string", - "BankSerial": "int", - "BankID": "string", - "BankBrchID": "string", - "BankAccount": "string", - "CertCode": "string", - "CurrencyCode": "string", - "TxAmount": "double", - "Flag": "char", -} - -CThostFtdcRspInfoField = { - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcExchangeField = { - "ExchangeID": "string", - "ExchangeName": "string", - "ExchangeProperty": "char", -} - -CThostFtdcProductField = { - "ProductID": "string", - "ProductName": "string", - "ExchangeID": "string", - "ProductClass": "char", - "VolumeMultiple": "int", - "PriceTick": "double", - "MaxMarketOrderVolume": "int", - "MinMarketOrderVolume": "int", - "MaxLimitOrderVolume": "int", - "MinLimitOrderVolume": "int", - "PositionType": "char", - "PositionDateType": "char", - "CloseDealType": "char", - "TradeCurrencyID": "string", - "MortgageFundUseRange": "char", - "ExchangeProductID": "string", - "UnderlyingMultiple": "double", -} - -CThostFtdcInstrumentField = { - "InstrumentID": "string", - "ExchangeID": "string", - "InstrumentName": "string", - "ExchangeInstID": "string", - "ProductID": "string", - "ProductClass": "char", - "DeliveryYear": "int", - "DeliveryMonth": "int", - "MaxMarketOrderVolume": "int", - "MinMarketOrderVolume": "int", - "MaxLimitOrderVolume": "int", - "MinLimitOrderVolume": "int", - "VolumeMultiple": "int", - "PriceTick": "double", - "CreateDate": "string", - "OpenDate": "string", - "ExpireDate": "string", - "StartDelivDate": "string", - "EndDelivDate": "string", - "InstLifePhase": "char", - "IsTrading": "int", - "PositionType": "char", - "PositionDateType": "char", - "LongMarginRatio": "double", - "ShortMarginRatio": "double", - "MaxMarginSideAlgorithm": "char", - "UnderlyingInstrID": "string", - "StrikePrice": "double", - "OptionsType": "char", - "UnderlyingMultiple": "double", - "CombinationType": "char", - "MinBuyVolume": "int", - "MinSellVolume": "int", - "InstrumentCode": "string", -} - -CThostFtdcBrokerField = { - "BrokerID": "string", - "BrokerAbbr": "string", - "BrokerName": "string", - "IsActive": "int", -} - -CThostFtdcTraderField = { - "ExchangeID": "string", - "TraderID": "string", - "ParticipantID": "string", - "Password": "string", - "InstallCount": "int", - "BrokerID": "string", -} - -CThostFtdcInvestorField = { - "InvestorID": "string", - "BrokerID": "string", - "InvestorGroupID": "string", - "InvestorName": "string", - "IdentifiedCardType": "char", - "IdentifiedCardNo": "string", - "IsActive": "int", - "Telephone": "string", - "Address": "string", - "OpenDate": "string", - "Mobile": "string", - "CommModelID": "string", - "MarginModelID": "string", -} - -CThostFtdcTradingCodeField = { - "InvestorID": "string", - "BrokerID": "string", - "ExchangeID": "string", - "ClientID": "string", - "IsActive": "int", - "ClientIDType": "char", - "BranchID": "string", - "BizType": "char", - "InvestUnitID": "string", -} - -CThostFtdcPartBrokerField = { - "BrokerID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "IsActive": "int", -} - -CThostFtdcSuperUserField = { - "UserID": "string", - "UserName": "string", - "Password": "string", - "IsActive": "int", -} - -CThostFtdcSuperUserFunctionField = { - "UserID": "string", - "FunctionCode": "char", -} - -CThostFtdcInvestorGroupField = { - "BrokerID": "string", - "InvestorGroupID": "string", - "InvestorGroupName": "string", -} - -CThostFtdcTradingAccountField = { - "BrokerID": "string", - "AccountID": "string", - "PreMortgage": "double", - "PreCredit": "double", - "PreDeposit": "double", - "PreBalance": "double", - "PreMargin": "double", - "InterestBase": "double", - "Interest": "double", - "Deposit": "double", - "Withdraw": "double", - "FrozenMargin": "double", - "FrozenCash": "double", - "FrozenCommission": "double", - "CurrMargin": "double", - "CashIn": "double", - "Commission": "double", - "CloseProfit": "double", - "PositionProfit": "double", - "Balance": "double", - "Available": "double", - "WithdrawQuota": "double", - "Reserve": "double", - "TradingDay": "string", - "SettlementID": "int", - "Credit": "double", - "Mortgage": "double", - "ExchangeMargin": "double", - "DeliveryMargin": "double", - "ExchangeDeliveryMargin": "double", - "ReserveBalance": "double", - "CurrencyID": "string", - "PreFundMortgageIn": "double", - "PreFundMortgageOut": "double", - "FundMortgageIn": "double", - "FundMortgageOut": "double", - "FundMortgageAvailable": "double", - "MortgageableFund": "double", - "SpecProductMargin": "double", - "SpecProductFrozenMargin": "double", - "SpecProductCommission": "double", - "SpecProductFrozenCommission": "double", - "SpecProductPositionProfit": "double", - "SpecProductCloseProfit": "double", - "SpecProductPositionProfitByAlg": "double", - "SpecProductExchangeMargin": "double", - "BizType": "char", - "FrozenSwap": "double", - "RemainSwap": "double", -} - -CThostFtdcInvestorPositionField = { - "InstrumentID": "string", - "BrokerID": "string", - "InvestorID": "string", - "PosiDirection": "char", - "HedgeFlag": "char", - "PositionDate": "char", - "YdPosition": "int", - "Position": "int", - "LongFrozen": "int", - "ShortFrozen": "int", - "LongFrozenAmount": "double", - "ShortFrozenAmount": "double", - "OpenVolume": "int", - "CloseVolume": "int", - "OpenAmount": "double", - "CloseAmount": "double", - "PositionCost": "double", - "PreMargin": "double", - "UseMargin": "double", - "FrozenMargin": "double", - "FrozenCash": "double", - "FrozenCommission": "double", - "CashIn": "double", - "Commission": "double", - "CloseProfit": "double", - "PositionProfit": "double", - "PreSettlementPrice": "double", - "SettlementPrice": "double", - "TradingDay": "string", - "SettlementID": "int", - "OpenCost": "double", - "ExchangeMargin": "double", - "CombPosition": "int", - "CombLongFrozen": "int", - "CombShortFrozen": "int", - "CloseProfitByDate": "double", - "CloseProfitByTrade": "double", - "TodayPosition": "int", - "MarginRateByMoney": "double", - "MarginRateByVolume": "double", - "StrikeFrozen": "int", - "StrikeFrozenAmount": "double", - "AbandonFrozen": "int", - "ExchangeID": "string", - "YdStrikeFrozen": "int", - "InvestUnitID": "string", -} - -CThostFtdcInstrumentMarginRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "HedgeFlag": "char", - "LongMarginRatioByMoney": "double", - "LongMarginRatioByVolume": "double", - "ShortMarginRatioByMoney": "double", - "ShortMarginRatioByVolume": "double", - "IsRelative": "int", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcInstrumentCommissionRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "OpenRatioByMoney": "double", - "OpenRatioByVolume": "double", - "CloseRatioByMoney": "double", - "CloseRatioByVolume": "double", - "CloseTodayRatioByMoney": "double", - "CloseTodayRatioByVolume": "double", - "ExchangeID": "string", - "BizType": "char", - "InvestUnitID": "string", -} - -CThostFtdcDepthMarketDataField = { - "TradingDay": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "ExchangeInstID": "string", - "LastPrice": "double", - "PreSettlementPrice": "double", - "PreClosePrice": "double", - "PreOpenInterest": "double", - "OpenPrice": "double", - "HighestPrice": "double", - "LowestPrice": "double", - "Volume": "int", - "Turnover": "double", - "OpenInterest": "double", - "ClosePrice": "double", - "SettlementPrice": "double", - "UpperLimitPrice": "double", - "LowerLimitPrice": "double", - "PreDelta": "double", - "CurrDelta": "double", - "UpdateTime": "string", - "UpdateMillisec": "int", - "BidPrice1": "double", - "BidVolume1": "int", - "AskPrice1": "double", - "AskVolume1": "int", - "BidPrice2": "double", - "BidVolume2": "int", - "AskPrice2": "double", - "AskVolume2": "int", - "BidPrice3": "double", - "BidVolume3": "int", - "AskPrice3": "double", - "AskVolume3": "int", - "BidPrice4": "double", - "BidVolume4": "int", - "AskPrice4": "double", - "AskVolume4": "int", - "BidPrice5": "double", - "BidVolume5": "int", - "AskPrice5": "double", - "AskVolume5": "int", - "AveragePrice": "double", - "ActionDay": "string", -} - -CThostFtdcInstrumentTradingRightField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "TradingRight": "char", - "ExchangeID": "string", - "BizType": "char", -} - -CThostFtdcBrokerUserField = { - "BrokerID": "string", - "UserID": "string", - "UserName": "string", - "UserType": "char", - "IsActive": "int", - "IsUsingOTP": "int", - "IsAuthForce": "int", -} - -CThostFtdcBrokerUserPasswordField = { - "BrokerID": "string", - "UserID": "string", - "Password": "string", - "LastUpdateTime": "string", - "LastLoginTime": "string", - "ExpireDate": "string", - "WeakExpireDate": "string", -} - -CThostFtdcBrokerUserFunctionField = { - "BrokerID": "string", - "UserID": "string", - "BrokerFunctionCode": "char", -} - -CThostFtdcTraderOfferField = { - "ExchangeID": "string", - "TraderID": "string", - "ParticipantID": "string", - "Password": "string", - "InstallID": "int", - "OrderLocalID": "string", - "TraderConnectStatus": "char", - "ConnectRequestDate": "string", - "ConnectRequestTime": "string", - "LastReportDate": "string", - "LastReportTime": "string", - "ConnectDate": "string", - "ConnectTime": "string", - "StartDate": "string", - "StartTime": "string", - "TradingDay": "string", - "BrokerID": "string", - "MaxTradeID": "string", - "MaxOrderMessageReference": "string", - "BizType": "char", -} - -CThostFtdcSettlementInfoField = { - "TradingDay": "string", - "SettlementID": "int", - "BrokerID": "string", - "InvestorID": "string", - "SequenceNo": "int", - "Content": "string", - "AccountID": "string", - "CurrencyID": "string", -} - -CThostFtdcInstrumentMarginRateAdjustField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "HedgeFlag": "char", - "LongMarginRatioByMoney": "double", - "LongMarginRatioByVolume": "double", - "ShortMarginRatioByMoney": "double", - "ShortMarginRatioByVolume": "double", - "IsRelative": "int", -} - -CThostFtdcExchangeMarginRateField = { - "BrokerID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "LongMarginRatioByMoney": "double", - "LongMarginRatioByVolume": "double", - "ShortMarginRatioByMoney": "double", - "ShortMarginRatioByVolume": "double", - "ExchangeID": "string", -} - -CThostFtdcExchangeMarginRateAdjustField = { - "BrokerID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "LongMarginRatioByMoney": "double", - "LongMarginRatioByVolume": "double", - "ShortMarginRatioByMoney": "double", - "ShortMarginRatioByVolume": "double", - "ExchLongMarginRatioByMoney": "double", - "ExchLongMarginRatioByVolume": "double", - "ExchShortMarginRatioByMoney": "double", - "ExchShortMarginRatioByVolume": "double", - "NoLongMarginRatioByMoney": "double", - "NoLongMarginRatioByVolume": "double", - "NoShortMarginRatioByMoney": "double", - "NoShortMarginRatioByVolume": "double", -} - -CThostFtdcExchangeRateField = { - "BrokerID": "string", - "FromCurrencyID": "string", - "FromCurrencyUnit": "double", - "ToCurrencyID": "string", - "ExchangeRate": "double", -} - -CThostFtdcSettlementRefField = { - "TradingDay": "string", - "SettlementID": "int", -} - -CThostFtdcCurrentTimeField = { - "CurrDate": "string", - "CurrTime": "string", - "CurrMillisec": "int", - "ActionDay": "string", -} - -CThostFtdcCommPhaseField = { - "TradingDay": "string", - "CommPhaseNo": "int", - "SystemID": "string", -} - -CThostFtdcLoginInfoField = { - "FrontID": "int", - "SessionID": "int", - "BrokerID": "string", - "UserID": "string", - "LoginDate": "string", - "LoginTime": "string", - "IPAddress": "string", - "UserProductInfo": "string", - "InterfaceProductInfo": "string", - "ProtocolInfo": "string", - "SystemName": "string", - "Password": "string", - "MaxOrderRef": "string", - "SHFETime": "string", - "DCETime": "string", - "CZCETime": "string", - "FFEXTime": "string", - "MacAddress": "string", - "OneTimePassword": "string", - "INETime": "string", - "IsQryControl": "int", - "LoginRemark": "string", - "SmsCode": "string", - "EncryptType": "int", -} - -CThostFtdcLogoutAllField = { - "FrontID": "int", - "SessionID": "int", - "SystemName": "string", -} - -CThostFtdcFrontStatusField = { - "FrontID": "int", - "LastReportDate": "string", - "LastReportTime": "string", - "IsActive": "int", -} - -CThostFtdcUserPasswordUpdateField = { - "BrokerID": "string", - "UserID": "string", - "OldPassword": "string", - "NewPassword": "string", - "EncryptType": "int", -} - -CThostFtdcInputOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OrderRef": "string", - "UserID": "string", - "OrderPriceType": "char", - "Direction": "char", - "CombOffsetFlag": "string", - "CombHedgeFlag": "string", - "LimitPrice": "double", - "VolumeTotalOriginal": "int", - "TimeCondition": "char", - "GTDDate": "string", - "VolumeCondition": "char", - "MinVolume": "int", - "ContingentCondition": "char", - "StopPrice": "double", - "ForceCloseReason": "char", - "IsAutoSuspend": "int", - "BusinessUnit": "string", - "RequestID": "int", - "UserForceClose": "int", - "IsSwapOrder": "int", - "ExchangeID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OrderRef": "string", - "UserID": "string", - "OrderPriceType": "char", - "Direction": "char", - "CombOffsetFlag": "string", - "CombHedgeFlag": "string", - "LimitPrice": "double", - "VolumeTotalOriginal": "int", - "TimeCondition": "char", - "GTDDate": "string", - "VolumeCondition": "char", - "MinVolume": "int", - "ContingentCondition": "char", - "StopPrice": "double", - "ForceCloseReason": "char", - "IsAutoSuspend": "int", - "BusinessUnit": "string", - "RequestID": "int", - "OrderLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "OrderSysID": "string", - "OrderSource": "char", - "OrderStatus": "char", - "OrderType": "char", - "VolumeTraded": "int", - "VolumeTotal": "int", - "InsertDate": "string", - "InsertTime": "string", - "ActiveTime": "string", - "SuspendTime": "string", - "UpdateTime": "string", - "CancelTime": "string", - "ActiveTraderID": "string", - "ClearingPartID": "string", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "UserForceClose": "int", - "ActiveUserID": "string", - "BrokerOrderSeq": "int", - "RelativeOrderSysID": "string", - "ZCETotalTradedVolume": "int", - "IsSwapOrder": "int", - "BranchID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExchangeOrderField = { - "OrderPriceType": "char", - "Direction": "char", - "CombOffsetFlag": "string", - "CombHedgeFlag": "string", - "LimitPrice": "double", - "VolumeTotalOriginal": "int", - "TimeCondition": "char", - "GTDDate": "string", - "VolumeCondition": "char", - "MinVolume": "int", - "ContingentCondition": "char", - "StopPrice": "double", - "ForceCloseReason": "char", - "IsAutoSuspend": "int", - "BusinessUnit": "string", - "RequestID": "int", - "OrderLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "OrderSysID": "string", - "OrderSource": "char", - "OrderStatus": "char", - "OrderType": "char", - "VolumeTraded": "int", - "VolumeTotal": "int", - "InsertDate": "string", - "InsertTime": "string", - "ActiveTime": "string", - "SuspendTime": "string", - "UpdateTime": "string", - "CancelTime": "string", - "ActiveTraderID": "string", - "ClearingPartID": "string", - "SequenceNo": "int", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExchangeOrderInsertErrorField = { - "ExchangeID": "string", - "ParticipantID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderLocalID": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcInputOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OrderActionRef": "int", - "OrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "OrderSysID": "string", - "ActionFlag": "char", - "LimitPrice": "double", - "VolumeChange": "int", - "UserID": "string", - "InstrumentID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OrderActionRef": "int", - "OrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "OrderSysID": "string", - "ActionFlag": "char", - "LimitPrice": "double", - "VolumeChange": "int", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "OrderLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "StatusMsg": "string", - "InstrumentID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExchangeOrderActionField = { - "ExchangeID": "string", - "OrderSysID": "string", - "ActionFlag": "char", - "LimitPrice": "double", - "VolumeChange": "int", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "OrderLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExchangeOrderActionErrorField = { - "ExchangeID": "string", - "OrderSysID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderLocalID": "string", - "ActionLocalID": "string", - "ErrorID": "int", - "ErrorMsg": "string", - "BrokerID": "string", - "CancelTime": "string", -} - -CThostFtdcExchangeTradeField = { - "ExchangeID": "string", - "TradeID": "string", - "Direction": "char", - "OrderSysID": "string", - "ParticipantID": "string", - "ClientID": "string", - "TradingRole": "char", - "ExchangeInstID": "string", - "OffsetFlag": "char", - "HedgeFlag": "char", - "Price": "double", - "Volume": "int", - "TradeDate": "string", - "TradeTime": "string", - "TradeType": "char", - "PriceSource": "char", - "TraderID": "string", - "OrderLocalID": "string", - "ClearingPartID": "string", - "BusinessUnit": "string", - "SequenceNo": "int", - "TradeSource": "char", -} - -CThostFtdcTradeField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OrderRef": "string", - "UserID": "string", - "ExchangeID": "string", - "TradeID": "string", - "Direction": "char", - "OrderSysID": "string", - "ParticipantID": "string", - "ClientID": "string", - "TradingRole": "char", - "ExchangeInstID": "string", - "OffsetFlag": "char", - "HedgeFlag": "char", - "Price": "double", - "Volume": "int", - "TradeDate": "string", - "TradeTime": "string", - "TradeType": "char", - "PriceSource": "char", - "TraderID": "string", - "OrderLocalID": "string", - "ClearingPartID": "string", - "BusinessUnit": "string", - "SequenceNo": "int", - "TradingDay": "string", - "SettlementID": "int", - "BrokerOrderSeq": "int", - "TradeSource": "char", - "InvestUnitID": "string", -} - -CThostFtdcUserSessionField = { - "FrontID": "int", - "SessionID": "int", - "BrokerID": "string", - "UserID": "string", - "LoginDate": "string", - "LoginTime": "string", - "IPAddress": "string", - "UserProductInfo": "string", - "InterfaceProductInfo": "string", - "ProtocolInfo": "string", - "MacAddress": "string", - "LoginRemark": "string", -} - -CThostFtdcQueryMaxOrderVolumeField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "Direction": "char", - "OffsetFlag": "char", - "HedgeFlag": "char", - "MaxVolume": "int", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcSettlementInfoConfirmField = { - "BrokerID": "string", - "InvestorID": "string", - "ConfirmDate": "string", - "ConfirmTime": "string", - "SettlementID": "int", - "AccountID": "string", - "CurrencyID": "string", -} - -CThostFtdcSyncDepositField = { - "DepositSeqNo": "string", - "BrokerID": "string", - "InvestorID": "string", - "Deposit": "double", - "IsForce": "int", - "CurrencyID": "string", - "BizType": "char", -} - -CThostFtdcSyncFundMortgageField = { - "MortgageSeqNo": "string", - "BrokerID": "string", - "InvestorID": "string", - "FromCurrencyID": "string", - "MortgageAmount": "double", - "ToCurrencyID": "string", -} - -CThostFtdcBrokerSyncField = { - "BrokerID": "string", -} - -CThostFtdcSyncingInvestorField = { - "InvestorID": "string", - "BrokerID": "string", - "InvestorGroupID": "string", - "InvestorName": "string", - "IdentifiedCardType": "char", - "IdentifiedCardNo": "string", - "IsActive": "int", - "Telephone": "string", - "Address": "string", - "OpenDate": "string", - "Mobile": "string", - "CommModelID": "string", - "MarginModelID": "string", -} - -CThostFtdcSyncingTradingCodeField = { - "InvestorID": "string", - "BrokerID": "string", - "ExchangeID": "string", - "ClientID": "string", - "IsActive": "int", - "ClientIDType": "char", - "BranchID": "string", -} - -CThostFtdcSyncingInvestorGroupField = { - "BrokerID": "string", - "InvestorGroupID": "string", - "InvestorGroupName": "string", -} - -CThostFtdcSyncingTradingAccountField = { - "BrokerID": "string", - "AccountID": "string", - "PreMortgage": "double", - "PreCredit": "double", - "PreDeposit": "double", - "PreBalance": "double", - "PreMargin": "double", - "InterestBase": "double", - "Interest": "double", - "Deposit": "double", - "Withdraw": "double", - "FrozenMargin": "double", - "FrozenCash": "double", - "FrozenCommission": "double", - "CurrMargin": "double", - "CashIn": "double", - "Commission": "double", - "CloseProfit": "double", - "PositionProfit": "double", - "Balance": "double", - "Available": "double", - "WithdrawQuota": "double", - "Reserve": "double", - "TradingDay": "string", - "SettlementID": "int", - "Credit": "double", - "Mortgage": "double", - "ExchangeMargin": "double", - "DeliveryMargin": "double", - "ExchangeDeliveryMargin": "double", - "ReserveBalance": "double", - "CurrencyID": "string", - "PreFundMortgageIn": "double", - "PreFundMortgageOut": "double", - "FundMortgageIn": "double", - "FundMortgageOut": "double", - "FundMortgageAvailable": "double", - "MortgageableFund": "double", - "SpecProductMargin": "double", - "SpecProductFrozenMargin": "double", - "SpecProductCommission": "double", - "SpecProductFrozenCommission": "double", - "SpecProductPositionProfit": "double", - "SpecProductCloseProfit": "double", - "SpecProductPositionProfitByAlg": "double", - "SpecProductExchangeMargin": "double", - "FrozenSwap": "double", - "RemainSwap": "double", -} - -CThostFtdcSyncingInvestorPositionField = { - "InstrumentID": "string", - "BrokerID": "string", - "InvestorID": "string", - "PosiDirection": "char", - "HedgeFlag": "char", - "PositionDate": "char", - "YdPosition": "int", - "Position": "int", - "LongFrozen": "int", - "ShortFrozen": "int", - "LongFrozenAmount": "double", - "ShortFrozenAmount": "double", - "OpenVolume": "int", - "CloseVolume": "int", - "OpenAmount": "double", - "CloseAmount": "double", - "PositionCost": "double", - "PreMargin": "double", - "UseMargin": "double", - "FrozenMargin": "double", - "FrozenCash": "double", - "FrozenCommission": "double", - "CashIn": "double", - "Commission": "double", - "CloseProfit": "double", - "PositionProfit": "double", - "PreSettlementPrice": "double", - "SettlementPrice": "double", - "TradingDay": "string", - "SettlementID": "int", - "OpenCost": "double", - "ExchangeMargin": "double", - "CombPosition": "int", - "CombLongFrozen": "int", - "CombShortFrozen": "int", - "CloseProfitByDate": "double", - "CloseProfitByTrade": "double", - "TodayPosition": "int", - "MarginRateByMoney": "double", - "MarginRateByVolume": "double", - "StrikeFrozen": "int", - "StrikeFrozenAmount": "double", - "AbandonFrozen": "int", - "ExchangeID": "string", - "YdStrikeFrozen": "int", - "InvestUnitID": "string", -} - -CThostFtdcSyncingInstrumentMarginRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "HedgeFlag": "char", - "LongMarginRatioByMoney": "double", - "LongMarginRatioByVolume": "double", - "ShortMarginRatioByMoney": "double", - "ShortMarginRatioByVolume": "double", - "IsRelative": "int", -} - -CThostFtdcSyncingInstrumentCommissionRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "OpenRatioByMoney": "double", - "OpenRatioByVolume": "double", - "CloseRatioByMoney": "double", - "CloseRatioByVolume": "double", - "CloseTodayRatioByMoney": "double", - "CloseTodayRatioByVolume": "double", - "ExchangeID": "string", -} - -CThostFtdcSyncingInstrumentTradingRightField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "TradingRight": "char", - "ExchangeID": "string", -} - -CThostFtdcQryOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "OrderSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryTradeField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "TradeID": "string", - "TradeTimeStart": "string", - "TradeTimeEnd": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryInvestorPositionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryTradingAccountField = { - "BrokerID": "string", - "InvestorID": "string", - "CurrencyID": "string", - "BizType": "char", - "AccountID": "string", -} - -CThostFtdcQryInvestorField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcQryTradingCodeField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "ClientID": "string", - "ClientIDType": "char", - "InvestUnitID": "string", -} - -CThostFtdcQryInvestorGroupField = { - "BrokerID": "string", -} - -CThostFtdcQryInstrumentMarginRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryInstrumentCommissionRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryInstrumentTradingRightField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcQryBrokerField = { - "BrokerID": "string", -} - -CThostFtdcQryTraderField = { - "ExchangeID": "string", - "ParticipantID": "string", - "TraderID": "string", -} - -CThostFtdcQrySuperUserFunctionField = { - "UserID": "string", -} - -CThostFtdcQryUserSessionField = { - "FrontID": "int", - "SessionID": "int", - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcQryPartBrokerField = { - "ExchangeID": "string", - "BrokerID": "string", - "ParticipantID": "string", -} - -CThostFtdcQryFrontStatusField = { - "FrontID": "int", -} - -CThostFtdcQryExchangeOrderField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcQryOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcQryExchangeOrderActionField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcQrySuperUserField = { - "UserID": "string", -} - -CThostFtdcQryExchangeField = { - "ExchangeID": "string", -} - -CThostFtdcQryProductField = { - "ProductID": "string", - "ProductClass": "char", - "ExchangeID": "string", -} - -CThostFtdcQryInstrumentField = { - "InstrumentID": "string", - "ExchangeID": "string", - "ExchangeInstID": "string", - "ProductID": "string", -} - -CThostFtdcQryDepthMarketDataField = { - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcQryBrokerUserField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcQryBrokerUserFunctionField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcQryTraderOfferField = { - "ExchangeID": "string", - "ParticipantID": "string", - "TraderID": "string", -} - -CThostFtdcQrySyncDepositField = { - "BrokerID": "string", - "DepositSeqNo": "string", -} - -CThostFtdcQrySettlementInfoField = { - "BrokerID": "string", - "InvestorID": "string", - "TradingDay": "string", - "AccountID": "string", - "CurrencyID": "string", -} - -CThostFtdcQryExchangeMarginRateField = { - "BrokerID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "ExchangeID": "string", -} - -CThostFtdcQryExchangeMarginRateAdjustField = { - "BrokerID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", -} - -CThostFtdcQryExchangeRateField = { - "BrokerID": "string", - "FromCurrencyID": "string", - "ToCurrencyID": "string", -} - -CThostFtdcQrySyncFundMortgageField = { - "BrokerID": "string", - "MortgageSeqNo": "string", -} - -CThostFtdcQryHisOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "OrderSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", - "TradingDay": "string", - "SettlementID": "int", -} - -CThostFtdcOptionInstrMiniMarginField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "MinMargin": "double", - "ValueMethod": "char", - "IsRelative": "int", - "ExchangeID": "string", -} - -CThostFtdcOptionInstrMarginAdjustField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "SShortMarginRatioByMoney": "double", - "SShortMarginRatioByVolume": "double", - "HShortMarginRatioByMoney": "double", - "HShortMarginRatioByVolume": "double", - "AShortMarginRatioByMoney": "double", - "AShortMarginRatioByVolume": "double", - "IsRelative": "int", - "ExchangeID": "string", - "MShortMarginRatioByMoney": "double", - "MShortMarginRatioByVolume": "double", -} - -CThostFtdcOptionInstrCommRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "OpenRatioByMoney": "double", - "OpenRatioByVolume": "double", - "CloseRatioByMoney": "double", - "CloseRatioByVolume": "double", - "CloseTodayRatioByMoney": "double", - "CloseTodayRatioByVolume": "double", - "StrikeRatioByMoney": "double", - "StrikeRatioByVolume": "double", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcOptionInstrTradeCostField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "FixedMargin": "double", - "MiniMargin": "double", - "Royalty": "double", - "ExchFixedMargin": "double", - "ExchMiniMargin": "double", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryOptionInstrTradeCostField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "InputPrice": "double", - "UnderlyingPrice": "double", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryOptionInstrCommRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcIndexPriceField = { - "BrokerID": "string", - "InstrumentID": "string", - "ClosePrice": "double", - "ExchangeID": "string", -} - -CThostFtdcInputExecOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExecOrderRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "OffsetFlag": "char", - "HedgeFlag": "char", - "ActionType": "char", - "PosiDirection": "char", - "ReservePositionFlag": "char", - "CloseFlag": "char", - "ExchangeID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcInputExecOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExecOrderActionRef": "int", - "ExecOrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "ExecOrderSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InstrumentID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExecOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExecOrderRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "OffsetFlag": "char", - "HedgeFlag": "char", - "ActionType": "char", - "PosiDirection": "char", - "ReservePositionFlag": "char", - "CloseFlag": "char", - "ExecOrderLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "ExecOrderSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "ExecResult": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "ActiveUserID": "string", - "BrokerExecOrderSeq": "int", - "BranchID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExecOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExecOrderActionRef": "int", - "ExecOrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "ExecOrderSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "ExecOrderLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "ActionType": "char", - "StatusMsg": "string", - "InstrumentID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryExecOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "ExecOrderSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", -} - -CThostFtdcExchangeExecOrderField = { - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "OffsetFlag": "char", - "HedgeFlag": "char", - "ActionType": "char", - "PosiDirection": "char", - "ReservePositionFlag": "char", - "CloseFlag": "char", - "ExecOrderLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "ExecOrderSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "ExecResult": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryExchangeExecOrderField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcQryExecOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcExchangeExecOrderActionField = { - "ExchangeID": "string", - "ExecOrderSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "ExecOrderLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "ActionType": "char", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryExchangeExecOrderActionField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcErrExecOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExecOrderRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "OffsetFlag": "char", - "HedgeFlag": "char", - "ActionType": "char", - "PosiDirection": "char", - "ReservePositionFlag": "char", - "CloseFlag": "char", - "ExchangeID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcQryErrExecOrderField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcErrExecOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExecOrderActionRef": "int", - "ExecOrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "ExecOrderSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InstrumentID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcQryErrExecOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcOptionInstrTradingRightField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "Direction": "char", - "TradingRight": "char", - "ExchangeID": "string", - "HedgeFlag": "char", -} - -CThostFtdcQryOptionInstrTradingRightField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "Direction": "char", - "ExchangeID": "string", -} - -CThostFtdcInputForQuoteField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ForQuoteRef": "string", - "UserID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcForQuoteField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ForQuoteRef": "string", - "UserID": "string", - "ForQuoteLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "InsertDate": "string", - "InsertTime": "string", - "ForQuoteStatus": "char", - "FrontID": "int", - "SessionID": "int", - "StatusMsg": "string", - "ActiveUserID": "string", - "BrokerForQutoSeq": "int", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", - "BranchID": "string", -} - -CThostFtdcQryForQuoteField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", - "InvestUnitID": "string", -} - -CThostFtdcExchangeForQuoteField = { - "ForQuoteLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "InsertDate": "string", - "InsertTime": "string", - "ForQuoteStatus": "char", - "IPAddress": "string", - "MacAddress": "string", - "BranchID": "string", -} - -CThostFtdcQryExchangeForQuoteField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcInputQuoteField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "QuoteRef": "string", - "UserID": "string", - "AskPrice": "double", - "BidPrice": "double", - "AskVolume": "int", - "BidVolume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "AskOffsetFlag": "char", - "BidOffsetFlag": "char", - "AskHedgeFlag": "char", - "BidHedgeFlag": "char", - "AskOrderRef": "string", - "BidOrderRef": "string", - "ForQuoteSysID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcInputQuoteActionField = { - "BrokerID": "string", - "InvestorID": "string", - "QuoteActionRef": "int", - "QuoteRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "QuoteSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InstrumentID": "string", - "InvestUnitID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQuoteField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "QuoteRef": "string", - "UserID": "string", - "AskPrice": "double", - "BidPrice": "double", - "AskVolume": "int", - "BidVolume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "AskOffsetFlag": "char", - "BidOffsetFlag": "char", - "AskHedgeFlag": "char", - "BidHedgeFlag": "char", - "QuoteLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "NotifySequence": "int", - "OrderSubmitStatus": "char", - "TradingDay": "string", - "SettlementID": "int", - "QuoteSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "QuoteStatus": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "AskOrderSysID": "string", - "BidOrderSysID": "string", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "ActiveUserID": "string", - "BrokerQuoteSeq": "int", - "AskOrderRef": "string", - "BidOrderRef": "string", - "ForQuoteSysID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQuoteActionField = { - "BrokerID": "string", - "InvestorID": "string", - "QuoteActionRef": "int", - "QuoteRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "QuoteSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "QuoteLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "StatusMsg": "string", - "InstrumentID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryQuoteField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "QuoteSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", - "InvestUnitID": "string", -} - -CThostFtdcExchangeQuoteField = { - "AskPrice": "double", - "BidPrice": "double", - "AskVolume": "int", - "BidVolume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "AskOffsetFlag": "char", - "BidOffsetFlag": "char", - "AskHedgeFlag": "char", - "BidHedgeFlag": "char", - "QuoteLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "NotifySequence": "int", - "OrderSubmitStatus": "char", - "TradingDay": "string", - "SettlementID": "int", - "QuoteSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "QuoteStatus": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "AskOrderSysID": "string", - "BidOrderSysID": "string", - "ForQuoteSysID": "string", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryExchangeQuoteField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcQryQuoteActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcExchangeQuoteActionField = { - "ExchangeID": "string", - "QuoteSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "QuoteLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "IPAddress": "string", - "MacAddress": "string", - "BranchID": "string", -} - -CThostFtdcQryExchangeQuoteActionField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcOptionInstrDeltaField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "Delta": "double", - "ExchangeID": "string", -} - -CThostFtdcForQuoteRspField = { - "TradingDay": "string", - "InstrumentID": "string", - "ForQuoteSysID": "string", - "ForQuoteTime": "string", - "ActionDay": "string", - "ExchangeID": "string", -} - -CThostFtdcStrikeOffsetField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "Offset": "double", - "OffsetType": "char", - "ExchangeID": "string", -} - -CThostFtdcQryStrikeOffsetField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", -} - -CThostFtdcInputLockField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "LockRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "LockType": "char", - "ExchangeID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcLockField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "LockRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "LockType": "char", - "LockLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "LockSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "LockStatus": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "ActiveUserID": "string", - "BrokerLockSeq": "int", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryLockField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "LockSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", -} - -CThostFtdcLockPositionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "Volume": "int", - "FrozenVolume": "int", - "TodayVolume": "int", -} - -CThostFtdcQryLockPositionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcETFOptionInstrCommRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "OpenRatioByMoney": "double", - "OpenRatioByVolume": "double", - "CloseRatioByMoney": "double", - "CloseRatioByVolume": "double", - "CloseTodayRatioByMoney": "double", - "CloseTodayRatioByVolume": "double", - "StrikeRatioByMoney": "double", - "StrikeRatioByVolume": "double", - "ExchangeID": "string", - "HedgeFlag": "char", - "PosiDirection": "char", -} - -CThostFtdcQryETFOptionInstrCommRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcPosiFreezeField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "OrderLocalID": "string", - "TraderID": "string", - "ParticipantID": "string", - "InstallID": "int", - "Volume": "int", - "FreezeReasonType": "char", - "FreezeType": "char", -} - -CThostFtdcQryExchangeLockField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcExchangeLockField = { - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "LockType": "char", - "LockLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "LockSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "LockStatus": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExchangeExecOrderActionErrorField = { - "ExchangeID": "string", - "ExecOrderSysID": "string", - "TraderID": "string", - "InstallID": "int", - "ExecOrderLocalID": "string", - "ActionLocalID": "string", - "ErrorID": "int", - "ErrorMsg": "string", - "BrokerID": "string", -} - -CThostFtdcInputBatchOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OrderActionRef": "int", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "UserID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcBatchOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OrderActionRef": "int", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "StatusMsg": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExchangeBatchOrderActionField = { - "ExchangeID": "string", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryBatchOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcLimitPosiField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "TotalVolume": "int", - "LongVolume": "int", - "OpenVolume": "int", - "LongAmount": "double", - "TotalVolumeFrozen": "int", - "LongVolumeFrozen": "int", - "OpenVolumeFrozen": "int", - "LongAmountFrozen": "double", -} - -CThostFtdcQryLimitPosiField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcBrokerLimitPosiField = { - "BrokerID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "TotalVolume": "double", - "LongVolume": "double", - "TotalVolumeFrozen": "double", - "LongVolumeFrozen": "double", -} - -CThostFtdcQryBrokerLimitPosiField = { - "BrokerID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcLimitPosiSField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "TotalVolume": "int", - "OpenVolume": "int", - "TotalVolumeFrozen": "int", - "OpenVolumeFrozen": "int", -} - -CThostFtdcQryLimitPosiSField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcLimitPosiParamField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "TotalVolume": "int", - "LongVolume": "int", - "OpenVolume": "int", - "LongAmount": "double", -} - -CThostFtdcBrokerLimitPosiParamField = { - "BrokerID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "TotalVolume": "double", - "LongVolume": "double", -} - -CThostFtdcLimitPosiParamSField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "TotalVolume": "int", - "OpenVolume": "int", -} - -CThostFtdcInputStockDisposalActionField = { - "BrokerID": "string", - "InvestorID": "string", - "StockDisposalActionRef": "int", - "StockDisposalRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "StockDisposalSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InstrumentID": "string", -} - -CThostFtdcStockDisposalActionField = { - "BrokerID": "string", - "InvestorID": "string", - "StockDisposalActionRef": "int", - "StockDisposalRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "StockDisposalSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "StockDisposalLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "ActionType": "char", - "StatusMsg": "string", - "InstrumentID": "string", - "BranchID": "string", -} - -CThostFtdcQryStockDisposalActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcExchangeStockDisposalActionField = { - "ExchangeID": "string", - "StockDisposalSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "StockDisposalLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "ActionType": "char", - "BranchID": "string", -} - -CThostFtdcQryExchangeStockDisposalActionField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcQryErrStockDisposalActionField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcExchangeStockDisposalActionErrorField = { - "ExchangeID": "string", - "StockDisposalSysID": "string", - "TraderID": "string", - "InstallID": "int", - "StockDisposalLocalID": "string", - "ActionLocalID": "string", - "ErrorID": "int", - "ErrorMsg": "string", - "BrokerID": "string", -} - -CThostFtdcErrStockDisposalActionField = { - "BrokerID": "string", - "InvestorID": "string", - "StockDisposalActionRef": "int", - "StockDisposalRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "StockDisposalSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InstrumentID": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcInvestorLevelField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "LevelType": "char", -} - -CThostFtdcCombInstrumentGuardField = { - "BrokerID": "string", - "InstrumentID": "string", - "GuarantRatio": "double", - "ExchangeID": "string", -} - -CThostFtdcQryCombInstrumentGuardField = { - "BrokerID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcInputCombActionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "CombActionRef": "string", - "UserID": "string", - "Direction": "char", - "Volume": "int", - "CombDirection": "char", - "HedgeFlag": "char", - "ExchangeID": "string", - "IPAddress": "string", - "MacAddress": "string", - "InvestUnitID": "string", -} - -CThostFtdcCombActionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "CombActionRef": "string", - "UserID": "string", - "Direction": "char", - "Volume": "int", - "CombDirection": "char", - "HedgeFlag": "char", - "ActionLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "ActionStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "IPAddress": "string", - "MacAddress": "string", - "ComTradeID": "string", - "BranchID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryCombActionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcExchangeCombActionField = { - "Direction": "char", - "Volume": "int", - "CombDirection": "char", - "HedgeFlag": "char", - "ActionLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "ActionStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "SequenceNo": "int", - "IPAddress": "string", - "MacAddress": "string", - "ComTradeID": "string", - "BranchID": "string", -} - -CThostFtdcQryExchangeCombActionField = { - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "ExchangeID": "string", - "TraderID": "string", -} - -CThostFtdcProductExchRateField = { - "ProductID": "string", - "QuoteCurrencyID": "string", - "ExchangeRate": "double", - "ExchangeID": "string", -} - -CThostFtdcQryProductExchRateField = { - "ProductID": "string", - "ExchangeID": "string", -} - -CThostFtdcInputDesignateField = { - "BrokerID": "string", - "InvestorID": "string", - "DesignateRef": "string", - "UserID": "string", - "DesignateType": "char", - "ExchangeID": "string", - "PBU": "string", -} - -CThostFtdcDesignateField = { - "BrokerID": "string", - "InvestorID": "string", - "DesignateRef": "string", - "UserID": "string", - "DesignateType": "char", - "DesignateLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "TraderID": "string", - "InstallID": "int", - "DesignateStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "InsertDate": "string", - "InsertTime": "string", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "BranchID": "string", - "PBU": "string", -} - -CThostFtdcQryDesignateField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcExchangeDesignateField = { - "DesignateType": "char", - "DesignateLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "TraderID": "string", - "InstallID": "int", - "DesignateStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "InsertDate": "string", - "InsertTime": "string", - "BranchID": "string", -} - -CThostFtdcInputStockDisposalField = { - "BrokerID": "string", - "InvestorID": "string", - "StockDisposalRef": "string", - "UserID": "string", - "InstrumentID": "string", - "Volume": "int", - "StockDisposalType": "char", - "ExchangeID": "string", -} - -CThostFtdcStockDisposalField = { - "BrokerID": "string", - "InvestorID": "string", - "StockDisposalRef": "string", - "UserID": "string", - "InstrumentID": "string", - "Volume": "int", - "StockDisposalType": "char", - "StockDisposalLocalID": "string", - "ExchangeID": "string", - "ExchangeInstID": "string", - "ParticipantID": "string", - "ClientID": "string", - "TraderID": "string", - "InstallID": "int", - "StockDisposalStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "InsertDate": "string", - "InsertTime": "string", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "BranchID": "string", - "StockDisposalSysID": "string", - "BusinessUnit": "string", -} - -CThostFtdcQryStockDisposalField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcExchangeStockDisposalField = { - "Volume": "int", - "StockDisposalType": "char", - "StockDisposalLocalID": "string", - "ExchangeID": "string", - "ExchangeInstID": "string", - "ParticipantID": "string", - "ClientID": "string", - "TraderID": "string", - "InstallID": "int", - "StockDisposalStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "InsertDate": "string", - "InsertTime": "string", - "BranchID": "string", - "StockDisposalSysID": "string", - "BusinessUnit": "string", -} - -CThostFtdcQryInvestorLevelField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcQryForQuoteParamField = { - "BrokerID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcForQuoteParamField = { - "BrokerID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "LastPrice": "double", - "PriceInterval": "double", -} - -CThostFtdcQryExecFreezeField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcExecFreezeField = { - "InstrumentID": "string", - "ExchangeID": "string", - "BrokerID": "string", - "InvestorID": "string", - "PosiDirection": "char", - "OptionsType": "char", - "Volume": "int", - "FrozenAmount": "double", -} - -CThostFtdcMMOptionInstrCommRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "OpenRatioByMoney": "double", - "OpenRatioByVolume": "double", - "CloseRatioByMoney": "double", - "CloseRatioByVolume": "double", - "CloseTodayRatioByMoney": "double", - "CloseTodayRatioByVolume": "double", - "StrikeRatioByMoney": "double", - "StrikeRatioByVolume": "double", - "ExchangeID": "string", -} - -CThostFtdcQryMMOptionInstrCommRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcMMInstrumentCommissionRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "OpenRatioByMoney": "double", - "OpenRatioByVolume": "double", - "CloseRatioByMoney": "double", - "CloseRatioByVolume": "double", - "CloseTodayRatioByMoney": "double", - "CloseTodayRatioByVolume": "double", - "ExchangeID": "string", -} - -CThostFtdcQryMMInstrumentCommissionRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcInstrumentOrderCommRateField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "HedgeFlag": "char", - "OrderCommByVolume": "double", - "OrderActionCommByVolume": "double", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryInstrumentOrderCommRateField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcLimitAmountField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "LongAmount": "double", - "LongAmountFrozen": "double", -} - -CThostFtdcQryLimitAmountField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcLimitAmountParamField = { - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "LongAmount": "double", -} - -CThostFtdcOptionInstrMarginGuardField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "SShortMarginRatioByMoney": "double", - "SShortMarginRatioByVolume": "double", - "HShortMarginRatioByMoney": "double", - "HShortMarginRatioByVolume": "double", - "AShortMarginRatioByMoney": "double", - "AShortMarginRatioByVolume": "double", - "IsRelative": "int", - "ExchangeID": "string", -} - -CThostFtdcTradeParamField = { - "BrokerID": "string", - "TradeParamID": "char", - "TradeParamValue": "string", - "Memo": "string", -} - -CThostFtdcAuthenticationCodeField = { - "BrokerID": "string", - "UserProductInfo": "string", - "AuthCode": "string", - "PreAuthCode": "string", -} - -CThostFtdcReqSmsCodeGenerateField = { - "BrokerID": "string", - "UserID": "string", - "Password": "string", - "UserProductInfo": "string", - "MacAddress": "string", - "ClientIPAddress": "string", -} - -CThostFtdcRspSmsCodeGenerateField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcBrokerUserAuthMethodField = { - "BrokerID": "string", - "UserID": "string", - "IsSms": "int", -} - -CThostFtdcBrokerUserSmsCodeField = { - "BrokerID": "string", - "UserID": "string", - "Mobile": "string", - "SmsCode": "string", - "SeqNo": "int", - "Status": "char", -} - -CThostFtdcInstrumentMarginRateULField = { - "InstrumentID": "string", - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "HedgeFlag": "char", - "LongMarginRatioByMoney": "double", - "LongMarginRatioByVolume": "double", - "ShortMarginRatioByMoney": "double", - "ShortMarginRatioByVolume": "double", -} - -CThostFtdcFutureLimitPosiParamField = { - "InvestorRange": "char", - "BrokerID": "string", - "InvestorID": "string", - "ProductID": "string", - "ExchangeID": "string", - "SpecOpenVolume": "int", - "ArbiOpenVolume": "int", - "OpenVolume": "int", -} - -CThostFtdcLoginForbiddenIPField = { - "IPAddress": "string", -} - -CThostFtdcIPListField = { - "IPAddress": "string", - "IsWhite": "int", -} - -CThostFtdcInputOptionSelfCloseField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OptionSelfCloseRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "HedgeFlag": "char", - "OptSelfCloseFlag": "char", - "ExchangeID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcInputOptionSelfCloseActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OptionSelfCloseActionRef": "int", - "OptionSelfCloseRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "OptionSelfCloseSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InstrumentID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcOptionSelfCloseField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OptionSelfCloseRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "HedgeFlag": "char", - "OptSelfCloseFlag": "char", - "OptionSelfCloseLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "OptionSelfCloseSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "OptionSelfCloseStatus": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "ActiveUserID": "string", - "BrokerOptionSelfCloseSeq": "int", - "BranchID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcOptionSelfCloseActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OptionSelfCloseActionRef": "int", - "OptionSelfCloseRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "OptionSelfCloseSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "OptionSelfCloseLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "StatusMsg": "string", - "InstrumentID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryOptionSelfCloseField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "OptionSelfCloseSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", -} - -CThostFtdcExchangeOptionSelfCloseField = { - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "HedgeFlag": "char", - "OptSelfCloseFlag": "char", - "OptionSelfCloseLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "OptionSelfCloseSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "OptionSelfCloseStatus": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryOptionSelfCloseActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", -} - -CThostFtdcExchangeOptionSelfCloseActionField = { - "ExchangeID": "string", - "OptionSelfCloseSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "OptionSelfCloseLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "BranchID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcSyncDelaySwapField = { - "DelaySwapSeqNo": "string", - "BrokerID": "string", - "InvestorID": "string", - "FromCurrencyID": "string", - "FromAmount": "double", - "FromFrozenSwap": "double", - "ToCurrencyID": "string", - "ToAmount": "double", - "ToFrozenSwap": "double", -} - -CThostFtdcQrySyncDelaySwapField = { - "BrokerID": "string", - "DelaySwapSeqNo": "string", -} - -CThostFtdcInvestUnitField = { - "BrokerID": "string", - "InvestorID": "string", - "InvestUnitID": "string", - "InvestorUnitName": "string", - "InvestorGroupID": "string", - "CommModelID": "string", - "MarginModelID": "string", - "AccountID": "string", - "CurrencyID": "string", -} - -CThostFtdcQryInvestUnitField = { - "BrokerID": "string", - "InvestorID": "string", - "InvestUnitID": "string", -} - -CThostFtdcMarketDataField = { - "TradingDay": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "ExchangeInstID": "string", - "LastPrice": "double", - "PreSettlementPrice": "double", - "PreClosePrice": "double", - "PreOpenInterest": "double", - "OpenPrice": "double", - "HighestPrice": "double", - "LowestPrice": "double", - "Volume": "int", - "Turnover": "double", - "OpenInterest": "double", - "ClosePrice": "double", - "SettlementPrice": "double", - "UpperLimitPrice": "double", - "LowerLimitPrice": "double", - "PreDelta": "double", - "CurrDelta": "double", - "UpdateTime": "string", - "UpdateMillisec": "int", - "ActionDay": "string", -} - -CThostFtdcMarketDataBaseField = { - "TradingDay": "string", - "PreSettlementPrice": "double", - "PreClosePrice": "double", - "PreOpenInterest": "double", - "PreDelta": "double", -} - -CThostFtdcMarketDataStaticField = { - "OpenPrice": "double", - "HighestPrice": "double", - "LowestPrice": "double", - "ClosePrice": "double", - "UpperLimitPrice": "double", - "LowerLimitPrice": "double", - "SettlementPrice": "double", - "CurrDelta": "double", -} - -CThostFtdcMarketDataLastMatchField = { - "LastPrice": "double", - "Volume": "int", - "Turnover": "double", - "OpenInterest": "double", -} - -CThostFtdcMarketDataBestPriceField = { - "BidPrice1": "double", - "BidVolume1": "int", - "AskPrice1": "double", - "AskVolume1": "int", -} - -CThostFtdcMarketDataBid23Field = { - "BidPrice2": "double", - "BidVolume2": "int", - "BidPrice3": "double", - "BidVolume3": "int", -} - -CThostFtdcMarketDataAsk23Field = { - "AskPrice2": "double", - "AskVolume2": "int", - "AskPrice3": "double", - "AskVolume3": "int", -} - -CThostFtdcMarketDataBid45Field = { - "BidPrice4": "double", - "BidVolume4": "int", - "BidPrice5": "double", - "BidVolume5": "int", -} - -CThostFtdcMarketDataAsk45Field = { - "AskPrice4": "double", - "AskVolume4": "int", - "AskPrice5": "double", - "AskVolume5": "int", -} - -CThostFtdcMarketDataUpdateTimeField = { - "InstrumentID": "string", - "UpdateTime": "string", - "UpdateMillisec": "int", - "ActionDay": "string", - "ExchangeID": "string", -} - -CThostFtdcMarketDataExchangeField = { - "ExchangeID": "string", -} - -CThostFtdcSpecificInstrumentField = { - "InstrumentID": "string", -} - -CThostFtdcInstrumentStatusField = { - "ExchangeID": "string", - "ExchangeInstID": "string", - "SettlementGroupID": "string", - "InstrumentID": "string", - "InstrumentStatus": "char", - "TradingSegmentSN": "int", - "EnterTime": "string", - "EnterReason": "char", -} - -CThostFtdcQryInstrumentStatusField = { - "ExchangeID": "string", - "ExchangeInstID": "string", -} - -CThostFtdcInvestorAccountField = { - "BrokerID": "string", - "InvestorID": "string", - "AccountID": "string", - "CurrencyID": "string", - "BizType": "char", -} - -CThostFtdcPositionProfitAlgorithmField = { - "BrokerID": "string", - "AccountID": "string", - "Algorithm": "char", - "Memo": "string", - "CurrencyID": "string", -} - -CThostFtdcDiscountField = { - "BrokerID": "string", - "InvestorRange": "char", - "InvestorID": "string", - "Discount": "double", -} - -CThostFtdcQryTransferBankField = { - "BankID": "string", - "BankBrchID": "string", -} - -CThostFtdcTransferBankField = { - "BankID": "string", - "BankBrchID": "string", - "BankName": "string", - "IsActive": "int", -} - -CThostFtdcQryInvestorPositionDetailField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcInvestorPositionDetailField = { - "InstrumentID": "string", - "BrokerID": "string", - "InvestorID": "string", - "HedgeFlag": "char", - "Direction": "char", - "OpenDate": "string", - "TradeID": "string", - "Volume": "int", - "OpenPrice": "double", - "TradingDay": "string", - "SettlementID": "int", - "TradeType": "char", - "CombInstrumentID": "string", - "ExchangeID": "string", - "CloseProfitByDate": "double", - "CloseProfitByTrade": "double", - "PositionProfitByDate": "double", - "PositionProfitByTrade": "double", - "Margin": "double", - "ExchMargin": "double", - "MarginRateByMoney": "double", - "MarginRateByVolume": "double", - "LastSettlementPrice": "double", - "SettlementPrice": "double", - "CloseVolume": "int", - "CloseAmount": "double", - "InvestUnitID": "string", -} - -CThostFtdcTradingAccountPasswordField = { - "BrokerID": "string", - "AccountID": "string", - "Password": "string", - "CurrencyID": "string", -} - -CThostFtdcMDTraderOfferField = { - "ExchangeID": "string", - "TraderID": "string", - "ParticipantID": "string", - "Password": "string", - "InstallID": "int", - "OrderLocalID": "string", - "TraderConnectStatus": "char", - "ConnectRequestDate": "string", - "ConnectRequestTime": "string", - "LastReportDate": "string", - "LastReportTime": "string", - "ConnectDate": "string", - "ConnectTime": "string", - "StartDate": "string", - "StartTime": "string", - "TradingDay": "string", - "BrokerID": "string", - "MaxTradeID": "string", - "MaxOrderMessageReference": "string", - "BizType": "char", -} - -CThostFtdcQryMDTraderOfferField = { - "ExchangeID": "string", - "ParticipantID": "string", - "TraderID": "string", -} - -CThostFtdcQryNoticeField = { - "BrokerID": "string", -} - -CThostFtdcNoticeField = { - "BrokerID": "string", - "Content": "string", - "SequenceLabel": "string", -} - -CThostFtdcUserRightField = { - "BrokerID": "string", - "UserID": "string", - "UserRightType": "char", - "IsForbidden": "int", -} - -CThostFtdcQrySettlementInfoConfirmField = { - "BrokerID": "string", - "InvestorID": "string", - "AccountID": "string", - "CurrencyID": "string", -} - -CThostFtdcLoadSettlementInfoField = { - "BrokerID": "string", -} - -CThostFtdcBrokerWithdrawAlgorithmField = { - "BrokerID": "string", - "WithdrawAlgorithm": "char", - "UsingRatio": "double", - "IncludeCloseProfit": "char", - "AllWithoutTrade": "char", - "AvailIncludeCloseProfit": "char", - "IsBrokerUserEvent": "int", - "CurrencyID": "string", - "FundMortgageRatio": "double", - "BalanceAlgorithm": "char", -} - -CThostFtdcTradingAccountPasswordUpdateV1Field = { - "BrokerID": "string", - "InvestorID": "string", - "OldPassword": "string", - "NewPassword": "string", -} - -CThostFtdcTradingAccountPasswordUpdateField = { - "BrokerID": "string", - "AccountID": "string", - "OldPassword": "string", - "NewPassword": "string", - "CurrencyID": "string", -} - -CThostFtdcQryCombinationLegField = { - "CombInstrumentID": "string", - "LegID": "int", - "LegInstrumentID": "string", -} - -CThostFtdcQrySyncStatusField = { - "TradingDay": "string", -} - -CThostFtdcCombinationLegField = { - "CombInstrumentID": "string", - "LegID": "int", - "LegInstrumentID": "string", - "Direction": "char", - "LegMultiple": "int", - "ImplyLevel": "int", -} - -CThostFtdcSyncStatusField = { - "TradingDay": "string", - "DataSyncStatus": "char", -} - -CThostFtdcQryLinkManField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcLinkManField = { - "BrokerID": "string", - "InvestorID": "string", - "PersonType": "char", - "IdentifiedCardType": "char", - "IdentifiedCardNo": "string", - "PersonName": "string", - "Telephone": "string", - "Address": "string", - "ZipCode": "string", - "Priority": "int", - "UOAZipCode": "string", - "PersonFullName": "string", -} - -CThostFtdcQryBrokerUserEventField = { - "BrokerID": "string", - "UserID": "string", - "UserEventType": "char", -} - -CThostFtdcBrokerUserEventField = { - "BrokerID": "string", - "UserID": "string", - "UserEventType": "char", - "EventSequenceNo": "int", - "EventDate": "string", - "EventTime": "string", - "UserEventInfo": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", -} - -CThostFtdcQryContractBankField = { - "BrokerID": "string", - "BankID": "string", - "BankBrchID": "string", -} - -CThostFtdcContractBankField = { - "BrokerID": "string", - "BankID": "string", - "BankBrchID": "string", - "BankName": "string", -} - -CThostFtdcInvestorPositionCombineDetailField = { - "TradingDay": "string", - "OpenDate": "string", - "ExchangeID": "string", - "SettlementID": "int", - "BrokerID": "string", - "InvestorID": "string", - "ComTradeID": "string", - "TradeID": "string", - "InstrumentID": "string", - "HedgeFlag": "char", - "Direction": "char", - "TotalAmt": "int", - "Margin": "double", - "ExchMargin": "double", - "MarginRateByMoney": "double", - "MarginRateByVolume": "double", - "LegID": "int", - "LegMultiple": "int", - "CombInstrumentID": "string", - "TradeGroupID": "int", - "InvestUnitID": "string", -} - -CThostFtdcParkedOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OrderRef": "string", - "UserID": "string", - "OrderPriceType": "char", - "Direction": "char", - "CombOffsetFlag": "string", - "CombHedgeFlag": "string", - "LimitPrice": "double", - "VolumeTotalOriginal": "int", - "TimeCondition": "char", - "GTDDate": "string", - "VolumeCondition": "char", - "MinVolume": "int", - "ContingentCondition": "char", - "StopPrice": "double", - "ForceCloseReason": "char", - "IsAutoSuspend": "int", - "BusinessUnit": "string", - "RequestID": "int", - "UserForceClose": "int", - "ExchangeID": "string", - "ParkedOrderID": "string", - "UserType": "char", - "Status": "char", - "ErrorID": "int", - "ErrorMsg": "string", - "IsSwapOrder": "int", - "AccountID": "string", - "CurrencyID": "string", - "ClientID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcParkedOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OrderActionRef": "int", - "OrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "OrderSysID": "string", - "ActionFlag": "char", - "LimitPrice": "double", - "VolumeChange": "int", - "UserID": "string", - "InstrumentID": "string", - "ParkedOrderActionID": "string", - "UserType": "char", - "Status": "char", - "ErrorID": "int", - "ErrorMsg": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryParkedOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryParkedOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcRemoveParkedOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "ParkedOrderID": "string", - "InvestUnitID": "string", -} - -CThostFtdcRemoveParkedOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ParkedOrderActionID": "string", - "InvestUnitID": "string", -} - -CThostFtdcInvestorWithdrawAlgorithmField = { - "BrokerID": "string", - "InvestorRange": "char", - "InvestorID": "string", - "UsingRatio": "double", - "CurrencyID": "string", - "FundMortgageRatio": "double", -} - -CThostFtdcQryInvestorPositionCombineDetailField = { - "BrokerID": "string", - "InvestorID": "string", - "CombInstrumentID": "string", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcMarketDataAveragePriceField = { - "AveragePrice": "double", -} - -CThostFtdcVerifyInvestorPasswordField = { - "BrokerID": "string", - "InvestorID": "string", - "Password": "string", -} - -CThostFtdcUserIPField = { - "BrokerID": "string", - "UserID": "string", - "IPAddress": "string", - "IPMask": "string", - "MacAddress": "string", -} - -CThostFtdcTradingNoticeInfoField = { - "BrokerID": "string", - "InvestorID": "string", - "SendTime": "string", - "FieldContent": "string", - "SequenceSeries": "int", - "SequenceNo": "int", - "InvestUnitID": "string", -} - -CThostFtdcTradingNoticeField = { - "BrokerID": "string", - "InvestorRange": "char", - "InvestorID": "string", - "SequenceSeries": "int", - "UserID": "string", - "SendTime": "string", - "SequenceNo": "int", - "FieldContent": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryTradingNoticeField = { - "BrokerID": "string", - "InvestorID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryErrOrderField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcErrOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OrderRef": "string", - "UserID": "string", - "OrderPriceType": "char", - "Direction": "char", - "CombOffsetFlag": "string", - "CombHedgeFlag": "string", - "LimitPrice": "double", - "VolumeTotalOriginal": "int", - "TimeCondition": "char", - "GTDDate": "string", - "VolumeCondition": "char", - "MinVolume": "int", - "ContingentCondition": "char", - "StopPrice": "double", - "ForceCloseReason": "char", - "IsAutoSuspend": "int", - "BusinessUnit": "string", - "RequestID": "int", - "UserForceClose": "int", - "ErrorID": "int", - "ErrorMsg": "string", - "IsSwapOrder": "int", - "ExchangeID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcErrorConditionalOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "OrderRef": "string", - "UserID": "string", - "OrderPriceType": "char", - "Direction": "char", - "CombOffsetFlag": "string", - "CombHedgeFlag": "string", - "LimitPrice": "double", - "VolumeTotalOriginal": "int", - "TimeCondition": "char", - "GTDDate": "string", - "VolumeCondition": "char", - "MinVolume": "int", - "ContingentCondition": "char", - "StopPrice": "double", - "ForceCloseReason": "char", - "IsAutoSuspend": "int", - "BusinessUnit": "string", - "RequestID": "int", - "OrderLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "ExchangeInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "OrderSysID": "string", - "OrderSource": "char", - "OrderStatus": "char", - "OrderType": "char", - "VolumeTraded": "int", - "VolumeTotal": "int", - "InsertDate": "string", - "InsertTime": "string", - "ActiveTime": "string", - "SuspendTime": "string", - "UpdateTime": "string", - "CancelTime": "string", - "ActiveTraderID": "string", - "ClearingPartID": "string", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "UserForceClose": "int", - "ActiveUserID": "string", - "BrokerOrderSeq": "int", - "RelativeOrderSysID": "string", - "ZCETotalTradedVolume": "int", - "ErrorID": "int", - "ErrorMsg": "string", - "IsSwapOrder": "int", - "BranchID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryErrOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcErrOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "OrderActionRef": "int", - "OrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "OrderSysID": "string", - "ActionFlag": "char", - "LimitPrice": "double", - "VolumeChange": "int", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "OrderLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "StatusMsg": "string", - "InstrumentID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcQryExchangeSequenceField = { - "ExchangeID": "string", -} - -CThostFtdcExchangeSequenceField = { - "ExchangeID": "string", - "SequenceNo": "int", - "MarketStatus": "char", -} - -CThostFtdcQueryMaxOrderVolumeWithPriceField = { - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "Direction": "char", - "OffsetFlag": "char", - "HedgeFlag": "char", - "MaxVolume": "int", - "Price": "double", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryBrokerTradingParamsField = { - "BrokerID": "string", - "InvestorID": "string", - "CurrencyID": "string", - "AccountID": "string", -} - -CThostFtdcBrokerTradingParamsField = { - "BrokerID": "string", - "InvestorID": "string", - "MarginPriceType": "char", - "Algorithm": "char", - "AvailIncludeCloseProfit": "char", - "CurrencyID": "string", - "OptionRoyaltyPriceType": "char", - "AccountID": "string", -} - -CThostFtdcQryBrokerTradingAlgosField = { - "BrokerID": "string", - "ExchangeID": "string", - "InstrumentID": "string", -} - -CThostFtdcBrokerTradingAlgosField = { - "BrokerID": "string", - "ExchangeID": "string", - "InstrumentID": "string", - "HandlePositionAlgoID": "char", - "FindMarginRateAlgoID": "char", - "HandleTradingAccountAlgoID": "char", -} - -CThostFtdcQueryBrokerDepositField = { - "BrokerID": "string", - "ExchangeID": "string", -} - -CThostFtdcBrokerDepositField = { - "TradingDay": "string", - "BrokerID": "string", - "ParticipantID": "string", - "ExchangeID": "string", - "PreBalance": "double", - "CurrMargin": "double", - "CloseProfit": "double", - "Balance": "double", - "Deposit": "double", - "Withdraw": "double", - "Available": "double", - "Reserve": "double", - "FrozenMargin": "double", -} - -CThostFtdcQryCFMMCBrokerKeyField = { - "BrokerID": "string", -} - -CThostFtdcCFMMCBrokerKeyField = { - "BrokerID": "string", - "ParticipantID": "string", - "CreateDate": "string", - "CreateTime": "string", - "KeyID": "int", - "CurrentKey": "string", - "KeyKind": "char", -} - -CThostFtdcCFMMCTradingAccountKeyField = { - "BrokerID": "string", - "ParticipantID": "string", - "AccountID": "string", - "KeyID": "int", - "CurrentKey": "string", -} - -CThostFtdcQryCFMMCTradingAccountKeyField = { - "BrokerID": "string", - "InvestorID": "string", -} - -CThostFtdcBrokerUserOTPParamField = { - "BrokerID": "string", - "UserID": "string", - "OTPVendorsID": "string", - "SerialNumber": "string", - "AuthKey": "string", - "LastDrift": "int", - "LastSuccess": "int", - "OTPType": "char", -} - -CThostFtdcManualSyncBrokerUserOTPField = { - "BrokerID": "string", - "UserID": "string", - "OTPType": "char", - "FirstOTP": "string", - "SecondOTP": "string", -} - -CThostFtdcCommRateModelField = { - "BrokerID": "string", - "CommModelID": "string", - "CommModelName": "string", -} - -CThostFtdcQryCommRateModelField = { - "BrokerID": "string", - "CommModelID": "string", -} - -CThostFtdcMarginModelField = { - "BrokerID": "string", - "MarginModelID": "string", - "MarginModelName": "string", -} - -CThostFtdcQryMarginModelField = { - "BrokerID": "string", - "MarginModelID": "string", -} - -CThostFtdcEWarrantOffsetField = { - "TradingDay": "string", - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "InstrumentID": "string", - "Direction": "char", - "HedgeFlag": "char", - "Volume": "int", - "InvestUnitID": "string", -} - -CThostFtdcQryEWarrantOffsetField = { - "BrokerID": "string", - "InvestorID": "string", - "ExchangeID": "string", - "InstrumentID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQryInvestorProductGroupMarginField = { - "BrokerID": "string", - "InvestorID": "string", - "ProductGroupID": "string", - "HedgeFlag": "char", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcInvestorProductGroupMarginField = { - "ProductGroupID": "string", - "BrokerID": "string", - "InvestorID": "string", - "TradingDay": "string", - "SettlementID": "int", - "FrozenMargin": "double", - "LongFrozenMargin": "double", - "ShortFrozenMargin": "double", - "UseMargin": "double", - "LongUseMargin": "double", - "ShortUseMargin": "double", - "ExchMargin": "double", - "LongExchMargin": "double", - "ShortExchMargin": "double", - "CloseProfit": "double", - "FrozenCommission": "double", - "Commission": "double", - "FrozenCash": "double", - "CashIn": "double", - "PositionProfit": "double", - "OffsetAmount": "double", - "LongOffsetAmount": "double", - "ShortOffsetAmount": "double", - "ExchOffsetAmount": "double", - "LongExchOffsetAmount": "double", - "ShortExchOffsetAmount": "double", - "HedgeFlag": "char", - "ExchangeID": "string", - "InvestUnitID": "string", -} - -CThostFtdcQueryCFMMCTradingAccountTokenField = { - "BrokerID": "string", - "InvestorID": "string", - "InvestUnitID": "string", -} - -CThostFtdcCFMMCTradingAccountTokenField = { - "BrokerID": "string", - "ParticipantID": "string", - "AccountID": "string", - "KeyID": "int", - "Token": "string", -} - -CThostFtdcInstructionRightField = { - "BrokerID": "string", - "ExchangeID": "string", - "InvestorID": "string", - "InstructionRight": "char", - "IsForbidden": "int", -} - -CThostFtdcQryProductGroupField = { - "ProductID": "string", - "ExchangeID": "string", -} - -CThostFtdcProductGroupField = { - "ProductID": "string", - "ExchangeID": "string", - "ProductGroupID": "string", -} - -CThostFtdcBulletinField = { - "ExchangeID": "string", - "TradingDay": "string", - "BulletinID": "int", - "SequenceNo": "int", - "NewsType": "string", - "NewsUrgency": "char", - "SendTime": "string", - "Abstract": "string", - "ComeFrom": "string", - "Content": "string", - "URLLink": "string", - "MarketID": "string", -} - -CThostFtdcQryBulletinField = { - "ExchangeID": "string", - "BulletinID": "int", - "SequenceNo": "int", - "NewsType": "string", - "NewsUrgency": "char", -} - -CThostFtdcReqOpenAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "SecDaBeBl": "double", - "BankChal": "char", -} - -CThostFtdcReqCancelAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "SecDaBeBl": "double", - "BankChal": "char", -} - -CThostFtdcReqChangeAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "NewBankAccount": "string", - "NewBankPassWord": "string", - "AccountID": "string", - "Password": "string", - "BankAccType": "char", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "BrokerIDByBank": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "TID": "int", - "Digest": "string", -} - -CThostFtdcReqTransferField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "FutureSerial": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "TradeAmount": "double", - "FutureFetchAmount": "double", - "FeePayFlag": "char", - "CustFee": "double", - "BrokerFee": "double", - "Message": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "TransferStatus": "char", -} - -CThostFtdcRspTransferField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "FutureSerial": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "TradeAmount": "double", - "FutureFetchAmount": "double", - "FeePayFlag": "char", - "CustFee": "double", - "BrokerFee": "double", - "Message": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "TransferStatus": "char", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcReqRepealField = { - "RepealTimeInterval": "int", - "RepealedTimes": "int", - "BankRepealFlag": "char", - "BrokerRepealFlag": "char", - "PlateRepealSerial": "int", - "BankRepealSerial": "string", - "FutureRepealSerial": "int", - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "FutureSerial": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "TradeAmount": "double", - "FutureFetchAmount": "double", - "FeePayFlag": "char", - "CustFee": "double", - "BrokerFee": "double", - "Message": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "TransferStatus": "char", -} - -CThostFtdcRspRepealField = { - "RepealTimeInterval": "int", - "RepealedTimes": "int", - "BankRepealFlag": "char", - "BrokerRepealFlag": "char", - "PlateRepealSerial": "int", - "BankRepealSerial": "string", - "FutureRepealSerial": "int", - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "FutureSerial": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "TradeAmount": "double", - "FutureFetchAmount": "double", - "FeePayFlag": "char", - "CustFee": "double", - "BrokerFee": "double", - "Message": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "TransferStatus": "char", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcReqQueryAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "FutureSerial": "int", - "InstallID": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", -} - -CThostFtdcRspQueryAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "FutureSerial": "int", - "InstallID": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "BankUseAmount": "double", - "BankFetchAmount": "double", -} - -CThostFtdcFutureSignIOField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", -} - -CThostFtdcRspFutureSignInField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", - "PinKey": "string", - "MacKey": "string", -} - -CThostFtdcReqFutureSignOutField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", -} - -CThostFtdcRspFutureSignOutField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcReqQueryTradeResultBySerialField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "Reference": "int", - "RefrenceIssureType": "char", - "RefrenceIssure": "string", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "CurrencyID": "string", - "TradeAmount": "double", - "Digest": "string", -} - -CThostFtdcRspQueryTradeResultBySerialField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "ErrorID": "int", - "ErrorMsg": "string", - "Reference": "int", - "RefrenceIssureType": "char", - "RefrenceIssure": "string", - "OriginReturnCode": "string", - "OriginDescrInfoForReturnCode": "string", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "CurrencyID": "string", - "TradeAmount": "double", - "Digest": "string", -} - -CThostFtdcReqDayEndFileReadyField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "FileBusinessCode": "char", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", -} - -CThostFtdcRspDayEndFileReadyField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "FileBusinessCode": "char", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcDayEndFileReadyField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "FileBusinessCode": "char", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcReturnResultField = { - "ReturnCode": "string", - "DescrInfoForReturnCode": "string", -} - -CThostFtdcVerifyFuturePasswordField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "AccountID": "string", - "Password": "string", - "BankAccount": "string", - "BankPassWord": "string", - "InstallID": "int", - "TID": "int", - "CurrencyID": "string", -} - -CThostFtdcVerifyCustInfoField = { - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", -} - -CThostFtdcVerifyFuturePasswordAndCustInfoField = { - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "AccountID": "string", - "Password": "string", - "CurrencyID": "string", -} - -CThostFtdcDepositResultInformField = { - "DepositSeqNo": "string", - "BrokerID": "string", - "InvestorID": "string", - "Deposit": "double", - "RequestID": "int", - "ReturnCode": "string", - "DescrInfoForReturnCode": "string", -} - -CThostFtdcReqSyncKeyField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Message": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", -} - -CThostFtdcRspSyncKeyField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Message": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcNotifyQueryAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustType": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "FutureSerial": "int", - "InstallID": "int", - "UserID": "string", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "BankUseAmount": "double", - "BankFetchAmount": "double", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcTransferSerialField = { - "PlateSerial": "int", - "TradeDate": "string", - "TradingDay": "string", - "TradeTime": "string", - "TradeCode": "string", - "SessionID": "int", - "BankID": "string", - "BankBranchID": "string", - "BankAccType": "char", - "BankAccount": "string", - "BankSerial": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "FutureAccType": "char", - "AccountID": "string", - "InvestorID": "string", - "FutureSerial": "int", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CurrencyID": "string", - "TradeAmount": "double", - "CustFee": "double", - "BrokerFee": "double", - "AvailabilityFlag": "char", - "OperatorCode": "string", - "BankNewAccount": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcQryTransferSerialField = { - "BrokerID": "string", - "AccountID": "string", - "BankID": "string", - "CurrencyID": "string", -} - -CThostFtdcNotifyFutureSignInField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", - "PinKey": "string", - "MacKey": "string", -} - -CThostFtdcNotifyFutureSignOutField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Digest": "string", - "CurrencyID": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcNotifySyncKeyField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "InstallID": "int", - "UserID": "string", - "Message": "string", - "DeviceID": "string", - "BrokerIDByBank": "string", - "OperNo": "string", - "RequestID": "int", - "TID": "int", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcQryAccountregisterField = { - "BrokerID": "string", - "AccountID": "string", - "BankID": "string", - "BankBranchID": "string", - "CurrencyID": "string", -} - -CThostFtdcAccountregisterField = { - "TradeDay": "string", - "BankID": "string", - "BankBranchID": "string", - "BankAccount": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "AccountID": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "CustomerName": "string", - "CurrencyID": "string", - "OpenOrDestroy": "char", - "RegDate": "string", - "OutDate": "string", - "TID": "int", - "CustType": "char", - "BankAccType": "char", -} - -CThostFtdcOpenAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "ErrorID": "int", - "ErrorMsg": "string", - "SecDaBeBl": "double", - "BankChal": "char", -} - -CThostFtdcCancelAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "SecDaBeBl": "double", - "BankChal": "char", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcChangeAccountField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "NewBankAccount": "string", - "NewBankPassWord": "string", - "AccountID": "string", - "Password": "string", - "BankAccType": "char", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "BrokerIDByBank": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "TID": "int", - "Digest": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcSecAgentACIDMapField = { - "BrokerID": "string", - "UserID": "string", - "AccountID": "string", - "CurrencyID": "string", - "BrokerSecAgentID": "string", -} - -CThostFtdcQrySecAgentACIDMapField = { - "BrokerID": "string", - "UserID": "string", - "AccountID": "string", - "CurrencyID": "string", -} - -CThostFtdcUserRightsAssignField = { - "BrokerID": "string", - "UserID": "string", - "DRIdentityID": "int", -} - -CThostFtdcBrokerUserRightAssignField = { - "BrokerID": "string", - "DRIdentityID": "int", - "Tradeable": "int", -} - -CThostFtdcDRTransferField = { - "OrigDRIdentityID": "int", - "DestDRIdentityID": "int", - "OrigBrokerID": "string", - "DestBrokerID": "string", -} - -CThostFtdcFensUserInfoField = { - "BrokerID": "string", - "UserID": "string", - "LoginMode": "char", -} - -CThostFtdcCurrTransferIdentityField = { - "IdentityID": "int", -} - -CThostFtdcLoginForbiddenUserField = { - "BrokerID": "string", - "UserID": "string", - "IPAddress": "string", -} - -CThostFtdcQryLoginForbiddenUserField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcMulticastGroupInfoField = { - "GroupIP": "string", - "GroupPort": "int", - "SourceIP": "string", -} - -CThostFtdcTradingAccountReserveField = { - "BrokerID": "string", - "AccountID": "string", - "Reserve": "double", - "CurrencyID": "string", -} - -CThostFtdcQryLoginForbiddenIPField = { - "IPAddress": "string", -} - -CThostFtdcQryIPListField = { - "IPAddress": "string", -} - -CThostFtdcQryUserRightsAssignField = { - "BrokerID": "string", - "UserID": "string", -} - -CThostFtdcDBFRecordField = { - "DBFComdType": "string", - "DBFComTime": "string", - "DBFOComNo": "string", - "DBFComNo": "string", - "DBFFdName1": "string", - "DBFFdContent1": "string", - "DBFFdName2": "string", - "DBFFdContent2": "string", - "DBFFdName3": "string", - "DBFFdContent3": "string", - "DBFFdName4": "string", - "DBFFdContent4": "string", -} - -CThostFtdcAccountPropertyField = { - "BrokerID": "string", - "AccountID": "string", - "BankID": "string", - "BankAccount": "string", - "OpenName": "string", - "OpenBank": "string", - "IsActive": "int", - "AccountSourceType": "char", - "OpenDate": "string", - "CancelDate": "string", - "OperatorID": "string", - "OperateDate": "string", - "OperateTime": "string", - "CurrencyID": "string", -} - -CThostFtdcQryCurrDRIdentityField = { - "DRIdentityID": "int", -} - -CThostFtdcCurrDRIdentityField = { - "DRIdentityID": "int", -} - -CThostFtdcReqReserveOpenAccountTpdField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "SecDaBeBl": "double", - "BankChal": "char", -} - -CThostFtdcReserveOpenAccountTpdField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "SecDaBeBl": "double", - "BankChal": "char", - "ReserveOpenAccStas": "char", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcReqResOpenAccConfirmTpdField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "BankAccType": "char", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "BrokerIDByBank": "string", - "BankSecuAccType": "char", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "DeviceID": "string", - "OperNo": "string", - "UserID": "string", - "TID": "int", - "Digest": "string", -} - -CThostFtdcResOpenAccConfirmTpdField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "BankAccType": "char", - "InstallID": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "BrokerIDByBank": "string", - "BankSecuAccType": "char", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "DeviceID": "string", - "OperNo": "string", - "UserID": "string", - "TID": "int", - "Digest": "string", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcReqSecuritiesDepositInterestField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "FutureSerial": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "DepositInterest": "double", -} - -CThostFtdcSecuritiesDepositInterestField = { - "TradeCode": "string", - "BankID": "string", - "BankBranchID": "string", - "BrokerID": "string", - "BrokerBranchID": "string", - "TradeDate": "string", - "TradeTime": "string", - "BankSerial": "string", - "TradingDay": "string", - "PlateSerial": "int", - "LastFragment": "char", - "SessionID": "int", - "CustomerName": "string", - "IdCardType": "char", - "IdentifiedCardNo": "string", - "Gender": "char", - "CountryCode": "string", - "CustType": "char", - "Address": "string", - "ZipCode": "string", - "Telephone": "string", - "MobilePhone": "string", - "Fax": "string", - "EMail": "string", - "MoneyAccountStatus": "char", - "BankAccount": "string", - "BankPassWord": "string", - "AccountID": "string", - "Password": "string", - "InstallID": "int", - "FutureSerial": "int", - "VerifyCertNoFlag": "char", - "CurrencyID": "string", - "CashExchangeCode": "char", - "Digest": "string", - "BankAccType": "char", - "DeviceID": "string", - "BankSecuAccType": "char", - "BrokerIDByBank": "string", - "BankSecuAcc": "string", - "BankPwdFlag": "char", - "SecuPwdFlag": "char", - "OperNo": "string", - "TID": "int", - "UserID": "string", - "DepositInterest": "double", - "InterestType": "char", - "ErrorID": "int", - "ErrorMsg": "string", -} - -CThostFtdcBrokerBreakSectionField = { - "ExchangeID": "string", - "BrokerID": "string", - "TimeStart": "string", - "TimeEnd": "string", - "SequenceNo": "int", -} - -CThostFtdcBrokerLockInvestorStockField = { - "ExchangeID": "string", - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", - "Volume": "int", -} - -CThostFtdcQryBrokerLockInvestorStockField = { - "ExchangeID": "string", - "BrokerID": "string", - "InvestorID": "string", - "InstrumentID": "string", -} - -CThostFtdcExecIsCheckUnderlyingField = { - "ExchangeID": "string", - "UnderlyingInstrID": "string", - "IsCheck": "int", -} - -CThostFtdcQryExecIsCheckUnderlyingField = { - "ExchangeID": "string", - "UnderlyingInstrID": "string", -} - -CThostFtdcPBUInvestorMapField = { - "BrokerID": "string", - "ExchangeID": "string", - "InvestorID": "string", - "PBU": "string", - "ClientID": "string", - "OperationDate": "string", - "OperationTime": "string", -} - -CThostFtdcInputExecCombineOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "CallInstrumentID": "string", - "PutInstrumentID": "string", - "ExecCombineOrderRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "ActionType": "char", - "ExchangeID": "string", - "InvestUnitID": "string", - "ClientID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcInputExecCombineOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExecCombineOrderActionRef": "int", - "ExecCombineOrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "ExecCombineOrderSysID": "string", - "ActionFlag": "char", - "UserID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExecCombineOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "CallInstrumentID": "string", - "PutInstrumentID": "string", - "ExecCombineOrderRef": "string", - "UserID": "string", - "Volume": "int", - "RequestID": "int", - "BusinessUnit": "string", - "ActionType": "char", - "ExecCombineOrderLocalID": "string", - "ExchangeID": "string", - "ParticipantID": "string", - "ClientID": "string", - "UnderlyingInstID": "string", - "ExchangeCallInstID": "string", - "ExchangePutInstID": "string", - "TraderID": "string", - "InstallID": "int", - "OrderSubmitStatus": "char", - "NotifySequence": "int", - "TradingDay": "string", - "SettlementID": "int", - "ExecCombineOrderSysID": "string", - "InsertDate": "string", - "InsertTime": "string", - "CancelTime": "string", - "ExecResult": "char", - "ClearingPartID": "string", - "SequenceNo": "int", - "FrontID": "int", - "SessionID": "int", - "UserProductInfo": "string", - "StatusMsg": "string", - "ActiveUserID": "string", - "BrokerExecCombineOrderSeq": "int", - "BranchID": "string", - "InvestUnitID": "string", - "AccountID": "string", - "CurrencyID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcExecCombineOrderActionField = { - "BrokerID": "string", - "InvestorID": "string", - "ExecCombineOrderActionRef": "int", - "ExecCombineOrderRef": "string", - "RequestID": "int", - "FrontID": "int", - "SessionID": "int", - "ExchangeID": "string", - "ExecCombineOrderSysID": "string", - "ActionFlag": "char", - "ActionDate": "string", - "ActionTime": "string", - "TraderID": "string", - "InstallID": "int", - "ExecCombineOrderLocalID": "string", - "ActionLocalID": "string", - "ParticipantID": "string", - "ClientID": "string", - "BusinessUnit": "string", - "OrderActionStatus": "char", - "UserID": "string", - "ActionType": "char", - "StatusMsg": "string", - "CallInstrumentID": "string", - "PutInstrumentID": "string", - "BranchID": "string", - "InvestUnitID": "string", - "IPAddress": "string", - "MacAddress": "string", -} - -CThostFtdcQryExecCombineOrderField = { - "BrokerID": "string", - "InvestorID": "string", - "CallInstrumentID": "string", - "PutInstrumentID": "string", - "ExchangeID": "string", - "ExecCombineOrderSysID": "string", - "InsertTimeStart": "string", - "InsertTimeEnd": "string", -} - -CThostFtdcUserSystemInfoField = { - "BrokerID": "string", - "UserID": "string", - "ClientSystemInfoLen": "int", - "ClientSystemInfo": "string", - "ClientPublicIP": "string", - "ClientIPPort": "int", - "ClientLoginTime": "string", - "ClientAppID": "string", -} - -CThostFtdcReqApiHandshakeField = { - "CryptoKeyVersion": "string", -} - -CThostFtdcRspApiHandshakeField = { - "FrontHandshakeDataLen": "int", - "FrontHandshakeData": "string", - "IsApiAuthEnabled": "int", -} - -CThostFtdcReqVerifyApiKeyField = { - "ApiHandshakeDataLen": "int", - "ApiHandshakeData": "string", -} - -CThostFtdcAppIDAuthAssignField = { - "BrokerID": "string", - "AppID": "string", - "DRIdentityID": "int", -} - -CThostFtdcAppAuthenticationCodeField = { - "BrokerID": "string", - "AppID": "string", - "AuthCode": "string", - "PreAuthCode": "string", - "AppType": "char", -} - - - diff --git a/vnpy/api/sec/generator/Sec_td_header_define.h b/vnpy/api/sec/generator/Sec_td_header_define.h deleted file mode 100644 index e8f909e8..00000000 --- a/vnpy/api/sec/generator/Sec_td_header_define.h +++ /dev/null @@ -1,130 +0,0 @@ -#define ONFRONTCONNECTED 0 -#define ONFRONTDISCONNECTED 1 -#define ONHEARTBEATWARNING 2 -#define ONRSPAUTHENTICATE 3 -#define ONRSPUSERLOGIN 4 -#define ONRSPUSERLOGOUT 5 -#define ONRSPUSERPASSWORDUPDATE 6 -#define ONRSPTRADINGACCOUNTPASSWORDUPDATE 7 -#define ONRSPORDERINSERT 8 -#define ONRSPPARKEDORDERINSERT 9 -#define ONRSPPARKEDORDERACTION 10 -#define ONRSPORDERACTION 11 -#define ONRSPQUERYMAXORDERVOLUME 12 -#define ONRSPSETTLEMENTINFOCONFIRM 13 -#define ONRSPREMOVEPARKEDORDER 14 -#define ONRSPREMOVEPARKEDORDERACTION 15 -#define ONRSPEXECORDERINSERT 16 -#define ONRSPEXECORDERACTION 17 -#define ONRSPFORQUOTEINSERT 18 -#define ONRSPQUOTEINSERT 19 -#define ONRSPQUOTEACTION 20 -#define ONRSPLOCKINSERT 21 -#define ONRSPBATCHORDERACTION 22 -#define ONRSPCOMBACTIONINSERT 23 -#define ONRSPQRYORDER 24 -#define ONRSPQRYTRADE 25 -#define ONRSPQRYINVESTORPOSITION 26 -#define ONRSPQRYTRADINGACCOUNT 27 -#define ONRSPQRYINVESTOR 28 -#define ONRSPQRYTRADINGCODE 29 -#define ONRSPQRYINSTRUMENTMARGINRATE 30 -#define ONRSPQRYINSTRUMENTCOMMISSIONRATE 31 -#define ONRSPQRYEXCHANGE 32 -#define ONRSPQRYPRODUCT 33 -#define ONRSPQRYINSTRUMENT 34 -#define ONRSPQRYDEPTHMARKETDATA 35 -#define ONRSPQRYSETTLEMENTINFO 36 -#define ONRSPQRYTRANSFERBANK 37 -#define ONRSPQRYINVESTORPOSITIONDETAIL 38 -#define ONRSPQRYNOTICE 39 -#define ONRSPQRYSETTLEMENTINFOCONFIRM 40 -#define ONRSPQRYINVESTORPOSITIONCOMBINEDETAIL 41 -#define ONRSPQRYCFMMCTRADINGACCOUNTKEY 42 -#define ONRSPQRYEWARRANTOFFSET 43 -#define ONRSPQRYINVESTORPRODUCTGROUPMARGIN 44 -#define ONRSPQRYEXCHANGEMARGINRATE 45 -#define ONRSPQRYEXCHANGEMARGINRATEADJUST 46 -#define ONRSPQRYEXCHANGERATE 47 -#define ONRSPQRYSECAGENTACIDMAP 48 -#define ONRSPQRYPRODUCTEXCHRATE 49 -#define ONRSPQRYPRODUCTGROUP 50 -#define ONRSPQRYMMINSTRUMENTCOMMISSIONRATE 51 -#define ONRSPQRYMMOPTIONINSTRCOMMRATE 52 -#define ONRSPQRYINSTRUMENTORDERCOMMRATE 53 -#define ONRSPQRYOPTIONINSTRTRADECOST 54 -#define ONRSPQRYOPTIONINSTRCOMMRATE 55 -#define ONRSPQRYEXECORDER 56 -#define ONRSPQRYFORQUOTE 57 -#define ONRSPQRYQUOTE 58 -#define ONRSPQRYLOCK 59 -#define ONRSPQRYLOCKPOSITION 60 -#define ONRSPQRYETFOPTIONINSTRCOMMRATE 61 -#define ONRSPQRYINVESTORLEVEL 62 -#define ONRSPQRYEXECFREEZE 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 ONRTNLOCK 86 -#define ONERRRTNLOCKINSERT 87 -#define ONERRRTNBATCHORDERACTION 88 -#define ONRTNCOMBACTION 89 -#define ONERRRTNCOMBACTIONINSERT 90 -#define ONRSPQRYCONTRACTBANK 91 -#define ONRSPQRYPARKEDORDER 92 -#define ONRSPQRYPARKEDORDERACTION 93 -#define ONRSPQRYTRADINGNOTICE 94 -#define ONRSPQRYBROKERTRADINGPARAMS 95 -#define ONRSPQRYBROKERTRADINGALGOS 96 -#define ONRSPQUERYCFMMCTRADINGACCOUNTTOKEN 97 -#define ONRTNFROMBANKTOFUTUREBYBANK 98 -#define ONRTNFROMFUTURETOBANKBYBANK 99 -#define ONRTNREPEALFROMBANKTOFUTUREBYBANK 100 -#define ONRTNREPEALFROMFUTURETOBANKBYBANK 101 -#define ONRTNFROMBANKTOFUTUREBYFUTURE 102 -#define ONRTNFROMFUTURETOBANKBYFUTURE 103 -#define ONRTNREPEALFROMBANKTOFUTUREBYFUTUREMANUAL 104 -#define ONRTNREPEALFROMFUTURETOBANKBYFUTUREMANUAL 105 -#define ONRTNQUERYBANKBALANCEBYFUTURE 106 -#define ONERRRTNBANKTOFUTUREBYFUTURE 107 -#define ONERRRTNFUTURETOBANKBYFUTURE 108 -#define ONERRRTNREPEALBANKTOFUTUREBYFUTUREMANUAL 109 -#define ONERRRTNREPEALFUTURETOBANKBYFUTUREMANUAL 110 -#define ONERRRTNQUERYBANKBALANCEBYFUTURE 111 -#define ONRTNREPEALFROMBANKTOFUTUREBYFUTURE 112 -#define ONRTNREPEALFROMFUTURETOBANKBYFUTURE 113 -#define ONRSPFROMBANKTOFUTUREBYFUTURE 114 -#define ONRSPFROMFUTURETOBANKBYFUTURE 115 -#define ONRSPQUERYBANKACCOUNTMONEYBYFUTURE 116 -#define ONRTNOPENACCOUNTBYBANK 117 -#define ONRTNCANCELACCOUNTBYBANK 118 -#define ONRTNCHANGEACCOUNTBYBANK 119 -#define ONRTNRESOPENACCCONFIRMTPDBYBANK 120 -#define ONRSPRESERVEOPENACCOUNTTPDBYFUTURE 121 -#define ONRSPSECURITIESDEPOSITINTERESTBYFUTURE 122 -#define ONRSPDAYENDFILEREADYBYFUTURE 123 -#define ONRSPEXECCOMBINEORDERINSERT 124 -#define ONRSPEXECCOMBINEORDERACTION 125 -#define ONRSPQRYEXECCOMBINEORDER 126 -#define ONERRRTNEXECCOMBINEORDERACTION 127 -#define ONERRRTNEXECCOMBINEORDERINSERT 128 -#define ONRTNEXECCOMBINEORDER 129 diff --git a/vnpy/api/sec/generator/Sec_td_header_function.h b/vnpy/api/sec/generator/Sec_td_header_function.h deleted file mode 100644 index af66520f..00000000 --- a/vnpy/api/sec/generator/Sec_td_header_function.h +++ /dev/null @@ -1,162 +0,0 @@ -int reqAuthenticate(const dict &req, int reqid); - -int reqUserLogin(const dict &req, int reqid); - -int reqUserLogout(const dict &req, int reqid); - -int reqUserPasswordUpdate(const dict &req, int reqid); - -int reqTradingAccountPasswordUpdate(const dict &req, int reqid); - -int reqOrderInsert(const dict &req, int reqid); - -int reqParkedOrderInsert(const dict &req, int reqid); - -int reqParkedOrderAction(const dict &req, int reqid); - -int reqOrderAction(const dict &req, int reqid); - -int reqQueryMaxOrderVolume(const dict &req, int reqid); - -int reqSettlementInfoConfirm(const dict &req, int reqid); - -int reqRemoveParkedOrder(const dict &req, int reqid); - -int reqRemoveParkedOrderAction(const dict &req, int reqid); - -int reqExecOrderInsert(const dict &req, int reqid); - -int reqExecOrderAction(const dict &req, int reqid); - -int reqForQuoteInsert(const dict &req, int reqid); - -int reqQuoteInsert(const dict &req, int reqid); - -int reqQuoteAction(const dict &req, int reqid); - -int reqLockInsert(const dict &req, int reqid); - -int reqBatchOrderAction(const dict &req, int reqid); - -int reqCombActionInsert(const dict &req, int reqid); - -int reqQryOrder(const dict &req, int reqid); - -int reqQryTrade(const dict &req, int reqid); - -int reqQryInvestorPosition(const dict &req, int reqid); - -int reqQryTradingAccount(const dict &req, int reqid); - -int reqQryInvestor(const dict &req, int reqid); - -int reqQryTradingCode(const dict &req, int reqid); - -int reqQryInstrumentMarginRate(const dict &req, int reqid); - -int reqQryInstrumentCommissionRate(const dict &req, int reqid); - -int reqQryExchange(const dict &req, int reqid); - -int reqQryProduct(const dict &req, int reqid); - -int reqQryInstrument(const dict &req, int reqid); - -int reqQryDepthMarketData(const dict &req, int reqid); - -int reqQrySettlementInfo(const dict &req, int reqid); - -int reqQryTransferBank(const dict &req, int reqid); - -int reqQryInvestorPositionDetail(const dict &req, int reqid); - -int reqQryNotice(const dict &req, int reqid); - -int reqQrySettlementInfoConfirm(const dict &req, int reqid); - -int reqQryInvestorPositionCombineDetail(const dict &req, int reqid); - -int reqQryCFMMCTradingAccountKey(const dict &req, int reqid); - -int reqQryEWarrantOffset(const dict &req, int reqid); - -int reqQryInvestorProductGroupMargin(const dict &req, int reqid); - -int reqQryExchangeMarginRate(const dict &req, int reqid); - -int reqQryExchangeMarginRateAdjust(const dict &req, int reqid); - -int reqQryExchangeRate(const dict &req, int reqid); - -int reqQrySecAgentACIDMap(const dict &req, int reqid); - -int reqQryProductExchRate(const dict &req, int reqid); - -int reqQryProductGroup(const dict &req, int reqid); - -int reqQryMMInstrumentCommissionRate(const dict &req, int reqid); - -int reqQryMMOptionInstrCommRate(const dict &req, int reqid); - -int reqQryInstrumentOrderCommRate(const dict &req, int reqid); - -int reqQryOptionInstrTradeCost(const dict &req, int reqid); - -int reqQryOptionInstrCommRate(const dict &req, int reqid); - -int reqQryExecOrder(const dict &req, int reqid); - -int reqQryForQuote(const dict &req, int reqid); - -int reqQryQuote(const dict &req, int reqid); - -int reqQryLock(const dict &req, int reqid); - -int reqQryLockPosition(const dict &req, int reqid); - -int reqQryETFOptionInstrCommRate(const dict &req, int reqid); - -int reqQryInvestorLevel(const dict &req, int reqid); - -int reqQryExecFreeze(const dict &req, int reqid); - -int reqQryCombInstrumentGuard(const dict &req, int reqid); - -int reqQryCombAction(const dict &req, int reqid); - -int reqQryTransferSerial(const dict &req, int reqid); - -int reqQryAccountregister(const dict &req, int reqid); - -int reqQryContractBank(const dict &req, int reqid); - -int reqQryParkedOrder(const dict &req, int reqid); - -int reqQryParkedOrderAction(const dict &req, int reqid); - -int reqQryTradingNotice(const dict &req, int reqid); - -int reqQryBrokerTradingParams(const dict &req, int reqid); - -int reqQryBrokerTradingAlgos(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 reqReserveOpenAccountTpdByFuture(const dict &req, int reqid); - -int reqSecuritiesDepositInterestByFuture(const dict &req, int reqid); - -int reqDayEndFileReadyByFuture(const dict &req, int reqid); - -int reqExecCombineOrderInsert(const dict &req, int reqid); - -int reqExecCombineOrderAction(const dict &req, int reqid); - -int reqQryExecCombineOrder(const dict &req, int reqid); - diff --git a/vnpy/api/sec/generator/Sec_td_header_on.h b/vnpy/api/sec/generator/Sec_td_header_on.h deleted file mode 100644 index 997014af..00000000 --- a/vnpy/api/sec/generator/Sec_td_header_on.h +++ /dev/null @@ -1,260 +0,0 @@ -virtual void onFrontConnected() {}; - -virtual void onFrontDisconnected(int reqid) {}; - -virtual void onHeartBeatWarning(int reqid) {}; - -virtual void onRspAuthenticate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspUserLogin(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspUserLogout(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspUserPasswordUpdate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspTradingAccountPasswordUpdate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspOrderInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspParkedOrderInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQueryMaxOrderVolume(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspSettlementInfoConfirm(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspRemoveParkedOrder(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspRemoveParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspExecOrderInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspExecOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspForQuoteInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQuoteInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQuoteAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspLockInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspBatchOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspCombActionInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryOrder(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryTrade(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInvestorPosition(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryTradingAccount(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInvestor(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryTradingCode(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInstrumentMarginRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInstrumentCommissionRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryExchange(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryProduct(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInstrument(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryDepthMarketData(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQrySettlementInfo(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryTransferBank(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInvestorPositionDetail(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryNotice(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQrySettlementInfoConfirm(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInvestorPositionCombineDetail(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryCFMMCTradingAccountKey(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryEWarrantOffset(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInvestorProductGroupMargin(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryExchangeMarginRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryExchangeMarginRateAdjust(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryExchangeRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQrySecAgentACIDMap(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryProductExchRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryProductGroup(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryMMInstrumentCommissionRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryMMOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInstrumentOrderCommRate(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) {}; - -virtual void onRspQryExecOrder(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryForQuote(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryQuote(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryLock(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryLockPosition(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryETFOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryInvestorLevel(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryExecFreeze(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryCombInstrumentGuard(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryCombAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryTransferSerial(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryAccountregister(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspError(const dict &error, int reqid, bool last) {}; - -virtual void onRtnOrder(const dict &data) {}; - -virtual void onRtnTrade(const dict &data) {}; - -virtual void onErrRtnOrderInsert(const dict &data, const dict &error) {}; - -virtual void onErrRtnOrderAction(const dict &data, const dict &error) {}; - -virtual void onRtnInstrumentStatus(const dict &data) {}; - -virtual void onRtnBulletin(const dict &data) {}; - -virtual void onRtnTradingNotice(const dict &data) {}; - -virtual void onRtnErrorConditionalOrder(const dict &data) {}; - -virtual void onRtnExecOrder(const dict &data) {}; - -virtual void onErrRtnExecOrderInsert(const dict &data, const dict &error) {}; - -virtual void onErrRtnExecOrderAction(const dict &data, const dict &error) {}; - -virtual void onErrRtnForQuoteInsert(const dict &data, const dict &error) {}; - -virtual void onRtnQuote(const dict &data) {}; - -virtual void onErrRtnQuoteInsert(const dict &data, const dict &error) {}; - -virtual void onErrRtnQuoteAction(const dict &data, const dict &error) {}; - -virtual void onRtnForQuoteRsp(const dict &data) {}; - -virtual void onRtnCFMMCTradingAccountToken(const dict &data) {}; - -virtual void onRtnLock(const dict &data) {}; - -virtual void onErrRtnLockInsert(const dict &data, const dict &error) {}; - -virtual void onErrRtnBatchOrderAction(const dict &data, const dict &error) {}; - -virtual void onRtnCombAction(const dict &data) {}; - -virtual void onErrRtnCombActionInsert(const dict &data, const dict &error) {}; - -virtual void onRspQryContractBank(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryParkedOrder(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryParkedOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryTradingNotice(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryBrokerTradingParams(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryBrokerTradingAlgos(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQueryCFMMCTradingAccountToken(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRtnFromBankToFutureByBank(const dict &data) {}; - -virtual void onRtnFromFutureToBankByBank(const dict &data) {}; - -virtual void onRtnRepealFromBankToFutureByBank(const dict &data) {}; - -virtual void onRtnRepealFromFutureToBankByBank(const dict &data) {}; - -virtual void onRtnFromBankToFutureByFuture(const dict &data) {}; - -virtual void onRtnFromFutureToBankByFuture(const dict &data) {}; - -virtual void onRtnRepealFromBankToFutureByFutureManual(const dict &data) {}; - -virtual void onRtnRepealFromFutureToBankByFutureManual(const dict &data) {}; - -virtual void onRtnQueryBankBalanceByFuture(const dict &data) {}; - -virtual void onErrRtnBankToFutureByFuture(const dict &data, const dict &error) {}; - -virtual void onErrRtnFutureToBankByFuture(const dict &data, const dict &error) {}; - -virtual void onErrRtnRepealBankToFutureByFutureManual(const dict &data, const dict &error) {}; - -virtual void onErrRtnRepealFutureToBankByFutureManual(const dict &data, const dict &error) {}; - -virtual void onErrRtnQueryBankBalanceByFuture(const dict &data, const dict &error) {}; - -virtual void onRtnRepealFromBankToFutureByFuture(const dict &data) {}; - -virtual void onRtnRepealFromFutureToBankByFuture(const dict &data) {}; - -virtual void onRspFromBankToFutureByFuture(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspFromFutureToBankByFuture(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQueryBankAccountMoneyByFuture(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRtnOpenAccountByBank(const dict &data) {}; - -virtual void onRtnCancelAccountByBank(const dict &data) {}; - -virtual void onRtnChangeAccountByBank(const dict &data) {}; - -virtual void onRtnResOpenAccConfirmTpdByBank(const dict &data) {}; - -virtual void onRspReserveOpenAccountTpdByFuture(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspSecuritiesDepositInterestByFuture(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspDayEndFileReadyByFuture(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspExecCombineOrderInsert(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspExecCombineOrderAction(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onRspQryExecCombineOrder(const dict &data, const dict &error, int reqid, bool last) {}; - -virtual void onErrRtnExecCombineOrderAction(const dict &data, const dict &error) {}; - -virtual void onErrRtnExecCombineOrderInsert(const dict &data, const dict &error) {}; - -virtual void onRtnExecCombineOrder(const dict &data) {}; - diff --git a/vnpy/api/sec/generator/Sec_td_header_process.h b/vnpy/api/sec/generator/Sec_td_header_process.h deleted file mode 100644 index 2f04ba7a..00000000 --- a/vnpy/api/sec/generator/Sec_td_header_process.h +++ /dev/null @@ -1,260 +0,0 @@ -void processFrontConnected(Task *task); - -void processFrontDisconnected(Task *task); - -void processHeartBeatWarning(Task *task); - -void processRspAuthenticate(Task *task); - -void processRspUserLogin(Task *task); - -void processRspUserLogout(Task *task); - -void processRspUserPasswordUpdate(Task *task); - -void processRspTradingAccountPasswordUpdate(Task *task); - -void processRspOrderInsert(Task *task); - -void processRspParkedOrderInsert(Task *task); - -void processRspParkedOrderAction(Task *task); - -void processRspOrderAction(Task *task); - -void processRspQueryMaxOrderVolume(Task *task); - -void processRspSettlementInfoConfirm(Task *task); - -void processRspRemoveParkedOrder(Task *task); - -void processRspRemoveParkedOrderAction(Task *task); - -void processRspExecOrderInsert(Task *task); - -void processRspExecOrderAction(Task *task); - -void processRspForQuoteInsert(Task *task); - -void processRspQuoteInsert(Task *task); - -void processRspQuoteAction(Task *task); - -void processRspLockInsert(Task *task); - -void processRspBatchOrderAction(Task *task); - -void processRspCombActionInsert(Task *task); - -void processRspQryOrder(Task *task); - -void processRspQryTrade(Task *task); - -void processRspQryInvestorPosition(Task *task); - -void processRspQryTradingAccount(Task *task); - -void processRspQryInvestor(Task *task); - -void processRspQryTradingCode(Task *task); - -void processRspQryInstrumentMarginRate(Task *task); - -void processRspQryInstrumentCommissionRate(Task *task); - -void processRspQryExchange(Task *task); - -void processRspQryProduct(Task *task); - -void processRspQryInstrument(Task *task); - -void processRspQryDepthMarketData(Task *task); - -void processRspQrySettlementInfo(Task *task); - -void processRspQryTransferBank(Task *task); - -void processRspQryInvestorPositionDetail(Task *task); - -void processRspQryNotice(Task *task); - -void processRspQrySettlementInfoConfirm(Task *task); - -void processRspQryInvestorPositionCombineDetail(Task *task); - -void processRspQryCFMMCTradingAccountKey(Task *task); - -void processRspQryEWarrantOffset(Task *task); - -void processRspQryInvestorProductGroupMargin(Task *task); - -void processRspQryExchangeMarginRate(Task *task); - -void processRspQryExchangeMarginRateAdjust(Task *task); - -void processRspQryExchangeRate(Task *task); - -void processRspQrySecAgentACIDMap(Task *task); - -void processRspQryProductExchRate(Task *task); - -void processRspQryProductGroup(Task *task); - -void processRspQryMMInstrumentCommissionRate(Task *task); - -void processRspQryMMOptionInstrCommRate(Task *task); - -void processRspQryInstrumentOrderCommRate(Task *task); - -void processRspQryOptionInstrTradeCost(Task *task); - -void processRspQryOptionInstrCommRate(Task *task); - -void processRspQryExecOrder(Task *task); - -void processRspQryForQuote(Task *task); - -void processRspQryQuote(Task *task); - -void processRspQryLock(Task *task); - -void processRspQryLockPosition(Task *task); - -void processRspQryETFOptionInstrCommRate(Task *task); - -void processRspQryInvestorLevel(Task *task); - -void processRspQryExecFreeze(Task *task); - -void processRspQryCombInstrumentGuard(Task *task); - -void processRspQryCombAction(Task *task); - -void processRspQryTransferSerial(Task *task); - -void processRspQryAccountregister(Task *task); - -void processRspError(Task *task); - -void processRtnOrder(Task *task); - -void processRtnTrade(Task *task); - -void processErrRtnOrderInsert(Task *task); - -void processErrRtnOrderAction(Task *task); - -void processRtnInstrumentStatus(Task *task); - -void processRtnBulletin(Task *task); - -void processRtnTradingNotice(Task *task); - -void processRtnErrorConditionalOrder(Task *task); - -void processRtnExecOrder(Task *task); - -void processErrRtnExecOrderInsert(Task *task); - -void processErrRtnExecOrderAction(Task *task); - -void processErrRtnForQuoteInsert(Task *task); - -void processRtnQuote(Task *task); - -void processErrRtnQuoteInsert(Task *task); - -void processErrRtnQuoteAction(Task *task); - -void processRtnForQuoteRsp(Task *task); - -void processRtnCFMMCTradingAccountToken(Task *task); - -void processRtnLock(Task *task); - -void processErrRtnLockInsert(Task *task); - -void processErrRtnBatchOrderAction(Task *task); - -void processRtnCombAction(Task *task); - -void processErrRtnCombActionInsert(Task *task); - -void processRspQryContractBank(Task *task); - -void processRspQryParkedOrder(Task *task); - -void processRspQryParkedOrderAction(Task *task); - -void processRspQryTradingNotice(Task *task); - -void processRspQryBrokerTradingParams(Task *task); - -void processRspQryBrokerTradingAlgos(Task *task); - -void processRspQueryCFMMCTradingAccountToken(Task *task); - -void processRtnFromBankToFutureByBank(Task *task); - -void processRtnFromFutureToBankByBank(Task *task); - -void processRtnRepealFromBankToFutureByBank(Task *task); - -void processRtnRepealFromFutureToBankByBank(Task *task); - -void processRtnFromBankToFutureByFuture(Task *task); - -void processRtnFromFutureToBankByFuture(Task *task); - -void processRtnRepealFromBankToFutureByFutureManual(Task *task); - -void processRtnRepealFromFutureToBankByFutureManual(Task *task); - -void processRtnQueryBankBalanceByFuture(Task *task); - -void processErrRtnBankToFutureByFuture(Task *task); - -void processErrRtnFutureToBankByFuture(Task *task); - -void processErrRtnRepealBankToFutureByFutureManual(Task *task); - -void processErrRtnRepealFutureToBankByFutureManual(Task *task); - -void processErrRtnQueryBankBalanceByFuture(Task *task); - -void processRtnRepealFromBankToFutureByFuture(Task *task); - -void processRtnRepealFromFutureToBankByFuture(Task *task); - -void processRspFromBankToFutureByFuture(Task *task); - -void processRspFromFutureToBankByFuture(Task *task); - -void processRspQueryBankAccountMoneyByFuture(Task *task); - -void processRtnOpenAccountByBank(Task *task); - -void processRtnCancelAccountByBank(Task *task); - -void processRtnChangeAccountByBank(Task *task); - -void processRtnResOpenAccConfirmTpdByBank(Task *task); - -void processRspReserveOpenAccountTpdByFuture(Task *task); - -void processRspSecuritiesDepositInterestByFuture(Task *task); - -void processRspDayEndFileReadyByFuture(Task *task); - -void processRspExecCombineOrderInsert(Task *task); - -void processRspExecCombineOrderAction(Task *task); - -void processRspQryExecCombineOrder(Task *task); - -void processErrRtnExecCombineOrderAction(Task *task); - -void processErrRtnExecCombineOrderInsert(Task *task); - -void processRtnExecCombineOrder(Task *task); - diff --git a/vnpy/api/sec/generator/Sec_td_source_function.cpp b/vnpy/api/sec/generator/Sec_td_source_function.cpp deleted file mode 100644 index ab60dd20..00000000 --- a/vnpy/api/sec/generator/Sec_td_source_function.cpp +++ /dev/null @@ -1,1418 +0,0 @@ -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); - getString(req, "AppID", myreq.AppID); - 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); - getInt(req, "ClientIPPort", &myreq.ClientIPPort); - 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; -}; - -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); - getInt(req, "EncryptType", &myreq.EncryptType); - 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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -int TdApi::reqLockInsert(const dict &req, int reqid) -{ - CThostFtdcInputLockField myreq = CThostFtdcInputLockField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "InstrumentID", myreq.InstrumentID); - getString(req, "LockRef", myreq.LockRef); - getString(req, "UserID", myreq.UserID); - getInt(req, "Volume", &myreq.Volume); - getInt(req, "RequestID", &myreq.RequestID); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getChar(req, "LockType", &myreq.LockType); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqLockInsert(&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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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); - getString(req, "ExchangeID", myreq.ExchangeID); - 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); - getString(req, "ExchangeID", myreq.ExchangeID); - 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); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryInstrumentOrderCommRate(&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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -int TdApi::reqQryLock(const dict &req, int reqid) -{ - CThostFtdcQryLockField myreq = CThostFtdcQryLockField(); - 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, "LockSysID", myreq.LockSysID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - int i = this->api->ReqQryLock(&myreq, reqid); - return i; -}; - -int TdApi::reqQryLockPosition(const dict &req, int reqid) -{ - CThostFtdcQryLockPositionField myreq = CThostFtdcQryLockPositionField(); - 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); - int i = this->api->ReqQryLockPosition(&myreq, reqid); - return i; -}; - -int TdApi::reqQryETFOptionInstrCommRate(const dict &req, int reqid) -{ - CThostFtdcQryETFOptionInstrCommRateField myreq = CThostFtdcQryETFOptionInstrCommRateField(); - 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); - int i = this->api->ReqQryETFOptionInstrCommRate(&myreq, reqid); - return i; -}; - -int TdApi::reqQryInvestorLevel(const dict &req, int reqid) -{ - CThostFtdcQryInvestorLevelField myreq = CThostFtdcQryInvestorLevelField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "ExchangeID", myreq.ExchangeID); - int i = this->api->ReqQryInvestorLevel(&myreq, reqid); - return i; -}; - -int TdApi::reqQryExecFreeze(const dict &req, int reqid) -{ - CThostFtdcQryExecFreezeField myreq = CThostFtdcQryExecFreezeField(); - 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); - int i = this->api->ReqQryExecFreeze(&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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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; -}; - -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); - 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); - 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); - int i = this->api->ReqQueryBankAccountMoneyByFuture(&myreq, reqid); - return i; -}; - -int TdApi::reqReserveOpenAccountTpdByFuture(const dict &req, int reqid) -{ - CThostFtdcReqReserveOpenAccountTpdField myreq = CThostFtdcReqReserveOpenAccountTpdField(); - 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, "Gender", &myreq.Gender); - getString(req, "CountryCode", myreq.CountryCode); - getChar(req, "CustType", &myreq.CustType); - getString(req, "Address", myreq.Address); - getString(req, "ZipCode", myreq.ZipCode); - getString(req, "Telephone", myreq.Telephone); - getString(req, "MobilePhone", myreq.MobilePhone); - getString(req, "Fax", myreq.Fax); - getString(req, "EMail", myreq.EMail); - getChar(req, "MoneyAccountStatus", &myreq.MoneyAccountStatus); - 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); - getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); - getString(req, "CurrencyID", myreq.CurrencyID); - getChar(req, "CashExchangeCode", &myreq.CashExchangeCode); - 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, "TID", &myreq.TID); - getString(req, "UserID", myreq.UserID); - getDouble(req, "SecDaBeBl", &myreq.SecDaBeBl); - getChar(req, "BankChal", &myreq.BankChal); - int i = this->api->ReqReserveOpenAccountTpdByFuture(&myreq, reqid); - return i; -}; - -int TdApi::reqSecuritiesDepositInterestByFuture(const dict &req, int reqid) -{ - CThostFtdcReqSecuritiesDepositInterestField myreq = CThostFtdcReqSecuritiesDepositInterestField(); - 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, "Gender", &myreq.Gender); - getString(req, "CountryCode", myreq.CountryCode); - getChar(req, "CustType", &myreq.CustType); - getString(req, "Address", myreq.Address); - getString(req, "ZipCode", myreq.ZipCode); - getString(req, "Telephone", myreq.Telephone); - getString(req, "MobilePhone", myreq.MobilePhone); - getString(req, "Fax", myreq.Fax); - getString(req, "EMail", myreq.EMail); - getChar(req, "MoneyAccountStatus", &myreq.MoneyAccountStatus); - 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); - getChar(req, "VerifyCertNoFlag", &myreq.VerifyCertNoFlag); - getString(req, "CurrencyID", myreq.CurrencyID); - getChar(req, "CashExchangeCode", &myreq.CashExchangeCode); - 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, "TID", &myreq.TID); - getString(req, "UserID", myreq.UserID); - getDouble(req, "DepositInterest", &myreq.DepositInterest); - int i = this->api->ReqSecuritiesDepositInterestByFuture(&myreq, reqid); - return i; -}; - -int TdApi::reqDayEndFileReadyByFuture(const dict &req, int reqid) -{ - CThostFtdcReqDayEndFileReadyField myreq = CThostFtdcReqDayEndFileReadyField(); - 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); - getChar(req, "FileBusinessCode", &myreq.FileBusinessCode); - getInt(req, "InstallID", &myreq.InstallID); - getString(req, "UserID", myreq.UserID); - getString(req, "Digest", myreq.Digest); - getString(req, "CurrencyID", myreq.CurrencyID); - getString(req, "DeviceID", myreq.DeviceID); - getString(req, "BrokerIDByBank", myreq.BrokerIDByBank); - getString(req, "OperNo", myreq.OperNo); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "TID", &myreq.TID); - int i = this->api->ReqDayEndFileReadyByFuture(&myreq, reqid); - return i; -}; - -int TdApi::reqExecCombineOrderInsert(const dict &req, int reqid) -{ - CThostFtdcInputExecCombineOrderField myreq = CThostFtdcInputExecCombineOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "CallInstrumentID", myreq.CallInstrumentID); - getString(req, "PutInstrumentID", myreq.PutInstrumentID); - getString(req, "ExecCombineOrderRef", myreq.ExecCombineOrderRef); - getString(req, "UserID", myreq.UserID); - getInt(req, "Volume", &myreq.Volume); - getInt(req, "RequestID", &myreq.RequestID); - getString(req, "BusinessUnit", myreq.BusinessUnit); - getChar(req, "ActionType", &myreq.ActionType); - 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->ReqExecCombineOrderInsert(&myreq, reqid); - return i; -}; - -int TdApi::reqExecCombineOrderAction(const dict &req, int reqid) -{ - CThostFtdcInputExecCombineOrderActionField myreq = CThostFtdcInputExecCombineOrderActionField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getInt(req, "ExecCombineOrderActionRef", &myreq.ExecCombineOrderActionRef); - getString(req, "ExecCombineOrderRef", myreq.ExecCombineOrderRef); - getInt(req, "RequestID", &myreq.RequestID); - getInt(req, "FrontID", &myreq.FrontID); - getInt(req, "SessionID", &myreq.SessionID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ExecCombineOrderSysID", myreq.ExecCombineOrderSysID); - getChar(req, "ActionFlag", &myreq.ActionFlag); - getString(req, "UserID", myreq.UserID); - getString(req, "InvestUnitID", myreq.InvestUnitID); - getString(req, "IPAddress", myreq.IPAddress); - getString(req, "MacAddress", myreq.MacAddress); - int i = this->api->ReqExecCombineOrderAction(&myreq, reqid); - return i; -}; - -int TdApi::reqQryExecCombineOrder(const dict &req, int reqid) -{ - CThostFtdcQryExecCombineOrderField myreq = CThostFtdcQryExecCombineOrderField(); - memset(&myreq, 0, sizeof(myreq)); - getString(req, "BrokerID", myreq.BrokerID); - getString(req, "InvestorID", myreq.InvestorID); - getString(req, "CallInstrumentID", myreq.CallInstrumentID); - getString(req, "PutInstrumentID", myreq.PutInstrumentID); - getString(req, "ExchangeID", myreq.ExchangeID); - getString(req, "ExecCombineOrderSysID", myreq.ExecCombineOrderSysID); - getString(req, "InsertTimeStart", myreq.InsertTimeStart); - getString(req, "InsertTimeEnd", myreq.InsertTimeEnd); - int i = this->api->ReqQryExecCombineOrder(&myreq, reqid); - return i; -}; - diff --git a/vnpy/api/sec/generator/Sec_td_source_module.cpp b/vnpy/api/sec/generator/Sec_td_source_module.cpp deleted file mode 100644 index c0fa9a40..00000000 --- a/vnpy/api/sec/generator/Sec_td_source_module.cpp +++ /dev/null @@ -1,213 +0,0 @@ -.def("reqAuthenticate", &TdApi::reqAuthenticate) -.def("reqUserLogin", &TdApi::reqUserLogin) -.def("reqUserLogout", &TdApi::reqUserLogout) -.def("reqUserPasswordUpdate", &TdApi::reqUserPasswordUpdate) -.def("reqTradingAccountPasswordUpdate", &TdApi::reqTradingAccountPasswordUpdate) -.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("reqLockInsert", &TdApi::reqLockInsert) -.def("reqBatchOrderAction", &TdApi::reqBatchOrderAction) -.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("reqQryLock", &TdApi::reqQryLock) -.def("reqQryLockPosition", &TdApi::reqQryLockPosition) -.def("reqQryETFOptionInstrCommRate", &TdApi::reqQryETFOptionInstrCommRate) -.def("reqQryInvestorLevel", &TdApi::reqQryInvestorLevel) -.def("reqQryExecFreeze", &TdApi::reqQryExecFreeze) -.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("reqReserveOpenAccountTpdByFuture", &TdApi::reqReserveOpenAccountTpdByFuture) -.def("reqSecuritiesDepositInterestByFuture", &TdApi::reqSecuritiesDepositInterestByFuture) -.def("reqDayEndFileReadyByFuture", &TdApi::reqDayEndFileReadyByFuture) -.def("reqExecCombineOrderInsert", &TdApi::reqExecCombineOrderInsert) -.def("reqExecCombineOrderAction", &TdApi::reqExecCombineOrderAction) -.def("reqQryExecCombineOrder", &TdApi::reqQryExecCombineOrder) - -.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("onRspLockInsert", &TdApi::onRspLockInsert) -.def("onRspBatchOrderAction", &TdApi::onRspBatchOrderAction) -.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("onRspQryLock", &TdApi::onRspQryLock) -.def("onRspQryLockPosition", &TdApi::onRspQryLockPosition) -.def("onRspQryETFOptionInstrCommRate", &TdApi::onRspQryETFOptionInstrCommRate) -.def("onRspQryInvestorLevel", &TdApi::onRspQryInvestorLevel) -.def("onRspQryExecFreeze", &TdApi::onRspQryExecFreeze) -.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("onRtnLock", &TdApi::onRtnLock) -.def("onErrRtnLockInsert", &TdApi::onErrRtnLockInsert) -.def("onErrRtnBatchOrderAction", &TdApi::onErrRtnBatchOrderAction) -.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("onRtnResOpenAccConfirmTpdByBank", &TdApi::onRtnResOpenAccConfirmTpdByBank) -.def("onRspReserveOpenAccountTpdByFuture", &TdApi::onRspReserveOpenAccountTpdByFuture) -.def("onRspSecuritiesDepositInterestByFuture", &TdApi::onRspSecuritiesDepositInterestByFuture) -.def("onRspDayEndFileReadyByFuture", &TdApi::onRspDayEndFileReadyByFuture) -.def("onRspExecCombineOrderInsert", &TdApi::onRspExecCombineOrderInsert) -.def("onRspExecCombineOrderAction", &TdApi::onRspExecCombineOrderAction) -.def("onRspQryExecCombineOrder", &TdApi::onRspQryExecCombineOrder) -.def("onErrRtnExecCombineOrderAction", &TdApi::onErrRtnExecCombineOrderAction) -.def("onErrRtnExecCombineOrderInsert", &TdApi::onErrRtnExecCombineOrderInsert) -.def("onRtnExecCombineOrder", &TdApi::onRtnExecCombineOrder) -; diff --git a/vnpy/api/sec/generator/Sec_td_source_on.cpp b/vnpy/api/sec/generator/Sec_td_source_on.cpp deleted file mode 100644 index b46b1ba2..00000000 --- a/vnpy/api/sec/generator/Sec_td_source_on.cpp +++ /dev/null @@ -1,1560 +0,0 @@ -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 onRspLockInsert(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspLockInsert, 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 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 onRspQryLock(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryLock, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspQryLockPosition(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryLockPosition, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspQryETFOptionInstrCommRate(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryETFOptionInstrCommRate, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspQryInvestorLevel(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryInvestorLevel, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspQryExecFreeze(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExecFreeze, 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 onRtnLock(const dict &data) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnLock, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onErrRtnLockInsert(const dict &data, const dict &error) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnLockInsert, data, error); - } - 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 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; - } -}; - -void onRtnResOpenAccConfirmTpdByBank(const dict &data) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnResOpenAccConfirmTpdByBank, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspReserveOpenAccountTpdByFuture(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspReserveOpenAccountTpdByFuture, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspSecuritiesDepositInterestByFuture(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspSecuritiesDepositInterestByFuture, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspDayEndFileReadyByFuture(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspDayEndFileReadyByFuture, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspExecCombineOrderInsert(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspExecCombineOrderInsert, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspExecCombineOrderAction(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspExecCombineOrderAction, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRspQryExecCombineOrder(const dict &data, const dict &error, int reqid, bool last) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRspQryExecCombineOrder, data, error, reqid, last); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onErrRtnExecCombineOrderAction(const dict &data, const dict &error) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnExecCombineOrderAction, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onErrRtnExecCombineOrderInsert(const dict &data, const dict &error) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onErrRtnExecCombineOrderInsert, data, error); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - -void onRtnExecCombineOrder(const dict &data) override -{ - try - { - PYBIND11_OVERLOAD(void, TdApi, onRtnExecCombineOrder, data); - } - catch (const error_already_set &e) - { - cout << e.what() << endl; - } -}; - diff --git a/vnpy/api/sec/generator/Sec_td_source_process.cpp b/vnpy/api/sec/generator/Sec_td_source_process.cpp deleted file mode 100644 index bef7202d..00000000 --- a/vnpy/api/sec/generator/Sec_td_source_process.cpp +++ /dev/null @@ -1,5406 +0,0 @@ -void TdApi::processFrontConnected(Task *task) -{ - gil_scoped_acquire acquire; - this->onFrontConnected(); -}; - -void TdApi::processFrontDisconnected(Task *task) -{ - gil_scoped_acquire acquire; - this->onFrontDisconnected(task->task_id); -}; - -void TdApi::processHeartBeatWarning(Task *task) -{ - gil_scoped_acquire acquire; - this->onHeartBeatWarning(task->task_id); -}; - -void TdApi::processRspAuthenticate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspAuthenticateField *task_data = (CThostFtdcRspAuthenticateField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["AppID"] = toUtf(task_data->AppID); - data["AppType"] = task_data->AppType; - delete 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_error; - } - this->onRspAuthenticate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspUserLogin(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspUserLoginField *task_data = (CThostFtdcRspUserLoginField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["LoginTime"] = toUtf(task_data->LoginTime); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - data["SystemName"] = toUtf(task_data->SystemName); - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["MaxOrderRef"] = toUtf(task_data->MaxOrderRef); - data["SHFETime"] = toUtf(task_data->SHFETime); - data["DCETime"] = toUtf(task_data->DCETime); - data["CZCETime"] = toUtf(task_data->CZCETime); - data["FFEXTime"] = toUtf(task_data->FFEXTime); - data["INETime"] = toUtf(task_data->INETime); - delete 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_error; - } - this->onRspUserLogin(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspUserLogout(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcUserLogoutField *task_data = (CThostFtdcUserLogoutField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - delete 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_error; - } - this->onRspUserLogout(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspUserPasswordUpdate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcUserPasswordUpdateField *task_data = (CThostFtdcUserPasswordUpdateField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - data["OldPassword"] = toUtf(task_data->OldPassword); - data["NewPassword"] = toUtf(task_data->NewPassword); - data["EncryptType"] = task_data->EncryptType; - delete 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_error; - } - this->onRspUserPasswordUpdate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspTradingAccountPasswordUpdate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTradingAccountPasswordUpdateField *task_data = (CThostFtdcTradingAccountPasswordUpdateField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["AccountID"] = toUtf(task_data->AccountID); - data["OldPassword"] = toUtf(task_data->OldPassword); - data["NewPassword"] = toUtf(task_data->NewPassword); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - delete 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_error; - } - this->onRspTradingAccountPasswordUpdate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputOrderField *task_data = (CThostFtdcInputOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["UserForceClose"] = task_data->UserForceClose; - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspOrderInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspParkedOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcParkedOrderField *task_data = (CThostFtdcParkedOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["UserForceClose"] = task_data->UserForceClose; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParkedOrderID"] = toUtf(task_data->ParkedOrderID); - data["UserType"] = task_data->UserType; - data["Status"] = task_data->Status; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["ClientID"] = toUtf(task_data->ClientID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspParkedOrderInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspParkedOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcParkedOrderActionField *task_data = (CThostFtdcParkedOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OrderActionRef"] = task_data->OrderActionRef; - data["OrderRef"] = toUtf(task_data->OrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeChange"] = task_data->VolumeChange; - data["UserID"] = toUtf(task_data->UserID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ParkedOrderActionID"] = toUtf(task_data->ParkedOrderActionID); - data["UserType"] = task_data->UserType; - data["Status"] = task_data->Status; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspParkedOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputOrderActionField *task_data = (CThostFtdcInputOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OrderActionRef"] = task_data->OrderActionRef; - data["OrderRef"] = toUtf(task_data->OrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeChange"] = task_data->VolumeChange; - data["UserID"] = toUtf(task_data->UserID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQueryMaxOrderVolume(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcQueryMaxOrderVolumeField *task_data = (CThostFtdcQueryMaxOrderVolumeField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["Direction"] = task_data->Direction; - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["MaxVolume"] = task_data->MaxVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQueryMaxOrderVolume(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspSettlementInfoConfirm(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSettlementInfoConfirmField *task_data = (CThostFtdcSettlementInfoConfirmField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ConfirmDate"] = toUtf(task_data->ConfirmDate); - data["ConfirmTime"] = toUtf(task_data->ConfirmTime); - data["SettlementID"] = task_data->SettlementID; - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - delete 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_error; - } - this->onRspSettlementInfoConfirm(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspRemoveParkedOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRemoveParkedOrderField *task_data = (CThostFtdcRemoveParkedOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ParkedOrderID"] = toUtf(task_data->ParkedOrderID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspRemoveParkedOrder(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspRemoveParkedOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRemoveParkedOrderActionField *task_data = (CThostFtdcRemoveParkedOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ParkedOrderActionID"] = toUtf(task_data->ParkedOrderActionID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspRemoveParkedOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspExecOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputExecOrderField *task_data = (CThostFtdcInputExecOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExecOrderRef"] = toUtf(task_data->ExecOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ActionType"] = task_data->ActionType; - data["PosiDirection"] = task_data->PosiDirection; - data["ReservePositionFlag"] = task_data->ReservePositionFlag; - data["CloseFlag"] = task_data->CloseFlag; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspExecOrderInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspExecOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputExecOrderActionField *task_data = (CThostFtdcInputExecOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ExecOrderActionRef"] = task_data->ExecOrderActionRef; - data["ExecOrderRef"] = toUtf(task_data->ExecOrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExecOrderSysID"] = toUtf(task_data->ExecOrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["UserID"] = toUtf(task_data->UserID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspExecOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspForQuoteInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputForQuoteField *task_data = (CThostFtdcInputForQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ForQuoteRef"] = toUtf(task_data->ForQuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspForQuoteInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQuoteInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputQuoteField *task_data = (CThostFtdcInputQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["QuoteRef"] = toUtf(task_data->QuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["AskPrice"] = task_data->AskPrice; - data["BidPrice"] = task_data->BidPrice; - data["AskVolume"] = task_data->AskVolume; - data["BidVolume"] = task_data->BidVolume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["AskOffsetFlag"] = task_data->AskOffsetFlag; - data["BidOffsetFlag"] = task_data->BidOffsetFlag; - data["AskHedgeFlag"] = task_data->AskHedgeFlag; - data["BidHedgeFlag"] = task_data->BidHedgeFlag; - data["AskOrderRef"] = toUtf(task_data->AskOrderRef); - data["BidOrderRef"] = toUtf(task_data->BidOrderRef); - data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQuoteInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQuoteAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputQuoteActionField *task_data = (CThostFtdcInputQuoteActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["QuoteActionRef"] = task_data->QuoteActionRef; - data["QuoteRef"] = toUtf(task_data->QuoteRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["QuoteSysID"] = toUtf(task_data->QuoteSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["UserID"] = toUtf(task_data->UserID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQuoteAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspLockInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputLockField *task_data = (CThostFtdcInputLockField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["LockRef"] = toUtf(task_data->LockRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["LockType"] = task_data->LockType; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspLockInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspBatchOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputBatchOrderActionField *task_data = (CThostFtdcInputBatchOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OrderActionRef"] = task_data->OrderActionRef; - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["UserID"] = toUtf(task_data->UserID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspBatchOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspCombActionInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputCombActionField *task_data = (CThostFtdcInputCombActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["CombActionRef"] = toUtf(task_data->CombActionRef); - data["UserID"] = toUtf(task_data->UserID); - data["Direction"] = task_data->Direction; - data["Volume"] = task_data->Volume; - data["CombDirection"] = task_data->CombDirection; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspCombActionInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcOrderField *task_data = (CThostFtdcOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["OrderLocalID"] = toUtf(task_data->OrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["OrderSource"] = task_data->OrderSource; - data["OrderStatus"] = task_data->OrderStatus; - data["OrderType"] = task_data->OrderType; - data["VolumeTraded"] = task_data->VolumeTraded; - data["VolumeTotal"] = task_data->VolumeTotal; - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["ActiveTime"] = toUtf(task_data->ActiveTime); - data["SuspendTime"] = toUtf(task_data->SuspendTime); - data["UpdateTime"] = toUtf(task_data->UpdateTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ActiveTraderID"] = toUtf(task_data->ActiveTraderID); - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["UserForceClose"] = task_data->UserForceClose; - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerOrderSeq"] = task_data->BrokerOrderSeq; - data["RelativeOrderSysID"] = toUtf(task_data->RelativeOrderSysID); - data["ZCETotalTradedVolume"] = task_data->ZCETotalTradedVolume; - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryOrder(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryTrade(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTradeField *task_data = (CThostFtdcTradeField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["TradeID"] = toUtf(task_data->TradeID); - data["Direction"] = task_data->Direction; - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["TradingRole"] = task_data->TradingRole; - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["Price"] = task_data->Price; - data["Volume"] = task_data->Volume; - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["TradeType"] = task_data->TradeType; - data["PriceSource"] = task_data->PriceSource; - data["TraderID"] = toUtf(task_data->TraderID); - data["OrderLocalID"] = toUtf(task_data->OrderLocalID); - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["SequenceNo"] = task_data->SequenceNo; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["BrokerOrderSeq"] = task_data->BrokerOrderSeq; - data["TradeSource"] = task_data->TradeSource; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryTrade(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInvestorPosition(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInvestorPositionField *task_data = (CThostFtdcInvestorPositionField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["PosiDirection"] = task_data->PosiDirection; - data["HedgeFlag"] = task_data->HedgeFlag; - data["PositionDate"] = task_data->PositionDate; - data["YdPosition"] = task_data->YdPosition; - data["Position"] = task_data->Position; - data["LongFrozen"] = task_data->LongFrozen; - data["ShortFrozen"] = task_data->ShortFrozen; - data["LongFrozenAmount"] = task_data->LongFrozenAmount; - data["ShortFrozenAmount"] = task_data->ShortFrozenAmount; - data["OpenVolume"] = task_data->OpenVolume; - data["CloseVolume"] = task_data->CloseVolume; - data["OpenAmount"] = task_data->OpenAmount; - data["CloseAmount"] = task_data->CloseAmount; - data["PositionCost"] = task_data->PositionCost; - data["PreMargin"] = task_data->PreMargin; - data["UseMargin"] = task_data->UseMargin; - data["FrozenMargin"] = task_data->FrozenMargin; - data["FrozenCash"] = task_data->FrozenCash; - data["FrozenCommission"] = task_data->FrozenCommission; - data["CashIn"] = task_data->CashIn; - data["Commission"] = task_data->Commission; - data["CloseProfit"] = task_data->CloseProfit; - data["PositionProfit"] = task_data->PositionProfit; - data["PreSettlementPrice"] = task_data->PreSettlementPrice; - data["SettlementPrice"] = task_data->SettlementPrice; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["OpenCost"] = task_data->OpenCost; - data["ExchangeMargin"] = task_data->ExchangeMargin; - data["CombPosition"] = task_data->CombPosition; - data["CombLongFrozen"] = task_data->CombLongFrozen; - data["CombShortFrozen"] = task_data->CombShortFrozen; - data["CloseProfitByDate"] = task_data->CloseProfitByDate; - data["CloseProfitByTrade"] = task_data->CloseProfitByTrade; - data["TodayPosition"] = task_data->TodayPosition; - data["MarginRateByMoney"] = task_data->MarginRateByMoney; - data["MarginRateByVolume"] = task_data->MarginRateByVolume; - data["StrikeFrozen"] = task_data->StrikeFrozen; - data["StrikeFrozenAmount"] = task_data->StrikeFrozenAmount; - data["AbandonFrozen"] = task_data->AbandonFrozen; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["YdStrikeFrozen"] = task_data->YdStrikeFrozen; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInvestorPosition(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryTradingAccount(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_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_error; - } - this->onRspQryTradingAccount(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInvestor(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInvestorField *task_data = (CThostFtdcInvestorField*)task->task_data; - data["InvestorID"] = toUtf(task_data->InvestorID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorGroupID"] = toUtf(task_data->InvestorGroupID); - data["InvestorName"] = toUtf(task_data->InvestorName); - data["IdentifiedCardType"] = task_data->IdentifiedCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["IsActive"] = task_data->IsActive; - data["Telephone"] = toUtf(task_data->Telephone); - data["Address"] = toUtf(task_data->Address); - data["OpenDate"] = toUtf(task_data->OpenDate); - data["Mobile"] = toUtf(task_data->Mobile); - data["CommModelID"] = toUtf(task_data->CommModelID); - data["MarginModelID"] = toUtf(task_data->MarginModelID); - delete 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_error; - } - this->onRspQryInvestor(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryTradingCode(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTradingCodeField *task_data = (CThostFtdcTradingCodeField*)task->task_data; - data["InvestorID"] = toUtf(task_data->InvestorID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IsActive"] = task_data->IsActive; - data["ClientIDType"] = task_data->ClientIDType; - data["BranchID"] = toUtf(task_data->BranchID); - data["BizType"] = task_data->BizType; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryTradingCode(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInstrumentMarginRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInstrumentMarginRateField *task_data = (CThostFtdcInstrumentMarginRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["LongMarginRatioByMoney"] = task_data->LongMarginRatioByMoney; - data["LongMarginRatioByVolume"] = task_data->LongMarginRatioByVolume; - data["ShortMarginRatioByMoney"] = task_data->ShortMarginRatioByMoney; - data["ShortMarginRatioByVolume"] = task_data->ShortMarginRatioByVolume; - data["IsRelative"] = task_data->IsRelative; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInstrumentMarginRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInstrumentCommissionRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInstrumentCommissionRateField *task_data = (CThostFtdcInstrumentCommissionRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OpenRatioByMoney"] = task_data->OpenRatioByMoney; - data["OpenRatioByVolume"] = task_data->OpenRatioByVolume; - data["CloseRatioByMoney"] = task_data->CloseRatioByMoney; - data["CloseRatioByVolume"] = task_data->CloseRatioByVolume; - data["CloseTodayRatioByMoney"] = task_data->CloseTodayRatioByMoney; - data["CloseTodayRatioByVolume"] = task_data->CloseTodayRatioByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["BizType"] = task_data->BizType; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInstrumentCommissionRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExchange(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExchangeField *task_data = (CThostFtdcExchangeField*)task->task_data; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExchangeName"] = toUtf(task_data->ExchangeName); - data["ExchangeProperty"] = task_data->ExchangeProperty; - delete 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_error; - } - this->onRspQryExchange(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryProduct(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcProductField *task_data = (CThostFtdcProductField*)task->task_data; - data["ProductID"] = toUtf(task_data->ProductID); - data["ProductName"] = toUtf(task_data->ProductName); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ProductClass"] = task_data->ProductClass; - data["VolumeMultiple"] = task_data->VolumeMultiple; - data["PriceTick"] = task_data->PriceTick; - data["MaxMarketOrderVolume"] = task_data->MaxMarketOrderVolume; - data["MinMarketOrderVolume"] = task_data->MinMarketOrderVolume; - data["MaxLimitOrderVolume"] = task_data->MaxLimitOrderVolume; - data["MinLimitOrderVolume"] = task_data->MinLimitOrderVolume; - data["PositionType"] = task_data->PositionType; - data["PositionDateType"] = task_data->PositionDateType; - data["CloseDealType"] = task_data->CloseDealType; - data["TradeCurrencyID"] = toUtf(task_data->TradeCurrencyID); - data["MortgageFundUseRange"] = task_data->MortgageFundUseRange; - data["ExchangeProductID"] = toUtf(task_data->ExchangeProductID); - data["UnderlyingMultiple"] = task_data->UnderlyingMultiple; - delete 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_error; - } - this->onRspQryProduct(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInstrument(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInstrumentField *task_data = (CThostFtdcInstrumentField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InstrumentName"] = toUtf(task_data->InstrumentName); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["ProductID"] = toUtf(task_data->ProductID); - data["ProductClass"] = task_data->ProductClass; - data["DeliveryYear"] = task_data->DeliveryYear; - data["DeliveryMonth"] = task_data->DeliveryMonth; - data["MaxMarketOrderVolume"] = task_data->MaxMarketOrderVolume; - data["MinMarketOrderVolume"] = task_data->MinMarketOrderVolume; - data["MaxLimitOrderVolume"] = task_data->MaxLimitOrderVolume; - data["MinLimitOrderVolume"] = task_data->MinLimitOrderVolume; - data["VolumeMultiple"] = task_data->VolumeMultiple; - data["PriceTick"] = task_data->PriceTick; - data["CreateDate"] = toUtf(task_data->CreateDate); - data["OpenDate"] = toUtf(task_data->OpenDate); - data["ExpireDate"] = toUtf(task_data->ExpireDate); - data["StartDelivDate"] = toUtf(task_data->StartDelivDate); - data["EndDelivDate"] = toUtf(task_data->EndDelivDate); - data["InstLifePhase"] = task_data->InstLifePhase; - data["IsTrading"] = task_data->IsTrading; - data["PositionType"] = task_data->PositionType; - data["PositionDateType"] = task_data->PositionDateType; - data["LongMarginRatio"] = task_data->LongMarginRatio; - data["ShortMarginRatio"] = task_data->ShortMarginRatio; - data["MaxMarginSideAlgorithm"] = task_data->MaxMarginSideAlgorithm; - data["UnderlyingInstrID"] = toUtf(task_data->UnderlyingInstrID); - data["StrikePrice"] = task_data->StrikePrice; - data["OptionsType"] = task_data->OptionsType; - data["UnderlyingMultiple"] = task_data->UnderlyingMultiple; - data["CombinationType"] = task_data->CombinationType; - data["MinBuyVolume"] = task_data->MinBuyVolume; - data["MinSellVolume"] = task_data->MinSellVolume; - data["InstrumentCode"] = toUtf(task_data->InstrumentCode); - delete 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_error; - } - this->onRspQryInstrument(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryDepthMarketData(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcDepthMarketDataField *task_data = (CThostFtdcDepthMarketDataField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["LastPrice"] = task_data->LastPrice; - data["PreSettlementPrice"] = task_data->PreSettlementPrice; - data["PreClosePrice"] = task_data->PreClosePrice; - data["PreOpenInterest"] = task_data->PreOpenInterest; - data["OpenPrice"] = task_data->OpenPrice; - data["HighestPrice"] = task_data->HighestPrice; - data["LowestPrice"] = task_data->LowestPrice; - data["Volume"] = task_data->Volume; - data["Turnover"] = task_data->Turnover; - data["OpenInterest"] = task_data->OpenInterest; - data["ClosePrice"] = task_data->ClosePrice; - data["SettlementPrice"] = task_data->SettlementPrice; - data["UpperLimitPrice"] = task_data->UpperLimitPrice; - data["LowerLimitPrice"] = task_data->LowerLimitPrice; - data["PreDelta"] = task_data->PreDelta; - data["CurrDelta"] = task_data->CurrDelta; - data["UpdateTime"] = toUtf(task_data->UpdateTime); - data["UpdateMillisec"] = task_data->UpdateMillisec; - data["BidPrice1"] = task_data->BidPrice1; - data["BidVolume1"] = task_data->BidVolume1; - data["AskPrice1"] = task_data->AskPrice1; - data["AskVolume1"] = task_data->AskVolume1; - data["BidPrice2"] = task_data->BidPrice2; - data["BidVolume2"] = task_data->BidVolume2; - data["AskPrice2"] = task_data->AskPrice2; - data["AskVolume2"] = task_data->AskVolume2; - data["BidPrice3"] = task_data->BidPrice3; - data["BidVolume3"] = task_data->BidVolume3; - data["AskPrice3"] = task_data->AskPrice3; - data["AskVolume3"] = task_data->AskVolume3; - data["BidPrice4"] = task_data->BidPrice4; - data["BidVolume4"] = task_data->BidVolume4; - data["AskPrice4"] = task_data->AskPrice4; - data["AskVolume4"] = task_data->AskVolume4; - data["BidPrice5"] = task_data->BidPrice5; - data["BidVolume5"] = task_data->BidVolume5; - data["AskPrice5"] = task_data->AskPrice5; - data["AskVolume5"] = task_data->AskVolume5; - data["AveragePrice"] = task_data->AveragePrice; - data["ActionDay"] = toUtf(task_data->ActionDay); - delete 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_error; - } - this->onRspQryDepthMarketData(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQrySettlementInfo(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSettlementInfoField *task_data = (CThostFtdcSettlementInfoField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["SequenceNo"] = task_data->SequenceNo; - data["Content"] = toUtf(task_data->Content); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - delete 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_error; - } - this->onRspQrySettlementInfo(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryTransferBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTransferBankField *task_data = (CThostFtdcTransferBankField*)task->task_data; - data["BankID"] = toUtf(task_data->BankID); - data["BankBrchID"] = toUtf(task_data->BankBrchID); - data["BankName"] = toUtf(task_data->BankName); - data["IsActive"] = task_data->IsActive; - delete 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_error; - } - this->onRspQryTransferBank(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInvestorPositionDetail(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInvestorPositionDetailField *task_data = (CThostFtdcInvestorPositionDetailField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["Direction"] = task_data->Direction; - data["OpenDate"] = toUtf(task_data->OpenDate); - data["TradeID"] = toUtf(task_data->TradeID); - data["Volume"] = task_data->Volume; - data["OpenPrice"] = task_data->OpenPrice; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["TradeType"] = task_data->TradeType; - data["CombInstrumentID"] = toUtf(task_data->CombInstrumentID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["CloseProfitByDate"] = task_data->CloseProfitByDate; - data["CloseProfitByTrade"] = task_data->CloseProfitByTrade; - data["PositionProfitByDate"] = task_data->PositionProfitByDate; - data["PositionProfitByTrade"] = task_data->PositionProfitByTrade; - data["Margin"] = task_data->Margin; - data["ExchMargin"] = task_data->ExchMargin; - data["MarginRateByMoney"] = task_data->MarginRateByMoney; - data["MarginRateByVolume"] = task_data->MarginRateByVolume; - data["LastSettlementPrice"] = task_data->LastSettlementPrice; - data["SettlementPrice"] = task_data->SettlementPrice; - data["CloseVolume"] = task_data->CloseVolume; - data["CloseAmount"] = task_data->CloseAmount; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInvestorPositionDetail(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryNotice(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcNoticeField *task_data = (CThostFtdcNoticeField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["Content"] = toUtf(task_data->Content); - data["SequenceLabel"] = toUtf(task_data->SequenceLabel); - delete 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_error; - } - this->onRspQryNotice(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQrySettlementInfoConfirm(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSettlementInfoConfirmField *task_data = (CThostFtdcSettlementInfoConfirmField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ConfirmDate"] = toUtf(task_data->ConfirmDate); - data["ConfirmTime"] = toUtf(task_data->ConfirmTime); - data["SettlementID"] = task_data->SettlementID; - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - delete 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_error; - } - this->onRspQrySettlementInfoConfirm(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInvestorPositionCombineDetail(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInvestorPositionCombineDetailField *task_data = (CThostFtdcInvestorPositionCombineDetailField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["OpenDate"] = toUtf(task_data->OpenDate); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["SettlementID"] = task_data->SettlementID; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ComTradeID"] = toUtf(task_data->ComTradeID); - data["TradeID"] = toUtf(task_data->TradeID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["Direction"] = task_data->Direction; - data["TotalAmt"] = task_data->TotalAmt; - data["Margin"] = task_data->Margin; - data["ExchMargin"] = task_data->ExchMargin; - data["MarginRateByMoney"] = task_data->MarginRateByMoney; - data["MarginRateByVolume"] = task_data->MarginRateByVolume; - data["LegID"] = task_data->LegID; - data["LegMultiple"] = task_data->LegMultiple; - data["CombInstrumentID"] = toUtf(task_data->CombInstrumentID); - data["TradeGroupID"] = task_data->TradeGroupID; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInvestorPositionCombineDetail(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryCFMMCTradingAccountKey(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcCFMMCTradingAccountKeyField *task_data = (CThostFtdcCFMMCTradingAccountKeyField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["AccountID"] = toUtf(task_data->AccountID); - data["KeyID"] = task_data->KeyID; - data["CurrentKey"] = toUtf(task_data->CurrentKey); - delete 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_error; - } - this->onRspQryCFMMCTradingAccountKey(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryEWarrantOffset(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcEWarrantOffsetField *task_data = (CThostFtdcEWarrantOffsetField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["Direction"] = task_data->Direction; - data["HedgeFlag"] = task_data->HedgeFlag; - data["Volume"] = task_data->Volume; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryEWarrantOffset(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInvestorProductGroupMargin(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInvestorProductGroupMarginField *task_data = (CThostFtdcInvestorProductGroupMarginField*)task->task_data; - data["ProductGroupID"] = toUtf(task_data->ProductGroupID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["FrozenMargin"] = task_data->FrozenMargin; - data["LongFrozenMargin"] = task_data->LongFrozenMargin; - data["ShortFrozenMargin"] = task_data->ShortFrozenMargin; - data["UseMargin"] = task_data->UseMargin; - data["LongUseMargin"] = task_data->LongUseMargin; - data["ShortUseMargin"] = task_data->ShortUseMargin; - data["ExchMargin"] = task_data->ExchMargin; - data["LongExchMargin"] = task_data->LongExchMargin; - data["ShortExchMargin"] = task_data->ShortExchMargin; - data["CloseProfit"] = task_data->CloseProfit; - data["FrozenCommission"] = task_data->FrozenCommission; - data["Commission"] = task_data->Commission; - data["FrozenCash"] = task_data->FrozenCash; - data["CashIn"] = task_data->CashIn; - data["PositionProfit"] = task_data->PositionProfit; - data["OffsetAmount"] = task_data->OffsetAmount; - data["LongOffsetAmount"] = task_data->LongOffsetAmount; - data["ShortOffsetAmount"] = task_data->ShortOffsetAmount; - data["ExchOffsetAmount"] = task_data->ExchOffsetAmount; - data["LongExchOffsetAmount"] = task_data->LongExchOffsetAmount; - data["ShortExchOffsetAmount"] = task_data->ShortExchOffsetAmount; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInvestorProductGroupMargin(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExchangeMarginRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExchangeMarginRateField *task_data = (CThostFtdcExchangeMarginRateField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["LongMarginRatioByMoney"] = task_data->LongMarginRatioByMoney; - data["LongMarginRatioByVolume"] = task_data->LongMarginRatioByVolume; - data["ShortMarginRatioByMoney"] = task_data->ShortMarginRatioByMoney; - data["ShortMarginRatioByVolume"] = task_data->ShortMarginRatioByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete 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_error; - } - this->onRspQryExchangeMarginRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExchangeMarginRateAdjust(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExchangeMarginRateAdjustField *task_data = (CThostFtdcExchangeMarginRateAdjustField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["LongMarginRatioByMoney"] = task_data->LongMarginRatioByMoney; - data["LongMarginRatioByVolume"] = task_data->LongMarginRatioByVolume; - data["ShortMarginRatioByMoney"] = task_data->ShortMarginRatioByMoney; - data["ShortMarginRatioByVolume"] = task_data->ShortMarginRatioByVolume; - data["ExchLongMarginRatioByMoney"] = task_data->ExchLongMarginRatioByMoney; - data["ExchLongMarginRatioByVolume"] = task_data->ExchLongMarginRatioByVolume; - data["ExchShortMarginRatioByMoney"] = task_data->ExchShortMarginRatioByMoney; - data["ExchShortMarginRatioByVolume"] = task_data->ExchShortMarginRatioByVolume; - data["NoLongMarginRatioByMoney"] = task_data->NoLongMarginRatioByMoney; - data["NoLongMarginRatioByVolume"] = task_data->NoLongMarginRatioByVolume; - data["NoShortMarginRatioByMoney"] = task_data->NoShortMarginRatioByMoney; - data["NoShortMarginRatioByVolume"] = task_data->NoShortMarginRatioByVolume; - delete 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_error; - } - this->onRspQryExchangeMarginRateAdjust(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExchangeRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExchangeRateField *task_data = (CThostFtdcExchangeRateField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["FromCurrencyID"] = toUtf(task_data->FromCurrencyID); - data["FromCurrencyUnit"] = task_data->FromCurrencyUnit; - data["ToCurrencyID"] = toUtf(task_data->ToCurrencyID); - data["ExchangeRate"] = task_data->ExchangeRate; - delete 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_error; - } - this->onRspQryExchangeRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQrySecAgentACIDMap(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcSecAgentACIDMapField *task_data = (CThostFtdcSecAgentACIDMapField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["UserID"] = toUtf(task_data->UserID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["BrokerSecAgentID"] = toUtf(task_data->BrokerSecAgentID); - delete 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_error; - } - this->onRspQrySecAgentACIDMap(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryProductExchRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcProductExchRateField *task_data = (CThostFtdcProductExchRateField*)task->task_data; - data["ProductID"] = toUtf(task_data->ProductID); - data["QuoteCurrencyID"] = toUtf(task_data->QuoteCurrencyID); - data["ExchangeRate"] = task_data->ExchangeRate; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete 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_error; - } - this->onRspQryProductExchRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryProductGroup(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcProductGroupField *task_data = (CThostFtdcProductGroupField*)task->task_data; - data["ProductID"] = toUtf(task_data->ProductID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ProductGroupID"] = toUtf(task_data->ProductGroupID); - delete 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_error; - } - this->onRspQryProductGroup(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryMMInstrumentCommissionRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcMMInstrumentCommissionRateField *task_data = (CThostFtdcMMInstrumentCommissionRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OpenRatioByMoney"] = task_data->OpenRatioByMoney; - data["OpenRatioByVolume"] = task_data->OpenRatioByVolume; - data["CloseRatioByMoney"] = task_data->CloseRatioByMoney; - data["CloseRatioByVolume"] = task_data->CloseRatioByVolume; - data["CloseTodayRatioByMoney"] = task_data->CloseTodayRatioByMoney; - data["CloseTodayRatioByVolume"] = task_data->CloseTodayRatioByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete 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_error; - } - this->onRspQryMMInstrumentCommissionRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryMMOptionInstrCommRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcMMOptionInstrCommRateField *task_data = (CThostFtdcMMOptionInstrCommRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OpenRatioByMoney"] = task_data->OpenRatioByMoney; - data["OpenRatioByVolume"] = task_data->OpenRatioByVolume; - data["CloseRatioByMoney"] = task_data->CloseRatioByMoney; - data["CloseRatioByVolume"] = task_data->CloseRatioByVolume; - data["CloseTodayRatioByMoney"] = task_data->CloseTodayRatioByMoney; - data["CloseTodayRatioByVolume"] = task_data->CloseTodayRatioByVolume; - data["StrikeRatioByMoney"] = task_data->StrikeRatioByMoney; - data["StrikeRatioByVolume"] = task_data->StrikeRatioByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete 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_error; - } - this->onRspQryMMOptionInstrCommRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInstrumentOrderCommRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInstrumentOrderCommRateField *task_data = (CThostFtdcInstrumentOrderCommRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["OrderCommByVolume"] = task_data->OrderCommByVolume; - data["OrderActionCommByVolume"] = task_data->OrderActionCommByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryInstrumentOrderCommRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryOptionInstrTradeCost(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcOptionInstrTradeCostField *task_data = (CThostFtdcOptionInstrTradeCostField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["FixedMargin"] = task_data->FixedMargin; - data["MiniMargin"] = task_data->MiniMargin; - data["Royalty"] = task_data->Royalty; - data["ExchFixedMargin"] = task_data->ExchFixedMargin; - data["ExchMiniMargin"] = task_data->ExchMiniMargin; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryOptionInstrTradeCost(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryOptionInstrCommRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcOptionInstrCommRateField *task_data = (CThostFtdcOptionInstrCommRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OpenRatioByMoney"] = task_data->OpenRatioByMoney; - data["OpenRatioByVolume"] = task_data->OpenRatioByVolume; - data["CloseRatioByMoney"] = task_data->CloseRatioByMoney; - data["CloseRatioByVolume"] = task_data->CloseRatioByVolume; - data["CloseTodayRatioByMoney"] = task_data->CloseTodayRatioByMoney; - data["CloseTodayRatioByVolume"] = task_data->CloseTodayRatioByVolume; - data["StrikeRatioByMoney"] = task_data->StrikeRatioByMoney; - data["StrikeRatioByVolume"] = task_data->StrikeRatioByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryOptionInstrCommRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExecOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecOrderField *task_data = (CThostFtdcExecOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExecOrderRef"] = toUtf(task_data->ExecOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ActionType"] = task_data->ActionType; - data["PosiDirection"] = task_data->PosiDirection; - data["ReservePositionFlag"] = task_data->ReservePositionFlag; - data["CloseFlag"] = task_data->CloseFlag; - data["ExecOrderLocalID"] = toUtf(task_data->ExecOrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["ExecOrderSysID"] = toUtf(task_data->ExecOrderSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ExecResult"] = task_data->ExecResult; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerExecOrderSeq"] = task_data->BrokerExecOrderSeq; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryExecOrder(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryForQuote(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcForQuoteField *task_data = (CThostFtdcForQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ForQuoteRef"] = toUtf(task_data->ForQuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["ForQuoteLocalID"] = toUtf(task_data->ForQuoteLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["ForQuoteStatus"] = task_data->ForQuoteStatus; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerForQutoSeq"] = task_data->BrokerForQutoSeq; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - data["BranchID"] = toUtf(task_data->BranchID); - delete 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_error; - } - this->onRspQryForQuote(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryQuote(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcQuoteField *task_data = (CThostFtdcQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["QuoteRef"] = toUtf(task_data->QuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["AskPrice"] = task_data->AskPrice; - data["BidPrice"] = task_data->BidPrice; - data["AskVolume"] = task_data->AskVolume; - data["BidVolume"] = task_data->BidVolume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["AskOffsetFlag"] = task_data->AskOffsetFlag; - data["BidOffsetFlag"] = task_data->BidOffsetFlag; - data["AskHedgeFlag"] = task_data->AskHedgeFlag; - data["BidHedgeFlag"] = task_data->BidHedgeFlag; - data["QuoteLocalID"] = toUtf(task_data->QuoteLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["NotifySequence"] = task_data->NotifySequence; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["QuoteSysID"] = toUtf(task_data->QuoteSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["QuoteStatus"] = task_data->QuoteStatus; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["AskOrderSysID"] = toUtf(task_data->AskOrderSysID); - data["BidOrderSysID"] = toUtf(task_data->BidOrderSysID); - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerQuoteSeq"] = task_data->BrokerQuoteSeq; - data["AskOrderRef"] = toUtf(task_data->AskOrderRef); - data["BidOrderRef"] = toUtf(task_data->BidOrderRef); - data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryQuote(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryLock(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcLockField *task_data = (CThostFtdcLockField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["LockRef"] = toUtf(task_data->LockRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["LockType"] = task_data->LockType; - data["LockLocalID"] = toUtf(task_data->LockLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["LockSysID"] = toUtf(task_data->LockSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["LockStatus"] = task_data->LockStatus; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerLockSeq"] = task_data->BrokerLockSeq; - data["BranchID"] = toUtf(task_data->BranchID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryLock(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryLockPosition(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcLockPositionField *task_data = (CThostFtdcLockPositionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["Volume"] = task_data->Volume; - data["FrozenVolume"] = task_data->FrozenVolume; - data["TodayVolume"] = task_data->TodayVolume; - delete 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_error; - } - this->onRspQryLockPosition(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryETFOptionInstrCommRate(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcETFOptionInstrCommRateField *task_data = (CThostFtdcETFOptionInstrCommRateField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InvestorRange"] = task_data->InvestorRange; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OpenRatioByMoney"] = task_data->OpenRatioByMoney; - data["OpenRatioByVolume"] = task_data->OpenRatioByVolume; - data["CloseRatioByMoney"] = task_data->CloseRatioByMoney; - data["CloseRatioByVolume"] = task_data->CloseRatioByVolume; - data["CloseTodayRatioByMoney"] = task_data->CloseTodayRatioByMoney; - data["CloseTodayRatioByVolume"] = task_data->CloseTodayRatioByVolume; - data["StrikeRatioByMoney"] = task_data->StrikeRatioByMoney; - data["StrikeRatioByVolume"] = task_data->StrikeRatioByVolume; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["HedgeFlag"] = task_data->HedgeFlag; - data["PosiDirection"] = task_data->PosiDirection; - delete 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_error; - } - this->onRspQryETFOptionInstrCommRate(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryInvestorLevel(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInvestorLevelField *task_data = (CThostFtdcInvestorLevelField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["LevelType"] = task_data->LevelType; - delete 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_error; - } - this->onRspQryInvestorLevel(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExecFreeze(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecFreezeField *task_data = (CThostFtdcExecFreezeField*)task->task_data; - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["PosiDirection"] = task_data->PosiDirection; - data["OptionsType"] = task_data->OptionsType; - data["Volume"] = task_data->Volume; - data["FrozenAmount"] = task_data->FrozenAmount; - delete 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_error; - } - this->onRspQryExecFreeze(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryCombInstrumentGuard(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcCombInstrumentGuardField *task_data = (CThostFtdcCombInstrumentGuardField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["GuarantRatio"] = task_data->GuarantRatio; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete 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_error; - } - this->onRspQryCombInstrumentGuard(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryCombAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcCombActionField *task_data = (CThostFtdcCombActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["CombActionRef"] = toUtf(task_data->CombActionRef); - data["UserID"] = toUtf(task_data->UserID); - data["Direction"] = task_data->Direction; - data["Volume"] = task_data->Volume; - data["CombDirection"] = task_data->CombDirection; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["ActionStatus"] = task_data->ActionStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - data["ComTradeID"] = toUtf(task_data->ComTradeID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryCombAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryTransferSerial(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTransferSerialField *task_data = (CThostFtdcTransferSerialField*)task->task_data; - data["PlateSerial"] = task_data->PlateSerial; - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["TradeCode"] = toUtf(task_data->TradeCode); - data["SessionID"] = task_data->SessionID; - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BankAccType"] = task_data->BankAccType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["FutureAccType"] = task_data->FutureAccType; - data["AccountID"] = toUtf(task_data->AccountID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["FutureSerial"] = task_data->FutureSerial; - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["AvailabilityFlag"] = task_data->AvailabilityFlag; - data["OperatorCode"] = toUtf(task_data->OperatorCode); - data["BankNewAccount"] = toUtf(task_data->BankNewAccount); - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete 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_error; - } - this->onRspQryTransferSerial(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryAccountregister(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcAccountregisterField *task_data = (CThostFtdcAccountregisterField*)task->task_data; - data["TradeDay"] = toUtf(task_data->TradeDay); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["AccountID"] = toUtf(task_data->AccountID); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustomerName"] = toUtf(task_data->CustomerName); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["OpenOrDestroy"] = task_data->OpenOrDestroy; - data["RegDate"] = toUtf(task_data->RegDate); - data["OutDate"] = toUtf(task_data->OutDate); - data["TID"] = task_data->TID; - data["CustType"] = task_data->CustType; - data["BankAccType"] = task_data->BankAccType; - delete 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_error; - } - this->onRspQryAccountregister(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspError(Task *task) -{ - gil_scoped_acquire acquire; - 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_error; - } - this->onRspError(error, task->task_id, task->task_last); -}; - -void TdApi::processRtnOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcOrderField *task_data = (CThostFtdcOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["OrderLocalID"] = toUtf(task_data->OrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["OrderSource"] = task_data->OrderSource; - data["OrderStatus"] = task_data->OrderStatus; - data["OrderType"] = task_data->OrderType; - data["VolumeTraded"] = task_data->VolumeTraded; - data["VolumeTotal"] = task_data->VolumeTotal; - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["ActiveTime"] = toUtf(task_data->ActiveTime); - data["SuspendTime"] = toUtf(task_data->SuspendTime); - data["UpdateTime"] = toUtf(task_data->UpdateTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ActiveTraderID"] = toUtf(task_data->ActiveTraderID); - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["UserForceClose"] = task_data->UserForceClose; - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerOrderSeq"] = task_data->BrokerOrderSeq; - data["RelativeOrderSysID"] = toUtf(task_data->RelativeOrderSysID); - data["ZCETotalTradedVolume"] = task_data->ZCETotalTradedVolume; - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete task_data; - } - this->onRtnOrder(data); -}; - -void TdApi::processRtnTrade(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTradeField *task_data = (CThostFtdcTradeField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["TradeID"] = toUtf(task_data->TradeID); - data["Direction"] = task_data->Direction; - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["TradingRole"] = task_data->TradingRole; - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["Price"] = task_data->Price; - data["Volume"] = task_data->Volume; - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["TradeType"] = task_data->TradeType; - data["PriceSource"] = task_data->PriceSource; - data["TraderID"] = toUtf(task_data->TraderID); - data["OrderLocalID"] = toUtf(task_data->OrderLocalID); - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["SequenceNo"] = task_data->SequenceNo; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["BrokerOrderSeq"] = task_data->BrokerOrderSeq; - data["TradeSource"] = task_data->TradeSource; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete task_data; - } - this->onRtnTrade(data); -}; - -void TdApi::processErrRtnOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputOrderField *task_data = (CThostFtdcInputOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["UserForceClose"] = task_data->UserForceClose; - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnOrderInsert(data, error); -}; - -void TdApi::processErrRtnOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcOrderActionField *task_data = (CThostFtdcOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OrderActionRef"] = task_data->OrderActionRef; - data["OrderRef"] = toUtf(task_data->OrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeChange"] = task_data->VolumeChange; - data["ActionDate"] = toUtf(task_data->ActionDate); - data["ActionTime"] = toUtf(task_data->ActionTime); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderLocalID"] = toUtf(task_data->OrderLocalID); - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OrderActionStatus"] = task_data->OrderActionStatus; - data["UserID"] = toUtf(task_data->UserID); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnOrderAction(data, error); -}; - -void TdApi::processRtnInstrumentStatus(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInstrumentStatusField *task_data = (CThostFtdcInstrumentStatusField*)task->task_data; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["SettlementGroupID"] = toUtf(task_data->SettlementGroupID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["InstrumentStatus"] = task_data->InstrumentStatus; - data["TradingSegmentSN"] = task_data->TradingSegmentSN; - data["EnterTime"] = toUtf(task_data->EnterTime); - data["EnterReason"] = task_data->EnterReason; - delete task_data; - } - this->onRtnInstrumentStatus(data); -}; - -void TdApi::processRtnBulletin(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcBulletinField *task_data = (CThostFtdcBulletinField*)task->task_data; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["BulletinID"] = task_data->BulletinID; - data["SequenceNo"] = task_data->SequenceNo; - data["NewsType"] = toUtf(task_data->NewsType); - data["NewsUrgency"] = task_data->NewsUrgency; - data["SendTime"] = toUtf(task_data->SendTime); - data["Abstract"] = toUtf(task_data->Abstract); - data["ComeFrom"] = toUtf(task_data->ComeFrom); - data["Content"] = toUtf(task_data->Content); - data["URLLink"] = toUtf(task_data->URLLink); - data["MarketID"] = toUtf(task_data->MarketID); - delete task_data; - } - this->onRtnBulletin(data); -}; - -void TdApi::processRtnTradingNotice(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTradingNoticeInfoField *task_data = (CThostFtdcTradingNoticeInfoField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["SendTime"] = toUtf(task_data->SendTime); - data["FieldContent"] = toUtf(task_data->FieldContent); - data["SequenceSeries"] = task_data->SequenceSeries; - data["SequenceNo"] = task_data->SequenceNo; - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete task_data; - } - this->onRtnTradingNotice(data); -}; - -void TdApi::processRtnErrorConditionalOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcErrorConditionalOrderField *task_data = (CThostFtdcErrorConditionalOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["OrderLocalID"] = toUtf(task_data->OrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["OrderSource"] = task_data->OrderSource; - data["OrderStatus"] = task_data->OrderStatus; - data["OrderType"] = task_data->OrderType; - data["VolumeTraded"] = task_data->VolumeTraded; - data["VolumeTotal"] = task_data->VolumeTotal; - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["ActiveTime"] = toUtf(task_data->ActiveTime); - data["SuspendTime"] = toUtf(task_data->SuspendTime); - data["UpdateTime"] = toUtf(task_data->UpdateTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ActiveTraderID"] = toUtf(task_data->ActiveTraderID); - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["UserForceClose"] = task_data->UserForceClose; - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerOrderSeq"] = task_data->BrokerOrderSeq; - data["RelativeOrderSysID"] = toUtf(task_data->RelativeOrderSysID); - data["ZCETotalTradedVolume"] = task_data->ZCETotalTradedVolume; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete task_data; - } - this->onRtnErrorConditionalOrder(data); -}; - -void TdApi::processRtnExecOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecOrderField *task_data = (CThostFtdcExecOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExecOrderRef"] = toUtf(task_data->ExecOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ActionType"] = task_data->ActionType; - data["PosiDirection"] = task_data->PosiDirection; - data["ReservePositionFlag"] = task_data->ReservePositionFlag; - data["CloseFlag"] = task_data->CloseFlag; - data["ExecOrderLocalID"] = toUtf(task_data->ExecOrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["ExecOrderSysID"] = toUtf(task_data->ExecOrderSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ExecResult"] = task_data->ExecResult; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerExecOrderSeq"] = task_data->BrokerExecOrderSeq; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete task_data; - } - this->onRtnExecOrder(data); -}; - -void TdApi::processErrRtnExecOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputExecOrderField *task_data = (CThostFtdcInputExecOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ExecOrderRef"] = toUtf(task_data->ExecOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OffsetFlag"] = task_data->OffsetFlag; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ActionType"] = task_data->ActionType; - data["PosiDirection"] = task_data->PosiDirection; - data["ReservePositionFlag"] = task_data->ReservePositionFlag; - data["CloseFlag"] = task_data->CloseFlag; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnExecOrderInsert(data, error); -}; - -void TdApi::processErrRtnExecOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecOrderActionField *task_data = (CThostFtdcExecOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ExecOrderActionRef"] = task_data->ExecOrderActionRef; - data["ExecOrderRef"] = toUtf(task_data->ExecOrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExecOrderSysID"] = toUtf(task_data->ExecOrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["ActionDate"] = toUtf(task_data->ActionDate); - data["ActionTime"] = toUtf(task_data->ActionTime); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["ExecOrderLocalID"] = toUtf(task_data->ExecOrderLocalID); - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OrderActionStatus"] = task_data->OrderActionStatus; - data["UserID"] = toUtf(task_data->UserID); - data["ActionType"] = task_data->ActionType; - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnExecOrderAction(data, error); -}; - -void TdApi::processErrRtnForQuoteInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputForQuoteField *task_data = (CThostFtdcInputForQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ForQuoteRef"] = toUtf(task_data->ForQuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnForQuoteInsert(data, error); -}; - -void TdApi::processRtnQuote(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcQuoteField *task_data = (CThostFtdcQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["QuoteRef"] = toUtf(task_data->QuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["AskPrice"] = task_data->AskPrice; - data["BidPrice"] = task_data->BidPrice; - data["AskVolume"] = task_data->AskVolume; - data["BidVolume"] = task_data->BidVolume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["AskOffsetFlag"] = task_data->AskOffsetFlag; - data["BidOffsetFlag"] = task_data->BidOffsetFlag; - data["AskHedgeFlag"] = task_data->AskHedgeFlag; - data["BidHedgeFlag"] = task_data->BidHedgeFlag; - data["QuoteLocalID"] = toUtf(task_data->QuoteLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["NotifySequence"] = task_data->NotifySequence; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["QuoteSysID"] = toUtf(task_data->QuoteSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["QuoteStatus"] = task_data->QuoteStatus; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["AskOrderSysID"] = toUtf(task_data->AskOrderSysID); - data["BidOrderSysID"] = toUtf(task_data->BidOrderSysID); - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerQuoteSeq"] = task_data->BrokerQuoteSeq; - data["AskOrderRef"] = toUtf(task_data->AskOrderRef); - data["BidOrderRef"] = toUtf(task_data->BidOrderRef); - data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete task_data; - } - this->onRtnQuote(data); -}; - -void TdApi::processErrRtnQuoteInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputQuoteField *task_data = (CThostFtdcInputQuoteField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["QuoteRef"] = toUtf(task_data->QuoteRef); - data["UserID"] = toUtf(task_data->UserID); - data["AskPrice"] = task_data->AskPrice; - data["BidPrice"] = task_data->BidPrice; - data["AskVolume"] = task_data->AskVolume; - data["BidVolume"] = task_data->BidVolume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["AskOffsetFlag"] = task_data->AskOffsetFlag; - data["BidOffsetFlag"] = task_data->BidOffsetFlag; - data["AskHedgeFlag"] = task_data->AskHedgeFlag; - data["BidHedgeFlag"] = task_data->BidHedgeFlag; - data["AskOrderRef"] = toUtf(task_data->AskOrderRef); - data["BidOrderRef"] = toUtf(task_data->BidOrderRef); - data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnQuoteInsert(data, error); -}; - -void TdApi::processErrRtnQuoteAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcQuoteActionField *task_data = (CThostFtdcQuoteActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["QuoteActionRef"] = task_data->QuoteActionRef; - data["QuoteRef"] = toUtf(task_data->QuoteRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["QuoteSysID"] = toUtf(task_data->QuoteSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["ActionDate"] = toUtf(task_data->ActionDate); - data["ActionTime"] = toUtf(task_data->ActionTime); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["QuoteLocalID"] = toUtf(task_data->QuoteLocalID); - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OrderActionStatus"] = task_data->OrderActionStatus; - data["UserID"] = toUtf(task_data->UserID); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnQuoteAction(data, error); -}; - -void TdApi::processRtnForQuoteRsp(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcForQuoteRspField *task_data = (CThostFtdcForQuoteRspField*)task->task_data; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID); - data["ForQuoteTime"] = toUtf(task_data->ForQuoteTime); - data["ActionDay"] = toUtf(task_data->ActionDay); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - delete task_data; - } - this->onRtnForQuoteRsp(data); -}; - -void TdApi::processRtnCFMMCTradingAccountToken(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcCFMMCTradingAccountTokenField *task_data = (CThostFtdcCFMMCTradingAccountTokenField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["AccountID"] = toUtf(task_data->AccountID); - data["KeyID"] = task_data->KeyID; - data["Token"] = toUtf(task_data->Token); - delete task_data; - } - this->onRtnCFMMCTradingAccountToken(data); -}; - -void TdApi::processRtnLock(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcLockField *task_data = (CThostFtdcLockField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["LockRef"] = toUtf(task_data->LockRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["LockType"] = task_data->LockType; - data["LockLocalID"] = toUtf(task_data->LockLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["LockSysID"] = toUtf(task_data->LockSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["LockStatus"] = task_data->LockStatus; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerLockSeq"] = task_data->BrokerLockSeq; - data["BranchID"] = toUtf(task_data->BranchID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete task_data; - } - this->onRtnLock(data); -}; - -void TdApi::processErrRtnLockInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputLockField *task_data = (CThostFtdcInputLockField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["LockRef"] = toUtf(task_data->LockRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["LockType"] = task_data->LockType; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnLockInsert(data, error); -}; - -void TdApi::processErrRtnBatchOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcBatchOrderActionField *task_data = (CThostFtdcBatchOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OrderActionRef"] = task_data->OrderActionRef; - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ActionDate"] = toUtf(task_data->ActionDate); - data["ActionTime"] = toUtf(task_data->ActionTime); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OrderActionStatus"] = task_data->OrderActionStatus; - data["UserID"] = toUtf(task_data->UserID); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnBatchOrderAction(data, error); -}; - -void TdApi::processRtnCombAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcCombActionField *task_data = (CThostFtdcCombActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["CombActionRef"] = toUtf(task_data->CombActionRef); - data["UserID"] = toUtf(task_data->UserID); - data["Direction"] = task_data->Direction; - data["Volume"] = task_data->Volume; - data["CombDirection"] = task_data->CombDirection; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["ActionStatus"] = task_data->ActionStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - data["ComTradeID"] = toUtf(task_data->ComTradeID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete task_data; - } - this->onRtnCombAction(data); -}; - -void TdApi::processErrRtnCombActionInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputCombActionField *task_data = (CThostFtdcInputCombActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["CombActionRef"] = toUtf(task_data->CombActionRef); - data["UserID"] = toUtf(task_data->UserID); - data["Direction"] = task_data->Direction; - data["Volume"] = task_data->Volume; - data["CombDirection"] = task_data->CombDirection; - data["HedgeFlag"] = task_data->HedgeFlag; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onErrRtnCombActionInsert(data, error); -}; - -void TdApi::processRspQryContractBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcContractBankField *task_data = (CThostFtdcContractBankField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BankID"] = toUtf(task_data->BankID); - data["BankBrchID"] = toUtf(task_data->BankBrchID); - data["BankName"] = toUtf(task_data->BankName); - delete 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_error; - } - this->onRspQryContractBank(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryParkedOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcParkedOrderField *task_data = (CThostFtdcParkedOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["OrderRef"] = toUtf(task_data->OrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["OrderPriceType"] = task_data->OrderPriceType; - data["Direction"] = task_data->Direction; - data["CombOffsetFlag"] = toUtf(task_data->CombOffsetFlag); - data["CombHedgeFlag"] = toUtf(task_data->CombHedgeFlag); - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeTotalOriginal"] = task_data->VolumeTotalOriginal; - data["TimeCondition"] = task_data->TimeCondition; - data["GTDDate"] = toUtf(task_data->GTDDate); - data["VolumeCondition"] = task_data->VolumeCondition; - data["MinVolume"] = task_data->MinVolume; - data["ContingentCondition"] = task_data->ContingentCondition; - data["StopPrice"] = task_data->StopPrice; - data["ForceCloseReason"] = task_data->ForceCloseReason; - data["IsAutoSuspend"] = task_data->IsAutoSuspend; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["RequestID"] = task_data->RequestID; - data["UserForceClose"] = task_data->UserForceClose; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParkedOrderID"] = toUtf(task_data->ParkedOrderID); - data["UserType"] = task_data->UserType; - data["Status"] = task_data->Status; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - data["IsSwapOrder"] = task_data->IsSwapOrder; - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["ClientID"] = toUtf(task_data->ClientID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryParkedOrder(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryParkedOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcParkedOrderActionField *task_data = (CThostFtdcParkedOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["OrderActionRef"] = task_data->OrderActionRef; - data["OrderRef"] = toUtf(task_data->OrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["OrderSysID"] = toUtf(task_data->OrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["LimitPrice"] = task_data->LimitPrice; - data["VolumeChange"] = task_data->VolumeChange; - data["UserID"] = toUtf(task_data->UserID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["ParkedOrderActionID"] = toUtf(task_data->ParkedOrderActionID); - data["UserType"] = task_data->UserType; - data["Status"] = task_data->Status; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryParkedOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryTradingNotice(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcTradingNoticeField *task_data = (CThostFtdcTradingNoticeField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorRange"] = task_data->InvestorRange; - data["InvestorID"] = toUtf(task_data->InvestorID); - data["SequenceSeries"] = task_data->SequenceSeries; - data["UserID"] = toUtf(task_data->UserID); - data["SendTime"] = toUtf(task_data->SendTime); - data["SequenceNo"] = task_data->SequenceNo; - data["FieldContent"] = toUtf(task_data->FieldContent); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQryTradingNotice(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryBrokerTradingParams(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcBrokerTradingParamsField *task_data = (CThostFtdcBrokerTradingParamsField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["MarginPriceType"] = task_data->MarginPriceType; - data["Algorithm"] = task_data->Algorithm; - data["AvailIncludeCloseProfit"] = task_data->AvailIncludeCloseProfit; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["OptionRoyaltyPriceType"] = task_data->OptionRoyaltyPriceType; - data["AccountID"] = toUtf(task_data->AccountID); - delete 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_error; - } - this->onRspQryBrokerTradingParams(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryBrokerTradingAlgos(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcBrokerTradingAlgosField *task_data = (CThostFtdcBrokerTradingAlgosField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InstrumentID"] = toUtf(task_data->InstrumentID); - data["HandlePositionAlgoID"] = task_data->HandlePositionAlgoID; - data["FindMarginRateAlgoID"] = task_data->FindMarginRateAlgoID; - data["HandleTradingAccountAlgoID"] = task_data->HandleTradingAccountAlgoID; - delete 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_error; - } - this->onRspQryBrokerTradingAlgos(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQueryCFMMCTradingAccountToken(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcQueryCFMMCTradingAccountTokenField *task_data = (CThostFtdcQueryCFMMCTradingAccountTokenField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - delete 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_error; - } - this->onRspQueryCFMMCTradingAccountToken(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRtnFromBankToFutureByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspTransferField *task_data = (CThostFtdcRspTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnFromBankToFutureByBank(data); -}; - -void TdApi::processRtnFromFutureToBankByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspTransferField *task_data = (CThostFtdcRspTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnFromFutureToBankByBank(data); -}; - -void TdApi::processRtnRepealFromBankToFutureByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspRepealField *task_data = (CThostFtdcRspRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnRepealFromBankToFutureByBank(data); -}; - -void TdApi::processRtnRepealFromFutureToBankByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspRepealField *task_data = (CThostFtdcRspRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnRepealFromFutureToBankByBank(data); -}; - -void TdApi::processRtnFromBankToFutureByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspTransferField *task_data = (CThostFtdcRspTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnFromBankToFutureByFuture(data); -}; - -void TdApi::processRtnFromFutureToBankByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspTransferField *task_data = (CThostFtdcRspTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnFromFutureToBankByFuture(data); -}; - -void TdApi::processRtnRepealFromBankToFutureByFutureManual(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspRepealField *task_data = (CThostFtdcRspRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnRepealFromBankToFutureByFutureManual(data); -}; - -void TdApi::processRtnRepealFromFutureToBankByFutureManual(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspRepealField *task_data = (CThostFtdcRspRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnRepealFromFutureToBankByFutureManual(data); -}; - -void TdApi::processRtnQueryBankBalanceByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcNotifyQueryAccountField *task_data = (CThostFtdcNotifyQueryAccountField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["FutureSerial"] = task_data->FutureSerial; - data["InstallID"] = task_data->InstallID; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["BankUseAmount"] = task_data->BankUseAmount; - data["BankFetchAmount"] = task_data->BankFetchAmount; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnQueryBankBalanceByFuture(data); -}; - -void TdApi::processErrRtnBankToFutureByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqTransferField *task_data = (CThostFtdcReqTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - delete 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_error; - } - this->onErrRtnBankToFutureByFuture(data, error); -}; - -void TdApi::processErrRtnFutureToBankByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqTransferField *task_data = (CThostFtdcReqTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - delete 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_error; - } - this->onErrRtnFutureToBankByFuture(data, error); -}; - -void TdApi::processErrRtnRepealBankToFutureByFutureManual(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqRepealField *task_data = (CThostFtdcReqRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - delete 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_error; - } - this->onErrRtnRepealBankToFutureByFutureManual(data, error); -}; - -void TdApi::processErrRtnRepealFutureToBankByFutureManual(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqRepealField *task_data = (CThostFtdcReqRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - delete 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_error; - } - this->onErrRtnRepealFutureToBankByFutureManual(data, error); -}; - -void TdApi::processErrRtnQueryBankBalanceByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqQueryAccountField *task_data = (CThostFtdcReqQueryAccountField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["FutureSerial"] = task_data->FutureSerial; - data["InstallID"] = task_data->InstallID; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - delete 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_error; - } - this->onErrRtnQueryBankBalanceByFuture(data, error); -}; - -void TdApi::processRtnRepealFromBankToFutureByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspRepealField *task_data = (CThostFtdcRspRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnRepealFromBankToFutureByFuture(data); -}; - -void TdApi::processRtnRepealFromFutureToBankByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcRspRepealField *task_data = (CThostFtdcRspRepealField*)task->task_data; - data["RepealTimeInterval"] = task_data->RepealTimeInterval; - data["RepealedTimes"] = task_data->RepealedTimes; - data["BankRepealFlag"] = task_data->BankRepealFlag; - data["BrokerRepealFlag"] = task_data->BrokerRepealFlag; - data["PlateRepealSerial"] = task_data->PlateRepealSerial; - data["BankRepealSerial"] = toUtf(task_data->BankRepealSerial); - data["FutureRepealSerial"] = task_data->FutureRepealSerial; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnRepealFromFutureToBankByFuture(data); -}; - -void TdApi::processRspFromBankToFutureByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqTransferField *task_data = (CThostFtdcReqTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - delete 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_error; - } - this->onRspFromBankToFutureByFuture(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspFromFutureToBankByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqTransferField *task_data = (CThostFtdcReqTransferField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["TradeAmount"] = task_data->TradeAmount; - data["FutureFetchAmount"] = task_data->FutureFetchAmount; - data["FeePayFlag"] = task_data->FeePayFlag; - data["CustFee"] = task_data->CustFee; - data["BrokerFee"] = task_data->BrokerFee; - data["Message"] = toUtf(task_data->Message); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - data["TransferStatus"] = task_data->TransferStatus; - delete 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_error; - } - this->onRspFromFutureToBankByFuture(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQueryBankAccountMoneyByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqQueryAccountField *task_data = (CThostFtdcReqQueryAccountField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["CustType"] = task_data->CustType; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["FutureSerial"] = task_data->FutureSerial; - data["InstallID"] = task_data->InstallID; - data["UserID"] = toUtf(task_data->UserID); - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - delete 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_error; - } - this->onRspQueryBankAccountMoneyByFuture(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRtnOpenAccountByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcOpenAccountField *task_data = (CThostFtdcOpenAccountField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["Gender"] = task_data->Gender; - data["CountryCode"] = toUtf(task_data->CountryCode); - data["CustType"] = task_data->CustType; - data["Address"] = toUtf(task_data->Address); - data["ZipCode"] = toUtf(task_data->ZipCode); - data["Telephone"] = toUtf(task_data->Telephone); - data["MobilePhone"] = toUtf(task_data->MobilePhone); - data["Fax"] = toUtf(task_data->Fax); - data["EMail"] = toUtf(task_data->EMail); - data["MoneyAccountStatus"] = task_data->MoneyAccountStatus; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["CashExchangeCode"] = task_data->CashExchangeCode; - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["TID"] = task_data->TID; - data["UserID"] = toUtf(task_data->UserID); - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - data["SecDaBeBl"] = task_data->SecDaBeBl; - data["BankChal"] = task_data->BankChal; - delete task_data; - } - this->onRtnOpenAccountByBank(data); -}; - -void TdApi::processRtnCancelAccountByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcCancelAccountField *task_data = (CThostFtdcCancelAccountField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["Gender"] = task_data->Gender; - data["CountryCode"] = toUtf(task_data->CountryCode); - data["CustType"] = task_data->CustType; - data["Address"] = toUtf(task_data->Address); - data["ZipCode"] = toUtf(task_data->ZipCode); - data["Telephone"] = toUtf(task_data->Telephone); - data["MobilePhone"] = toUtf(task_data->MobilePhone); - data["Fax"] = toUtf(task_data->Fax); - data["EMail"] = toUtf(task_data->EMail); - data["MoneyAccountStatus"] = task_data->MoneyAccountStatus; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["CashExchangeCode"] = task_data->CashExchangeCode; - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["TID"] = task_data->TID; - data["UserID"] = toUtf(task_data->UserID); - data["SecDaBeBl"] = task_data->SecDaBeBl; - data["BankChal"] = task_data->BankChal; - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnCancelAccountByBank(data); -}; - -void TdApi::processRtnChangeAccountByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcChangeAccountField *task_data = (CThostFtdcChangeAccountField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["Gender"] = task_data->Gender; - data["CountryCode"] = toUtf(task_data->CountryCode); - data["CustType"] = task_data->CustType; - data["Address"] = toUtf(task_data->Address); - data["ZipCode"] = toUtf(task_data->ZipCode); - data["Telephone"] = toUtf(task_data->Telephone); - data["MobilePhone"] = toUtf(task_data->MobilePhone); - data["Fax"] = toUtf(task_data->Fax); - data["EMail"] = toUtf(task_data->EMail); - data["MoneyAccountStatus"] = task_data->MoneyAccountStatus; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["NewBankAccount"] = toUtf(task_data->NewBankAccount); - data["NewBankPassWord"] = toUtf(task_data->NewBankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["BankAccType"] = task_data->BankAccType; - data["InstallID"] = task_data->InstallID; - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["TID"] = task_data->TID; - data["Digest"] = toUtf(task_data->Digest); - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnChangeAccountByBank(data); -}; - -void TdApi::processRtnResOpenAccConfirmTpdByBank(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcResOpenAccConfirmTpdField *task_data = (CThostFtdcResOpenAccConfirmTpdField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["Gender"] = task_data->Gender; - data["CountryCode"] = toUtf(task_data->CountryCode); - data["CustType"] = task_data->CustType; - data["Address"] = toUtf(task_data->Address); - data["ZipCode"] = toUtf(task_data->ZipCode); - data["Telephone"] = toUtf(task_data->Telephone); - data["MobilePhone"] = toUtf(task_data->MobilePhone); - data["Fax"] = toUtf(task_data->Fax); - data["EMail"] = toUtf(task_data->EMail); - data["MoneyAccountStatus"] = task_data->MoneyAccountStatus; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["BankAccType"] = task_data->BankAccType; - data["InstallID"] = task_data->InstallID; - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["CashExchangeCode"] = task_data->CashExchangeCode; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["OperNo"] = toUtf(task_data->OperNo); - data["UserID"] = toUtf(task_data->UserID); - data["TID"] = task_data->TID; - data["Digest"] = toUtf(task_data->Digest); - data["ErrorID"] = task_data->ErrorID; - data["ErrorMsg"] = toUtf(task_data->ErrorMsg); - delete task_data; - } - this->onRtnResOpenAccConfirmTpdByBank(data); -}; - -void TdApi::processRspReserveOpenAccountTpdByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqReserveOpenAccountTpdField *task_data = (CThostFtdcReqReserveOpenAccountTpdField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["Gender"] = task_data->Gender; - data["CountryCode"] = toUtf(task_data->CountryCode); - data["CustType"] = task_data->CustType; - data["Address"] = toUtf(task_data->Address); - data["ZipCode"] = toUtf(task_data->ZipCode); - data["Telephone"] = toUtf(task_data->Telephone); - data["MobilePhone"] = toUtf(task_data->MobilePhone); - data["Fax"] = toUtf(task_data->Fax); - data["EMail"] = toUtf(task_data->EMail); - data["MoneyAccountStatus"] = task_data->MoneyAccountStatus; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["CashExchangeCode"] = task_data->CashExchangeCode; - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["TID"] = task_data->TID; - data["UserID"] = toUtf(task_data->UserID); - data["SecDaBeBl"] = task_data->SecDaBeBl; - data["BankChal"] = task_data->BankChal; - delete 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_error; - } - this->onRspReserveOpenAccountTpdByFuture(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspSecuritiesDepositInterestByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqSecuritiesDepositInterestField *task_data = (CThostFtdcReqSecuritiesDepositInterestField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["CustomerName"] = toUtf(task_data->CustomerName); - data["IdCardType"] = task_data->IdCardType; - data["IdentifiedCardNo"] = toUtf(task_data->IdentifiedCardNo); - data["Gender"] = task_data->Gender; - data["CountryCode"] = toUtf(task_data->CountryCode); - data["CustType"] = task_data->CustType; - data["Address"] = toUtf(task_data->Address); - data["ZipCode"] = toUtf(task_data->ZipCode); - data["Telephone"] = toUtf(task_data->Telephone); - data["MobilePhone"] = toUtf(task_data->MobilePhone); - data["Fax"] = toUtf(task_data->Fax); - data["EMail"] = toUtf(task_data->EMail); - data["MoneyAccountStatus"] = task_data->MoneyAccountStatus; - data["BankAccount"] = toUtf(task_data->BankAccount); - data["BankPassWord"] = toUtf(task_data->BankPassWord); - data["AccountID"] = toUtf(task_data->AccountID); - data["Password"] = toUtf(task_data->Password); - data["InstallID"] = task_data->InstallID; - data["FutureSerial"] = task_data->FutureSerial; - data["VerifyCertNoFlag"] = task_data->VerifyCertNoFlag; - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["CashExchangeCode"] = task_data->CashExchangeCode; - data["Digest"] = toUtf(task_data->Digest); - data["BankAccType"] = task_data->BankAccType; - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BankSecuAccType"] = task_data->BankSecuAccType; - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["BankSecuAcc"] = toUtf(task_data->BankSecuAcc); - data["BankPwdFlag"] = task_data->BankPwdFlag; - data["SecuPwdFlag"] = task_data->SecuPwdFlag; - data["OperNo"] = toUtf(task_data->OperNo); - data["TID"] = task_data->TID; - data["UserID"] = toUtf(task_data->UserID); - data["DepositInterest"] = task_data->DepositInterest; - delete 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_error; - } - this->onRspSecuritiesDepositInterestByFuture(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspDayEndFileReadyByFuture(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcReqDayEndFileReadyField *task_data = (CThostFtdcReqDayEndFileReadyField*)task->task_data; - data["TradeCode"] = toUtf(task_data->TradeCode); - data["BankID"] = toUtf(task_data->BankID); - data["BankBranchID"] = toUtf(task_data->BankBranchID); - data["BrokerID"] = toUtf(task_data->BrokerID); - data["BrokerBranchID"] = toUtf(task_data->BrokerBranchID); - data["TradeDate"] = toUtf(task_data->TradeDate); - data["TradeTime"] = toUtf(task_data->TradeTime); - data["BankSerial"] = toUtf(task_data->BankSerial); - data["TradingDay"] = toUtf(task_data->TradingDay); - data["PlateSerial"] = task_data->PlateSerial; - data["LastFragment"] = task_data->LastFragment; - data["SessionID"] = task_data->SessionID; - data["FileBusinessCode"] = task_data->FileBusinessCode; - data["InstallID"] = task_data->InstallID; - data["UserID"] = toUtf(task_data->UserID); - data["Digest"] = toUtf(task_data->Digest); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["DeviceID"] = toUtf(task_data->DeviceID); - data["BrokerIDByBank"] = toUtf(task_data->BrokerIDByBank); - data["OperNo"] = toUtf(task_data->OperNo); - data["RequestID"] = task_data->RequestID; - data["TID"] = task_data->TID; - delete 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_error; - } - this->onRspDayEndFileReadyByFuture(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspExecCombineOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputExecCombineOrderField *task_data = (CThostFtdcInputExecCombineOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["CallInstrumentID"] = toUtf(task_data->CallInstrumentID); - data["PutInstrumentID"] = toUtf(task_data->PutInstrumentID); - data["ExecCombineOrderRef"] = toUtf(task_data->ExecCombineOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["ActionType"] = task_data->ActionType; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspExecCombineOrderInsert(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspExecCombineOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputExecCombineOrderActionField *task_data = (CThostFtdcInputExecCombineOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ExecCombineOrderActionRef"] = task_data->ExecCombineOrderActionRef; - data["ExecCombineOrderRef"] = toUtf(task_data->ExecCombineOrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExecCombineOrderSysID"] = toUtf(task_data->ExecCombineOrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["UserID"] = toUtf(task_data->UserID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspExecCombineOrderAction(data, error, task->task_id, task->task_last); -}; - -void TdApi::processRspQryExecCombineOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecCombineOrderField *task_data = (CThostFtdcExecCombineOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["CallInstrumentID"] = toUtf(task_data->CallInstrumentID); - data["PutInstrumentID"] = toUtf(task_data->PutInstrumentID); - data["ExecCombineOrderRef"] = toUtf(task_data->ExecCombineOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["ActionType"] = task_data->ActionType; - data["ExecCombineOrderLocalID"] = toUtf(task_data->ExecCombineOrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["UnderlyingInstID"] = toUtf(task_data->UnderlyingInstID); - data["ExchangeCallInstID"] = toUtf(task_data->ExchangeCallInstID); - data["ExchangePutInstID"] = toUtf(task_data->ExchangePutInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["ExecCombineOrderSysID"] = toUtf(task_data->ExecCombineOrderSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ExecResult"] = task_data->ExecResult; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerExecCombineOrderSeq"] = task_data->BrokerExecCombineOrderSeq; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onRspQryExecCombineOrder(data, error, task->task_id, task->task_last); -}; - -void TdApi::processErrRtnExecCombineOrderAction(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecCombineOrderActionField *task_data = (CThostFtdcExecCombineOrderActionField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["ExecCombineOrderActionRef"] = task_data->ExecCombineOrderActionRef; - data["ExecCombineOrderRef"] = toUtf(task_data->ExecCombineOrderRef); - data["RequestID"] = task_data->RequestID; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ExecCombineOrderSysID"] = toUtf(task_data->ExecCombineOrderSysID); - data["ActionFlag"] = task_data->ActionFlag; - data["ActionDate"] = toUtf(task_data->ActionDate); - data["ActionTime"] = toUtf(task_data->ActionTime); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["ExecCombineOrderLocalID"] = toUtf(task_data->ExecCombineOrderLocalID); - data["ActionLocalID"] = toUtf(task_data->ActionLocalID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["OrderActionStatus"] = task_data->OrderActionStatus; - data["UserID"] = toUtf(task_data->UserID); - data["ActionType"] = task_data->ActionType; - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["CallInstrumentID"] = toUtf(task_data->CallInstrumentID); - data["PutInstrumentID"] = toUtf(task_data->PutInstrumentID); - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnExecCombineOrderAction(data, error); -}; - -void TdApi::processErrRtnExecCombineOrderInsert(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcInputExecCombineOrderField *task_data = (CThostFtdcInputExecCombineOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["CallInstrumentID"] = toUtf(task_data->CallInstrumentID); - data["PutInstrumentID"] = toUtf(task_data->PutInstrumentID); - data["ExecCombineOrderRef"] = toUtf(task_data->ExecCombineOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["ActionType"] = task_data->ActionType; - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["ClientID"] = toUtf(task_data->ClientID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete 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_error; - } - this->onErrRtnExecCombineOrderInsert(data, error); -}; - -void TdApi::processRtnExecCombineOrder(Task *task) -{ - gil_scoped_acquire acquire; - dict data; - if (task->task_data) - { - CThostFtdcExecCombineOrderField *task_data = (CThostFtdcExecCombineOrderField*)task->task_data; - data["BrokerID"] = toUtf(task_data->BrokerID); - data["InvestorID"] = toUtf(task_data->InvestorID); - data["CallInstrumentID"] = toUtf(task_data->CallInstrumentID); - data["PutInstrumentID"] = toUtf(task_data->PutInstrumentID); - data["ExecCombineOrderRef"] = toUtf(task_data->ExecCombineOrderRef); - data["UserID"] = toUtf(task_data->UserID); - data["Volume"] = task_data->Volume; - data["RequestID"] = task_data->RequestID; - data["BusinessUnit"] = toUtf(task_data->BusinessUnit); - data["ActionType"] = task_data->ActionType; - data["ExecCombineOrderLocalID"] = toUtf(task_data->ExecCombineOrderLocalID); - data["ExchangeID"] = toUtf(task_data->ExchangeID); - data["ParticipantID"] = toUtf(task_data->ParticipantID); - data["ClientID"] = toUtf(task_data->ClientID); - data["UnderlyingInstID"] = toUtf(task_data->UnderlyingInstID); - data["ExchangeCallInstID"] = toUtf(task_data->ExchangeCallInstID); - data["ExchangePutInstID"] = toUtf(task_data->ExchangePutInstID); - data["TraderID"] = toUtf(task_data->TraderID); - data["InstallID"] = task_data->InstallID; - data["OrderSubmitStatus"] = task_data->OrderSubmitStatus; - data["NotifySequence"] = task_data->NotifySequence; - data["TradingDay"] = toUtf(task_data->TradingDay); - data["SettlementID"] = task_data->SettlementID; - data["ExecCombineOrderSysID"] = toUtf(task_data->ExecCombineOrderSysID); - data["InsertDate"] = toUtf(task_data->InsertDate); - data["InsertTime"] = toUtf(task_data->InsertTime); - data["CancelTime"] = toUtf(task_data->CancelTime); - data["ExecResult"] = task_data->ExecResult; - data["ClearingPartID"] = toUtf(task_data->ClearingPartID); - data["SequenceNo"] = task_data->SequenceNo; - data["FrontID"] = task_data->FrontID; - data["SessionID"] = task_data->SessionID; - data["UserProductInfo"] = toUtf(task_data->UserProductInfo); - data["StatusMsg"] = toUtf(task_data->StatusMsg); - data["ActiveUserID"] = toUtf(task_data->ActiveUserID); - data["BrokerExecCombineOrderSeq"] = task_data->BrokerExecCombineOrderSeq; - data["BranchID"] = toUtf(task_data->BranchID); - data["InvestUnitID"] = toUtf(task_data->InvestUnitID); - data["AccountID"] = toUtf(task_data->AccountID); - data["CurrencyID"] = toUtf(task_data->CurrencyID); - data["IPAddress"] = toUtf(task_data->IPAddress); - data["MacAddress"] = toUtf(task_data->MacAddress); - delete task_data; - } - this->onRtnExecCombineOrder(data); -}; - diff --git a/vnpy/api/sec/generator/Sec_td_source_switch.cpp b/vnpy/api/sec/generator/Sec_td_source_switch.cpp deleted file mode 100644 index 6036e930..00000000 --- a/vnpy/api/sec/generator/Sec_td_source_switch.cpp +++ /dev/null @@ -1,780 +0,0 @@ -case ONFRONTCONNECTED: -{ - this->processFrontConnected(&task); - break; -} - -case ONFRONTDISCONNECTED: -{ - this->processFrontDisconnected(&task); - break; -} - -case ONHEARTBEATWARNING: -{ - this->processHeartBeatWarning(&task); - break; -} - -case ONRSPAUTHENTICATE: -{ - this->processRspAuthenticate(&task); - break; -} - -case ONRSPUSERLOGIN: -{ - this->processRspUserLogin(&task); - break; -} - -case ONRSPUSERLOGOUT: -{ - this->processRspUserLogout(&task); - break; -} - -case ONRSPUSERPASSWORDUPDATE: -{ - this->processRspUserPasswordUpdate(&task); - break; -} - -case ONRSPTRADINGACCOUNTPASSWORDUPDATE: -{ - this->processRspTradingAccountPasswordUpdate(&task); - break; -} - -case ONRSPORDERINSERT: -{ - this->processRspOrderInsert(&task); - break; -} - -case ONRSPPARKEDORDERINSERT: -{ - this->processRspParkedOrderInsert(&task); - break; -} - -case ONRSPPARKEDORDERACTION: -{ - this->processRspParkedOrderAction(&task); - break; -} - -case ONRSPORDERACTION: -{ - this->processRspOrderAction(&task); - break; -} - -case ONRSPQUERYMAXORDERVOLUME: -{ - this->processRspQueryMaxOrderVolume(&task); - break; -} - -case ONRSPSETTLEMENTINFOCONFIRM: -{ - this->processRspSettlementInfoConfirm(&task); - break; -} - -case ONRSPREMOVEPARKEDORDER: -{ - this->processRspRemoveParkedOrder(&task); - break; -} - -case ONRSPREMOVEPARKEDORDERACTION: -{ - this->processRspRemoveParkedOrderAction(&task); - break; -} - -case ONRSPEXECORDERINSERT: -{ - this->processRspExecOrderInsert(&task); - break; -} - -case ONRSPEXECORDERACTION: -{ - this->processRspExecOrderAction(&task); - break; -} - -case ONRSPFORQUOTEINSERT: -{ - this->processRspForQuoteInsert(&task); - break; -} - -case ONRSPQUOTEINSERT: -{ - this->processRspQuoteInsert(&task); - break; -} - -case ONRSPQUOTEACTION: -{ - this->processRspQuoteAction(&task); - break; -} - -case ONRSPLOCKINSERT: -{ - this->processRspLockInsert(&task); - break; -} - -case ONRSPBATCHORDERACTION: -{ - this->processRspBatchOrderAction(&task); - break; -} - -case ONRSPCOMBACTIONINSERT: -{ - this->processRspCombActionInsert(&task); - break; -} - -case ONRSPQRYORDER: -{ - this->processRspQryOrder(&task); - break; -} - -case ONRSPQRYTRADE: -{ - this->processRspQryTrade(&task); - break; -} - -case ONRSPQRYINVESTORPOSITION: -{ - this->processRspQryInvestorPosition(&task); - break; -} - -case ONRSPQRYTRADINGACCOUNT: -{ - this->processRspQryTradingAccount(&task); - break; -} - -case ONRSPQRYINVESTOR: -{ - this->processRspQryInvestor(&task); - break; -} - -case ONRSPQRYTRADINGCODE: -{ - this->processRspQryTradingCode(&task); - break; -} - -case ONRSPQRYINSTRUMENTMARGINRATE: -{ - this->processRspQryInstrumentMarginRate(&task); - break; -} - -case ONRSPQRYINSTRUMENTCOMMISSIONRATE: -{ - this->processRspQryInstrumentCommissionRate(&task); - break; -} - -case ONRSPQRYEXCHANGE: -{ - this->processRspQryExchange(&task); - break; -} - -case ONRSPQRYPRODUCT: -{ - this->processRspQryProduct(&task); - break; -} - -case ONRSPQRYINSTRUMENT: -{ - this->processRspQryInstrument(&task); - break; -} - -case ONRSPQRYDEPTHMARKETDATA: -{ - this->processRspQryDepthMarketData(&task); - break; -} - -case ONRSPQRYSETTLEMENTINFO: -{ - this->processRspQrySettlementInfo(&task); - break; -} - -case ONRSPQRYTRANSFERBANK: -{ - this->processRspQryTransferBank(&task); - break; -} - -case ONRSPQRYINVESTORPOSITIONDETAIL: -{ - this->processRspQryInvestorPositionDetail(&task); - break; -} - -case ONRSPQRYNOTICE: -{ - this->processRspQryNotice(&task); - break; -} - -case ONRSPQRYSETTLEMENTINFOCONFIRM: -{ - this->processRspQrySettlementInfoConfirm(&task); - break; -} - -case ONRSPQRYINVESTORPOSITIONCOMBINEDETAIL: -{ - this->processRspQryInvestorPositionCombineDetail(&task); - break; -} - -case ONRSPQRYCFMMCTRADINGACCOUNTKEY: -{ - this->processRspQryCFMMCTradingAccountKey(&task); - break; -} - -case ONRSPQRYEWARRANTOFFSET: -{ - this->processRspQryEWarrantOffset(&task); - break; -} - -case ONRSPQRYINVESTORPRODUCTGROUPMARGIN: -{ - this->processRspQryInvestorProductGroupMargin(&task); - break; -} - -case ONRSPQRYEXCHANGEMARGINRATE: -{ - this->processRspQryExchangeMarginRate(&task); - break; -} - -case ONRSPQRYEXCHANGEMARGINRATEADJUST: -{ - this->processRspQryExchangeMarginRateAdjust(&task); - break; -} - -case ONRSPQRYEXCHANGERATE: -{ - this->processRspQryExchangeRate(&task); - break; -} - -case ONRSPQRYSECAGENTACIDMAP: -{ - this->processRspQrySecAgentACIDMap(&task); - break; -} - -case ONRSPQRYPRODUCTEXCHRATE: -{ - this->processRspQryProductExchRate(&task); - break; -} - -case ONRSPQRYPRODUCTGROUP: -{ - this->processRspQryProductGroup(&task); - break; -} - -case ONRSPQRYMMINSTRUMENTCOMMISSIONRATE: -{ - this->processRspQryMMInstrumentCommissionRate(&task); - break; -} - -case ONRSPQRYMMOPTIONINSTRCOMMRATE: -{ - this->processRspQryMMOptionInstrCommRate(&task); - break; -} - -case ONRSPQRYINSTRUMENTORDERCOMMRATE: -{ - this->processRspQryInstrumentOrderCommRate(&task); - break; -} - -case ONRSPQRYOPTIONINSTRTRADECOST: -{ - this->processRspQryOptionInstrTradeCost(&task); - break; -} - -case ONRSPQRYOPTIONINSTRCOMMRATE: -{ - this->processRspQryOptionInstrCommRate(&task); - break; -} - -case ONRSPQRYEXECORDER: -{ - this->processRspQryExecOrder(&task); - break; -} - -case ONRSPQRYFORQUOTE: -{ - this->processRspQryForQuote(&task); - break; -} - -case ONRSPQRYQUOTE: -{ - this->processRspQryQuote(&task); - break; -} - -case ONRSPQRYLOCK: -{ - this->processRspQryLock(&task); - break; -} - -case ONRSPQRYLOCKPOSITION: -{ - this->processRspQryLockPosition(&task); - break; -} - -case ONRSPQRYETFOPTIONINSTRCOMMRATE: -{ - this->processRspQryETFOptionInstrCommRate(&task); - break; -} - -case ONRSPQRYINVESTORLEVEL: -{ - this->processRspQryInvestorLevel(&task); - break; -} - -case ONRSPQRYEXECFREEZE: -{ - this->processRspQryExecFreeze(&task); - break; -} - -case ONRSPQRYCOMBINSTRUMENTGUARD: -{ - this->processRspQryCombInstrumentGuard(&task); - break; -} - -case ONRSPQRYCOMBACTION: -{ - this->processRspQryCombAction(&task); - break; -} - -case ONRSPQRYTRANSFERSERIAL: -{ - this->processRspQryTransferSerial(&task); - break; -} - -case ONRSPQRYACCOUNTREGISTER: -{ - this->processRspQryAccountregister(&task); - break; -} - -case ONRSPERROR: -{ - this->processRspError(&task); - break; -} - -case ONRTNORDER: -{ - this->processRtnOrder(&task); - break; -} - -case ONRTNTRADE: -{ - this->processRtnTrade(&task); - break; -} - -case ONERRRTNORDERINSERT: -{ - this->processErrRtnOrderInsert(&task); - break; -} - -case ONERRRTNORDERACTION: -{ - this->processErrRtnOrderAction(&task); - break; -} - -case ONRTNINSTRUMENTSTATUS: -{ - this->processRtnInstrumentStatus(&task); - break; -} - -case ONRTNBULLETIN: -{ - this->processRtnBulletin(&task); - break; -} - -case ONRTNTRADINGNOTICE: -{ - this->processRtnTradingNotice(&task); - break; -} - -case ONRTNERRORCONDITIONALORDER: -{ - this->processRtnErrorConditionalOrder(&task); - break; -} - -case ONRTNEXECORDER: -{ - this->processRtnExecOrder(&task); - break; -} - -case ONERRRTNEXECORDERINSERT: -{ - this->processErrRtnExecOrderInsert(&task); - break; -} - -case ONERRRTNEXECORDERACTION: -{ - this->processErrRtnExecOrderAction(&task); - break; -} - -case ONERRRTNFORQUOTEINSERT: -{ - this->processErrRtnForQuoteInsert(&task); - break; -} - -case ONRTNQUOTE: -{ - this->processRtnQuote(&task); - break; -} - -case ONERRRTNQUOTEINSERT: -{ - this->processErrRtnQuoteInsert(&task); - break; -} - -case ONERRRTNQUOTEACTION: -{ - this->processErrRtnQuoteAction(&task); - break; -} - -case ONRTNFORQUOTERSP: -{ - this->processRtnForQuoteRsp(&task); - break; -} - -case ONRTNCFMMCTRADINGACCOUNTTOKEN: -{ - this->processRtnCFMMCTradingAccountToken(&task); - break; -} - -case ONRTNLOCK: -{ - this->processRtnLock(&task); - break; -} - -case ONERRRTNLOCKINSERT: -{ - this->processErrRtnLockInsert(&task); - break; -} - -case ONERRRTNBATCHORDERACTION: -{ - this->processErrRtnBatchOrderAction(&task); - break; -} - -case ONRTNCOMBACTION: -{ - this->processRtnCombAction(&task); - break; -} - -case ONERRRTNCOMBACTIONINSERT: -{ - this->processErrRtnCombActionInsert(&task); - break; -} - -case ONRSPQRYCONTRACTBANK: -{ - this->processRspQryContractBank(&task); - break; -} - -case ONRSPQRYPARKEDORDER: -{ - this->processRspQryParkedOrder(&task); - break; -} - -case ONRSPQRYPARKEDORDERACTION: -{ - this->processRspQryParkedOrderAction(&task); - break; -} - -case ONRSPQRYTRADINGNOTICE: -{ - this->processRspQryTradingNotice(&task); - break; -} - -case ONRSPQRYBROKERTRADINGPARAMS: -{ - this->processRspQryBrokerTradingParams(&task); - break; -} - -case ONRSPQRYBROKERTRADINGALGOS: -{ - this->processRspQryBrokerTradingAlgos(&task); - break; -} - -case ONRSPQUERYCFMMCTRADINGACCOUNTTOKEN: -{ - this->processRspQueryCFMMCTradingAccountToken(&task); - break; -} - -case ONRTNFROMBANKTOFUTUREBYBANK: -{ - this->processRtnFromBankToFutureByBank(&task); - break; -} - -case ONRTNFROMFUTURETOBANKBYBANK: -{ - this->processRtnFromFutureToBankByBank(&task); - break; -} - -case ONRTNREPEALFROMBANKTOFUTUREBYBANK: -{ - this->processRtnRepealFromBankToFutureByBank(&task); - break; -} - -case ONRTNREPEALFROMFUTURETOBANKBYBANK: -{ - this->processRtnRepealFromFutureToBankByBank(&task); - break; -} - -case ONRTNFROMBANKTOFUTUREBYFUTURE: -{ - this->processRtnFromBankToFutureByFuture(&task); - break; -} - -case ONRTNFROMFUTURETOBANKBYFUTURE: -{ - this->processRtnFromFutureToBankByFuture(&task); - break; -} - -case ONRTNREPEALFROMBANKTOFUTUREBYFUTUREMANUAL: -{ - this->processRtnRepealFromBankToFutureByFutureManual(&task); - break; -} - -case ONRTNREPEALFROMFUTURETOBANKBYFUTUREMANUAL: -{ - this->processRtnRepealFromFutureToBankByFutureManual(&task); - break; -} - -case ONRTNQUERYBANKBALANCEBYFUTURE: -{ - this->processRtnQueryBankBalanceByFuture(&task); - break; -} - -case ONERRRTNBANKTOFUTUREBYFUTURE: -{ - this->processErrRtnBankToFutureByFuture(&task); - break; -} - -case ONERRRTNFUTURETOBANKBYFUTURE: -{ - this->processErrRtnFutureToBankByFuture(&task); - break; -} - -case ONERRRTNREPEALBANKTOFUTUREBYFUTUREMANUAL: -{ - this->processErrRtnRepealBankToFutureByFutureManual(&task); - break; -} - -case ONERRRTNREPEALFUTURETOBANKBYFUTUREMANUAL: -{ - this->processErrRtnRepealFutureToBankByFutureManual(&task); - break; -} - -case ONERRRTNQUERYBANKBALANCEBYFUTURE: -{ - this->processErrRtnQueryBankBalanceByFuture(&task); - break; -} - -case ONRTNREPEALFROMBANKTOFUTUREBYFUTURE: -{ - this->processRtnRepealFromBankToFutureByFuture(&task); - break; -} - -case ONRTNREPEALFROMFUTURETOBANKBYFUTURE: -{ - this->processRtnRepealFromFutureToBankByFuture(&task); - break; -} - -case ONRSPFROMBANKTOFUTUREBYFUTURE: -{ - this->processRspFromBankToFutureByFuture(&task); - break; -} - -case ONRSPFROMFUTURETOBANKBYFUTURE: -{ - this->processRspFromFutureToBankByFuture(&task); - break; -} - -case ONRSPQUERYBANKACCOUNTMONEYBYFUTURE: -{ - this->processRspQueryBankAccountMoneyByFuture(&task); - break; -} - -case ONRTNOPENACCOUNTBYBANK: -{ - this->processRtnOpenAccountByBank(&task); - break; -} - -case ONRTNCANCELACCOUNTBYBANK: -{ - this->processRtnCancelAccountByBank(&task); - break; -} - -case ONRTNCHANGEACCOUNTBYBANK: -{ - this->processRtnChangeAccountByBank(&task); - break; -} - -case ONRTNRESOPENACCCONFIRMTPDBYBANK: -{ - this->processRtnResOpenAccConfirmTpdByBank(&task); - break; -} - -case ONRSPRESERVEOPENACCOUNTTPDBYFUTURE: -{ - this->processRspReserveOpenAccountTpdByFuture(&task); - break; -} - -case ONRSPSECURITIESDEPOSITINTERESTBYFUTURE: -{ - this->processRspSecuritiesDepositInterestByFuture(&task); - break; -} - -case ONRSPDAYENDFILEREADYBYFUTURE: -{ - this->processRspDayEndFileReadyByFuture(&task); - break; -} - -case ONRSPEXECCOMBINEORDERINSERT: -{ - this->processRspExecCombineOrderInsert(&task); - break; -} - -case ONRSPEXECCOMBINEORDERACTION: -{ - this->processRspExecCombineOrderAction(&task); - break; -} - -case ONRSPQRYEXECCOMBINEORDER: -{ - this->processRspQryExecCombineOrder(&task); - break; -} - -case ONERRRTNEXECCOMBINEORDERACTION: -{ - this->processErrRtnExecCombineOrderAction(&task); - break; -} - -case ONERRRTNEXECCOMBINEORDERINSERT: -{ - this->processErrRtnExecCombineOrderInsert(&task); - break; -} - -case ONRTNEXECCOMBINEORDER: -{ - this->processRtnExecCombineOrder(&task); - break; -} - diff --git a/vnpy/api/sec/generator/Sec_td_source_task.cpp b/vnpy/api/sec/generator/Sec_td_source_task.cpp deleted file mode 100644 index f512223e..00000000 --- a/vnpy/api/sec/generator/Sec_td_source_task.cpp +++ /dev/null @@ -1,2426 +0,0 @@ -void TdApi::OnFrontConnected() -{ - 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); -}; - -void TdApi::OnHeartBeatWarning(int nTimeLapse) -{ - 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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -void TdApi::OnRspLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPLOCKINSERT; - if (pInputLock) - { - CThostFtdcInputLockField *task_data = new CThostFtdcInputLockField(); - *task_data = *pInputLock; - 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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -void TdApi::OnRspQryLock(CThostFtdcLockField *pLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPQRYLOCK; - if (pLock) - { - CThostFtdcLockField *task_data = new CThostFtdcLockField(); - *task_data = *pLock; - 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::OnRspQryLockPosition(CThostFtdcLockPositionField *pLockPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPQRYLOCKPOSITION; - if (pLockPosition) - { - CThostFtdcLockPositionField *task_data = new CThostFtdcLockPositionField(); - *task_data = *pLockPosition; - 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::OnRspQryETFOptionInstrCommRate(CThostFtdcETFOptionInstrCommRateField *pETFOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPQRYETFOPTIONINSTRCOMMRATE; - if (pETFOptionInstrCommRate) - { - CThostFtdcETFOptionInstrCommRateField *task_data = new CThostFtdcETFOptionInstrCommRateField(); - *task_data = *pETFOptionInstrCommRate; - 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::OnRspQryInvestorLevel(CThostFtdcInvestorLevelField *pInvestorLevel, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPQRYINVESTORLEVEL; - if (pInvestorLevel) - { - CThostFtdcInvestorLevelField *task_data = new CThostFtdcInvestorLevelField(); - *task_data = *pInvestorLevel; - 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::OnRspQryExecFreeze(CThostFtdcExecFreezeField *pExecFreeze, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPQRYEXECFREEZE; - if (pExecFreeze) - { - CThostFtdcExecFreezeField *task_data = new CThostFtdcExecFreezeField(); - *task_data = *pExecFreeze; - 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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -void TdApi::OnRtnLock(CThostFtdcLockField *pLock) -{ - Task task = Task(); - task.task_name = ONRTNLOCK; - if (pLock) - { - CThostFtdcLockField *task_data = new CThostFtdcLockField(); - *task_data = *pLock; - task.task_data = task_data; - } - this->task_queue.push(task); -}; - -void TdApi::OnErrRtnLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo) -{ - Task task = Task(); - task.task_name = ONERRRTNLOCKINSERT; - if (pInputLock) - { - CThostFtdcInputLockField *task_data = new CThostFtdcInputLockField(); - *task_data = *pInputLock; - 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::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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -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); -}; - -void TdApi::OnRtnResOpenAccConfirmTpdByBank(CThostFtdcResOpenAccConfirmTpdField *pResOpenAccConfirmTpd) -{ - Task task = Task(); - task.task_name = ONRTNRESOPENACCCONFIRMTPDBYBANK; - if (pResOpenAccConfirmTpd) - { - CThostFtdcResOpenAccConfirmTpdField *task_data = new CThostFtdcResOpenAccConfirmTpdField(); - *task_data = *pResOpenAccConfirmTpd; - task.task_data = task_data; - } - this->task_queue.push(task); -}; - -void TdApi::OnRspReserveOpenAccountTpdByFuture(CThostFtdcReqReserveOpenAccountTpdField *pReqReserveOpenAccountTpd, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPRESERVEOPENACCOUNTTPDBYFUTURE; - if (pReqReserveOpenAccountTpd) - { - CThostFtdcReqReserveOpenAccountTpdField *task_data = new CThostFtdcReqReserveOpenAccountTpdField(); - *task_data = *pReqReserveOpenAccountTpd; - 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::OnRspSecuritiesDepositInterestByFuture(CThostFtdcReqSecuritiesDepositInterestField *pReqSecuritiesDepositInterest, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPSECURITIESDEPOSITINTERESTBYFUTURE; - if (pReqSecuritiesDepositInterest) - { - CThostFtdcReqSecuritiesDepositInterestField *task_data = new CThostFtdcReqSecuritiesDepositInterestField(); - *task_data = *pReqSecuritiesDepositInterest; - 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::OnRspDayEndFileReadyByFuture(CThostFtdcReqDayEndFileReadyField *pReqDayEndFileReady, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPDAYENDFILEREADYBYFUTURE; - if (pReqDayEndFileReady) - { - CThostFtdcReqDayEndFileReadyField *task_data = new CThostFtdcReqDayEndFileReadyField(); - *task_data = *pReqDayEndFileReady; - 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::OnRspExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPEXECCOMBINEORDERINSERT; - if (pInputExecCombineOrder) - { - CThostFtdcInputExecCombineOrderField *task_data = new CThostFtdcInputExecCombineOrderField(); - *task_data = *pInputExecCombineOrder; - 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::OnRspExecCombineOrderAction(CThostFtdcInputExecCombineOrderActionField *pInputExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPEXECCOMBINEORDERACTION; - if (pInputExecCombineOrderAction) - { - CThostFtdcInputExecCombineOrderActionField *task_data = new CThostFtdcInputExecCombineOrderActionField(); - *task_data = *pInputExecCombineOrderAction; - 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::OnRspQryExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) -{ - Task task = Task(); - task.task_name = ONRSPQRYEXECCOMBINEORDER; - if (pExecCombineOrder) - { - CThostFtdcExecCombineOrderField *task_data = new CThostFtdcExecCombineOrderField(); - *task_data = *pExecCombineOrder; - 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::OnErrRtnExecCombineOrderAction(CThostFtdcExecCombineOrderActionField *pExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo) -{ - Task task = Task(); - task.task_name = ONERRRTNEXECCOMBINEORDERACTION; - if (pExecCombineOrderAction) - { - CThostFtdcExecCombineOrderActionField *task_data = new CThostFtdcExecCombineOrderActionField(); - *task_data = *pExecCombineOrderAction; - 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::OnErrRtnExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo) -{ - Task task = Task(); - task.task_name = ONERRRTNEXECCOMBINEORDERINSERT; - if (pInputExecCombineOrder) - { - CThostFtdcInputExecCombineOrderField *task_data = new CThostFtdcInputExecCombineOrderField(); - *task_data = *pInputExecCombineOrder; - 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::OnRtnExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder) -{ - Task task = Task(); - task.task_name = ONRTNEXECCOMBINEORDER; - if (pExecCombineOrder) - { - CThostFtdcExecCombineOrderField *task_data = new CThostFtdcExecCombineOrderField(); - *task_data = *pExecCombineOrder; - task.task_data = task_data; - } - this->task_queue.push(task); -}; - diff --git a/vnpy/api/sec/generator/Sec_typedef.py b/vnpy/api/sec/generator/Sec_typedef.py deleted file mode 100644 index 2100a496..00000000 --- a/vnpy/api/sec/generator/Sec_typedef.py +++ /dev/null @@ -1,814 +0,0 @@ -TThostFtdcTraderIDType = "string" -TThostFtdcInvestorIDType = "string" -TThostFtdcBrokerIDType = "string" -TThostFtdcBrokerAbbrType = "string" -TThostFtdcBrokerNameType = "string" -TThostFtdcExchangeInstIDType = "string" -TThostFtdcOrderRefType = "string" -TThostFtdcParticipantIDType = "string" -TThostFtdcUserIDType = "string" -TThostFtdcPasswordType = "string" -TThostFtdcClientIDType = "string" -TThostFtdcInstrumentIDType = "string" -TThostFtdcInstrumentCodeType = "string" -TThostFtdcMarketIDType = "string" -TThostFtdcProductNameType = "string" -TThostFtdcExchangeIDType = "string" -TThostFtdcExchangeNameType = "string" -TThostFtdcExchangeAbbrType = "string" -TThostFtdcExchangeFlagType = "string" -TThostFtdcMacAddressType = "string" -TThostFtdcSystemIDType = "string" -TThostFtdcExchangePropertyType = "char" -TThostFtdcDateType = "string" -TThostFtdcTimeType = "string" -TThostFtdcLongTimeType = "string" -TThostFtdcInstrumentNameType = "string" -TThostFtdcSettlementGroupIDType = "string" -TThostFtdcOrderSysIDType = "string" -TThostFtdcTradeIDType = "string" -TThostFtdcCommandTypeType = "string" -TThostFtdcIPAddressType = "string" -TThostFtdcIPPortType = "int" -TThostFtdcProductInfoType = "string" -TThostFtdcProtocolInfoType = "string" -TThostFtdcBusinessUnitType = "string" -TThostFtdcDepositSeqNoType = "string" -TThostFtdcIdentifiedCardNoType = "string" -TThostFtdcIdCardTypeType = "char" -TThostFtdcOrderLocalIDType = "string" -TThostFtdcUserNameType = "string" -TThostFtdcPartyNameType = "string" -TThostFtdcErrorMsgType = "string" -TThostFtdcFieldNameType = "string" -TThostFtdcFieldContentType = "string" -TThostFtdcSystemNameType = "string" -TThostFtdcContentType = "string" -TThostFtdcInvestorRangeType = "char" -TThostFtdcDepartmentRangeType = "char" -TThostFtdcDataSyncStatusType = "char" -TThostFtdcBrokerDataSyncStatusType = "char" -TThostFtdcExchangeConnectStatusType = "char" -TThostFtdcTraderConnectStatusType = "char" -TThostFtdcFunctionCodeType = "char" -TThostFtdcBrokerFunctionCodeType = "char" -TThostFtdcOrderActionStatusType = "char" -TThostFtdcOrderStatusType = "char" -TThostFtdcOrderSubmitStatusType = "char" -TThostFtdcPositionDateType = "char" -TThostFtdcPositionDateTypeType = "char" -TThostFtdcTradingRoleType = "char" -TThostFtdcProductClassType = "char" -TThostFtdcInstLifePhaseType = "char" -TThostFtdcDirectionType = "char" -TThostFtdcPositionTypeType = "char" -TThostFtdcPosiDirectionType = "char" -TThostFtdcSysSettlementStatusType = "char" -TThostFtdcRatioAttrType = "char" -TThostFtdcHedgeFlagType = "char" -TThostFtdcBillHedgeFlagType = "char" -TThostFtdcClientIDTypeType = "char" -TThostFtdcOrderPriceTypeType = "char" -TThostFtdcOffsetFlagType = "char" -TThostFtdcForceCloseReasonType = "char" -TThostFtdcOrderTypeType = "char" -TThostFtdcTimeConditionType = "char" -TThostFtdcVolumeConditionType = "char" -TThostFtdcContingentConditionType = "char" -TThostFtdcActionFlagType = "char" -TThostFtdcTradingRightType = "char" -TThostFtdcOrderSourceType = "char" -TThostFtdcTradeTypeType = "char" -TThostFtdcPriceSourceType = "char" -TThostFtdcInstrumentStatusType = "char" -TThostFtdcInstStatusEnterReasonType = "char" -TThostFtdcOrderActionRefType = "int" -TThostFtdcInstallCountType = "int" -TThostFtdcInstallIDType = "int" -TThostFtdcErrorIDType = "int" -TThostFtdcSettlementIDType = "int" -TThostFtdcVolumeType = "int" -TThostFtdcFrontIDType = "int" -TThostFtdcSessionIDType = "int" -TThostFtdcSequenceNoType = "int" -TThostFtdcCommandNoType = "int" -TThostFtdcMillisecType = "int" -TThostFtdcVolumeMultipleType = "int" -TThostFtdcTradingSegmentSNType = "int" -TThostFtdcRequestIDType = "int" -TThostFtdcYearType = "int" -TThostFtdcMonthType = "int" -TThostFtdcBoolType = "int" -TThostFtdcPriceType = "double" -TThostFtdcCombOffsetFlagType = "string" -TThostFtdcCombHedgeFlagType = "string" -TThostFtdcRatioType = "double" -TThostFtdcMoneyType = "double" -TThostFtdcLargeVolumeType = "double" -TThostFtdcSequenceSeriesType = "int" -TThostFtdcCommPhaseNoType = "int" -TThostFtdcSequenceLabelType = "string" -TThostFtdcUnderlyingMultipleType = "double" -TThostFtdcPriorityType = "int" -TThostFtdcContractCodeType = "string" -TThostFtdcCityType = "string" -TThostFtdcIsStockType = "string" -TThostFtdcChannelType = "string" -TThostFtdcAddressType = "string" -TThostFtdcZipCodeType = "string" -TThostFtdcTelephoneType = "string" -TThostFtdcFaxType = "string" -TThostFtdcMobileType = "string" -TThostFtdcEMailType = "string" -TThostFtdcMemoType = "string" -TThostFtdcCompanyCodeType = "string" -TThostFtdcWebsiteType = "string" -TThostFtdcTaxNoType = "string" -TThostFtdcBatchStatusType = "char" -TThostFtdcPropertyIDType = "string" -TThostFtdcPropertyNameType = "string" -TThostFtdcLicenseNoType = "string" -TThostFtdcAgentIDType = "string" -TThostFtdcAgentNameType = "string" -TThostFtdcAgentGroupIDType = "string" -TThostFtdcAgentGroupNameType = "string" -TThostFtdcReturnStyleType = "char" -TThostFtdcReturnPatternType = "char" -TThostFtdcReturnLevelType = "char" -TThostFtdcReturnStandardType = "char" -TThostFtdcMortgageTypeType = "char" -TThostFtdcInvestorSettlementParamIDType = "char" -TThostFtdcExchangeSettlementParamIDType = "char" -TThostFtdcSystemParamIDType = "char" -TThostFtdcTradeParamIDType = "char" -TThostFtdcSettlementParamValueType = "string" -TThostFtdcCounterIDType = "string" -TThostFtdcInvestorGroupNameType = "string" -TThostFtdcBrandCodeType = "string" -TThostFtdcWarehouseType = "string" -TThostFtdcProductDateType = "string" -TThostFtdcGradeType = "string" -TThostFtdcClassifyType = "string" -TThostFtdcPositionType = "string" -TThostFtdcYieldlyType = "string" -TThostFtdcWeightType = "string" -TThostFtdcSubEntryFundNoType = "int" -TThostFtdcFileIDType = "char" -TThostFtdcFileNameType = "string" -TThostFtdcFileTypeType = "char" -TThostFtdcFileFormatType = "char" -TThostFtdcFileUploadStatusType = "char" -TThostFtdcTransferDirectionType = "char" -TThostFtdcUploadModeType = "string" -TThostFtdcAccountIDType = "string" -TThostFtdcBankFlagType = "string" -TThostFtdcBankAccountType = "string" -TThostFtdcOpenNameType = "string" -TThostFtdcOpenBankType = "string" -TThostFtdcBankNameType = "string" -TThostFtdcPublishPathType = "string" -TThostFtdcOperatorIDType = "string" -TThostFtdcMonthCountType = "int" -TThostFtdcAdvanceMonthArrayType = "string" -TThostFtdcDateExprType = "string" -TThostFtdcInstrumentIDExprType = "string" -TThostFtdcInstrumentNameExprType = "string" -TThostFtdcSpecialCreateRuleType = "char" -TThostFtdcBasisPriceTypeType = "char" -TThostFtdcProductLifePhaseType = "char" -TThostFtdcDeliveryModeType = "char" -TThostFtdcLogLevelType = "string" -TThostFtdcProcessNameType = "string" -TThostFtdcOperationMemoType = "string" -TThostFtdcFundIOTypeType = "char" -TThostFtdcFundTypeType = "char" -TThostFtdcFundDirectionType = "char" -TThostFtdcFundStatusType = "char" -TThostFtdcBillNoType = "string" -TThostFtdcBillNameType = "string" -TThostFtdcPublishStatusType = "char" -TThostFtdcEnumValueIDType = "string" -TThostFtdcEnumValueTypeType = "string" -TThostFtdcEnumValueLabelType = "string" -TThostFtdcEnumValueResultType = "string" -TThostFtdcSystemStatusType = "char" -TThostFtdcSettlementStatusType = "char" -TThostFtdcRangeIntTypeType = "string" -TThostFtdcRangeIntFromType = "string" -TThostFtdcRangeIntToType = "string" -TThostFtdcFunctionIDType = "string" -TThostFtdcFunctionValueCodeType = "string" -TThostFtdcFunctionNameType = "string" -TThostFtdcRoleIDType = "string" -TThostFtdcRoleNameType = "string" -TThostFtdcDescriptionType = "string" -TThostFtdcCombineIDType = "string" -TThostFtdcCombineTypeType = "string" -TThostFtdcInvestorTypeType = "char" -TThostFtdcBrokerTypeType = "char" -TThostFtdcRiskLevelType = "char" -TThostFtdcFeeAcceptStyleType = "char" -TThostFtdcPasswordTypeType = "char" -TThostFtdcAlgorithmType = "char" -TThostFtdcIncludeCloseProfitType = "char" -TThostFtdcAllWithoutTradeType = "char" -TThostFtdcCommentType = "string" -TThostFtdcVersionType = "string" -TThostFtdcTradeCodeType = "string" -TThostFtdcTradeDateType = "string" -TThostFtdcTradeTimeType = "string" -TThostFtdcTradeSerialType = "string" -TThostFtdcTradeSerialNoType = "int" -TThostFtdcFutureIDType = "string" -TThostFtdcBankIDType = "string" -TThostFtdcBankBrchIDType = "string" -TThostFtdcBankBranchIDType = "string" -TThostFtdcOperNoType = "string" -TThostFtdcDeviceIDType = "string" -TThostFtdcRecordNumType = "string" -TThostFtdcFutureAccountType = "string" -TThostFtdcFuturePwdFlagType = "char" -TThostFtdcTransferTypeType = "char" -TThostFtdcFutureAccPwdType = "string" -TThostFtdcCurrencyCodeType = "string" -TThostFtdcRetCodeType = "string" -TThostFtdcRetInfoType = "string" -TThostFtdcTradeAmtType = "string" -TThostFtdcUseAmtType = "string" -TThostFtdcFetchAmtType = "string" -TThostFtdcTransferValidFlagType = "char" -TThostFtdcCertCodeType = "string" -TThostFtdcBankChannelType = "char" -TThostFtdcReasonType = "char" -TThostFtdcFundProjectIDType = "string" -TThostFtdcSexType = "char" -TThostFtdcProfessionType = "string" -TThostFtdcNationalType = "string" -TThostFtdcProvinceType = "string" -TThostFtdcRegionType = "string" -TThostFtdcCountryType = "string" -TThostFtdcLicenseNOType = "string" -TThostFtdcCompanyTypeType = "string" -TThostFtdcBusinessScopeType = "string" -TThostFtdcCapitalCurrencyType = "string" -TThostFtdcUserTypeType = "char" -TThostFtdcBranchIDType = "string" -TThostFtdcRateTypeType = "char" -TThostFtdcNoteTypeType = "char" -TThostFtdcSettlementStyleType = "char" -TThostFtdcBrokerDNSType = "string" -TThostFtdcSentenceType = "string" -TThostFtdcSettlementBillTypeType = "char" -TThostFtdcUserRightTypeType = "char" -TThostFtdcMarginPriceTypeType = "char" -TThostFtdcBillGenStatusType = "char" -TThostFtdcAlgoTypeType = "char" -TThostFtdcHandlePositionAlgoIDType = "char" -TThostFtdcFindMarginRateAlgoIDType = "char" -TThostFtdcHandleTradingAccountAlgoIDType = "char" -TThostFtdcPersonTypeType = "char" -TThostFtdcQueryInvestorRangeType = "char" -TThostFtdcInvestorRiskStatusType = "char" -TThostFtdcLegIDType = "int" -TThostFtdcLegMultipleType = "int" -TThostFtdcImplyLevelType = "int" -TThostFtdcClearAccountType = "string" -TThostFtdcOrganNOType = "string" -TThostFtdcClearbarchIDType = "string" -TThostFtdcUserEventTypeType = "char" -TThostFtdcUserEventInfoType = "string" -TThostFtdcCloseStyleType = "char" -TThostFtdcStatModeType = "char" -TThostFtdcParkedOrderStatusType = "char" -TThostFtdcParkedOrderIDType = "string" -TThostFtdcParkedOrderActionIDType = "string" -TThostFtdcVirDealStatusType = "char" -TThostFtdcOrgSystemIDType = "char" -TThostFtdcVirTradeStatusType = "char" -TThostFtdcVirBankAccTypeType = "char" -TThostFtdcVirementStatusType = "char" -TThostFtdcVirementAvailAbilityType = "char" -TThostFtdcVirementTradeCodeType = "char" -TThostFtdcPhotoTypeNameType = "string" -TThostFtdcPhotoTypeIDType = "string" -TThostFtdcPhotoNameType = "string" -TThostFtdcTopicIDType = "int" -TThostFtdcReportTypeIDType = "string" -TThostFtdcCharacterIDType = "string" -TThostFtdcAMLParamIDType = "string" -TThostFtdcAMLInvestorTypeType = "string" -TThostFtdcAMLIdCardTypeType = "string" -TThostFtdcAMLTradeDirectType = "string" -TThostFtdcAMLTradeModelType = "string" -TThostFtdcAMLParamIDType = "string" -TThostFtdcAMLOpParamValueType = "double" -TThostFtdcAMLCustomerCardTypeType = "string" -TThostFtdcAMLInstitutionNameType = "string" -TThostFtdcAMLDistrictIDType = "string" -TThostFtdcAMLRelationShipType = "string" -TThostFtdcAMLInstitutionTypeType = "string" -TThostFtdcAMLInstitutionIDType = "string" -TThostFtdcAMLAccountTypeType = "string" -TThostFtdcAMLTradingTypeType = "string" -TThostFtdcAMLTransactClassType = "string" -TThostFtdcAMLCapitalIOType = "string" -TThostFtdcAMLSiteType = "string" -TThostFtdcAMLCapitalPurposeType = "string" -TThostFtdcAMLReportTypeType = "string" -TThostFtdcAMLSerialNoType = "string" -TThostFtdcAMLStatusType = "string" -TThostFtdcAMLGenStatusType = "char" -TThostFtdcAMLSeqCodeType = "string" -TThostFtdcAMLFileNameType = "string" -TThostFtdcAMLMoneyType = "double" -TThostFtdcAMLFileAmountType = "int" -TThostFtdcCFMMCKeyType = "string" -TThostFtdcCFMMCTokenType = "string" -TThostFtdcCFMMCKeyKindType = "char" -TThostFtdcAMLReportNameType = "string" -TThostFtdcDBFComdTypeType = "string" -TThostFtdcDBFComTimeType = "string" -TThostFtdcDBFComNoType = "string" -TThostFtdcDBFFdNameType = "string" -TThostFtdcDBFFdContentType = "string" -TThostFtdcIndividualNameType = "string" -TThostFtdcCurrencyIDType = "string" -TThostFtdcCustNumberType = "string" -TThostFtdcOrganCodeType = "string" -TThostFtdcOrganNameType = "string" -TThostFtdcSuperOrganCodeType = "string" -TThostFtdcSubBranchIDType = "string" -TThostFtdcSubBranchNameType = "string" -TThostFtdcBranchNetCodeType = "string" -TThostFtdcBranchNetNameType = "string" -TThostFtdcOrganFlagType = "string" -TThostFtdcBankCodingForFutureType = "string" -TThostFtdcBankReturnCodeType = "string" -TThostFtdcPlateReturnCodeType = "string" -TThostFtdcBankSubBranchIDType = "string" -TThostFtdcFutureBranchIDType = "string" -TThostFtdcReturnCodeType = "string" -TThostFtdcOperatorCodeType = "string" -TThostFtdcClearDepIDType = "string" -TThostFtdcClearBrchIDType = "string" -TThostFtdcClearNameType = "string" -TThostFtdcBankAccountNameType = "string" -TThostFtdcInvDepIDType = "string" -TThostFtdcInvBrchIDType = "string" -TThostFtdcMessageFormatVersionType = "string" -TThostFtdcDigestType = "string" -TThostFtdcAuthenticDataType = "string" -TThostFtdcPasswordKeyType = "string" -TThostFtdcFutureAccountNameType = "string" -TThostFtdcMobilePhoneType = "string" -TThostFtdcFutureMainKeyType = "string" -TThostFtdcFutureWorkKeyType = "string" -TThostFtdcFutureTransKeyType = "string" -TThostFtdcBankMainKeyType = "string" -TThostFtdcBankWorkKeyType = "string" -TThostFtdcBankTransKeyType = "string" -TThostFtdcBankServerDescriptionType = "string" -TThostFtdcAddInfoType = "string" -TThostFtdcDescrInfoForReturnCodeType = "string" -TThostFtdcCountryCodeType = "string" -TThostFtdcSerialType = "int" -TThostFtdcPlateSerialType = "int" -TThostFtdcBankSerialType = "string" -TThostFtdcCorrectSerialType = "int" -TThostFtdcFutureSerialType = "int" -TThostFtdcApplicationIDType = "int" -TThostFtdcBankProxyIDType = "int" -TThostFtdcFBTCoreIDType = "int" -TThostFtdcServerPortType = "int" -TThostFtdcRepealedTimesType = "int" -TThostFtdcRepealTimeIntervalType = "int" -TThostFtdcTotalTimesType = "int" -TThostFtdcFBTRequestIDType = "int" -TThostFtdcTIDType = "int" -TThostFtdcTradeAmountType = "double" -TThostFtdcCustFeeType = "double" -TThostFtdcFutureFeeType = "double" -TThostFtdcSingleMaxAmtType = "double" -TThostFtdcSingleMinAmtType = "double" -TThostFtdcTotalAmtType = "double" -TThostFtdcCertificationTypeType = "char" -TThostFtdcFileBusinessCodeType = "char" -TThostFtdcCashExchangeCodeType = "char" -TThostFtdcYesNoIndicatorType = "char" -TThostFtdcBanlanceTypeType = "char" -TThostFtdcGenderType = "char" -TThostFtdcFeePayFlagType = "char" -TThostFtdcPassWordKeyTypeType = "char" -TThostFtdcFBTPassWordTypeType = "char" -TThostFtdcFBTEncryModeType = "char" -TThostFtdcBankRepealFlagType = "char" -TThostFtdcBrokerRepealFlagType = "char" -TThostFtdcInstitutionTypeType = "char" -TThostFtdcLastFragmentType = "char" -TThostFtdcBankAccStatusType = "char" -TThostFtdcMoneyAccountStatusType = "char" -TThostFtdcManageStatusType = "char" -TThostFtdcSystemTypeType = "char" -TThostFtdcTxnEndFlagType = "char" -TThostFtdcProcessStatusType = "char" -TThostFtdcCustTypeType = "char" -TThostFtdcFBTTransferDirectionType = "char" -TThostFtdcOpenOrDestroyType = "char" -TThostFtdcAvailabilityFlagType = "char" -TThostFtdcOrganTypeType = "char" -TThostFtdcOrganLevelType = "char" -TThostFtdcProtocalIDType = "char" -TThostFtdcConnectModeType = "char" -TThostFtdcSyncModeType = "char" -TThostFtdcBankAccTypeType = "char" -TThostFtdcFutureAccTypeType = "char" -TThostFtdcOrganStatusType = "char" -TThostFtdcCCBFeeModeType = "char" -TThostFtdcCommApiTypeType = "char" -TThostFtdcServiceIDType = "int" -TThostFtdcServiceLineNoType = "int" -TThostFtdcServiceNameType = "string" -TThostFtdcLinkStatusType = "char" -TThostFtdcCommApiPointerType = "int" -TThostFtdcPwdFlagType = "char" -TThostFtdcSecuAccTypeType = "char" -TThostFtdcTransferStatusType = "char" -TThostFtdcSponsorTypeType = "char" -TThostFtdcReqRspTypeType = "char" -TThostFtdcFBTUserEventTypeType = "char" -TThostFtdcBankIDByBankType = "string" -TThostFtdcBankOperNoType = "string" -TThostFtdcBankCustNoType = "string" -TThostFtdcDBOPSeqNoType = "int" -TThostFtdcTableNameType = "string" -TThostFtdcPKNameType = "string" -TThostFtdcPKValueType = "string" -TThostFtdcDBOperationType = "char" -TThostFtdcSyncFlagType = "char" -TThostFtdcTargetIDType = "string" -TThostFtdcSyncTypeType = "char" -TThostFtdcFBETimeType = "string" -TThostFtdcFBEBankNoType = "string" -TThostFtdcFBECertNoType = "string" -TThostFtdcExDirectionType = "char" -TThostFtdcFBEBankAccountType = "string" -TThostFtdcFBEBankAccountNameType = "string" -TThostFtdcFBEAmtType = "double" -TThostFtdcFBEBusinessTypeType = "string" -TThostFtdcFBEPostScriptType = "string" -TThostFtdcFBERemarkType = "string" -TThostFtdcExRateType = "double" -TThostFtdcFBEResultFlagType = "char" -TThostFtdcFBERtnMsgType = "string" -TThostFtdcFBEExtendMsgType = "string" -TThostFtdcFBEBusinessSerialType = "string" -TThostFtdcFBESystemSerialType = "string" -TThostFtdcFBETotalExCntType = "int" -TThostFtdcFBEExchStatusType = "char" -TThostFtdcFBEFileFlagType = "char" -TThostFtdcFBEAlreadyTradeType = "char" -TThostFtdcFBEOpenBankType = "string" -TThostFtdcFBEUserEventTypeType = "char" -TThostFtdcFBEFileNameType = "string" -TThostFtdcFBEBatchSerialType = "string" -TThostFtdcFBEReqFlagType = "char" -TThostFtdcNotifyClassType = "char" -TThostFtdcRiskNofityInfoType = "string" -TThostFtdcForceCloseSceneIdType = "string" -TThostFtdcForceCloseTypeType = "char" -TThostFtdcInstrumentIDsType = "string" -TThostFtdcRiskNotifyMethodType = "char" -TThostFtdcRiskNotifyStatusType = "char" -TThostFtdcRiskUserEventType = "char" -TThostFtdcParamIDType = "int" -TThostFtdcParamNameType = "string" -TThostFtdcParamValueType = "string" -TThostFtdcConditionalOrderSortTypeType = "char" -TThostFtdcSendTypeType = "char" -TThostFtdcClientIDStatusType = "char" -TThostFtdcIndustryIDType = "string" -TThostFtdcQuestionIDType = "string" -TThostFtdcQuestionContentType = "string" -TThostFtdcOptionIDType = "string" -TThostFtdcOptionContentType = "string" -TThostFtdcQuestionTypeType = "char" -TThostFtdcProcessIDType = "string" -TThostFtdcSeqNoType = "int" -TThostFtdcUOAProcessStatusType = "string" -TThostFtdcProcessTypeType = "string" -TThostFtdcBusinessTypeType = "char" -TThostFtdcCfmmcReturnCodeType = "char" -TThostFtdcExReturnCodeType = "int" -TThostFtdcClientTypeType = "char" -TThostFtdcExchangeIDTypeType = "char" -TThostFtdcExClientIDTypeType = "char" -TThostFtdcClientClassifyType = "string" -TThostFtdcUOAOrganTypeType = "string" -TThostFtdcUOACountryCodeType = "string" -TThostFtdcAreaCodeType = "string" -TThostFtdcFuturesIDType = "string" -TThostFtdcCffmcDateType = "string" -TThostFtdcCffmcTimeType = "string" -TThostFtdcNocIDType = "string" -TThostFtdcUpdateFlagType = "char" -TThostFtdcApplyOperateIDType = "char" -TThostFtdcApplyStatusIDType = "char" -TThostFtdcSendMethodType = "char" -TThostFtdcEventTypeType = "string" -TThostFtdcEventModeType = "char" -TThostFtdcUOAAutoSendType = "char" -TThostFtdcQueryDepthType = "int" -TThostFtdcDataCenterIDType = "int" -TThostFtdcFlowIDType = "char" -TThostFtdcCheckLevelType = "char" -TThostFtdcCheckNoType = "int" -TThostFtdcCheckStatusType = "char" -TThostFtdcUsedStatusType = "char" -TThostFtdcRateTemplateNameType = "string" -TThostFtdcPropertyStringType = "string" -TThostFtdcBankAcountOriginType = "char" -TThostFtdcMonthBillTradeSumType = "char" -TThostFtdcFBTTradeCodeEnumType = "char" -TThostFtdcRateTemplateIDType = "string" -TThostFtdcRiskRateType = "string" -TThostFtdcTimestampType = "int" -TThostFtdcInvestorIDRuleNameType = "string" -TThostFtdcInvestorIDRuleExprType = "string" -TThostFtdcLastDriftType = "int" -TThostFtdcLastSuccessType = "int" -TThostFtdcAuthKeyType = "string" -TThostFtdcSerialNumberType = "string" -TThostFtdcOTPTypeType = "char" -TThostFtdcOTPVendorsIDType = "string" -TThostFtdcOTPVendorsNameType = "string" -TThostFtdcOTPStatusType = "char" -TThostFtdcBrokerUserTypeType = "char" -TThostFtdcFutureTypeType = "char" -TThostFtdcFundEventTypeType = "char" -TThostFtdcAccountSourceTypeType = "char" -TThostFtdcCodeSourceTypeType = "char" -TThostFtdcUserRangeType = "char" -TThostFtdcTimeSpanType = "string" -TThostFtdcImportSequenceIDType = "string" -TThostFtdcByGroupType = "char" -TThostFtdcTradeSumStatModeType = "char" -TThostFtdcComTypeType = "int" -TThostFtdcUserProductIDType = "string" -TThostFtdcUserProductNameType = "string" -TThostFtdcUserProductMemoType = "string" -TThostFtdcCSRCCancelFlagType = "string" -TThostFtdcCSRCDateType = "string" -TThostFtdcCSRCInvestorNameType = "string" -TThostFtdcCSRCOpenInvestorNameType = "string" -TThostFtdcCSRCInvestorIDType = "string" -TThostFtdcCSRCIdentifiedCardNoType = "string" -TThostFtdcCSRCClientIDType = "string" -TThostFtdcCSRCBankFlagType = "string" -TThostFtdcCSRCBankAccountType = "string" -TThostFtdcCSRCOpenNameType = "string" -TThostFtdcCSRCMemoType = "string" -TThostFtdcCSRCTimeType = "string" -TThostFtdcCSRCTradeIDType = "string" -TThostFtdcCSRCExchangeInstIDType = "string" -TThostFtdcCSRCMortgageNameType = "string" -TThostFtdcCSRCReasonType = "string" -TThostFtdcIsSettlementType = "string" -TThostFtdcCSRCMoneyType = "double" -TThostFtdcCSRCPriceType = "double" -TThostFtdcCSRCOptionsTypeType = "string" -TThostFtdcCSRCStrikePriceType = "double" -TThostFtdcCSRCTargetProductIDType = "string" -TThostFtdcCSRCTargetInstrIDType = "string" -TThostFtdcCommModelNameType = "string" -TThostFtdcCommModelMemoType = "string" -TThostFtdcExprSetModeType = "char" -TThostFtdcRateInvestorRangeType = "char" -TThostFtdcAgentBrokerIDType = "string" -TThostFtdcDRIdentityIDType = "int" -TThostFtdcDRIdentityNameType = "string" -TThostFtdcDBLinkIDType = "string" -TThostFtdcSyncDataStatusType = "char" -TThostFtdcTradeSourceType = "char" -TThostFtdcFlexStatModeType = "char" -TThostFtdcByInvestorRangeType = "char" -TThostFtdcSRiskRateType = "string" -TThostFtdcSequenceNo12Type = "int" -TThostFtdcPropertyInvestorRangeType = "char" -TThostFtdcFileStatusType = "char" -TThostFtdcFileGenStyleType = "char" -TThostFtdcSysOperModeType = "char" -TThostFtdcSysOperTypeType = "char" -TThostFtdcCSRCDataQueyTypeType = "char" -TThostFtdcFreezeStatusType = "char" -TThostFtdcStandardStatusType = "char" -TThostFtdcCSRCFreezeStatusType = "string" -TThostFtdcRightParamTypeType = "char" -TThostFtdcRightTemplateIDType = "string" -TThostFtdcRightTemplateNameType = "string" -TThostFtdcDataStatusType = "char" -TThostFtdcAMLCheckStatusType = "char" -TThostFtdcAmlDateTypeType = "char" -TThostFtdcAmlCheckLevelType = "char" -TThostFtdcAmlCheckFlowType = "string" -TThostFtdcDataTypeType = "string" -TThostFtdcExportFileTypeType = "char" -TThostFtdcSettleManagerTypeType = "char" -TThostFtdcSettleManagerIDType = "string" -TThostFtdcSettleManagerNameType = "string" -TThostFtdcSettleManagerLevelType = "char" -TThostFtdcSettleManagerGroupType = "char" -TThostFtdcCheckResultMemoType = "string" -TThostFtdcFunctionUrlType = "string" -TThostFtdcAuthInfoType = "string" -TThostFtdcAuthCodeType = "string" -TThostFtdcLimitUseTypeType = "char" -TThostFtdcDataResourceType = "char" -TThostFtdcMarginTypeType = "char" -TThostFtdcActiveTypeType = "char" -TThostFtdcMarginRateTypeType = "char" -TThostFtdcBackUpStatusType = "char" -TThostFtdcInitSettlementType = "char" -TThostFtdcReportStatusType = "char" -TThostFtdcSaveStatusType = "char" -TThostFtdcSettArchiveStatusType = "char" -TThostFtdcCTPTypeType = "char" -TThostFtdcToolIDType = "string" -TThostFtdcToolNameType = "string" -TThostFtdcCloseDealTypeType = "char" -TThostFtdcMortgageFundUseRangeType = "char" -TThostFtdcCurrencyUnitType = "double" -TThostFtdcExchangeRateType = "double" -TThostFtdcSpecProductTypeType = "char" -TThostFtdcFundMortgageTypeType = "char" -TThostFtdcAccountSettlementParamIDType = "char" -TThostFtdcCurrencyNameType = "string" -TThostFtdcCurrencySignType = "string" -TThostFtdcFundMortDirectionType = "char" -TThostFtdcBusinessClassType = "char" -TThostFtdcSwapSourceTypeType = "char" -TThostFtdcCurrExDirectionType = "char" -TThostFtdcCurrencySwapStatusType = "char" -TThostFtdcCurrExchCertNoType = "string" -TThostFtdcBatchSerialNoType = "string" -TThostFtdcReqFlagType = "char" -TThostFtdcResFlagType = "char" -TThostFtdcPageControlType = "string" -TThostFtdcRecordCountType = "int" -TThostFtdcCurrencySwapMemoType = "string" -TThostFtdcExStatusType = "char" -TThostFtdcClientRegionType = "char" -TThostFtdcWorkPlaceType = "string" -TThostFtdcBusinessPeriodType = "string" -TThostFtdcWebSiteType = "string" -TThostFtdcUOAIdCardTypeType = "string" -TThostFtdcClientModeType = "string" -TThostFtdcInvestorFullNameType = "string" -TThostFtdcUOABrokerIDType = "string" -TThostFtdcUOAZipCodeType = "string" -TThostFtdcUOAEMailType = "string" -TThostFtdcOldCityType = "string" -TThostFtdcCorporateIdentifiedCardNoType = "string" -TThostFtdcHasBoardType = "char" -TThostFtdcStartModeType = "char" -TThostFtdcTemplateTypeType = "char" -TThostFtdcLoginModeType = "char" -TThostFtdcPromptTypeType = "char" -TThostFtdcLedgerManageIDType = "string" -TThostFtdcInvestVarietyType = "string" -TThostFtdcBankAccountTypeType = "string" -TThostFtdcLedgerManageBankType = "string" -TThostFtdcCffexDepartmentNameType = "string" -TThostFtdcCffexDepartmentCodeType = "string" -TThostFtdcHasTrusteeType = "char" -TThostFtdcCSRCMemo1Type = "string" -TThostFtdcAssetmgrCFullNameType = "string" -TThostFtdcAssetmgrApprovalNOType = "string" -TThostFtdcAssetmgrMgrNameType = "string" -TThostFtdcAmTypeType = "char" -TThostFtdcCSRCAmTypeType = "string" -TThostFtdcCSRCFundIOTypeType = "char" -TThostFtdcCusAccountTypeType = "char" -TThostFtdcCSRCNationalType = "string" -TThostFtdcCSRCSecAgentIDType = "string" -TThostFtdcLanguageTypeType = "char" -TThostFtdcAmAccountType = "string" -TThostFtdcAssetmgrClientTypeType = "char" -TThostFtdcAssetmgrTypeType = "char" -TThostFtdcUOMType = "string" -TThostFtdcSHFEInstLifePhaseType = "string" -TThostFtdcSHFEProductClassType = "string" -TThostFtdcPriceDecimalType = "string" -TThostFtdcInTheMoneyFlagType = "string" -TThostFtdcCheckInstrTypeType = "char" -TThostFtdcDeliveryTypeType = "char" -TThostFtdcBigMoneyType = "double" -TThostFtdcMaxMarginSideAlgorithmType = "char" -TThostFtdcDAClientTypeType = "char" -TThostFtdcCombinInstrIDType = "string" -TThostFtdcCombinSettlePriceType = "string" -TThostFtdcDCEPriorityType = "int" -TThostFtdcTradeGroupIDType = "int" -TThostFtdcIsCheckPrepaType = "int" -TThostFtdcUOAAssetmgrTypeType = "char" -TThostFtdcDirectionEnType = "char" -TThostFtdcOffsetFlagEnType = "char" -TThostFtdcHedgeFlagEnType = "char" -TThostFtdcFundIOTypeEnType = "char" -TThostFtdcFundTypeEnType = "char" -TThostFtdcFundDirectionEnType = "char" -TThostFtdcFundMortDirectionEnType = "char" -TThostFtdcSwapBusinessTypeType = "string" -TThostFtdcOptionsTypeType = "char" -TThostFtdcStrikeModeType = "char" -TThostFtdcStrikeTypeType = "char" -TThostFtdcApplyTypeType = "char" -TThostFtdcGiveUpDataSourceType = "char" -TThostFtdcExecOrderSysIDType = "string" -TThostFtdcExecResultType = "char" -TThostFtdcStrikeSequenceType = "int" -TThostFtdcStrikeTimeType = "string" -TThostFtdcCombinationTypeType = "char" -TThostFtdcOptionRoyaltyPriceTypeType = "char" -TThostFtdcBalanceAlgorithmType = "char" -TThostFtdcActionTypeType = "char" -TThostFtdcForQuoteStatusType = "char" -TThostFtdcValueMethodType = "char" -TThostFtdcExecOrderPositionFlagType = "char" -TThostFtdcExecOrderCloseFlagType = "char" -TThostFtdcProductTypeType = "char" -TThostFtdcCZCEUploadFileNameType = "char" -TThostFtdcDCEUploadFileNameType = "char" -TThostFtdcSHFEUploadFileNameType = "char" -TThostFtdcCFFEXUploadFileNameType = "char" -TThostFtdcCombDirectionType = "char" -TThostFtdcLockTypeType = "char" -TThostFtdcBizTypeType = "char" -TThostFtdcDesignateTypeType = "char" -TThostFtdcFreezeReasonTypeType = "char" -TThostFtdcFreezeTypeType = "char" -TThostFtdcTradeSystemTypeType = "char" -TThostFtdcStockDisposalTypeType = "char" -TThostFtdcStockDisposalSysIDType = "string" -TThostFtdcStockDisposalStatusType = "char" -TThostFtdcInstructionRightTypeType = "char" -TThostFtdcLevelTypeType = "char" -TThostFtdcStrikeOffsetTypeType = "char" -TThostFtdcLoginRemarkType = "string" -TThostFtdcInvestUnitIDType = "string" -TThostFtdcBulletinIDType = "int" -TThostFtdcNewsTypeType = "string" -TThostFtdcNewsUrgencyType = "char" -TThostFtdcAbstractType = "string" -TThostFtdcComeFromType = "string" -TThostFtdcURLLinkType = "string" -TThostFtdcSmsCodeType = "string" -TThostFtdcSmsCodeStatusType = "char" -TThostFtdcEncryptPasswordType = "string" -TThostFtdcRandomStringType = "string" -TThostFtdcPasswordEncryptTypeType = "int" -TThostFtdcDateTimeType = "string" -TThostFtdcWeakPasswordSourceType = "char" -TThostFtdcRandomStringType = "string" -TThostFtdcOptSelfCloseFlagType = "char" -TThostFtdcAppTypeType = "char" -TThostFtdcAppIDType = "string" -TThostFtdcSystemInfoLenType = "int" -TThostFtdcAdditionalInfoLenType = "int" -TThostFtdcClientSystemInfoType = "string" -TThostFtdcAdditionalInfoType = "string" -TThostFtdcBase64ClientSystemInfoType = "string" -TThostFtdcBase64AdditionalInfoType = "string" -TThostFtdcCurrentAuthMethodType = "int" -TThostFtdcCaptchaInfoLenType = "int" -TThostFtdcCaptchaInfoType = "string" -TThostFtdcUserTextSeqType = "int" -TThostFtdcHandshakeDataType = "string" -TThostFtdcHandshakeDataLenType = "int" -TThostFtdcCryptoKeyVersionType = "string" -TThostFtdcRsaKeyVersionType = "int" -TThostFtdcSoftwareProviderIDType = "string" -TThostFtdcCollectTimeType = "string" -TThostFtdcReserveOpenAccStasType = "char" -TThostFtdcSFInterestTypeType = "char" -TThostFtdcInterestSuccessType = "char" -TThostFtdcSFBankIDType = "string" -TThostFtdcSFBrokerIDType = "string" -TThostFtdcSFSecOrgIDType = "string" -TThostFtdcSFTradeTimeType = "string" -TThostFtdcSFBankSerialType = "string" -TThostFtdcSFSECSerialType = "string" -TThostFtdcSFBankAccountType = "string" -TThostFtdcSFInvestorNameType = "string" -TThostFtdcSFSponsorTypeType = "char" -TThostFtdcSFFBTransferDirectionType = "char" -TThostFtdcSFCashRemitFlagType = "char" -TThostFtdcSFMoneyType = "string" -TThostFtdcSFStatusType = "char" -TThostFtdcSFTradeTypeType = "string" -TThostFtdcSFBuySellFlagType = "char" -TThostFtdcSFTradeSettleAccountIDType = "string" -TThostFtdcSFAgreeNumberType = "string" -TThostFtdcSFIdCardTypeType = "char" -TThostFtdcSFIdentifiedCardNoType = "string" -TThostFtdcSFMarketIDType = "char" -TThostFtdcSFBankNameType = "string" diff --git a/vnpy/api/sec/generator/generate_api_functions.py b/vnpy/api/sec/generator/generate_api_functions.py index 535d6096..6e5b0337 100644 --- a/vnpy/api/sec/generator/generate_api_functions.py +++ b/vnpy/api/sec/generator/generate_api_functions.py @@ -336,8 +336,10 @@ class ApiGenerator: if __name__ == "__main__": - md_generator = ApiGenerator("../include/Sec/ThostFtdcMdApi.h", "Sec", "md", "MdApi") + md_generator = ApiGenerator( + "../include/sec/ThostFtdcMdApi.h", "sec", "md", "MdApi") md_generator.run() - td_generator = ApiGenerator("../include/Sec/ThostFtdcTraderApi.h", "Sec", "td", "TdApi") + td_generator = ApiGenerator( + "../include/sec/ThostFtdcTraderApi.h", "sec", "td", "TdApi") td_generator.run() diff --git a/vnpy/api/sec/generator/generate_data_type.py b/vnpy/api/sec/generator/generate_data_type.py index c517e3a4..b1cc1adf 100644 --- a/vnpy/api/sec/generator/generate_data_type.py +++ b/vnpy/api/sec/generator/generate_data_type.py @@ -72,5 +72,6 @@ class DataTypeGenerator: if __name__ == "__main__": - generator = DataTypeGenerator("../include/Sec/ThostFtdcUserApiDataType.h", "Sec") + generator = DataTypeGenerator( + "../include/sec/ThostFtdcUserApiDataType.h", "sec") generator.run() diff --git a/vnpy/api/sec/generator/generate_struct.py b/vnpy/api/sec/generator/generate_struct.py index b356f9e6..f56f588b 100644 --- a/vnpy/api/sec/generator/generate_struct.py +++ b/vnpy/api/sec/generator/generate_struct.py @@ -81,5 +81,5 @@ class StructGenerator: if __name__ == "__main__": generator = StructGenerator( - "../include/Sec/ThostFtdcUserApiStruct.h", "Sec") + "../include/sec/ThostFtdcUserApiStruct.h", "sec") generator.run()