public void CTP_RegMD() { MdApi.CTP_RegOnRtnDepthMarketData_Tick(OnRtnDepthMarketData_Tick_2); MdApi.CTP_RegOnRtnDepthMarketData_KLine(OnRtnDepthMarketData_KLine_2); MdApi.CTP_RegOnHistory_Tick(OnHistoryTick_2); MdApi.CTP_RegOnHistory_KLine(OnHistoryKLine_2); MdApi.CTP_RegMDOnConnect(OnConnect_2); MdApi.CTP_RegMDOnDisconnect(OnDisconnect_2); MdApi.CTP_RegMDOnRspError(OnRspError_2); }
static void Main(string[] args) { MdApi.CTP_ReadConfigFile("F:\\CTP-MATLAB\\bin\\ConfigFile.xml"); MdApi.CTP_RegMDOnConnect(OnConnect); MdApi.CTP_RegOnRtnDepthMarketData_Tick(OnRtnDepthMarketData_Tick); MdApi.MD_Connect(); TdApi.TD_Connect(); while (true) { } }