Skip to content

Commit

Permalink
更新:CTP6.5.1解决合约巨多的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertwu1976 committed Jan 15, 2021
1 parent 1d91a9d commit 0c900b1
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18,020 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,5 @@ dll*/
.idea*/
/generate/data_type.py
/requirements.txt
.vscode*/
.vscode*/
/.vs
18 changes: 2 additions & 16 deletions cs_ctp/ctp.sln
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2035
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ctp_test", "ctp_test\ctp_test.csproj", "{B33BC960-4EB1-46BB-BA96-9CD21F962456}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proxy", "proxy\Proxy.csproj", "{EC96CF69-CBA4-4620-B7C4-204001025151}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProxyTest", "proxy_test\ProxyTest.csproj", "{38924468-F70E-4490-8AB9-3D357762CF7C}"
Expand All @@ -19,18 +17,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Debug|x64.ActiveCfg = Debug|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Debug|x64.Build.0 = Debug|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Debug|x86.ActiveCfg = Debug|x86
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Debug|x86.Build.0 = Debug|x86
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Release|Any CPU.Build.0 = Release|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Release|x64.ActiveCfg = Release|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Release|x64.Build.0 = Release|Any CPU
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Release|x86.ActiveCfg = Release|x86
{B33BC960-4EB1-46BB-BA96-9CD21F962456}.Release|x86.Build.0 = Release|x86
{EC96CF69-CBA4-4620-B7C4-204001025151}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC96CF69-CBA4-4620-B7C4-204001025151}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC96CF69-CBA4-4620-B7C4-204001025151}.Debug|x64.ActiveCfg = Debug|x64
Expand Down
11 changes: 10 additions & 1 deletion cs_ctp/proxy/CTPTrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ void SetCallBack()
_t.SetOnRspSettlementInfoConfirm((DeleOnRspSettlementInfoConfirm)AddDele(new DeleOnRspSettlementInfoConfirm(CTPOnRspSettlementInfoConfirm)));
_t.SetOnFrontDisconnected((DeleOnFrontDisconnected)AddDele(new DeleOnFrontDisconnected(CTPOnFrontDisconnected)));
_t.SetOnRspQryInstrument((DeleOnRspQryInstrument)AddDele(new DeleOnRspQryInstrument(CTPOnRspQryInstrument)));
_t.SetOnRspQryClassifiedInstrument((DeleOnRspQryClassifiedInstrument)AddDele(new DeleOnRspQryClassifiedInstrument(CTPOnRspQryClassifiedInstrument)));
_t.SetOnRspQryInvestorPosition((DeleOnRspQryInvestorPosition)AddDele(new DeleOnRspQryInvestorPosition(CTPOnRspQryInvestorPosition)));
_t.SetOnRspQryTradingAccount((DeleOnRspQryTradingAccount)AddDele(new DeleOnRspQryTradingAccount(CTPOnRspQryTradingAccount)));
_t.SetOnRspOrderInsert((DeleOnRspOrderInsert)AddDele(new DeleOnRspOrderInsert(CTPOnRspOrderInsert)));
Expand Down Expand Up @@ -174,7 +175,10 @@ private void CTPOnRspUserLogin(ref CThostFtdcRspUserLoginField pRspUserLogin, re

private void CTPOnRspSettlementInfoConfirm(ref CThostFtdcSettlementInfoConfirmField pSettlementInfoConfirm, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast)
{
_t.ReqQryInstrument();
if (this.Broker == "9999")
_t.ReqQryInstrument();
else
_t.ReqQryClassifiedInstrument();
}

private void CTPOnRtnInstrumentStatus(ref CThostFtdcInstrumentStatusField pInstrumentStatus)
Expand All @@ -199,6 +203,11 @@ private void CTPOnRtnInstrumentStatus(ref CThostFtdcInstrumentStatusField pInstr
}
}

private void CTPOnRspQryClassifiedInstrument(ref CThostFtdcInstrumentField pInstrument, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast)
{
CTPOnRspQryInstrument(ref pInstrument,ref pRspInfo, nRequestID, bIsLast);
}

private void CTPOnRspQryInstrument(ref CThostFtdcInstrumentField pInstrument, ref CThostFtdcRspInfoField pRspInfo, int nRequestID, bool bIsLast)
{
var field = new InstrumentField
Expand Down
Binary file modified cs_ctp/proxy/Resources/lib64.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions ctp_c/quote.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#ifdef WIN32
#define WINAPI __cdecl
#include "../v6.5.1/ThostFtdcMdApi.h"
#pragma comment(lib, "../v6.5.1/thostmduserapi_se.lib")
#pragma comment(lib, "../v6.5.1/win/thostmduserapi_se.lib")
#else
#define WINAPI __stdcall
#include "../v6.5.1/ThostFtdcMdApi.h"
#pragma comment(lib, "../v6.5.1/thostmduserapi_se.lib")
#pragma comment(lib, "../v6.5.1/win/thostmduserapi_se.lib")
#endif
#else
#define WINAPI
Expand Down
4 changes: 2 additions & 2 deletions ctp_c/trade.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#ifdef WIN32
#define WINAPI __cdecl
#include "../v6.5.1/ThostFtdcTraderApi.h"
#pragma comment(lib, "../v6.5.1/thosttraderapi_se.lib")
#pragma comment(lib, "../v6.5.1/win/thosttraderapi_se.lib")
#else
#define WINAPI __stdcall
#include "../v6.5.1/ThostFtdcTraderApi.h"
#pragma comment(lib, "../v6.5.1/thosttraderapi_se.lib")
#pragma comment(lib, "../v6.5.1/win/thosttraderapi_se.lib")
#endif
#else
#define WINAPI
Expand Down
Binary file modified py_ctp/lib64/ctp_quote.dll
Binary file not shown.
Binary file modified py_ctp/lib64/ctp_trade.dll
Binary file not shown.
Binary file modified py_ctp/lib64/thostmduserapi_se.dll
Binary file not shown.
Binary file modified py_ctp/lib64/thosttraderapi_se.dll
Binary file not shown.
168 changes: 0 additions & 168 deletions v6.5.1/win/ThostFtdcMdApi.h

This file was deleted.

Loading

0 comments on commit 0c900b1

Please sign in to comment.