• 大小: 16.7MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-01
  • 语言: 其他
  • 标签: 期货证券  

资源简介

唤梦科技提供的访问期货和证券公司底层接口的api和demo,

资源截图

代码片段和文件信息

#include “stdafx.h“
#include “ctest.h“
#include 

void CTraderSpi::OnFrontConnected()
{
LOG(“\n“);
LOG(“
\n“);
};

void CTraderSpi::OnFrontDisconnected(int nReason)
{
LOG(“\n“);
LOG(“\tnReason [%d]\n“ nReason);
LOG(“
\n“);
}

void CTraderSpi::OnHeartBeatWarning(int nTimeLapse)
{
LOG(“\n“);
LOG(“\tnTimeLapse [%d]\n“ nTimeLapse);
LOG(“
\n“);
}

void CTraderSpi::OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField CThostFtdcRspInfoField *pRspInfo int nRequestID bool bIsLast)
{
LOG(“\n“);
if (pRspAuthenticateField)
{
LOG(“\tBrokerID [%s]\n“ pRspAuthenticateField->BrokerID);
LOG(“\tUserID [%s]\n“ pRspAuthenticateField->UserID);
LOG(“\tUserProductInfo [%s]\n“ pRspAuthenticateField->UserProductInfo);
}
if (pRspInfo)
{
LOG(“\tErrorMsg [%s]\n“ pRspInfo->ErrorMsg);
LOG(“\tErrorID [%d]\n“ pRspInfo->ErrorID);
}
LOG(“\tnRequestID [%d]\n“ nRequestID);
LOG(“\tbIsLast [%d]\n“ bIsLast);
LOG(“
\n“);
};

void CTraderSpi::OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin CThostFtdcRspInfoField *pRspInfo int nRequestID bool bIsLast)
{
LOG(“\n“);
if (pRspUserLogin)
{
LOG(“\tTradingDay [%s]\n“ pRspUserLogin->TradingDay);
LOG(“\tLoginTime [%s]\n“ pRspUserLogin->LoginTime);
LOG(“\tBrokerID [%s]\n“ pRspUserLogin->BrokerID);
LOG(“\tUserID [%s]\n“ pRspUserLogin->UserID);
LOG(“\tSystemName [%s]\n“ pRspUserLogin->SystemName);
LOG(“\tMaxOrderRef [%s]\n“ pRspUserLogin->MaxOrderRef);
LOG(“\tSHFETime [%s]\n“ pRspUserLogin->SHFETime);
LOG(“\tDCETime [%s]\n“ pRspUserLogin->DCETime);
LOG(“\tCZCETime [%s]\n“ pRspUserLogin->CZCETime);
LOG(“\tFFEXTime [%s]\n“ pRspUserLogin->FFEXTime);
LOG(“\tINETime [%s]\n“ pRspUserLogin->INETime);
LOG(“\tFrontID [%d]\n“ pRspUserLogin->FrontID);
LOG(“\tSessionID [%d]\n“ pRspUserLogin->SessionID);
}
if (pRspInfo)
{
LOG(“\tErrorMsg [%s]\n“ pRspInfo->ErrorMsg);
LOG(“\tErrorID [%d]\n“ pRspInfo->ErrorID);
}
LOG(“\tnRequestID [%d]\n“ nRequestID);
LOG(“\tbIsLast [%d]\n“ bIsLast);
LOG(“
\n“);
};

void CTraderSpi::OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout CThostFtdcRspInfoField *pRspInfo int nRequestID bool bIsLast)
{
LOG(“\n“);
if (pUserLogout)
{
LOG(“\tBrokerID [%s]\n“ pUserLogout->BrokerID);
LOG(“\tUserID [%s]\n“ pUserLogout->UserID);
}
if (pRspInfo)
{
LOG(“\tErrorMsg [%s]\n“ pRspInfo->ErrorMsg);
LOG(“\tErrorID [%d]\n“ pRspInfo->ErrorID);
}
LOG(“\tnRequestID [%d]\n“ nRequestID);
LOG(“\tbIsLast [%d]\n“ bIsLast);
LOG(“
\n“);
};

