/* generated by handle_module_spi */

use crate::v1alpha1::bindings::*;

pub trait TraderSpi: Send {   
    /// 当客户端与交易后台建立起通信连接时（还未登录前），该方法被调用。
    fn on_front_connected(&mut self) {
    }
   
    /// 当客户端与交易后台通信连接断开时，该方法被调用。当发生这个情况后，API会自动重新连接，客户端可不做处理。
    ///@param nReason 错误原因
    ///         0x1001 网络读失败
    ///         0x1002 网络写失败
    ///         0x2001 接收心跳超时
    ///         0x2002 发送心跳失败
    ///         0x2003 收到错误报文
    fn on_front_disconnected(&mut self, n_reason: i32) {
    }
   
    /// 心跳超时警告。当长时间未收到报文时，该方法被调用。
    ///@param nTimeLapse 距离上次接收报文的时间
    fn on_heart_beat_warning(&mut self, n_time_lapse: i32) {
    }
   
    /// 客户端认证响应
    fn on_rsp_authenticate(&mut self, p_rsp_authenticate_field: Option<&CThostFtdcRspAuthenticateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 登录请求响应
    fn on_rsp_user_login(&mut self, p_rsp_user_login: Option<&CThostFtdcRspUserLoginField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 登出请求响应
    fn on_rsp_user_logout(&mut self, p_user_logout: Option<&CThostFtdcUserLogoutField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 用户口令更新请求响应
    fn on_rsp_user_password_update(&mut self, p_user_password_update: Option<&CThostFtdcUserPasswordUpdateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 资金账户口令更新请求响应
    fn on_rsp_trading_account_password_update(&mut self, p_trading_account_password_update: Option<&CThostFtdcTradingAccountPasswordUpdateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 查询用户当前支持的认证模式的回复
    fn on_rsp_user_auth_method(&mut self, p_rsp_user_auth_method: Option<&CThostFtdcRspUserAuthMethodField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 获取图形验证码请求的回复
    fn on_rsp_gen_user_captcha(&mut self, p_rsp_gen_user_captcha: Option<&CThostFtdcRspGenUserCaptchaField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 获取短信验证码请求的回复
    fn on_rsp_gen_user_text(&mut self, p_rsp_gen_user_text: Option<&CThostFtdcRspGenUserTextField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 报单录入请求响应
    fn on_rsp_order_insert(&mut self, p_input_order: Option<&CThostFtdcInputOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 预埋单录入请求响应
    fn on_rsp_parked_order_insert(&mut self, p_parked_order: Option<&CThostFtdcParkedOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 预埋撤单录入请求响应
    fn on_rsp_parked_order_action(&mut self, p_parked_order_action: Option<&CThostFtdcParkedOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 报单操作请求响应
    fn on_rsp_order_action(&mut self, p_input_order_action: Option<&CThostFtdcInputOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 查询最大报单数量响应
    fn on_rsp_qry_max_order_volume(&mut self, p_qry_max_order_volume: Option<&CThostFtdcQryMaxOrderVolumeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者结算结果确认响应
    fn on_rsp_settlement_info_confirm(&mut self, p_settlement_info_confirm: Option<&CThostFtdcSettlementInfoConfirmField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 删除预埋单响应
    fn on_rsp_remove_parked_order(&mut self, p_remove_parked_order: Option<&CThostFtdcRemoveParkedOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 删除预埋撤单响应
    fn on_rsp_remove_parked_order_action(&mut self, p_remove_parked_order_action: Option<&CThostFtdcRemoveParkedOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 执行宣告录入请求响应
    fn on_rsp_exec_order_insert(&mut self, p_input_exec_order: Option<&CThostFtdcInputExecOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 执行宣告操作请求响应
    fn on_rsp_exec_order_action(&mut self, p_input_exec_order_action: Option<&CThostFtdcInputExecOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 询价录入请求响应
    fn on_rsp_for_quote_insert(&mut self, p_input_for_quote: Option<&CThostFtdcInputForQuoteField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 报价录入请求响应
    fn on_rsp_quote_insert(&mut self, p_input_quote: Option<&CThostFtdcInputQuoteField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 报价操作请求响应
    fn on_rsp_quote_action(&mut self, p_input_quote_action: Option<&CThostFtdcInputQuoteActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 批量报单操作请求响应
    fn on_rsp_batch_order_action(&mut self, p_input_batch_order_action: Option<&CThostFtdcInputBatchOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 期权自对冲录入请求响应
    fn on_rsp_option_self_close_insert(&mut self, p_input_option_self_close: Option<&CThostFtdcInputOptionSelfCloseField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 期权自对冲操作请求响应
    fn on_rsp_option_self_close_action(&mut self, p_input_option_self_close_action: Option<&CThostFtdcInputOptionSelfCloseActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 申请组合录入请求响应
    fn on_rsp_comb_action_insert(&mut self, p_input_comb_action: Option<&CThostFtdcInputCombActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询报单响应
    fn on_rsp_qry_order(&mut self, p_order: Option<&CThostFtdcOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询成交响应
    fn on_rsp_qry_trade(&mut self, p_trade: Option<&CThostFtdcTradeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资者持仓响应
    fn on_rsp_qry_investor_position(&mut self, p_investor_position: Option<&CThostFtdcInvestorPositionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询资金账户响应
    fn on_rsp_qry_trading_account(&mut self, p_trading_account: Option<&CThostFtdcTradingAccountField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资者响应
    fn on_rsp_qry_investor(&mut self, p_investor: Option<&CThostFtdcInvestorField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询交易编码响应
    fn on_rsp_qry_trading_code(&mut self, p_trading_code: Option<&CThostFtdcTradingCodeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询合约保证金率响应
    fn on_rsp_qry_instrument_margin_rate(&mut self, p_instrument_margin_rate: Option<&CThostFtdcInstrumentMarginRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询合约手续费率响应
    fn on_rsp_qry_instrument_commission_rate(&mut self, p_instrument_commission_rate: Option<&CThostFtdcInstrumentCommissionRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询交易所响应
    fn on_rsp_qry_exchange(&mut self, p_exchange: Option<&CThostFtdcExchangeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询产品响应
    fn on_rsp_qry_product(&mut self, p_product: Option<&CThostFtdcProductField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询合约响应
    fn on_rsp_qry_instrument(&mut self, p_instrument: Option<&CThostFtdcInstrumentField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询行情响应
    fn on_rsp_qry_depth_market_data(&mut self, p_depth_market_data: Option<&CThostFtdcDepthMarketDataField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询交易员报盘机响应
    fn on_rsp_qry_trader_offer(&mut self, p_trader_offer: Option<&CThostFtdcTraderOfferField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资者结算结果响应
    fn on_rsp_qry_settlement_info(&mut self, p_settlement_info: Option<&CThostFtdcSettlementInfoField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询转帐银行响应
    fn on_rsp_qry_transfer_bank(&mut self, p_transfer_bank: Option<&CThostFtdcTransferBankField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资者持仓明细响应
    fn on_rsp_qry_investor_position_detail(&mut self, p_investor_position_detail: Option<&CThostFtdcInvestorPositionDetailField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询客户通知响应
    fn on_rsp_qry_notice(&mut self, p_notice: Option<&CThostFtdcNoticeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询结算信息确认响应
    fn on_rsp_qry_settlement_info_confirm(&mut self, p_settlement_info_confirm: Option<&CThostFtdcSettlementInfoConfirmField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资者持仓明细响应
    fn on_rsp_qry_investor_position_combine_detail(&mut self, p_investor_position_combine_detail: Option<&CThostFtdcInvestorPositionCombineDetailField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 查询保证金监管系统经纪公司资金账户密钥响应
    fn on_rsp_qry_cfmmc_trading_account_key(&mut self, p_cfmmc_trading_account_key: Option<&CThostFtdcCFMMCTradingAccountKeyField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询仓单折抵信息响应
    fn on_rsp_qry_e_warrant_offset(&mut self, p_e_warrant_offset: Option<&CThostFtdcEWarrantOffsetField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资者品种/跨品种保证金响应
    fn on_rsp_qry_investor_product_group_margin(&mut self, p_investor_product_group_margin: Option<&CThostFtdcInvestorProductGroupMarginField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询交易所保证金率响应
    fn on_rsp_qry_exchange_margin_rate(&mut self, p_exchange_margin_rate: Option<&CThostFtdcExchangeMarginRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询交易所调整保证金率响应
    fn on_rsp_qry_exchange_margin_rate_adjust(&mut self, p_exchange_margin_rate_adjust: Option<&CThostFtdcExchangeMarginRateAdjustField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询汇率响应
    fn on_rsp_qry_exchange_rate(&mut self, p_exchange_rate: Option<&CThostFtdcExchangeRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询二级代理操作员银期权限响应
    fn on_rsp_qry_sec_agent_acid_map(&mut self, p_sec_agent_acid_map: Option<&CThostFtdcSecAgentACIDMapField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询产品报价汇率
    fn on_rsp_qry_product_exch_rate(&mut self, p_product_exch_rate: Option<&CThostFtdcProductExchRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询产品组
    fn on_rsp_qry_product_group(&mut self, p_product_group: Option<&CThostFtdcProductGroupField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询做市商合约手续费率响应
    fn on_rsp_qry_mm_instrument_commission_rate(&mut self, p_mm_instrument_commission_rate: Option<&CThostFtdcMMInstrumentCommissionRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询做市商期权合约手续费响应
    fn on_rsp_qry_mm_option_instr_comm_rate(&mut self, p_mm_option_instr_comm_rate: Option<&CThostFtdcMMOptionInstrCommRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询报单手续费响应
    fn on_rsp_qry_instrument_order_comm_rate(&mut self, p_instrument_order_comm_rate: Option<&CThostFtdcInstrumentOrderCommRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询资金账户响应
    fn on_rsp_qry_sec_agent_trading_account(&mut self, p_trading_account: Option<&CThostFtdcTradingAccountField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询二级代理商资金校验模式响应
    fn on_rsp_qry_sec_agent_check_mode(&mut self, p_sec_agent_check_mode: Option<&CThostFtdcSecAgentCheckModeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询二级代理商信息响应
    fn on_rsp_qry_sec_agent_trade_info(&mut self, p_sec_agent_trade_info: Option<&CThostFtdcSecAgentTradeInfoField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询期权交易成本响应
    fn on_rsp_qry_option_instr_trade_cost(&mut self, p_option_instr_trade_cost: Option<&CThostFtdcOptionInstrTradeCostField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询期权合约手续费响应
    fn on_rsp_qry_option_instr_comm_rate(&mut self, p_option_instr_comm_rate: Option<&CThostFtdcOptionInstrCommRateField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询执行宣告响应
    fn on_rsp_qry_exec_order(&mut self, p_exec_order: Option<&CThostFtdcExecOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询询价响应
    fn on_rsp_qry_for_quote(&mut self, p_for_quote: Option<&CThostFtdcForQuoteField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询报价响应
    fn on_rsp_qry_quote(&mut self, p_quote: Option<&CThostFtdcQuoteField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询期权自对冲响应
    fn on_rsp_qry_option_self_close(&mut self, p_option_self_close: Option<&CThostFtdcOptionSelfCloseField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询投资单元响应
    fn on_rsp_qry_invest_unit(&mut self, p_invest_unit: Option<&CThostFtdcInvestUnitField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询组合合约安全系数响应
    fn on_rsp_qry_comb_instrument_guard(&mut self, p_comb_instrument_guard: Option<&CThostFtdcCombInstrumentGuardField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询申请组合响应
    fn on_rsp_qry_comb_action(&mut self, p_comb_action: Option<&CThostFtdcCombActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询转帐流水响应
    fn on_rsp_qry_transfer_serial(&mut self, p_transfer_serial: Option<&CThostFtdcTransferSerialField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询银期签约关系响应
    fn on_rsp_qry_accountregister(&mut self, p_accountregister: Option<&CThostFtdcAccountregisterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 错误应答
    fn on_rsp_error(&mut self, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 报单通知
    fn on_rtn_order(&mut self, p_order: Option<&CThostFtdcOrderField>) {
    }
   
    /// 成交通知
    fn on_rtn_trade(&mut self, p_trade: Option<&CThostFtdcTradeField>) {
    }
   
    /// 报单录入错误回报
    fn on_err_rtn_order_insert(&mut self, p_input_order: Option<&CThostFtdcInputOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 报单操作错误回报
    fn on_err_rtn_order_action(&mut self, p_order_action: Option<&CThostFtdcOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 合约交易状态通知
    fn on_rtn_instrument_status(&mut self, p_instrument_status: Option<&CThostFtdcInstrumentStatusField>) {
    }
   
    /// 交易所公告通知
    fn on_rtn_bulletin(&mut self, p_bulletin: Option<&CThostFtdcBulletinField>) {
    }
   
    /// 交易通知
    fn on_rtn_trading_notice(&mut self, p_trading_notice_info: Option<&CThostFtdcTradingNoticeInfoField>) {
    }
   
    /// 提示条件单校验错误
    fn on_rtn_error_conditional_order(&mut self, p_error_conditional_order: Option<&CThostFtdcErrorConditionalOrderField>) {
    }
   
    /// 执行宣告通知
    fn on_rtn_exec_order(&mut self, p_exec_order: Option<&CThostFtdcExecOrderField>) {
    }
   
    /// 执行宣告录入错误回报
    fn on_err_rtn_exec_order_insert(&mut self, p_input_exec_order: Option<&CThostFtdcInputExecOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 执行宣告操作错误回报
    fn on_err_rtn_exec_order_action(&mut self, p_exec_order_action: Option<&CThostFtdcExecOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 询价录入错误回报
    fn on_err_rtn_for_quote_insert(&mut self, p_input_for_quote: Option<&CThostFtdcInputForQuoteField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 报价通知
    fn on_rtn_quote(&mut self, p_quote: Option<&CThostFtdcQuoteField>) {
    }
   
    /// 报价录入错误回报
    fn on_err_rtn_quote_insert(&mut self, p_input_quote: Option<&CThostFtdcInputQuoteField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 报价操作错误回报
    fn on_err_rtn_quote_action(&mut self, p_quote_action: Option<&CThostFtdcQuoteActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 询价通知
    fn on_rtn_for_quote_rsp(&mut self, p_for_quote_rsp: Option<&CThostFtdcForQuoteRspField>) {
    }
   
    /// 保证金监控中心用户令牌
    fn on_rtn_cfmmc_trading_account_token(&mut self, p_cfmmc_trading_account_token: Option<&CThostFtdcCFMMCTradingAccountTokenField>) {
    }
   
    /// 批量报单操作错误回报
    fn on_err_rtn_batch_order_action(&mut self, p_batch_order_action: Option<&CThostFtdcBatchOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 期权自对冲通知
    fn on_rtn_option_self_close(&mut self, p_option_self_close: Option<&CThostFtdcOptionSelfCloseField>) {
    }
   
    /// 期权自对冲录入错误回报
    fn on_err_rtn_option_self_close_insert(&mut self, p_input_option_self_close: Option<&CThostFtdcInputOptionSelfCloseField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 期权自对冲操作错误回报
    fn on_err_rtn_option_self_close_action(&mut self, p_option_self_close_action: Option<&CThostFtdcOptionSelfCloseActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 申请组合通知
    fn on_rtn_comb_action(&mut self, p_comb_action: Option<&CThostFtdcCombActionField>) {
    }
   
    /// 申请组合录入错误回报
    fn on_err_rtn_comb_action_insert(&mut self, p_input_comb_action: Option<&CThostFtdcInputCombActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 请求查询签约银行响应
    fn on_rsp_qry_contract_bank(&mut self, p_contract_bank: Option<&CThostFtdcContractBankField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询预埋单响应
    fn on_rsp_qry_parked_order(&mut self, p_parked_order: Option<&CThostFtdcParkedOrderField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询预埋撤单响应
    fn on_rsp_qry_parked_order_action(&mut self, p_parked_order_action: Option<&CThostFtdcParkedOrderActionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询交易通知响应
    fn on_rsp_qry_trading_notice(&mut self, p_trading_notice: Option<&CThostFtdcTradingNoticeField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询经纪公司交易参数响应
    fn on_rsp_qry_broker_trading_params(&mut self, p_broker_trading_params: Option<&CThostFtdcBrokerTradingParamsField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询经纪公司交易算法响应
    fn on_rsp_qry_broker_trading_algos(&mut self, p_broker_trading_algos: Option<&CThostFtdcBrokerTradingAlgosField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求查询监控中心用户令牌
    fn on_rsp_query_cfmmc_trading_account_token(&mut self, p_query_cfmmc_trading_account_token: Option<&CThostFtdcQueryCFMMCTradingAccountTokenField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 银行发起银行资金转期货通知
    fn on_rtn_from_bank_to_future_by_bank(&mut self, p_rsp_transfer: Option<&CThostFtdcRspTransferField>) {
    }
   
    /// 银行发起期货资金转银行通知
    fn on_rtn_from_future_to_bank_by_bank(&mut self, p_rsp_transfer: Option<&CThostFtdcRspTransferField>) {
    }
   
    /// 银行发起冲正银行转期货通知
    fn on_rtn_repeal_from_bank_to_future_by_bank(&mut self, p_rsp_repeal: Option<&CThostFtdcRspRepealField>) {
    }
   
    /// 银行发起冲正期货转银行通知
    fn on_rtn_repeal_from_future_to_bank_by_bank(&mut self, p_rsp_repeal: Option<&CThostFtdcRspRepealField>) {
    }
   
    /// 期货发起银行资金转期货通知
    fn on_rtn_from_bank_to_future_by_future(&mut self, p_rsp_transfer: Option<&CThostFtdcRspTransferField>) {
    }
   
    /// 期货发起期货资金转银行通知
    fn on_rtn_from_future_to_bank_by_future(&mut self, p_rsp_transfer: Option<&CThostFtdcRspTransferField>) {
    }
   
    /// 系统运行时期货端手工发起冲正银行转期货请求，银行处理完毕后报盘发回的通知
    fn on_rtn_repeal_from_bank_to_future_by_future_manual(&mut self, p_rsp_repeal: Option<&CThostFtdcRspRepealField>) {
    }
   
    /// 系统运行时期货端手工发起冲正期货转银行请求，银行处理完毕后报盘发回的通知
    fn on_rtn_repeal_from_future_to_bank_by_future_manual(&mut self, p_rsp_repeal: Option<&CThostFtdcRspRepealField>) {
    }
   
    /// 期货发起查询银行余额通知
    fn on_rtn_query_bank_balance_by_future(&mut self, p_notify_query_account: Option<&CThostFtdcNotifyQueryAccountField>) {
    }
   
    /// 期货发起银行资金转期货错误回报
    fn on_err_rtn_bank_to_future_by_future(&mut self, p_req_transfer: Option<&CThostFtdcReqTransferField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 期货发起期货资金转银行错误回报
    fn on_err_rtn_future_to_bank_by_future(&mut self, p_req_transfer: Option<&CThostFtdcReqTransferField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 系统运行时期货端手工发起冲正银行转期货错误回报
    fn on_err_rtn_repeal_bank_to_future_by_future_manual(&mut self, p_req_repeal: Option<&CThostFtdcReqRepealField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 系统运行时期货端手工发起冲正期货转银行错误回报
    fn on_err_rtn_repeal_future_to_bank_by_future_manual(&mut self, p_req_repeal: Option<&CThostFtdcReqRepealField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 期货发起查询银行余额错误回报
    fn on_err_rtn_query_bank_balance_by_future(&mut self, p_req_query_account: Option<&CThostFtdcReqQueryAccountField>, p_rsp_info: Option<&CThostFtdcRspInfoField>) {
    }
   
    /// 期货发起冲正银行转期货请求，银行处理完毕后报盘发回的通知
    fn on_rtn_repeal_from_bank_to_future_by_future(&mut self, p_rsp_repeal: Option<&CThostFtdcRspRepealField>) {
    }
   
    /// 期货发起冲正期货转银行请求，银行处理完毕后报盘发回的通知
    fn on_rtn_repeal_from_future_to_bank_by_future(&mut self, p_rsp_repeal: Option<&CThostFtdcRspRepealField>) {
    }
   
    /// 期货发起银行资金转期货应答
    fn on_rsp_from_bank_to_future_by_future(&mut self, p_req_transfer: Option<&CThostFtdcReqTransferField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 期货发起期货资金转银行应答
    fn on_rsp_from_future_to_bank_by_future(&mut self, p_req_transfer: Option<&CThostFtdcReqTransferField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 期货发起查询银行余额应答
    fn on_rsp_query_bank_account_money_by_future(&mut self, p_req_query_account: Option<&CThostFtdcReqQueryAccountField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 银行发起银期开户通知
    fn on_rtn_open_account_by_bank(&mut self, p_open_account: Option<&CThostFtdcOpenAccountField>) {
    }
   
    /// 银行发起银期销户通知
    fn on_rtn_cancel_account_by_bank(&mut self, p_cancel_account: Option<&CThostFtdcCancelAccountField>) {
    }
   
    /// 银行发起变更银行账号通知
    fn on_rtn_change_account_by_bank(&mut self, p_change_account: Option<&CThostFtdcChangeAccountField>) {
    }
   
    /// 请求查询分类合约响应
    fn on_rsp_qry_classified_instrument(&mut self, p_instrument: Option<&CThostFtdcInstrumentField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 请求组合优惠比例响应
    fn on_rsp_qry_comb_promotion_param(&mut self, p_comb_promotion_param: Option<&CThostFtdcCombPromotionParamField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者风险结算持仓查询响应
    fn on_rsp_qry_risk_settle_invst_position(&mut self, p_risk_settle_invst_position: Option<&CThostFtdcRiskSettleInvstPositionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 风险结算产品查询响应
    fn on_rsp_qry_risk_settle_product_status(&mut self, p_risk_settle_product_status: Option<&CThostFtdcRiskSettleProductStatusField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPBM期货合约参数查询响应
    fn on_rsp_qry_spbm_future_parameter(&mut self, p_spbm_future_parameter: Option<&CThostFtdcSPBMFutureParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPBM期权合约参数查询响应
    fn on_rsp_qry_spbm_option_parameter(&mut self, p_spbm_option_parameter: Option<&CThostFtdcSPBMOptionParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPBM品种内对锁仓折扣参数查询响应
    fn on_rsp_qry_spbm_intra_parameter(&mut self, p_spbm_intra_parameter: Option<&CThostFtdcSPBMIntraParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPBM跨品种抵扣参数查询响应
    fn on_rsp_qry_spbm_inter_parameter(&mut self, p_spbm_inter_parameter: Option<&CThostFtdcSPBMInterParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPBM组合保证金套餐查询响应
    fn on_rsp_qry_spbm_portf_definition(&mut self, p_spbm_portf_definition: Option<&CThostFtdcSPBMPortfDefinitionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者SPBM套餐选择查询响应
    fn on_rsp_qry_spbm_investor_portf_def(&mut self, p_spbm_investor_portf_def: Option<&CThostFtdcSPBMInvestorPortfDefField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者新型组合保证金系数查询响应
    fn on_rsp_qry_investor_portf_margin_ratio(&mut self, p_investor_portf_margin_ratio: Option<&CThostFtdcInvestorPortfMarginRatioField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者产品SPBM明细查询响应
    fn on_rsp_qry_investor_prod_spbm_detail(&mut self, p_investor_prod_spbm_detail: Option<&CThostFtdcInvestorProdSPBMDetailField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者商品组SPMM记录查询响应
    fn on_rsp_qry_investor_commodity_spmm_margin(&mut self, p_investor_commodity_spmm_margin: Option<&CThostFtdcInvestorCommoditySPMMMarginField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者商品群SPMM记录查询响应
    fn on_rsp_qry_investor_commodity_group_spmm_margin(&mut self, p_investor_commodity_group_spmm_margin: Option<&CThostFtdcInvestorCommodityGroupSPMMMarginField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPMM合约参数查询响应
    fn on_rsp_qry_spmm_inst_param(&mut self, p_spmm_inst_param: Option<&CThostFtdcSPMMInstParamField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPMM产品参数查询响应
    fn on_rsp_qry_spmm_product_param(&mut self, p_spmm_product_param: Option<&CThostFtdcSPMMProductParamField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// SPBM附加跨品种抵扣参数查询响应
    fn on_rsp_qry_spbm_add_on_inter_parameter(&mut self, p_spbm_add_on_inter_parameter: Option<&CThostFtdcSPBMAddOnInterParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RCAMS产品组合信息查询响应
    fn on_rsp_qry_rcams_comb_product_info(&mut self, p_rcams_comb_product_info: Option<&CThostFtdcRCAMSCombProductInfoField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RCAMS同合约风险对冲参数查询响应
    fn on_rsp_qry_rcams_instr_parameter(&mut self, p_rcams_instr_parameter: Option<&CThostFtdcRCAMSInstrParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RCAMS品种内风险对冲参数查询响应
    fn on_rsp_qry_rcams_intra_parameter(&mut self, p_rcams_intra_parameter: Option<&CThostFtdcRCAMSIntraParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RCAMS跨品种风险折抵参数查询响应
    fn on_rsp_qry_rcams_inter_parameter(&mut self, p_rcams_inter_parameter: Option<&CThostFtdcRCAMSInterParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RCAMS空头期权风险调整参数查询响应
    fn on_rsp_qry_rcams_short_opt_adjust_param(&mut self, p_rcams_short_opt_adjust_param: Option<&CThostFtdcRCAMSShortOptAdjustParamField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RCAMS策略组合持仓查询响应
    fn on_rsp_qry_rcams_investor_comb_position(&mut self, p_rcams_investor_comb_position: Option<&CThostFtdcRCAMSInvestorCombPositionField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者品种RCAMS保证金查询响应
    fn on_rsp_qry_investor_prod_rcams_margin(&mut self, p_investor_prod_rcams_margin: Option<&CThostFtdcInvestorProdRCAMSMarginField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RULE合约保证金参数查询响应
    fn on_rsp_qry_rule_instr_parameter(&mut self, p_rule_instr_parameter: Option<&CThostFtdcRULEInstrParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RULE品种内对锁仓折扣参数查询响应
    fn on_rsp_qry_rule_intra_parameter(&mut self, p_rule_intra_parameter: Option<&CThostFtdcRULEIntraParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// RULE跨品种抵扣参数查询响应
    fn on_rsp_qry_rule_inter_parameter(&mut self, p_rule_inter_parameter: Option<&CThostFtdcRULEInterParameterField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
   
    /// 投资者产品RULE保证金查询响应
    fn on_rsp_qry_investor_prod_rule_margin(&mut self, p_investor_prod_rule_margin: Option<&CThostFtdcInvestorProdRULEMarginField>, p_rsp_info: Option<&CThostFtdcRspInfoField>, n_request_id: i32, b_is_last: bool) {
    }
}

#[repr(C)]
#[derive(Debug)]
pub struct TraderSpiVTable {
    on_front_connected: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt),
    on_front_disconnected: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, n_reason: std::os::raw::c_int),
    on_heart_beat_warning: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, n_time_lapse: std::os::raw::c_int),
    on_rsp_authenticate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_authenticate_field: *const CThostFtdcRspAuthenticateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_user_login: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_user_login: *const CThostFtdcRspUserLoginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_user_logout: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_user_logout: *const CThostFtdcUserLogoutField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_user_password_update: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_user_password_update: *const CThostFtdcUserPasswordUpdateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_trading_account_password_update: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trading_account_password_update: *const CThostFtdcTradingAccountPasswordUpdateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_user_auth_method: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_user_auth_method: *const CThostFtdcRspUserAuthMethodField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_gen_user_captcha: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_gen_user_captcha: *const CThostFtdcRspGenUserCaptchaField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_gen_user_text: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_gen_user_text: *const CThostFtdcRspGenUserTextField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_order_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_order: *const CThostFtdcInputOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_parked_order_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_parked_order: *const CThostFtdcParkedOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_parked_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_parked_order_action: *const CThostFtdcParkedOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_order_action: *const CThostFtdcInputOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_max_order_volume: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_qry_max_order_volume: *const CThostFtdcQryMaxOrderVolumeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_settlement_info_confirm: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_settlement_info_confirm: *const CThostFtdcSettlementInfoConfirmField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_remove_parked_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_remove_parked_order: *const CThostFtdcRemoveParkedOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_remove_parked_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_remove_parked_order_action: *const CThostFtdcRemoveParkedOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_exec_order_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_exec_order: *const CThostFtdcInputExecOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_exec_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_exec_order_action: *const CThostFtdcInputExecOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_for_quote_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_for_quote: *const CThostFtdcInputForQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_quote_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_quote: *const CThostFtdcInputQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_quote_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_quote_action: *const CThostFtdcInputQuoteActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_batch_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_batch_order_action: *const CThostFtdcInputBatchOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_option_self_close_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_option_self_close: *const CThostFtdcInputOptionSelfCloseField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_option_self_close_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_option_self_close_action: *const CThostFtdcInputOptionSelfCloseActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_comb_action_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_comb_action: *const CThostFtdcInputCombActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_order: *const CThostFtdcOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_trade: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trade: *const CThostFtdcTradeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_position: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_position: *const CThostFtdcInvestorPositionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_trading_account: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trading_account: *const CThostFtdcTradingAccountField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor: *const CThostFtdcInvestorField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_trading_code: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trading_code: *const CThostFtdcTradingCodeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_instrument_margin_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_instrument_margin_rate: *const CThostFtdcInstrumentMarginRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_instrument_commission_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_instrument_commission_rate: *const CThostFtdcInstrumentCommissionRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_exchange: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exchange: *const CThostFtdcExchangeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_product: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_product: *const CThostFtdcProductField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_instrument: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_instrument: *const CThostFtdcInstrumentField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_depth_market_data: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_depth_market_data: *const CThostFtdcDepthMarketDataField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_trader_offer: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trader_offer: *const CThostFtdcTraderOfferField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_settlement_info: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_settlement_info: *const CThostFtdcSettlementInfoField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_transfer_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_transfer_bank: *const CThostFtdcTransferBankField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_position_detail: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_position_detail: *const CThostFtdcInvestorPositionDetailField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_notice: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_notice: *const CThostFtdcNoticeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_settlement_info_confirm: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_settlement_info_confirm: *const CThostFtdcSettlementInfoConfirmField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_position_combine_detail: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_position_combine_detail: *const CThostFtdcInvestorPositionCombineDetailField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_cfmmc_trading_account_key: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_cfmmc_trading_account_key: *const CThostFtdcCFMMCTradingAccountKeyField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_e_warrant_offset: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_e_warrant_offset: *const CThostFtdcEWarrantOffsetField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_product_group_margin: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_product_group_margin: *const CThostFtdcInvestorProductGroupMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_exchange_margin_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exchange_margin_rate: *const CThostFtdcExchangeMarginRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_exchange_margin_rate_adjust: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exchange_margin_rate_adjust: *const CThostFtdcExchangeMarginRateAdjustField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_exchange_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exchange_rate: *const CThostFtdcExchangeRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_sec_agent_acid_map: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_sec_agent_acid_map: *const CThostFtdcSecAgentACIDMapField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_product_exch_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_product_exch_rate: *const CThostFtdcProductExchRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_product_group: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_product_group: *const CThostFtdcProductGroupField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_mm_instrument_commission_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_mm_instrument_commission_rate: *const CThostFtdcMMInstrumentCommissionRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_mm_option_instr_comm_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_mm_option_instr_comm_rate: *const CThostFtdcMMOptionInstrCommRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_instrument_order_comm_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_instrument_order_comm_rate: *const CThostFtdcInstrumentOrderCommRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_sec_agent_trading_account: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trading_account: *const CThostFtdcTradingAccountField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_sec_agent_check_mode: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_sec_agent_check_mode: *const CThostFtdcSecAgentCheckModeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_sec_agent_trade_info: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_sec_agent_trade_info: *const CThostFtdcSecAgentTradeInfoField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_option_instr_trade_cost: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_option_instr_trade_cost: *const CThostFtdcOptionInstrTradeCostField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_option_instr_comm_rate: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_option_instr_comm_rate: *const CThostFtdcOptionInstrCommRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_exec_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exec_order: *const CThostFtdcExecOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_for_quote: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_for_quote: *const CThostFtdcForQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_quote: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_quote: *const CThostFtdcQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_option_self_close: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_option_self_close: *const CThostFtdcOptionSelfCloseField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_invest_unit: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_invest_unit: *const CThostFtdcInvestUnitField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_comb_instrument_guard: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_comb_instrument_guard: *const CThostFtdcCombInstrumentGuardField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_comb_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_comb_action: *const CThostFtdcCombActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_transfer_serial: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_transfer_serial: *const CThostFtdcTransferSerialField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_accountregister: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_accountregister: *const CThostFtdcAccountregisterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_error: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rtn_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_order: *const CThostFtdcOrderField),
    on_rtn_trade: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trade: *const CThostFtdcTradeField),
    on_err_rtn_order_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_order: *const CThostFtdcInputOrderField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_order_action: *const CThostFtdcOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rtn_instrument_status: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_instrument_status: *const CThostFtdcInstrumentStatusField),
    on_rtn_bulletin: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_bulletin: *const CThostFtdcBulletinField),
    on_rtn_trading_notice: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trading_notice_info: *const CThostFtdcTradingNoticeInfoField),
    on_rtn_error_conditional_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_error_conditional_order: *const CThostFtdcErrorConditionalOrderField),
    on_rtn_exec_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exec_order: *const CThostFtdcExecOrderField),
    on_err_rtn_exec_order_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_exec_order: *const CThostFtdcInputExecOrderField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_exec_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_exec_order_action: *const CThostFtdcExecOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_for_quote_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_for_quote: *const CThostFtdcInputForQuoteField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rtn_quote: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_quote: *const CThostFtdcQuoteField),
    on_err_rtn_quote_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_quote: *const CThostFtdcInputQuoteField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_quote_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_quote_action: *const CThostFtdcQuoteActionField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rtn_for_quote_rsp: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_for_quote_rsp: *const CThostFtdcForQuoteRspField),
    on_rtn_cfmmc_trading_account_token: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_cfmmc_trading_account_token: *const CThostFtdcCFMMCTradingAccountTokenField),
    on_err_rtn_batch_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_batch_order_action: *const CThostFtdcBatchOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rtn_option_self_close: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_option_self_close: *const CThostFtdcOptionSelfCloseField),
    on_err_rtn_option_self_close_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_option_self_close: *const CThostFtdcInputOptionSelfCloseField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_option_self_close_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_option_self_close_action: *const CThostFtdcOptionSelfCloseActionField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rtn_comb_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_comb_action: *const CThostFtdcCombActionField),
    on_err_rtn_comb_action_insert: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_input_comb_action: *const CThostFtdcInputCombActionField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rsp_qry_contract_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_contract_bank: *const CThostFtdcContractBankField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_parked_order: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_parked_order: *const CThostFtdcParkedOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_parked_order_action: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_parked_order_action: *const CThostFtdcParkedOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_trading_notice: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_trading_notice: *const CThostFtdcTradingNoticeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_broker_trading_params: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_broker_trading_params: *const CThostFtdcBrokerTradingParamsField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_broker_trading_algos: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_broker_trading_algos: *const CThostFtdcBrokerTradingAlgosField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_query_cfmmc_trading_account_token: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_query_cfmmc_trading_account_token: *const CThostFtdcQueryCFMMCTradingAccountTokenField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rtn_from_bank_to_future_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField),
    on_rtn_from_future_to_bank_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField),
    on_rtn_repeal_from_bank_to_future_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField),
    on_rtn_repeal_from_future_to_bank_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField),
    on_rtn_from_bank_to_future_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField),
    on_rtn_from_future_to_bank_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField),
    on_rtn_repeal_from_bank_to_future_by_future_manual: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField),
    on_rtn_repeal_from_future_to_bank_by_future_manual: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField),
    on_rtn_query_bank_balance_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_notify_query_account: *const CThostFtdcNotifyQueryAccountField),
    on_err_rtn_bank_to_future_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_future_to_bank_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_repeal_bank_to_future_by_future_manual: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_repeal: *const CThostFtdcReqRepealField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_repeal_future_to_bank_by_future_manual: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_repeal: *const CThostFtdcReqRepealField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_err_rtn_query_bank_balance_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_query_account: *const CThostFtdcReqQueryAccountField, p_rsp_info: *const CThostFtdcRspInfoField),
    on_rtn_repeal_from_bank_to_future_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField),
    on_rtn_repeal_from_future_to_bank_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField),
    on_rsp_from_bank_to_future_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_from_future_to_bank_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_query_bank_account_money_by_future: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_req_query_account: *const CThostFtdcReqQueryAccountField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rtn_open_account_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_open_account: *const CThostFtdcOpenAccountField),
    on_rtn_cancel_account_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_cancel_account: *const CThostFtdcCancelAccountField),
    on_rtn_change_account_by_bank: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_change_account: *const CThostFtdcChangeAccountField),
    on_rsp_qry_classified_instrument: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_instrument: *const CThostFtdcInstrumentField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_comb_promotion_param: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_comb_promotion_param: *const CThostFtdcCombPromotionParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_risk_settle_invst_position: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_risk_settle_invst_position: *const CThostFtdcRiskSettleInvstPositionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_risk_settle_product_status: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_risk_settle_product_status: *const CThostFtdcRiskSettleProductStatusField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_future_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_future_parameter: *const CThostFtdcSPBMFutureParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_option_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_option_parameter: *const CThostFtdcSPBMOptionParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_intra_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_intra_parameter: *const CThostFtdcSPBMIntraParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_inter_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_inter_parameter: *const CThostFtdcSPBMInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_portf_definition: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_portf_definition: *const CThostFtdcSPBMPortfDefinitionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_investor_portf_def: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_investor_portf_def: *const CThostFtdcSPBMInvestorPortfDefField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_portf_margin_ratio: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_portf_margin_ratio: *const CThostFtdcInvestorPortfMarginRatioField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_prod_spbm_detail: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_prod_spbm_detail: *const CThostFtdcInvestorProdSPBMDetailField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_commodity_spmm_margin: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_commodity_spmm_margin: *const CThostFtdcInvestorCommoditySPMMMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_commodity_group_spmm_margin: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_commodity_group_spmm_margin: *const CThostFtdcInvestorCommodityGroupSPMMMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spmm_inst_param: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spmm_inst_param: *const CThostFtdcSPMMInstParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spmm_product_param: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spmm_product_param: *const CThostFtdcSPMMProductParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_spbm_add_on_inter_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_spbm_add_on_inter_parameter: *const CThostFtdcSPBMAddOnInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rcams_comb_product_info: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rcams_comb_product_info: *const CThostFtdcRCAMSCombProductInfoField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rcams_instr_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rcams_instr_parameter: *const CThostFtdcRCAMSInstrParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rcams_intra_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rcams_intra_parameter: *const CThostFtdcRCAMSIntraParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rcams_inter_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rcams_inter_parameter: *const CThostFtdcRCAMSInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rcams_short_opt_adjust_param: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rcams_short_opt_adjust_param: *const CThostFtdcRCAMSShortOptAdjustParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rcams_investor_comb_position: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rcams_investor_comb_position: *const CThostFtdcRCAMSInvestorCombPositionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_prod_rcams_margin: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_prod_rcams_margin: *const CThostFtdcInvestorProdRCAMSMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rule_instr_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rule_instr_parameter: *const CThostFtdcRULEInstrParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rule_intra_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rule_intra_parameter: *const CThostFtdcRULEIntraParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_rule_inter_parameter: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_rule_inter_parameter: *const CThostFtdcRULEInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
    on_rsp_qry_investor_prod_rule_margin: unsafe extern "C" fn(spi: *mut CThostFtdcTraderSpiExt, p_investor_prod_rule_margin: *const CThostFtdcInvestorProdRULEMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool),
}

static SPI_VTABLE: TraderSpiVTable = TraderSpiVTable {
    on_front_connected: spi_on_front_connected,
    on_front_disconnected: spi_on_front_disconnected,
    on_heart_beat_warning: spi_on_heart_beat_warning,
    on_rsp_authenticate: spi_on_rsp_authenticate,
    on_rsp_user_login: spi_on_rsp_user_login,
    on_rsp_user_logout: spi_on_rsp_user_logout,
    on_rsp_user_password_update: spi_on_rsp_user_password_update,
    on_rsp_trading_account_password_update: spi_on_rsp_trading_account_password_update,
    on_rsp_user_auth_method: spi_on_rsp_user_auth_method,
    on_rsp_gen_user_captcha: spi_on_rsp_gen_user_captcha,
    on_rsp_gen_user_text: spi_on_rsp_gen_user_text,
    on_rsp_order_insert: spi_on_rsp_order_insert,
    on_rsp_parked_order_insert: spi_on_rsp_parked_order_insert,
    on_rsp_parked_order_action: spi_on_rsp_parked_order_action,
    on_rsp_order_action: spi_on_rsp_order_action,
    on_rsp_qry_max_order_volume: spi_on_rsp_qry_max_order_volume,
    on_rsp_settlement_info_confirm: spi_on_rsp_settlement_info_confirm,
    on_rsp_remove_parked_order: spi_on_rsp_remove_parked_order,
    on_rsp_remove_parked_order_action: spi_on_rsp_remove_parked_order_action,
    on_rsp_exec_order_insert: spi_on_rsp_exec_order_insert,
    on_rsp_exec_order_action: spi_on_rsp_exec_order_action,
    on_rsp_for_quote_insert: spi_on_rsp_for_quote_insert,
    on_rsp_quote_insert: spi_on_rsp_quote_insert,
    on_rsp_quote_action: spi_on_rsp_quote_action,
    on_rsp_batch_order_action: spi_on_rsp_batch_order_action,
    on_rsp_option_self_close_insert: spi_on_rsp_option_self_close_insert,
    on_rsp_option_self_close_action: spi_on_rsp_option_self_close_action,
    on_rsp_comb_action_insert: spi_on_rsp_comb_action_insert,
    on_rsp_qry_order: spi_on_rsp_qry_order,
    on_rsp_qry_trade: spi_on_rsp_qry_trade,
    on_rsp_qry_investor_position: spi_on_rsp_qry_investor_position,
    on_rsp_qry_trading_account: spi_on_rsp_qry_trading_account,
    on_rsp_qry_investor: spi_on_rsp_qry_investor,
    on_rsp_qry_trading_code: spi_on_rsp_qry_trading_code,
    on_rsp_qry_instrument_margin_rate: spi_on_rsp_qry_instrument_margin_rate,
    on_rsp_qry_instrument_commission_rate: spi_on_rsp_qry_instrument_commission_rate,
    on_rsp_qry_exchange: spi_on_rsp_qry_exchange,
    on_rsp_qry_product: spi_on_rsp_qry_product,
    on_rsp_qry_instrument: spi_on_rsp_qry_instrument,
    on_rsp_qry_depth_market_data: spi_on_rsp_qry_depth_market_data,
    on_rsp_qry_trader_offer: spi_on_rsp_qry_trader_offer,
    on_rsp_qry_settlement_info: spi_on_rsp_qry_settlement_info,
    on_rsp_qry_transfer_bank: spi_on_rsp_qry_transfer_bank,
    on_rsp_qry_investor_position_detail: spi_on_rsp_qry_investor_position_detail,
    on_rsp_qry_notice: spi_on_rsp_qry_notice,
    on_rsp_qry_settlement_info_confirm: spi_on_rsp_qry_settlement_info_confirm,
    on_rsp_qry_investor_position_combine_detail: spi_on_rsp_qry_investor_position_combine_detail,
    on_rsp_qry_cfmmc_trading_account_key: spi_on_rsp_qry_cfmmc_trading_account_key,
    on_rsp_qry_e_warrant_offset: spi_on_rsp_qry_e_warrant_offset,
    on_rsp_qry_investor_product_group_margin: spi_on_rsp_qry_investor_product_group_margin,
    on_rsp_qry_exchange_margin_rate: spi_on_rsp_qry_exchange_margin_rate,
    on_rsp_qry_exchange_margin_rate_adjust: spi_on_rsp_qry_exchange_margin_rate_adjust,
    on_rsp_qry_exchange_rate: spi_on_rsp_qry_exchange_rate,
    on_rsp_qry_sec_agent_acid_map: spi_on_rsp_qry_sec_agent_acid_map,
    on_rsp_qry_product_exch_rate: spi_on_rsp_qry_product_exch_rate,
    on_rsp_qry_product_group: spi_on_rsp_qry_product_group,
    on_rsp_qry_mm_instrument_commission_rate: spi_on_rsp_qry_mm_instrument_commission_rate,
    on_rsp_qry_mm_option_instr_comm_rate: spi_on_rsp_qry_mm_option_instr_comm_rate,
    on_rsp_qry_instrument_order_comm_rate: spi_on_rsp_qry_instrument_order_comm_rate,
    on_rsp_qry_sec_agent_trading_account: spi_on_rsp_qry_sec_agent_trading_account,
    on_rsp_qry_sec_agent_check_mode: spi_on_rsp_qry_sec_agent_check_mode,
    on_rsp_qry_sec_agent_trade_info: spi_on_rsp_qry_sec_agent_trade_info,
    on_rsp_qry_option_instr_trade_cost: spi_on_rsp_qry_option_instr_trade_cost,
    on_rsp_qry_option_instr_comm_rate: spi_on_rsp_qry_option_instr_comm_rate,
    on_rsp_qry_exec_order: spi_on_rsp_qry_exec_order,
    on_rsp_qry_for_quote: spi_on_rsp_qry_for_quote,
    on_rsp_qry_quote: spi_on_rsp_qry_quote,
    on_rsp_qry_option_self_close: spi_on_rsp_qry_option_self_close,
    on_rsp_qry_invest_unit: spi_on_rsp_qry_invest_unit,
    on_rsp_qry_comb_instrument_guard: spi_on_rsp_qry_comb_instrument_guard,
    on_rsp_qry_comb_action: spi_on_rsp_qry_comb_action,
    on_rsp_qry_transfer_serial: spi_on_rsp_qry_transfer_serial,
    on_rsp_qry_accountregister: spi_on_rsp_qry_accountregister,
    on_rsp_error: spi_on_rsp_error,
    on_rtn_order: spi_on_rtn_order,
    on_rtn_trade: spi_on_rtn_trade,
    on_err_rtn_order_insert: spi_on_err_rtn_order_insert,
    on_err_rtn_order_action: spi_on_err_rtn_order_action,
    on_rtn_instrument_status: spi_on_rtn_instrument_status,
    on_rtn_bulletin: spi_on_rtn_bulletin,
    on_rtn_trading_notice: spi_on_rtn_trading_notice,
    on_rtn_error_conditional_order: spi_on_rtn_error_conditional_order,
    on_rtn_exec_order: spi_on_rtn_exec_order,
    on_err_rtn_exec_order_insert: spi_on_err_rtn_exec_order_insert,
    on_err_rtn_exec_order_action: spi_on_err_rtn_exec_order_action,
    on_err_rtn_for_quote_insert: spi_on_err_rtn_for_quote_insert,
    on_rtn_quote: spi_on_rtn_quote,
    on_err_rtn_quote_insert: spi_on_err_rtn_quote_insert,
    on_err_rtn_quote_action: spi_on_err_rtn_quote_action,
    on_rtn_for_quote_rsp: spi_on_rtn_for_quote_rsp,
    on_rtn_cfmmc_trading_account_token: spi_on_rtn_cfmmc_trading_account_token,
    on_err_rtn_batch_order_action: spi_on_err_rtn_batch_order_action,
    on_rtn_option_self_close: spi_on_rtn_option_self_close,
    on_err_rtn_option_self_close_insert: spi_on_err_rtn_option_self_close_insert,
    on_err_rtn_option_self_close_action: spi_on_err_rtn_option_self_close_action,
    on_rtn_comb_action: spi_on_rtn_comb_action,
    on_err_rtn_comb_action_insert: spi_on_err_rtn_comb_action_insert,
    on_rsp_qry_contract_bank: spi_on_rsp_qry_contract_bank,
    on_rsp_qry_parked_order: spi_on_rsp_qry_parked_order,
    on_rsp_qry_parked_order_action: spi_on_rsp_qry_parked_order_action,
    on_rsp_qry_trading_notice: spi_on_rsp_qry_trading_notice,
    on_rsp_qry_broker_trading_params: spi_on_rsp_qry_broker_trading_params,
    on_rsp_qry_broker_trading_algos: spi_on_rsp_qry_broker_trading_algos,
    on_rsp_query_cfmmc_trading_account_token: spi_on_rsp_query_cfmmc_trading_account_token,
    on_rtn_from_bank_to_future_by_bank: spi_on_rtn_from_bank_to_future_by_bank,
    on_rtn_from_future_to_bank_by_bank: spi_on_rtn_from_future_to_bank_by_bank,
    on_rtn_repeal_from_bank_to_future_by_bank: spi_on_rtn_repeal_from_bank_to_future_by_bank,
    on_rtn_repeal_from_future_to_bank_by_bank: spi_on_rtn_repeal_from_future_to_bank_by_bank,
    on_rtn_from_bank_to_future_by_future: spi_on_rtn_from_bank_to_future_by_future,
    on_rtn_from_future_to_bank_by_future: spi_on_rtn_from_future_to_bank_by_future,
    on_rtn_repeal_from_bank_to_future_by_future_manual: spi_on_rtn_repeal_from_bank_to_future_by_future_manual,
    on_rtn_repeal_from_future_to_bank_by_future_manual: spi_on_rtn_repeal_from_future_to_bank_by_future_manual,
    on_rtn_query_bank_balance_by_future: spi_on_rtn_query_bank_balance_by_future,
    on_err_rtn_bank_to_future_by_future: spi_on_err_rtn_bank_to_future_by_future,
    on_err_rtn_future_to_bank_by_future: spi_on_err_rtn_future_to_bank_by_future,
    on_err_rtn_repeal_bank_to_future_by_future_manual: spi_on_err_rtn_repeal_bank_to_future_by_future_manual,
    on_err_rtn_repeal_future_to_bank_by_future_manual: spi_on_err_rtn_repeal_future_to_bank_by_future_manual,
    on_err_rtn_query_bank_balance_by_future: spi_on_err_rtn_query_bank_balance_by_future,
    on_rtn_repeal_from_bank_to_future_by_future: spi_on_rtn_repeal_from_bank_to_future_by_future,
    on_rtn_repeal_from_future_to_bank_by_future: spi_on_rtn_repeal_from_future_to_bank_by_future,
    on_rsp_from_bank_to_future_by_future: spi_on_rsp_from_bank_to_future_by_future,
    on_rsp_from_future_to_bank_by_future: spi_on_rsp_from_future_to_bank_by_future,
    on_rsp_query_bank_account_money_by_future: spi_on_rsp_query_bank_account_money_by_future,
    on_rtn_open_account_by_bank: spi_on_rtn_open_account_by_bank,
    on_rtn_cancel_account_by_bank: spi_on_rtn_cancel_account_by_bank,
    on_rtn_change_account_by_bank: spi_on_rtn_change_account_by_bank,
    on_rsp_qry_classified_instrument: spi_on_rsp_qry_classified_instrument,
    on_rsp_qry_comb_promotion_param: spi_on_rsp_qry_comb_promotion_param,
    on_rsp_qry_risk_settle_invst_position: spi_on_rsp_qry_risk_settle_invst_position,
    on_rsp_qry_risk_settle_product_status: spi_on_rsp_qry_risk_settle_product_status,
    on_rsp_qry_spbm_future_parameter: spi_on_rsp_qry_spbm_future_parameter,
    on_rsp_qry_spbm_option_parameter: spi_on_rsp_qry_spbm_option_parameter,
    on_rsp_qry_spbm_intra_parameter: spi_on_rsp_qry_spbm_intra_parameter,
    on_rsp_qry_spbm_inter_parameter: spi_on_rsp_qry_spbm_inter_parameter,
    on_rsp_qry_spbm_portf_definition: spi_on_rsp_qry_spbm_portf_definition,
    on_rsp_qry_spbm_investor_portf_def: spi_on_rsp_qry_spbm_investor_portf_def,
    on_rsp_qry_investor_portf_margin_ratio: spi_on_rsp_qry_investor_portf_margin_ratio,
    on_rsp_qry_investor_prod_spbm_detail: spi_on_rsp_qry_investor_prod_spbm_detail,
    on_rsp_qry_investor_commodity_spmm_margin: spi_on_rsp_qry_investor_commodity_spmm_margin,
    on_rsp_qry_investor_commodity_group_spmm_margin: spi_on_rsp_qry_investor_commodity_group_spmm_margin,
    on_rsp_qry_spmm_inst_param: spi_on_rsp_qry_spmm_inst_param,
    on_rsp_qry_spmm_product_param: spi_on_rsp_qry_spmm_product_param,
    on_rsp_qry_spbm_add_on_inter_parameter: spi_on_rsp_qry_spbm_add_on_inter_parameter,
    on_rsp_qry_rcams_comb_product_info: spi_on_rsp_qry_rcams_comb_product_info,
    on_rsp_qry_rcams_instr_parameter: spi_on_rsp_qry_rcams_instr_parameter,
    on_rsp_qry_rcams_intra_parameter: spi_on_rsp_qry_rcams_intra_parameter,
    on_rsp_qry_rcams_inter_parameter: spi_on_rsp_qry_rcams_inter_parameter,
    on_rsp_qry_rcams_short_opt_adjust_param: spi_on_rsp_qry_rcams_short_opt_adjust_param,
    on_rsp_qry_rcams_investor_comb_position: spi_on_rsp_qry_rcams_investor_comb_position,
    on_rsp_qry_investor_prod_rcams_margin: spi_on_rsp_qry_investor_prod_rcams_margin,
    on_rsp_qry_rule_instr_parameter: spi_on_rsp_qry_rule_instr_parameter,
    on_rsp_qry_rule_intra_parameter: spi_on_rsp_qry_rule_intra_parameter,
    on_rsp_qry_rule_inter_parameter: spi_on_rsp_qry_rule_inter_parameter,
    on_rsp_qry_investor_prod_rule_margin: spi_on_rsp_qry_investor_prod_rule_margin, 
};

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CThostFtdcTraderSpiExt {
    vtable: *const TraderSpiVTable,
    pub spi_ptr: *mut dyn TraderSpi,
}

impl CThostFtdcTraderSpiExt {
    pub fn new(spi: *mut dyn TraderSpi) -> Self {
        Self {
            vtable: &SPI_VTABLE,
            spi_ptr: spi,
        }
    }
}


extern "C" fn spi_on_front_connected(spi: *mut CThostFtdcTraderSpiExt) {
    unsafe {
        (*(*spi).spi_ptr).on_front_connected()
    }
}

extern "C" fn spi_on_front_disconnected(spi: *mut CThostFtdcTraderSpiExt, n_reason: std::os::raw::c_int) {
    unsafe {
        (*(*spi).spi_ptr).on_front_disconnected(n_reason)
    }
}

extern "C" fn spi_on_heart_beat_warning(spi: *mut CThostFtdcTraderSpiExt, n_time_lapse: std::os::raw::c_int) {
    unsafe {
        (*(*spi).spi_ptr).on_heart_beat_warning(n_time_lapse)
    }
}

extern "C" fn spi_on_rsp_authenticate(spi: *mut CThostFtdcTraderSpiExt, p_rsp_authenticate_field: *const CThostFtdcRspAuthenticateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_authenticate(p_rsp_authenticate_field.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_user_login(spi: *mut CThostFtdcTraderSpiExt, p_rsp_user_login: *const CThostFtdcRspUserLoginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_user_login(p_rsp_user_login.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_user_logout(spi: *mut CThostFtdcTraderSpiExt, p_user_logout: *const CThostFtdcUserLogoutField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_user_logout(p_user_logout.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_user_password_update(spi: *mut CThostFtdcTraderSpiExt, p_user_password_update: *const CThostFtdcUserPasswordUpdateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_user_password_update(p_user_password_update.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_trading_account_password_update(spi: *mut CThostFtdcTraderSpiExt, p_trading_account_password_update: *const CThostFtdcTradingAccountPasswordUpdateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_trading_account_password_update(p_trading_account_password_update.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_user_auth_method(spi: *mut CThostFtdcTraderSpiExt, p_rsp_user_auth_method: *const CThostFtdcRspUserAuthMethodField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_user_auth_method(p_rsp_user_auth_method.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_gen_user_captcha(spi: *mut CThostFtdcTraderSpiExt, p_rsp_gen_user_captcha: *const CThostFtdcRspGenUserCaptchaField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_gen_user_captcha(p_rsp_gen_user_captcha.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_gen_user_text(spi: *mut CThostFtdcTraderSpiExt, p_rsp_gen_user_text: *const CThostFtdcRspGenUserTextField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_gen_user_text(p_rsp_gen_user_text.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_order_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_order: *const CThostFtdcInputOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_order_insert(p_input_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_parked_order_insert(spi: *mut CThostFtdcTraderSpiExt, p_parked_order: *const CThostFtdcParkedOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_parked_order_insert(p_parked_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_parked_order_action(spi: *mut CThostFtdcTraderSpiExt, p_parked_order_action: *const CThostFtdcParkedOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_parked_order_action(p_parked_order_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_order_action(spi: *mut CThostFtdcTraderSpiExt, p_input_order_action: *const CThostFtdcInputOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_order_action(p_input_order_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_max_order_volume(spi: *mut CThostFtdcTraderSpiExt, p_qry_max_order_volume: *const CThostFtdcQryMaxOrderVolumeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_max_order_volume(p_qry_max_order_volume.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_settlement_info_confirm(spi: *mut CThostFtdcTraderSpiExt, p_settlement_info_confirm: *const CThostFtdcSettlementInfoConfirmField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_settlement_info_confirm(p_settlement_info_confirm.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_remove_parked_order(spi: *mut CThostFtdcTraderSpiExt, p_remove_parked_order: *const CThostFtdcRemoveParkedOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_remove_parked_order(p_remove_parked_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_remove_parked_order_action(spi: *mut CThostFtdcTraderSpiExt, p_remove_parked_order_action: *const CThostFtdcRemoveParkedOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_remove_parked_order_action(p_remove_parked_order_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_exec_order_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_exec_order: *const CThostFtdcInputExecOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_exec_order_insert(p_input_exec_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_exec_order_action(spi: *mut CThostFtdcTraderSpiExt, p_input_exec_order_action: *const CThostFtdcInputExecOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_exec_order_action(p_input_exec_order_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_for_quote_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_for_quote: *const CThostFtdcInputForQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_for_quote_insert(p_input_for_quote.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_quote_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_quote: *const CThostFtdcInputQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_quote_insert(p_input_quote.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_quote_action(spi: *mut CThostFtdcTraderSpiExt, p_input_quote_action: *const CThostFtdcInputQuoteActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_quote_action(p_input_quote_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_batch_order_action(spi: *mut CThostFtdcTraderSpiExt, p_input_batch_order_action: *const CThostFtdcInputBatchOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_batch_order_action(p_input_batch_order_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_option_self_close_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_option_self_close: *const CThostFtdcInputOptionSelfCloseField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_option_self_close_insert(p_input_option_self_close.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_option_self_close_action(spi: *mut CThostFtdcTraderSpiExt, p_input_option_self_close_action: *const CThostFtdcInputOptionSelfCloseActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_option_self_close_action(p_input_option_self_close_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_comb_action_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_comb_action: *const CThostFtdcInputCombActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_comb_action_insert(p_input_comb_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_order(spi: *mut CThostFtdcTraderSpiExt, p_order: *const CThostFtdcOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_order(p_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_trade(spi: *mut CThostFtdcTraderSpiExt, p_trade: *const CThostFtdcTradeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_trade(p_trade.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_position(spi: *mut CThostFtdcTraderSpiExt, p_investor_position: *const CThostFtdcInvestorPositionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_position(p_investor_position.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_trading_account(spi: *mut CThostFtdcTraderSpiExt, p_trading_account: *const CThostFtdcTradingAccountField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_trading_account(p_trading_account.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor(spi: *mut CThostFtdcTraderSpiExt, p_investor: *const CThostFtdcInvestorField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor(p_investor.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_trading_code(spi: *mut CThostFtdcTraderSpiExt, p_trading_code: *const CThostFtdcTradingCodeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_trading_code(p_trading_code.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_instrument_margin_rate(spi: *mut CThostFtdcTraderSpiExt, p_instrument_margin_rate: *const CThostFtdcInstrumentMarginRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_instrument_margin_rate(p_instrument_margin_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_instrument_commission_rate(spi: *mut CThostFtdcTraderSpiExt, p_instrument_commission_rate: *const CThostFtdcInstrumentCommissionRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_instrument_commission_rate(p_instrument_commission_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_exchange(spi: *mut CThostFtdcTraderSpiExt, p_exchange: *const CThostFtdcExchangeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_exchange(p_exchange.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_product(spi: *mut CThostFtdcTraderSpiExt, p_product: *const CThostFtdcProductField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_product(p_product.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_instrument(spi: *mut CThostFtdcTraderSpiExt, p_instrument: *const CThostFtdcInstrumentField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_instrument(p_instrument.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_depth_market_data(spi: *mut CThostFtdcTraderSpiExt, p_depth_market_data: *const CThostFtdcDepthMarketDataField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_depth_market_data(p_depth_market_data.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_trader_offer(spi: *mut CThostFtdcTraderSpiExt, p_trader_offer: *const CThostFtdcTraderOfferField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_trader_offer(p_trader_offer.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_settlement_info(spi: *mut CThostFtdcTraderSpiExt, p_settlement_info: *const CThostFtdcSettlementInfoField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_settlement_info(p_settlement_info.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_transfer_bank(spi: *mut CThostFtdcTraderSpiExt, p_transfer_bank: *const CThostFtdcTransferBankField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_transfer_bank(p_transfer_bank.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_position_detail(spi: *mut CThostFtdcTraderSpiExt, p_investor_position_detail: *const CThostFtdcInvestorPositionDetailField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_position_detail(p_investor_position_detail.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_notice(spi: *mut CThostFtdcTraderSpiExt, p_notice: *const CThostFtdcNoticeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_notice(p_notice.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_settlement_info_confirm(spi: *mut CThostFtdcTraderSpiExt, p_settlement_info_confirm: *const CThostFtdcSettlementInfoConfirmField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_settlement_info_confirm(p_settlement_info_confirm.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_position_combine_detail(spi: *mut CThostFtdcTraderSpiExt, p_investor_position_combine_detail: *const CThostFtdcInvestorPositionCombineDetailField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_position_combine_detail(p_investor_position_combine_detail.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_cfmmc_trading_account_key(spi: *mut CThostFtdcTraderSpiExt, p_cfmmc_trading_account_key: *const CThostFtdcCFMMCTradingAccountKeyField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_cfmmc_trading_account_key(p_cfmmc_trading_account_key.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_e_warrant_offset(spi: *mut CThostFtdcTraderSpiExt, p_e_warrant_offset: *const CThostFtdcEWarrantOffsetField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_e_warrant_offset(p_e_warrant_offset.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_product_group_margin(spi: *mut CThostFtdcTraderSpiExt, p_investor_product_group_margin: *const CThostFtdcInvestorProductGroupMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_product_group_margin(p_investor_product_group_margin.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_exchange_margin_rate(spi: *mut CThostFtdcTraderSpiExt, p_exchange_margin_rate: *const CThostFtdcExchangeMarginRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_exchange_margin_rate(p_exchange_margin_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_exchange_margin_rate_adjust(spi: *mut CThostFtdcTraderSpiExt, p_exchange_margin_rate_adjust: *const CThostFtdcExchangeMarginRateAdjustField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_exchange_margin_rate_adjust(p_exchange_margin_rate_adjust.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_exchange_rate(spi: *mut CThostFtdcTraderSpiExt, p_exchange_rate: *const CThostFtdcExchangeRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_exchange_rate(p_exchange_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_sec_agent_acid_map(spi: *mut CThostFtdcTraderSpiExt, p_sec_agent_acid_map: *const CThostFtdcSecAgentACIDMapField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_sec_agent_acid_map(p_sec_agent_acid_map.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_product_exch_rate(spi: *mut CThostFtdcTraderSpiExt, p_product_exch_rate: *const CThostFtdcProductExchRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_product_exch_rate(p_product_exch_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_product_group(spi: *mut CThostFtdcTraderSpiExt, p_product_group: *const CThostFtdcProductGroupField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_product_group(p_product_group.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_mm_instrument_commission_rate(spi: *mut CThostFtdcTraderSpiExt, p_mm_instrument_commission_rate: *const CThostFtdcMMInstrumentCommissionRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_mm_instrument_commission_rate(p_mm_instrument_commission_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_mm_option_instr_comm_rate(spi: *mut CThostFtdcTraderSpiExt, p_mm_option_instr_comm_rate: *const CThostFtdcMMOptionInstrCommRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_mm_option_instr_comm_rate(p_mm_option_instr_comm_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_instrument_order_comm_rate(spi: *mut CThostFtdcTraderSpiExt, p_instrument_order_comm_rate: *const CThostFtdcInstrumentOrderCommRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_instrument_order_comm_rate(p_instrument_order_comm_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_sec_agent_trading_account(spi: *mut CThostFtdcTraderSpiExt, p_trading_account: *const CThostFtdcTradingAccountField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_sec_agent_trading_account(p_trading_account.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_sec_agent_check_mode(spi: *mut CThostFtdcTraderSpiExt, p_sec_agent_check_mode: *const CThostFtdcSecAgentCheckModeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_sec_agent_check_mode(p_sec_agent_check_mode.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_sec_agent_trade_info(spi: *mut CThostFtdcTraderSpiExt, p_sec_agent_trade_info: *const CThostFtdcSecAgentTradeInfoField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_sec_agent_trade_info(p_sec_agent_trade_info.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_option_instr_trade_cost(spi: *mut CThostFtdcTraderSpiExt, p_option_instr_trade_cost: *const CThostFtdcOptionInstrTradeCostField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_option_instr_trade_cost(p_option_instr_trade_cost.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_option_instr_comm_rate(spi: *mut CThostFtdcTraderSpiExt, p_option_instr_comm_rate: *const CThostFtdcOptionInstrCommRateField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_option_instr_comm_rate(p_option_instr_comm_rate.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_exec_order(spi: *mut CThostFtdcTraderSpiExt, p_exec_order: *const CThostFtdcExecOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_exec_order(p_exec_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_for_quote(spi: *mut CThostFtdcTraderSpiExt, p_for_quote: *const CThostFtdcForQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_for_quote(p_for_quote.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_quote(spi: *mut CThostFtdcTraderSpiExt, p_quote: *const CThostFtdcQuoteField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_quote(p_quote.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_option_self_close(spi: *mut CThostFtdcTraderSpiExt, p_option_self_close: *const CThostFtdcOptionSelfCloseField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_option_self_close(p_option_self_close.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_invest_unit(spi: *mut CThostFtdcTraderSpiExt, p_invest_unit: *const CThostFtdcInvestUnitField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_invest_unit(p_invest_unit.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_comb_instrument_guard(spi: *mut CThostFtdcTraderSpiExt, p_comb_instrument_guard: *const CThostFtdcCombInstrumentGuardField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_comb_instrument_guard(p_comb_instrument_guard.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_comb_action(spi: *mut CThostFtdcTraderSpiExt, p_comb_action: *const CThostFtdcCombActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_comb_action(p_comb_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_transfer_serial(spi: *mut CThostFtdcTraderSpiExt, p_transfer_serial: *const CThostFtdcTransferSerialField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_transfer_serial(p_transfer_serial.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_accountregister(spi: *mut CThostFtdcTraderSpiExt, p_accountregister: *const CThostFtdcAccountregisterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_accountregister(p_accountregister.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_error(spi: *mut CThostFtdcTraderSpiExt, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_error(p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rtn_order(spi: *mut CThostFtdcTraderSpiExt, p_order: *const CThostFtdcOrderField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_order(p_order.as_ref())
    }
}

extern "C" fn spi_on_rtn_trade(spi: *mut CThostFtdcTraderSpiExt, p_trade: *const CThostFtdcTradeField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_trade(p_trade.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_order_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_order: *const CThostFtdcInputOrderField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_order_insert(p_input_order.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_order_action(spi: *mut CThostFtdcTraderSpiExt, p_order_action: *const CThostFtdcOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_order_action(p_order_action.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_instrument_status(spi: *mut CThostFtdcTraderSpiExt, p_instrument_status: *const CThostFtdcInstrumentStatusField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_instrument_status(p_instrument_status.as_ref())
    }
}

extern "C" fn spi_on_rtn_bulletin(spi: *mut CThostFtdcTraderSpiExt, p_bulletin: *const CThostFtdcBulletinField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_bulletin(p_bulletin.as_ref())
    }
}

extern "C" fn spi_on_rtn_trading_notice(spi: *mut CThostFtdcTraderSpiExt, p_trading_notice_info: *const CThostFtdcTradingNoticeInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_trading_notice(p_trading_notice_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_error_conditional_order(spi: *mut CThostFtdcTraderSpiExt, p_error_conditional_order: *const CThostFtdcErrorConditionalOrderField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_error_conditional_order(p_error_conditional_order.as_ref())
    }
}

extern "C" fn spi_on_rtn_exec_order(spi: *mut CThostFtdcTraderSpiExt, p_exec_order: *const CThostFtdcExecOrderField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_exec_order(p_exec_order.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_exec_order_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_exec_order: *const CThostFtdcInputExecOrderField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_exec_order_insert(p_input_exec_order.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_exec_order_action(spi: *mut CThostFtdcTraderSpiExt, p_exec_order_action: *const CThostFtdcExecOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_exec_order_action(p_exec_order_action.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_for_quote_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_for_quote: *const CThostFtdcInputForQuoteField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_for_quote_insert(p_input_for_quote.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_quote(spi: *mut CThostFtdcTraderSpiExt, p_quote: *const CThostFtdcQuoteField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_quote(p_quote.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_quote_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_quote: *const CThostFtdcInputQuoteField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_quote_insert(p_input_quote.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_quote_action(spi: *mut CThostFtdcTraderSpiExt, p_quote_action: *const CThostFtdcQuoteActionField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_quote_action(p_quote_action.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_for_quote_rsp(spi: *mut CThostFtdcTraderSpiExt, p_for_quote_rsp: *const CThostFtdcForQuoteRspField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_for_quote_rsp(p_for_quote_rsp.as_ref())
    }
}

extern "C" fn spi_on_rtn_cfmmc_trading_account_token(spi: *mut CThostFtdcTraderSpiExt, p_cfmmc_trading_account_token: *const CThostFtdcCFMMCTradingAccountTokenField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_cfmmc_trading_account_token(p_cfmmc_trading_account_token.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_batch_order_action(spi: *mut CThostFtdcTraderSpiExt, p_batch_order_action: *const CThostFtdcBatchOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_batch_order_action(p_batch_order_action.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_option_self_close(spi: *mut CThostFtdcTraderSpiExt, p_option_self_close: *const CThostFtdcOptionSelfCloseField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_option_self_close(p_option_self_close.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_option_self_close_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_option_self_close: *const CThostFtdcInputOptionSelfCloseField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_option_self_close_insert(p_input_option_self_close.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_option_self_close_action(spi: *mut CThostFtdcTraderSpiExt, p_option_self_close_action: *const CThostFtdcOptionSelfCloseActionField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_option_self_close_action(p_option_self_close_action.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_comb_action(spi: *mut CThostFtdcTraderSpiExt, p_comb_action: *const CThostFtdcCombActionField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_comb_action(p_comb_action.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_comb_action_insert(spi: *mut CThostFtdcTraderSpiExt, p_input_comb_action: *const CThostFtdcInputCombActionField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_comb_action_insert(p_input_comb_action.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rsp_qry_contract_bank(spi: *mut CThostFtdcTraderSpiExt, p_contract_bank: *const CThostFtdcContractBankField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_contract_bank(p_contract_bank.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_parked_order(spi: *mut CThostFtdcTraderSpiExt, p_parked_order: *const CThostFtdcParkedOrderField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_parked_order(p_parked_order.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_parked_order_action(spi: *mut CThostFtdcTraderSpiExt, p_parked_order_action: *const CThostFtdcParkedOrderActionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_parked_order_action(p_parked_order_action.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_trading_notice(spi: *mut CThostFtdcTraderSpiExt, p_trading_notice: *const CThostFtdcTradingNoticeField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_trading_notice(p_trading_notice.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_broker_trading_params(spi: *mut CThostFtdcTraderSpiExt, p_broker_trading_params: *const CThostFtdcBrokerTradingParamsField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_broker_trading_params(p_broker_trading_params.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_broker_trading_algos(spi: *mut CThostFtdcTraderSpiExt, p_broker_trading_algos: *const CThostFtdcBrokerTradingAlgosField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_broker_trading_algos(p_broker_trading_algos.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_query_cfmmc_trading_account_token(spi: *mut CThostFtdcTraderSpiExt, p_query_cfmmc_trading_account_token: *const CThostFtdcQueryCFMMCTradingAccountTokenField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_query_cfmmc_trading_account_token(p_query_cfmmc_trading_account_token.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rtn_from_bank_to_future_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_from_bank_to_future_by_bank(p_rsp_transfer.as_ref())
    }
}

extern "C" fn spi_on_rtn_from_future_to_bank_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_from_future_to_bank_by_bank(p_rsp_transfer.as_ref())
    }
}

extern "C" fn spi_on_rtn_repeal_from_bank_to_future_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_repeal_from_bank_to_future_by_bank(p_rsp_repeal.as_ref())
    }
}

extern "C" fn spi_on_rtn_repeal_from_future_to_bank_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_repeal_from_future_to_bank_by_bank(p_rsp_repeal.as_ref())
    }
}

extern "C" fn spi_on_rtn_from_bank_to_future_by_future(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_from_bank_to_future_by_future(p_rsp_transfer.as_ref())
    }
}

extern "C" fn spi_on_rtn_from_future_to_bank_by_future(spi: *mut CThostFtdcTraderSpiExt, p_rsp_transfer: *const CThostFtdcRspTransferField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_from_future_to_bank_by_future(p_rsp_transfer.as_ref())
    }
}

extern "C" fn spi_on_rtn_repeal_from_bank_to_future_by_future_manual(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_repeal_from_bank_to_future_by_future_manual(p_rsp_repeal.as_ref())
    }
}

extern "C" fn spi_on_rtn_repeal_from_future_to_bank_by_future_manual(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_repeal_from_future_to_bank_by_future_manual(p_rsp_repeal.as_ref())
    }
}

extern "C" fn spi_on_rtn_query_bank_balance_by_future(spi: *mut CThostFtdcTraderSpiExt, p_notify_query_account: *const CThostFtdcNotifyQueryAccountField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_query_bank_balance_by_future(p_notify_query_account.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_bank_to_future_by_future(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_bank_to_future_by_future(p_req_transfer.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_future_to_bank_by_future(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_future_to_bank_by_future(p_req_transfer.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_repeal_bank_to_future_by_future_manual(spi: *mut CThostFtdcTraderSpiExt, p_req_repeal: *const CThostFtdcReqRepealField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_repeal_bank_to_future_by_future_manual(p_req_repeal.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_repeal_future_to_bank_by_future_manual(spi: *mut CThostFtdcTraderSpiExt, p_req_repeal: *const CThostFtdcReqRepealField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_repeal_future_to_bank_by_future_manual(p_req_repeal.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_err_rtn_query_bank_balance_by_future(spi: *mut CThostFtdcTraderSpiExt, p_req_query_account: *const CThostFtdcReqQueryAccountField, p_rsp_info: *const CThostFtdcRspInfoField) {
    unsafe {
        (*(*spi).spi_ptr).on_err_rtn_query_bank_balance_by_future(p_req_query_account.as_ref(), p_rsp_info.as_ref())
    }
}

extern "C" fn spi_on_rtn_repeal_from_bank_to_future_by_future(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_repeal_from_bank_to_future_by_future(p_rsp_repeal.as_ref())
    }
}

extern "C" fn spi_on_rtn_repeal_from_future_to_bank_by_future(spi: *mut CThostFtdcTraderSpiExt, p_rsp_repeal: *const CThostFtdcRspRepealField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_repeal_from_future_to_bank_by_future(p_rsp_repeal.as_ref())
    }
}

extern "C" fn spi_on_rsp_from_bank_to_future_by_future(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_from_bank_to_future_by_future(p_req_transfer.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_from_future_to_bank_by_future(spi: *mut CThostFtdcTraderSpiExt, p_req_transfer: *const CThostFtdcReqTransferField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_from_future_to_bank_by_future(p_req_transfer.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_query_bank_account_money_by_future(spi: *mut CThostFtdcTraderSpiExt, p_req_query_account: *const CThostFtdcReqQueryAccountField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_query_bank_account_money_by_future(p_req_query_account.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rtn_open_account_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_open_account: *const CThostFtdcOpenAccountField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_open_account_by_bank(p_open_account.as_ref())
    }
}

extern "C" fn spi_on_rtn_cancel_account_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_cancel_account: *const CThostFtdcCancelAccountField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_cancel_account_by_bank(p_cancel_account.as_ref())
    }
}

extern "C" fn spi_on_rtn_change_account_by_bank(spi: *mut CThostFtdcTraderSpiExt, p_change_account: *const CThostFtdcChangeAccountField) {
    unsafe {
        (*(*spi).spi_ptr).on_rtn_change_account_by_bank(p_change_account.as_ref())
    }
}

extern "C" fn spi_on_rsp_qry_classified_instrument(spi: *mut CThostFtdcTraderSpiExt, p_instrument: *const CThostFtdcInstrumentField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_classified_instrument(p_instrument.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_comb_promotion_param(spi: *mut CThostFtdcTraderSpiExt, p_comb_promotion_param: *const CThostFtdcCombPromotionParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_comb_promotion_param(p_comb_promotion_param.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_risk_settle_invst_position(spi: *mut CThostFtdcTraderSpiExt, p_risk_settle_invst_position: *const CThostFtdcRiskSettleInvstPositionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_risk_settle_invst_position(p_risk_settle_invst_position.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_risk_settle_product_status(spi: *mut CThostFtdcTraderSpiExt, p_risk_settle_product_status: *const CThostFtdcRiskSettleProductStatusField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_risk_settle_product_status(p_risk_settle_product_status.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_future_parameter(spi: *mut CThostFtdcTraderSpiExt, p_spbm_future_parameter: *const CThostFtdcSPBMFutureParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_future_parameter(p_spbm_future_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_option_parameter(spi: *mut CThostFtdcTraderSpiExt, p_spbm_option_parameter: *const CThostFtdcSPBMOptionParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_option_parameter(p_spbm_option_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_intra_parameter(spi: *mut CThostFtdcTraderSpiExt, p_spbm_intra_parameter: *const CThostFtdcSPBMIntraParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_intra_parameter(p_spbm_intra_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_inter_parameter(spi: *mut CThostFtdcTraderSpiExt, p_spbm_inter_parameter: *const CThostFtdcSPBMInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_inter_parameter(p_spbm_inter_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_portf_definition(spi: *mut CThostFtdcTraderSpiExt, p_spbm_portf_definition: *const CThostFtdcSPBMPortfDefinitionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_portf_definition(p_spbm_portf_definition.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_investor_portf_def(spi: *mut CThostFtdcTraderSpiExt, p_spbm_investor_portf_def: *const CThostFtdcSPBMInvestorPortfDefField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_investor_portf_def(p_spbm_investor_portf_def.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_portf_margin_ratio(spi: *mut CThostFtdcTraderSpiExt, p_investor_portf_margin_ratio: *const CThostFtdcInvestorPortfMarginRatioField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_portf_margin_ratio(p_investor_portf_margin_ratio.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_prod_spbm_detail(spi: *mut CThostFtdcTraderSpiExt, p_investor_prod_spbm_detail: *const CThostFtdcInvestorProdSPBMDetailField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_prod_spbm_detail(p_investor_prod_spbm_detail.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_commodity_spmm_margin(spi: *mut CThostFtdcTraderSpiExt, p_investor_commodity_spmm_margin: *const CThostFtdcInvestorCommoditySPMMMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_commodity_spmm_margin(p_investor_commodity_spmm_margin.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_commodity_group_spmm_margin(spi: *mut CThostFtdcTraderSpiExt, p_investor_commodity_group_spmm_margin: *const CThostFtdcInvestorCommodityGroupSPMMMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_commodity_group_spmm_margin(p_investor_commodity_group_spmm_margin.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spmm_inst_param(spi: *mut CThostFtdcTraderSpiExt, p_spmm_inst_param: *const CThostFtdcSPMMInstParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spmm_inst_param(p_spmm_inst_param.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spmm_product_param(spi: *mut CThostFtdcTraderSpiExt, p_spmm_product_param: *const CThostFtdcSPMMProductParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spmm_product_param(p_spmm_product_param.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_spbm_add_on_inter_parameter(spi: *mut CThostFtdcTraderSpiExt, p_spbm_add_on_inter_parameter: *const CThostFtdcSPBMAddOnInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_spbm_add_on_inter_parameter(p_spbm_add_on_inter_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rcams_comb_product_info(spi: *mut CThostFtdcTraderSpiExt, p_rcams_comb_product_info: *const CThostFtdcRCAMSCombProductInfoField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rcams_comb_product_info(p_rcams_comb_product_info.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rcams_instr_parameter(spi: *mut CThostFtdcTraderSpiExt, p_rcams_instr_parameter: *const CThostFtdcRCAMSInstrParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rcams_instr_parameter(p_rcams_instr_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rcams_intra_parameter(spi: *mut CThostFtdcTraderSpiExt, p_rcams_intra_parameter: *const CThostFtdcRCAMSIntraParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rcams_intra_parameter(p_rcams_intra_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rcams_inter_parameter(spi: *mut CThostFtdcTraderSpiExt, p_rcams_inter_parameter: *const CThostFtdcRCAMSInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rcams_inter_parameter(p_rcams_inter_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rcams_short_opt_adjust_param(spi: *mut CThostFtdcTraderSpiExt, p_rcams_short_opt_adjust_param: *const CThostFtdcRCAMSShortOptAdjustParamField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rcams_short_opt_adjust_param(p_rcams_short_opt_adjust_param.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rcams_investor_comb_position(spi: *mut CThostFtdcTraderSpiExt, p_rcams_investor_comb_position: *const CThostFtdcRCAMSInvestorCombPositionField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rcams_investor_comb_position(p_rcams_investor_comb_position.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_prod_rcams_margin(spi: *mut CThostFtdcTraderSpiExt, p_investor_prod_rcams_margin: *const CThostFtdcInvestorProdRCAMSMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_prod_rcams_margin(p_investor_prod_rcams_margin.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rule_instr_parameter(spi: *mut CThostFtdcTraderSpiExt, p_rule_instr_parameter: *const CThostFtdcRULEInstrParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rule_instr_parameter(p_rule_instr_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rule_intra_parameter(spi: *mut CThostFtdcTraderSpiExt, p_rule_intra_parameter: *const CThostFtdcRULEIntraParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rule_intra_parameter(p_rule_intra_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_rule_inter_parameter(spi: *mut CThostFtdcTraderSpiExt, p_rule_inter_parameter: *const CThostFtdcRULEInterParameterField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_rule_inter_parameter(p_rule_inter_parameter.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}

extern "C" fn spi_on_rsp_qry_investor_prod_rule_margin(spi: *mut CThostFtdcTraderSpiExt, p_investor_prod_rule_margin: *const CThostFtdcInvestorProdRULEMarginField, p_rsp_info: *const CThostFtdcRspInfoField, n_request_id: std::os::raw::c_int, b_is_last: bool) {
    unsafe {
        (*(*spi).spi_ptr).on_rsp_qry_investor_prod_rule_margin(p_investor_prod_rule_margin.as_ref(), p_rsp_info.as_ref(), n_request_id, b_is_last)
    }
}
