コード例 #1
0
        private void InitCallbacks()
        {
            //由于回调函数可能被GC回收,所以用成员变量将回调函数保存下来
            _fnOnConnect_Holder = OnConnect;
            _fnOnDisconnect_Holder = OnDisconnect;
            _fnOnErrRtnOrderAction_Holder = OnErrRtnOrderAction;
            _fnOnErrRtnOrderInsert_Holder = OnErrRtnOrderInsert;
            _fnOnRspError_Holder = OnRspError;
            _fnOnRspOrderAction_Holder = OnRspOrderAction;
            _fnOnRspOrderInsert_Holder = OnRspOrderInsert;
            _fnOnRspQryDepthMarketData_Holder = OnRspQryDepthMarketData;
            _fnOnRspQryInstrument_Holder = OnRspQryInstrument;
            _fnOnRspQryInstrumentCommissionRate_Holder = OnRspQryInstrumentCommissionRate;
            _fnOnRspQryInvestorPosition_Holder = OnRspQryInvestorPosition;
            _fnOnRspQryTradingAccount_Holder = OnRspQryTradingAccount;
            _fnOnRtnInstrumentStatus_Holder = OnRtnInstrumentStatus;
            _fnOnRtnDepthMarketData_Holder = OnRtnDepthMarketData;
            _fnOnRtnOrder_Holder = OnRtnOrder;
            _fnOnRtnTrade_Holder = OnRtnTrade;

#if CTP
            _fnOnRspQryInstrumentMarginRate_Holder = OnRspQryInstrumentMarginRate;
#endif
            
            _fnOnRtnForQuoteRsp_Holder = OnRtnForQuoteRsp;
            _fnOnErrRtnQuoteAction_Holder = OnErrRtnQuoteAction;
            _fnOnErrRtnQuoteInsert_Holder = OnErrRtnQuoteInsert;
            _fnOnRspQuoteAction_Holder = OnRspQuoteAction;
            _fnOnRspQuoteInsert_Holder = OnRspQuoteInsert;
            _fnOnRtnQuote_Holder = OnRtnQuote;
        }
コード例 #2
0
        private void InitCallbacks()
        {
            //由于回调函数可能被GC回收,所以用成员变量将回调函数保存下来
            _fnOnConnect_Holder                        = OnConnect;
            _fnOnDisconnect_Holder                     = OnDisconnect;
            _fnOnErrRtnOrderAction_Holder              = OnErrRtnOrderAction;
            _fnOnErrRtnOrderInsert_Holder              = OnErrRtnOrderInsert;
            _fnOnRspError_Holder                       = OnRspError;
            _fnOnRspOrderAction_Holder                 = OnRspOrderAction;
            _fnOnRspOrderInsert_Holder                 = OnRspOrderInsert;
            _fnOnRspQryDepthMarketData_Holder          = OnRspQryDepthMarketData;
            _fnOnRspQryInstrument_Holder               = OnRspQryInstrument;
            _fnOnRspQryInstrumentCommissionRate_Holder = OnRspQryInstrumentCommissionRate;
            _fnOnRspQryInvestorPosition_Holder         = OnRspQryInvestorPosition;
            _fnOnRspQryTradingAccount_Holder           = OnRspQryTradingAccount;
            _fnOnRtnInstrumentStatus_Holder            = OnRtnInstrumentStatus;
            _fnOnRtnDepthMarketData_Holder             = OnRtnDepthMarketData;
            _fnOnRtnOrder_Holder                       = OnRtnOrder;
            _fnOnRtnTrade_Holder                       = OnRtnTrade;

#if CTP
            _fnOnRspQryInstrumentMarginRate_Holder = OnRspQryInstrumentMarginRate;
#endif

            _fnOnRtnForQuoteRsp_Holder    = OnRtnForQuoteRsp;
            _fnOnErrRtnQuoteAction_Holder = OnErrRtnQuoteAction;
            _fnOnErrRtnQuoteInsert_Holder = OnErrRtnQuoteInsert;
            _fnOnRspQuoteAction_Holder    = OnRspQuoteAction;
            _fnOnRspQuoteInsert_Holder    = OnRspQuoteInsert;
            _fnOnRtnQuote_Holder          = OnRtnQuote;
        }
コード例 #3
0
 private void InitCallbacks()
 {
     //由于回调函数可能被GC回收,所以用成员变量将回调函数保存下来
     _fnOnConnect_Holder                = OnConnect;
     _fnOnDisconnect_Holder             = OnDisconnect;
     _fnOnErrRtnOrderAction_Holder      = OnErrRtnOrderAction;
     _fnOnErrRtnOrderInsert_Holder      = OnErrRtnOrderInsert;
     _fnOnRspError_Holder               = OnRspError;
     _fnOnRspOrderAction_Holder         = OnRspOrderAction;
     _fnOnRspOrderInsert_Holder         = OnRspOrderInsert;
     _fnOnRspQryInstrument_Holder       = OnRspQryInstrument;
     _fnOnRspQryInvestorPosition_Holder = OnRspQryInvestorPosition;
     _fnOnRspQryTradingAccount_Holder   = OnRspQryTradingAccount;
     _fnOnRtnDepthMarketData_Holder     = OnRtnDepthMarketData;
     _fnOnRtnOrder_Holder               = OnRtnOrder;
     _fnOnRtnTrade_Holder               = OnRtnTrade;
 }