void CTraderSpi::OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate CThostFtdcRspInfoField *pRspInfo int nRequestID bool bIs

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     54784  2019-01-15 11:36  CTP-mini\api_demo_6.3.11\.vs\demo程序\v14\.suo

     文件       1330  2018-06-08 15:17  CTP-mini\api_demo_6.3.11\demo程序.sln

     文件   31956992  2019-01-15 11:36  CTP-mini\api_demo_6.3.11\demo程序.VC.db

     文件    3407872  2019-01-15 11:05  CTP-mini\api_demo_6.3.11\ipch\TEST20170321报单-c6ca6564\测试程序-863c2764.ipch

     文件        232  2018-08-17 02:33  CTP-mini\api_demo_6.3.11\test20170321报单\config - 副本.ini

     文件        223  2019-01-14 16:51  CTP-mini\api_demo_6.3.11\test20170321报单\config.ini

     文件     221750  2018-08-02 09:32  CTP-mini\api_demo_6.3.11\test20170321报单\ctest.cpp

     文件      20463  2018-08-02 09:50  CTP-mini\api_demo_6.3.11\test20170321报单\ctest.h

     文件        168  2018-05-11 13:19  CTP-mini\api_demo_6.3.11\test20170321报单\define.h

     文件          6  2019-01-14 17:10  CTP-mini\api_demo_6.3.11\test20170321报单\DialogRsp.con

     文件       1385  2018-08-02 13:40  CTP-mini\api_demo_6.3.11\test20170321报单\getconfig.cpp

     文件        108  2018-08-02 13:43  CTP-mini\api_demo_6.3.11\test20170321报单\getconfig.h

     文件      14209  2018-08-02 09:59  CTP-mini\api_demo_6.3.11\test20170321报单\main.cpp

     文件      65758  2018-08-17 02:33  CTP-mini\api_demo_6.3.11\test20170321报单\main.h

     文件          6  2019-01-14 14:15  CTP-mini\api_demo_6.3.11\test20170321报单\Private.con

     文件          6  2019-01-14 14:15  CTP-mini\api_demo_6.3.11\test20170321报单\Public.con

     文件          6  2019-01-14 17:10  CTP-mini\api_demo_6.3.11\test20170321报单\QueryRsp.con

     文件        220  2017-03-21 14:51  CTP-mini\api_demo_6.3.11\test20170321报单\stdafx.cpp

     文件        230  2017-04-24 17:56  CTP-mini\api_demo_6.3.11\test20170321报单\stdafx.h

     文件    2685829  2019-01-14 17:10  CTP-mini\api_demo_6.3.11\test20170321报单\syslog.txt

     文件        240  2017-03-21 14:51  CTP-mini\api_demo_6.3.11\test20170321报单\targetver.h

     文件       8772  2018-08-02 09:38  CTP-mini\api_demo_6.3.11\test20170321报单\test20170321报单.vcxproj

     文件       2755  2018-08-02 09:16  CTP-mini\api_demo_6.3.11\test20170321报单\test20170321报单.vcxproj.filters

     文件        165  2017-08-22 09:33  CTP-mini\api_demo_6.3.11\test20170321报单\test20170321报单.vcxproj.user

     文件       5560  2018-01-09 15:07  CTP-mini\api_demo_6.3.11\test20170321报单\ThostFtdcMdApi.h

     文件      34436  2018-01-09 15:05  CTP-mini\api_demo_6.3.11\test20170321报单\ThostFtdcTraderApi.h

     文件     248505  2018-01-09 15:07  CTP-mini\api_demo_6.3.11\test20170321报单\ThostFtdcUserApiDataType.h

     文件     231072  2018-01-09 15:07  CTP-mini\api_demo_6.3.11\test20170321报单\ThostFtdcUserApiStruct.h

     文件    1067520  2018-01-09 15:08  CTP-mini\api_demo_6.3.11\test20170321报单\thostmduserapi.dll

     文件       3768  2018-01-09 15:08  CTP-mini\api_demo_6.3.11\test20170321报单\thostmduserapi.lib

............此处省略100个文件信息

评论

共有 条评论

相关资源