コード例 #4
0
ファイル: TraderApiWrapper.cs プロジェクト: cz242/CTPZQ
 public TraderApiWrapper()
 {
     _fnOnConnect_Holder = OnConnect_callback;
     _fnOnDisconnect_Holder = OnDisconnect_callback;
     _fnOnErrRtnOrderAction_Holder = OnErrRtnOrderAction_callback;
     _fnOnErrRtnOrderInsert_Holder = OnErrRtnOrderInsert_callback;
     _fnOnRspError_Holder = OnRspError_callback;
     _fnOnRspOrderAction_Holder = OnRspOrderAction_callback;
     _fnOnRspOrderInsert_Holder = OnRspOrderInsert_callback;
     _fnOnRspQryDepthMarketData_Holder = OnRspQryDepthMarketData_callback;
     _fnOnRspQryInstrument_Holder = OnRspQryInstrument_callback;
     _fnOnRspQryInstrumentCommissionRate_Holder = OnRspQryInstrumentCommissionRate_callback;
     //_fnOnRspQryInstrumentMarginRate_Holder = OnRspQryInstrumentMarginRate_callback;
     _fnOnRspQryInvestorPosition_Holder = OnRspQryInvestorPosition_callback;
     _fnOnRspQryInvestorPositionDetail_Holder = OnRspQryInvestorPositionDetail_callback;
     _fnOnRspQryOrder_Holder = OnRspQryOrder_callback;
     _fnOnRspQryTrade_Holder = OnRspQryTrade_callback;
     _fnOnRspQryTradingAccount_Holder = OnRspQryTradingAccount_callback;
     _fnOnRtnOrder_Holder = OnRtnOrder_callback;
     _fnOnRtnTrade_Holder = OnRtnTrade_callback;
 }
コード例 #5
0
ファイル: TraderApiWrapper.cs プロジェクト: quantumyang/CTP
 public TraderApiWrapper()
 {
     _fnOnConnect_Holder                        = OnConnect_callback;
     _fnOnDisconnect_Holder                     = OnDisconnect_callback;
     _fnOnErrRtnOrderAction_Holder              = OnErrRtnOrderAction_callback;
     _fnOnErrRtnOrderInsert_Holder              = OnErrRtnOrderInsert_callback;
     _fnOnRspError_Holder                       = OnRspError_callback;
     _fnOnRspOrderAction_Holder                 = OnRspOrderAction_callback;
     _fnOnRspOrderInsert_Holder                 = OnRspOrderInsert_callback;
     _fnOnRspQryDepthMarketData_Holder          = OnRspQryDepthMarketData_callback;
     _fnOnRspQryInstrument_Holder               = OnRspQryInstrument_callback;
     _fnOnRspQryInstrumentCommissionRate_Holder = OnRspQryInstrumentCommissionRate_callback;
     _fnOnRspQryInstrumentMarginRate_Holder     = OnRspQryInstrumentMarginRate_callback;
     _fnOnRspQryInvestorPosition_Holder         = OnRspQryInvestorPosition_callback;
     _fnOnRspQryInvestorPositionDetail_Holder   = OnRspQryInvestorPositionDetail_callback;
     _fnOnRspQryOrder_Holder                    = OnRspQryOrder_callback;
     _fnOnRspQryTrade_Holder                    = OnRspQryTrade_callback;
     _fnOnRspQryTradingAccount_Holder           = OnRspQryTradingAccount_callback;
     _fnOnRtnInstrumentStatus_Holder            = OnRtnInstrumentStatus_callback;
     _fnOnRtnOrder_Holder                       = OnRtnOrder_callback;
     _fnOnRtnTrade_Holder                       = OnRtnTrade_callback;
 }
コード例 #6
0
ファイル: TraderApi.cs プロジェクト: HeiLine/CTP
 public static extern void CTP_RegOnRspQryInvestorPosition(IntPtr pMsgQueue, fnOnRspQryInvestorPosition pCallback);
コード例 #7
0
ファイル: QBProvider.CTP.cs プロジェクト: fouvy/OpenQuant
 private void InitCallbacks()
 {
     //由于回调函数可能被GC回收,所以用成员变量将回调函数保存下来
     _fnOnConnect_Holder = OnConnect;
     _fnOnDisconnect_Holder = OnDisconnect;
     _fnOnErrRtnOrderAction_Holder = OnErrRtnOrderAction;
     _fnOnErrRtnOrderInsert_Holder = OnErrRtnOrderInsert;
     _fnOnRspError_Holder = OnRspError;
     _fnOnRspOrderAction_Holder = OnRspOrderAction;
     _fnOnRspOrderInsert_Holder = OnRspOrderInsert;
     _fnOnRspQryInstrument_Holder = OnRspQryInstrument;
     _fnOnRspQryInvestorPosition_Holder = OnRspQryInvestorPosition;
     _fnOnRspQryTradingAccount_Holder = OnRspQryTradingAccount;
     _fnOnRtnDepthMarketData_Holder = OnRtnDepthMarketData;
     _fnOnRtnOrder_Holder = OnRtnOrder;
     _fnOnRtnTrade_Holder = OnRtnTrade;
 }
コード例 #8
0
 public static extern void CTP_RegOnRspQryInvestorPosition(IntPtr pMsgQueue, fnOnRspQryInvestorPosition pCallback);
コード例 #9
0
 public static extern void CTP_RegOnRspQryInvestorPosition(fnOnRspQryInvestorPosition pCallback);