change sec2sopt
This commit is contained in:
parent
e93362a2c0
commit
75147ffb80
@ -1,3 +0,0 @@
|
|||||||
from .vnsecmd import MdApi
|
|
||||||
from .vnsectd import TdApi
|
|
||||||
from .sec_constant import *
|
|
@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 15
|
|
||||||
VisualStudioVersion = 15.0.28307.757
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vnsecmd", "vnsecmd\vnsecmd.vcxproj", "{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vnsectd", "vnsectd\vnsectd.vcxproj", "{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Debug|x86 = Debug|x86
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
Release|x86 = Release|x86
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Release|x64.Build.0 = Release|x64
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}.Release|x86.Build.0 = Release|Win32
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Release|x64.Build.0 = Release|x64
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}.Release|x86.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {3391089F-B3B3-4C35-80D0-C1EF17244F21}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
3
vnpy/api/sopt/__init__.py
Normal file
3
vnpy/api/sopt/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from .vnsoptmd import MdApi
|
||||||
|
from .vnsopttd import TdApi
|
||||||
|
from .sopt_constant import *
|
41
vnpy/api/sopt/vnsopt/vnsopt.sln
Normal file
41
vnpy/api/sopt/vnsopt/vnsopt.sln
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28307.757
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vnsoptmd", "vnsoptmd\vnsoptmd.vcxproj", "{C2D4F5C9-D5EC-4823-93AF-7275E840E579}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vnsopttd", "vnsopttd\vnsopttd.vcxproj", "{059048EC-18DC-4B7E-8A41-E2450619519F}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Release|x64.Build.0 = Release|x64
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{C2D4F5C9-D5EC-4823-93AF-7275E840E579}.Release|x86.Build.0 = Release|Win32
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Release|x64.Build.0 = Release|x64
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{059048EC-18DC-4B7E-8A41-E2450619519F}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {CF87C672-384E-4403-B8DE-7D354FB339C0}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
@ -1,5 +1,5 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "vnsecmd.h"
|
#include "vnsoptmd.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
/////////////原生回调接口生成task
|
/////////////原生回调接口生成task
|
||||||
@ -793,7 +793,7 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
PYBIND11_MODULE(vnsecmd, m)
|
PYBIND11_MODULE(vnsoptmd, m)
|
||||||
{
|
{
|
||||||
class_<MdApi, PyMdApi> mdapi(m, "MdApi", module_local());
|
class_<MdApi, PyMdApi> mdapi(m, "MdApi", module_local());
|
||||||
mdapi
|
mdapi
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "ThostFtdcMdApi.h"
|
#include "ThostFtdcMdApi.h"
|
||||||
#include "pybind11.h"
|
#include "pybind11.h"
|
||||||
#include "vnsec.h"
|
#include "vnsopt.h"
|
||||||
using namespace pybind11;
|
using namespace pybind11;
|
||||||
|
|
||||||
class MdApi :public CThostFtdcMdSpi
|
class MdApi :public CThostFtdcMdSpi
|
@ -20,9 +20,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
<VCProjectVersion>15.0</VCProjectVersion>
|
||||||
<ProjectGuid>{3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A}</ProjectGuid>
|
<ProjectGuid>{C2D4F5C9-D5EC-4823-93AF-7275E840E579}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>vnsecmd</RootNamespace>
|
<RootNamespace>vnsoptmd</RootNamespace>
|
||||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
@ -73,22 +73,22 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@ -165,7 +165,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="targetver.h" />
|
<ClInclude Include="targetver.h" />
|
||||||
<ClInclude Include="vnsecmd.h" />
|
<ClInclude Include="vnsoptmd.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="dllmain.cpp" />
|
<ClCompile Include="dllmain.cpp" />
|
||||||
@ -175,7 +175,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="vnsecmd.cpp" />
|
<ClCompile Include="vnsoptmd.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
@ -21,7 +21,7 @@
|
|||||||
<ClInclude Include="targetver.h">
|
<ClInclude Include="targetver.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="vnsecmd.h">
|
<ClInclude Include="vnsoptmd.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="vnsecmd.cpp">
|
<ClCompile Include="vnsoptmd.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
@ -1,5 +1,5 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "vnsectd.h"
|
#include "vnsopttd.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
/////////////原生回调接口生成task
|
/////////////原生回调接口生成task
|
||||||
@ -11686,7 +11686,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
PYBIND11_MODULE(vnsectd, m)
|
PYBIND11_MODULE(vnsopttd, m)
|
||||||
{
|
{
|
||||||
class_<TdApi, PyTdApi> tdapi(m, "TdApi", module_local());
|
class_<TdApi, PyTdApi> tdapi(m, "TdApi", module_local());
|
||||||
tdapi
|
tdapi
|
||||||
@ -11698,8 +11698,8 @@ PYBIND11_MODULE(vnsectd, m)
|
|||||||
.def("exit", &TdApi::exit)
|
.def("exit", &TdApi::exit)
|
||||||
.def("getTradingDay", &TdApi::getTradingDay)
|
.def("getTradingDay", &TdApi::getTradingDay)
|
||||||
.def("registerFront", &TdApi::registerFront)
|
.def("registerFront", &TdApi::registerFront)
|
||||||
.def("subscribePublicTopic",&TdApi::subscribePublicTopic)
|
.def("subscribePublicTopic", &TdApi::subscribePublicTopic)
|
||||||
.def("subscribePrivateTopic",&TdApi::subscribePrivateTopic)
|
.def("subscribePrivateTopic", &TdApi::subscribePrivateTopic)
|
||||||
.def("reqAuthenticate", &TdApi::reqAuthenticate)
|
.def("reqAuthenticate", &TdApi::reqAuthenticate)
|
||||||
.def("reqUserLogin", &TdApi::reqUserLogin)
|
.def("reqUserLogin", &TdApi::reqUserLogin)
|
||||||
.def("reqUserLogout", &TdApi::reqUserLogout)
|
.def("reqUserLogout", &TdApi::reqUserLogout)
|
@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
#include "ThostFtdcTraderApi.h"
|
#include "ThostFtdcTraderApi.h"
|
||||||
#include "pybind11.h"
|
#include "pybind11.h"
|
||||||
#include "vnsec.h"
|
#include "vnsopt.h"
|
||||||
|
|
||||||
using namespace pybind11;
|
using namespace pybind11;
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//////////原生SPI回调函数
|
//////////原生SPI回调函数
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
virtual void OnFrontConnected() ;
|
virtual void OnFrontConnected();
|
||||||
|
|
||||||
///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。
|
///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。
|
||||||
///@param nReason 错误原因
|
///@param nReason 错误原因
|
||||||
@ -166,393 +166,393 @@ public:
|
|||||||
/// 0x2001 接收心跳超时
|
/// 0x2001 接收心跳超时
|
||||||
/// 0x2002 发送心跳失败
|
/// 0x2002 发送心跳失败
|
||||||
/// 0x2003 收到错误报文
|
/// 0x2003 收到错误报文
|
||||||
virtual void OnFrontDisconnected(int nReason) ;
|
virtual void OnFrontDisconnected(int nReason);
|
||||||
|
|
||||||
///心跳超时警告。当长时间未收到报文时,该方法被调用。
|
///心跳超时警告。当长时间未收到报文时,该方法被调用。
|
||||||
///@param nTimeLapse 距离上次接收报文的时间
|
///@param nTimeLapse 距离上次接收报文的时间
|
||||||
virtual void OnHeartBeatWarning(int nTimeLapse) ;
|
virtual void OnHeartBeatWarning(int nTimeLapse);
|
||||||
|
|
||||||
///客户端认证响应
|
///客户端认证响应
|
||||||
virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
|
|
||||||
///登录请求响应
|
///登录请求响应
|
||||||
virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///登出请求响应
|
///登出请求响应
|
||||||
virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///用户口令更新请求响应
|
///用户口令更新请求响应
|
||||||
virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///资金账户口令更新请求响应
|
///资金账户口令更新请求响应
|
||||||
virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///报单录入请求响应
|
///报单录入请求响应
|
||||||
virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///预埋单录入请求响应
|
///预埋单录入请求响应
|
||||||
virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///预埋撤单录入请求响应
|
///预埋撤单录入请求响应
|
||||||
virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///报单操作请求响应
|
///报单操作请求响应
|
||||||
virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///查询最大报单数量响应
|
///查询最大报单数量响应
|
||||||
virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///投资者结算结果确认响应
|
///投资者结算结果确认响应
|
||||||
virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///删除预埋单响应
|
///删除预埋单响应
|
||||||
virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///删除预埋撤单响应
|
///删除预埋撤单响应
|
||||||
virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///执行宣告录入请求响应
|
///执行宣告录入请求响应
|
||||||
virtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///执行宣告操作请求响应
|
///执行宣告操作请求响应
|
||||||
virtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspExecOrderAction(CThostFtdcInputExecOrderActionField *pInputExecOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///询价录入请求响应
|
///询价录入请求响应
|
||||||
virtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///报价录入请求响应
|
///报价录入请求响应
|
||||||
virtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///报价操作请求响应
|
///报价操作请求响应
|
||||||
virtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQuoteAction(CThostFtdcInputQuoteActionField *pInputQuoteAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///锁定应答
|
///锁定应答
|
||||||
virtual void OnRspLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///批量报单操作请求响应
|
///批量报单操作请求响应
|
||||||
virtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspBatchOrderAction(CThostFtdcInputBatchOrderActionField *pInputBatchOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///申请组合录入请求响应
|
///申请组合录入请求响应
|
||||||
virtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询报单响应
|
///请求查询报单响应
|
||||||
virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询成交响应
|
///请求查询成交响应
|
||||||
virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者持仓响应
|
///请求查询投资者持仓响应
|
||||||
virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询资金账户响应
|
///请求查询资金账户响应
|
||||||
virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者响应
|
///请求查询投资者响应
|
||||||
virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询交易编码响应
|
///请求查询交易编码响应
|
||||||
virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询合约保证金率响应
|
///请求查询合约保证金率响应
|
||||||
virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询合约手续费率响应
|
///请求查询合约手续费率响应
|
||||||
virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询交易所响应
|
///请求查询交易所响应
|
||||||
virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询产品响应
|
///请求查询产品响应
|
||||||
virtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryProduct(CThostFtdcProductField *pProduct, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询合约响应
|
///请求查询合约响应
|
||||||
virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询行情响应
|
///请求查询行情响应
|
||||||
virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者结算结果响应
|
///请求查询投资者结算结果响应
|
||||||
virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询转帐银行响应
|
///请求查询转帐银行响应
|
||||||
virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者持仓明细响应
|
///请求查询投资者持仓明细响应
|
||||||
virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询客户通知响应
|
///请求查询客户通知响应
|
||||||
virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询结算信息确认响应
|
///请求查询结算信息确认响应
|
||||||
virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者持仓明细响应
|
///请求查询投资者持仓明细响应
|
||||||
virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///查询保证金监管系统经纪公司资金账户密钥响应
|
///查询保证金监管系统经纪公司资金账户密钥响应
|
||||||
virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询仓单折抵信息响应
|
///请求查询仓单折抵信息响应
|
||||||
virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者品种/跨品种保证金响应
|
///请求查询投资者品种/跨品种保证金响应
|
||||||
virtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询交易所保证金率响应
|
///请求查询交易所保证金率响应
|
||||||
virtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExchangeMarginRate(CThostFtdcExchangeMarginRateField *pExchangeMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询交易所调整保证金率响应
|
///请求查询交易所调整保证金率响应
|
||||||
virtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询汇率响应
|
///请求查询汇率响应
|
||||||
virtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExchangeRate(CThostFtdcExchangeRateField *pExchangeRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询二级代理操作员银期权限响应
|
///请求查询二级代理操作员银期权限响应
|
||||||
virtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQrySecAgentACIDMap(CThostFtdcSecAgentACIDMapField *pSecAgentACIDMap, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询产品报价汇率
|
///请求查询产品报价汇率
|
||||||
virtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryProductExchRate(CThostFtdcProductExchRateField *pProductExchRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询产品组
|
///请求查询产品组
|
||||||
virtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryProductGroup(CThostFtdcProductGroupField *pProductGroup, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询做市商合约手续费率响应
|
///请求查询做市商合约手续费率响应
|
||||||
virtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryMMInstrumentCommissionRate(CThostFtdcMMInstrumentCommissionRateField *pMMInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询做市商期权合约手续费响应
|
///请求查询做市商期权合约手续费响应
|
||||||
virtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryMMOptionInstrCommRate(CThostFtdcMMOptionInstrCommRateField *pMMOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询报单手续费响应
|
///请求查询报单手续费响应
|
||||||
virtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInstrumentOrderCommRate(CThostFtdcInstrumentOrderCommRateField *pInstrumentOrderCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询期权交易成本响应
|
///请求查询期权交易成本响应
|
||||||
virtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryOptionInstrTradeCost(CThostFtdcOptionInstrTradeCostField *pOptionInstrTradeCost, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询期权合约手续费响应
|
///请求查询期权合约手续费响应
|
||||||
virtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryOptionInstrCommRate(CThostFtdcOptionInstrCommRateField *pOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询执行宣告响应
|
///请求查询执行宣告响应
|
||||||
virtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExecOrder(CThostFtdcExecOrderField *pExecOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询询价响应
|
///请求查询询价响应
|
||||||
virtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryForQuote(CThostFtdcForQuoteField *pForQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询报价响应
|
///请求查询报价响应
|
||||||
virtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryQuote(CThostFtdcQuoteField *pQuote, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询锁定应答
|
///请求查询锁定应答
|
||||||
virtual void OnRspQryLock(CThostFtdcLockField *pLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryLock(CThostFtdcLockField *pLock, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询锁定证券仓位应答
|
///请求查询锁定证券仓位应答
|
||||||
virtual void OnRspQryLockPosition(CThostFtdcLockPositionField *pLockPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryLockPosition(CThostFtdcLockPositionField *pLockPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询ETF期权合约手续费响应
|
///请求查询ETF期权合约手续费响应
|
||||||
virtual void OnRspQryETFOptionInstrCommRate(CThostFtdcETFOptionInstrCommRateField *pETFOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryETFOptionInstrCommRate(CThostFtdcETFOptionInstrCommRateField *pETFOptionInstrCommRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询投资者分级
|
///请求查询投资者分级
|
||||||
virtual void OnRspQryInvestorLevel(CThostFtdcInvestorLevelField *pInvestorLevel, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryInvestorLevel(CThostFtdcInvestorLevelField *pInvestorLevel, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询E+1日行权冻结响应
|
///请求查询E+1日行权冻结响应
|
||||||
virtual void OnRspQryExecFreeze(CThostFtdcExecFreezeField *pExecFreeze, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExecFreeze(CThostFtdcExecFreezeField *pExecFreeze, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询组合合约安全系数响应
|
///请求查询组合合约安全系数响应
|
||||||
virtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryCombInstrumentGuard(CThostFtdcCombInstrumentGuardField *pCombInstrumentGuard, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询申请组合响应
|
///请求查询申请组合响应
|
||||||
virtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryCombAction(CThostFtdcCombActionField *pCombAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询转帐流水响应
|
///请求查询转帐流水响应
|
||||||
virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询银期签约关系响应
|
///请求查询银期签约关系响应
|
||||||
virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///错误应答
|
///错误应答
|
||||||
virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///报单通知
|
///报单通知
|
||||||
virtual void OnRtnOrder(CThostFtdcOrderField *pOrder) ;
|
virtual void OnRtnOrder(CThostFtdcOrderField *pOrder);
|
||||||
|
|
||||||
///成交通知
|
///成交通知
|
||||||
virtual void OnRtnTrade(CThostFtdcTradeField *pTrade) ;
|
virtual void OnRtnTrade(CThostFtdcTradeField *pTrade);
|
||||||
|
|
||||||
///报单录入错误回报
|
///报单录入错误回报
|
||||||
virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///报单操作错误回报
|
///报单操作错误回报
|
||||||
virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///合约交易状态通知
|
///合约交易状态通知
|
||||||
virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) ;
|
virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus);
|
||||||
|
|
||||||
///交易所公告通知
|
///交易所公告通知
|
||||||
virtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin) ;
|
virtual void OnRtnBulletin(CThostFtdcBulletinField *pBulletin);
|
||||||
|
|
||||||
///交易通知
|
///交易通知
|
||||||
virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) ;
|
virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo);
|
||||||
|
|
||||||
///提示条件单校验错误
|
///提示条件单校验错误
|
||||||
virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) ;
|
virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder);
|
||||||
|
|
||||||
///执行宣告通知
|
///执行宣告通知
|
||||||
virtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder) ;
|
virtual void OnRtnExecOrder(CThostFtdcExecOrderField *pExecOrder);
|
||||||
|
|
||||||
///执行宣告录入错误回报
|
///执行宣告录入错误回报
|
||||||
virtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnExecOrderInsert(CThostFtdcInputExecOrderField *pInputExecOrder, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///执行宣告操作错误回报
|
///执行宣告操作错误回报
|
||||||
virtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnExecOrderAction(CThostFtdcExecOrderActionField *pExecOrderAction, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///询价录入错误回报
|
///询价录入错误回报
|
||||||
virtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnForQuoteInsert(CThostFtdcInputForQuoteField *pInputForQuote, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///报价通知
|
///报价通知
|
||||||
virtual void OnRtnQuote(CThostFtdcQuoteField *pQuote) ;
|
virtual void OnRtnQuote(CThostFtdcQuoteField *pQuote);
|
||||||
|
|
||||||
///报价录入错误回报
|
///报价录入错误回报
|
||||||
virtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnQuoteInsert(CThostFtdcInputQuoteField *pInputQuote, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///报价操作错误回报
|
///报价操作错误回报
|
||||||
virtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnQuoteAction(CThostFtdcQuoteActionField *pQuoteAction, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///询价通知
|
///询价通知
|
||||||
virtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp) ;
|
virtual void OnRtnForQuoteRsp(CThostFtdcForQuoteRspField *pForQuoteRsp);
|
||||||
|
|
||||||
///保证金监控中心用户令牌
|
///保证金监控中心用户令牌
|
||||||
virtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken) ;
|
virtual void OnRtnCFMMCTradingAccountToken(CThostFtdcCFMMCTradingAccountTokenField *pCFMMCTradingAccountToken);
|
||||||
|
|
||||||
///锁定通知
|
///锁定通知
|
||||||
virtual void OnRtnLock(CThostFtdcLockField *pLock) ;
|
virtual void OnRtnLock(CThostFtdcLockField *pLock);
|
||||||
|
|
||||||
///锁定错误通知
|
///锁定错误通知
|
||||||
virtual void OnErrRtnLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnLockInsert(CThostFtdcInputLockField *pInputLock, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///批量报单操作错误回报
|
///批量报单操作错误回报
|
||||||
virtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnBatchOrderAction(CThostFtdcBatchOrderActionField *pBatchOrderAction, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///申请组合通知
|
///申请组合通知
|
||||||
virtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction) ;
|
virtual void OnRtnCombAction(CThostFtdcCombActionField *pCombAction);
|
||||||
|
|
||||||
///申请组合录入错误回报
|
///申请组合录入错误回报
|
||||||
virtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnCombActionInsert(CThostFtdcInputCombActionField *pInputCombAction, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///请求查询签约银行响应
|
///请求查询签约银行响应
|
||||||
virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询预埋单响应
|
///请求查询预埋单响应
|
||||||
virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询预埋撤单响应
|
///请求查询预埋撤单响应
|
||||||
virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询交易通知响应
|
///请求查询交易通知响应
|
||||||
virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询经纪公司交易参数响应
|
///请求查询经纪公司交易参数响应
|
||||||
virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询经纪公司交易算法响应
|
///请求查询经纪公司交易算法响应
|
||||||
virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询监控中心用户令牌
|
///请求查询监控中心用户令牌
|
||||||
virtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQueryCFMMCTradingAccountToken(CThostFtdcQueryCFMMCTradingAccountTokenField *pQueryCFMMCTradingAccountToken, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///银行发起银行资金转期货通知
|
///银行发起银行资金转期货通知
|
||||||
virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) ;
|
virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer);
|
||||||
|
|
||||||
///银行发起期货资金转银行通知
|
///银行发起期货资金转银行通知
|
||||||
virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) ;
|
virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer);
|
||||||
|
|
||||||
///银行发起冲正银行转期货通知
|
///银行发起冲正银行转期货通知
|
||||||
virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) ;
|
virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal);
|
||||||
|
|
||||||
///银行发起冲正期货转银行通知
|
///银行发起冲正期货转银行通知
|
||||||
virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) ;
|
virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal);
|
||||||
|
|
||||||
///期货发起银行资金转期货通知
|
///期货发起银行资金转期货通知
|
||||||
virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) ;
|
virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer);
|
||||||
|
|
||||||
///期货发起期货资金转银行通知
|
///期货发起期货资金转银行通知
|
||||||
virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) ;
|
virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer);
|
||||||
|
|
||||||
///系统运行时期货端手工发起冲正银行转期货请求,银行处理完毕后报盘发回的通知
|
///系统运行时期货端手工发起冲正银行转期货请求,银行处理完毕后报盘发回的通知
|
||||||
virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) ;
|
virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal);
|
||||||
|
|
||||||
///系统运行时期货端手工发起冲正期货转银行请求,银行处理完毕后报盘发回的通知
|
///系统运行时期货端手工发起冲正期货转银行请求,银行处理完毕后报盘发回的通知
|
||||||
virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) ;
|
virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal);
|
||||||
|
|
||||||
///期货发起查询银行余额通知
|
///期货发起查询银行余额通知
|
||||||
virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) ;
|
virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount);
|
||||||
|
|
||||||
///期货发起银行资金转期货错误回报
|
///期货发起银行资金转期货错误回报
|
||||||
virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///期货发起期货资金转银行错误回报
|
///期货发起期货资金转银行错误回报
|
||||||
virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///系统运行时期货端手工发起冲正银行转期货错误回报
|
///系统运行时期货端手工发起冲正银行转期货错误回报
|
||||||
virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///系统运行时期货端手工发起冲正期货转银行错误回报
|
///系统运行时期货端手工发起冲正期货转银行错误回报
|
||||||
virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///期货发起查询银行余额错误回报
|
///期货发起查询银行余额错误回报
|
||||||
virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///期货发起冲正银行转期货请求,银行处理完毕后报盘发回的通知
|
///期货发起冲正银行转期货请求,银行处理完毕后报盘发回的通知
|
||||||
virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) ;
|
virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal);
|
||||||
|
|
||||||
///期货发起冲正期货转银行请求,银行处理完毕后报盘发回的通知
|
///期货发起冲正期货转银行请求,银行处理完毕后报盘发回的通知
|
||||||
virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) ;
|
virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal);
|
||||||
|
|
||||||
///期货发起银行资金转期货应答
|
///期货发起银行资金转期货应答
|
||||||
virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///期货发起期货资金转银行应答
|
///期货发起期货资金转银行应答
|
||||||
virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///期货发起查询银行余额应答
|
///期货发起查询银行余额应答
|
||||||
virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///银行发起银期开户通知
|
///银行发起银期开户通知
|
||||||
virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) ;
|
virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount);
|
||||||
|
|
||||||
///银行发起银期销户通知
|
///银行发起银期销户通知
|
||||||
virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) ;
|
virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount);
|
||||||
|
|
||||||
///银行发起变更银行账号通知
|
///银行发起变更银行账号通知
|
||||||
virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) ;
|
virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount);
|
||||||
|
|
||||||
///银行发起第三方存管业务开户确认通知
|
///银行发起第三方存管业务开户确认通知
|
||||||
virtual void OnRtnResOpenAccConfirmTpdByBank(CThostFtdcResOpenAccConfirmTpdField *pResOpenAccConfirmTpd) ;
|
virtual void OnRtnResOpenAccConfirmTpdByBank(CThostFtdcResOpenAccConfirmTpdField *pResOpenAccConfirmTpd);
|
||||||
|
|
||||||
///期货发起第三方存管业务开户预指定应答
|
///期货发起第三方存管业务开户预指定应答
|
||||||
virtual void OnRspReserveOpenAccountTpdByFuture(CThostFtdcReqReserveOpenAccountTpdField *pReqReserveOpenAccountTpd, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspReserveOpenAccountTpdByFuture(CThostFtdcReqReserveOpenAccountTpdField *pReqReserveOpenAccountTpd, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///期货发起第三方存管证券资金结息应答
|
///期货发起第三方存管证券资金结息应答
|
||||||
virtual void OnRspSecuritiesDepositInterestByFuture(CThostFtdcReqSecuritiesDepositInterestField *pReqSecuritiesDepositInterest, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspSecuritiesDepositInterestByFuture(CThostFtdcReqSecuritiesDepositInterestField *pReqSecuritiesDepositInterest, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///期货发起日终文件就绪应答
|
///期货发起日终文件就绪应答
|
||||||
virtual void OnRspDayEndFileReadyByFuture(CThostFtdcReqDayEndFileReadyField *pReqDayEndFileReady, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspDayEndFileReadyByFuture(CThostFtdcReqDayEndFileReadyField *pReqDayEndFileReady, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///行权指令合并录入请求响应
|
///行权指令合并录入请求响应
|
||||||
virtual void OnRspExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///行权指令合并操作请求响应
|
///行权指令合并操作请求响应
|
||||||
virtual void OnRspExecCombineOrderAction(CThostFtdcInputExecCombineOrderActionField *pInputExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspExecCombineOrderAction(CThostFtdcInputExecCombineOrderActionField *pInputExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///请求查询行权指令合并响应
|
///请求查询行权指令合并响应
|
||||||
virtual void OnRspQryExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) ;
|
virtual void OnRspQryExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast);
|
||||||
|
|
||||||
///行权指令合并操作错误回报
|
///行权指令合并操作错误回报
|
||||||
virtual void OnErrRtnExecCombineOrderAction(CThostFtdcExecCombineOrderActionField *pExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnExecCombineOrderAction(CThostFtdcExecCombineOrderActionField *pExecCombineOrderAction, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///行权指令合并录入错误回报
|
///行权指令合并录入错误回报
|
||||||
virtual void OnErrRtnExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo) ;
|
virtual void OnErrRtnExecCombineOrderInsert(CThostFtdcInputExecCombineOrderField *pInputExecCombineOrder, CThostFtdcRspInfoField *pRspInfo);
|
||||||
|
|
||||||
///行权指令合并通知
|
///行权指令合并通知
|
||||||
virtual void OnRtnExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder) ;
|
virtual void OnRtnExecCombineOrder(CThostFtdcExecCombineOrderField *pExecCombineOrder);
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//////////python封装的回调函数
|
//////////python封装的回调函数
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
@ -20,9 +20,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
<VCProjectVersion>15.0</VCProjectVersion>
|
||||||
<ProjectGuid>{4A6E7B14-A7CB-488E-BE1B-86E1A438E67D}</ProjectGuid>
|
<ProjectGuid>{059048EC-18DC-4B7E-8A41-E2450619519F}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>vnsectd</RootNamespace>
|
<RootNamespace>vnsopttd</RootNamespace>
|
||||||
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
@ -73,22 +73,22 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<TargetExt>.pyd</TargetExt>
|
<TargetExt>.pyd</TargetExt>
|
||||||
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
<IncludePath>$(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@ -165,7 +165,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="targetver.h" />
|
<ClInclude Include="targetver.h" />
|
||||||
<ClInclude Include="vnsectd.h" />
|
<ClInclude Include="vnsopttd.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="dllmain.cpp" />
|
<ClCompile Include="dllmain.cpp" />
|
||||||
@ -175,7 +175,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="vnsectd.cpp" />
|
<ClCompile Include="vnsopttd.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
@ -21,7 +21,7 @@
|
|||||||
<ClInclude Include="targetver.h">
|
<ClInclude Include="targetver.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="vnsectd.h">
|
<ClInclude Include="vnsopttd.h">
|
||||||
<Filter>头文件</Filter>
|
<Filter>头文件</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="vnsectd.cpp">
|
<ClCompile Include="vnsopttd.cpp">
|
||||||
<Filter>源文件</Filter>
|
<Filter>源文件</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
from .sec_gateway import SecGateway
|
|
1
vnpy/gateway/sopt/__init__.py
Normal file
1
vnpy/gateway/sopt/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from .sopt_gateway import SoptGateway
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from vnpy.api.sec import (
|
from vnpy.api.sopt import (
|
||||||
MdApi,
|
MdApi,
|
||||||
TdApi,
|
TdApi,
|
||||||
THOST_FTDC_OAS_Submitted,
|
THOST_FTDC_OAS_Submitted,
|
||||||
@ -62,7 +62,7 @@ from vnpy.trader.utility import get_folder_path
|
|||||||
from vnpy.trader.event import EVENT_TIMER
|
from vnpy.trader.event import EVENT_TIMER
|
||||||
|
|
||||||
|
|
||||||
STATUS_SEC2VT = {
|
STATUS_SOPT2VT = {
|
||||||
THOST_FTDC_OAS_Submitted: Status.SUBMITTING,
|
THOST_FTDC_OAS_Submitted: Status.SUBMITTING,
|
||||||
THOST_FTDC_OAS_Accepted: Status.SUBMITTING,
|
THOST_FTDC_OAS_Accepted: Status.SUBMITTING,
|
||||||
THOST_FTDC_OAS_Rejected: Status.REJECTED,
|
THOST_FTDC_OAS_Rejected: Status.REJECTED,
|
||||||
@ -72,40 +72,40 @@ STATUS_SEC2VT = {
|
|||||||
THOST_FTDC_OST_Canceled: Status.CANCELLED
|
THOST_FTDC_OST_Canceled: Status.CANCELLED
|
||||||
}
|
}
|
||||||
|
|
||||||
DIRECTION_VT2SEC = {
|
DIRECTION_VT2SOPT = {
|
||||||
Direction.LONG: THOST_FTDC_D_Buy,
|
Direction.LONG: THOST_FTDC_D_Buy,
|
||||||
Direction.SHORT: THOST_FTDC_D_Sell
|
Direction.SHORT: THOST_FTDC_D_Sell
|
||||||
}
|
}
|
||||||
DIRECTION_SEC2VT = {v: k for k, v in DIRECTION_VT2SEC.items()}
|
DIRECTION_SOPT2VT = {v: k for k, v in DIRECTION_VT2SOPT.items()}
|
||||||
DIRECTION_SEC2VT[THOST_FTDC_PD_Long] = Direction.LONG
|
DIRECTION_SOPT2VT[THOST_FTDC_PD_Long] = Direction.LONG
|
||||||
DIRECTION_SEC2VT[THOST_FTDC_PD_Short] = Direction.SHORT
|
DIRECTION_SOPT2VT[THOST_FTDC_PD_Short] = Direction.SHORT
|
||||||
|
|
||||||
ORDERTYPE_VT2SEC = {
|
ORDERTYPE_VT2SOPT = {
|
||||||
OrderType.LIMIT: THOST_FTDC_OPT_LimitPrice,
|
OrderType.LIMIT: THOST_FTDC_OPT_LimitPrice,
|
||||||
OrderType.MARKET: THOST_FTDC_OPT_AnyPrice
|
OrderType.MARKET: THOST_FTDC_OPT_AnyPrice
|
||||||
}
|
}
|
||||||
ORDERTYPE_SEC2VT = {v: k for k, v in ORDERTYPE_VT2SEC.items()}
|
ORDERTYPE_SOPT2VT = {v: k for k, v in ORDERTYPE_VT2SOPT.items()}
|
||||||
|
|
||||||
OFFSET_VT2SEC = {
|
OFFSET_VT2SOPT = {
|
||||||
Offset.OPEN: THOST_FTDC_OF_Open,
|
Offset.OPEN: THOST_FTDC_OF_Open,
|
||||||
Offset.CLOSE: THOST_FTDC_OFEN_Close,
|
Offset.CLOSE: THOST_FTDC_OFEN_Close,
|
||||||
Offset.CLOSETODAY: THOST_FTDC_OFEN_CloseToday,
|
Offset.CLOSETODAY: THOST_FTDC_OFEN_CloseToday,
|
||||||
Offset.CLOSEYESTERDAY: THOST_FTDC_OFEN_CloseYesterday,
|
Offset.CLOSEYESTERDAY: THOST_FTDC_OFEN_CloseYesterday,
|
||||||
}
|
}
|
||||||
OFFSET_SEC2VT = {v: k for k, v in OFFSET_VT2SEC.items()}
|
OFFSET_SOPT2VT = {v: k for k, v in OFFSET_VT2SOPT.items()}
|
||||||
|
|
||||||
EXCHANGE_SEC2VT = {
|
EXCHANGE_SOPT2VT = {
|
||||||
"SZSE": Exchange.SZSE,
|
"SZSE": Exchange.SZSE,
|
||||||
"SSE": Exchange.SSE
|
"SSE": Exchange.SSE
|
||||||
}
|
}
|
||||||
|
|
||||||
PRODUCT_SEC2VT = {
|
PRODUCT_SOPT2VT = {
|
||||||
THOST_FTDC_PC_Stock: Product.EQUITY,
|
THOST_FTDC_PC_Stock: Product.EQUITY,
|
||||||
THOST_FTDC_PC_ETFOption: Product.OPTION,
|
THOST_FTDC_PC_ETFOption: Product.OPTION,
|
||||||
THOST_FTDC_PC_Combination: Product.SPREAD
|
THOST_FTDC_PC_Combination: Product.SPREAD
|
||||||
}
|
}
|
||||||
|
|
||||||
OPTIONTYPE_SEC2VT = {
|
OPTIONTYPE_SOPT2VT = {
|
||||||
THOST_FTDC_CP_CallOptions: OptionType.CALL,
|
THOST_FTDC_CP_CallOptions: OptionType.CALL,
|
||||||
THOST_FTDC_CP_PutOptions: OptionType.PUT
|
THOST_FTDC_CP_PutOptions: OptionType.PUT
|
||||||
}
|
}
|
||||||
@ -116,9 +116,9 @@ symbol_name_map = {}
|
|||||||
symbol_size_map = {}
|
symbol_size_map = {}
|
||||||
|
|
||||||
|
|
||||||
class SecGateway(BaseGateway):
|
class SoptGateway(BaseGateway):
|
||||||
"""
|
"""
|
||||||
VN Trader Gateway for SEC .
|
VN Trader Gateway for SOPT .
|
||||||
"""
|
"""
|
||||||
|
|
||||||
default_setting = {
|
default_setting = {
|
||||||
@ -132,14 +132,14 @@ class SecGateway(BaseGateway):
|
|||||||
"产品信息": ""
|
"产品信息": ""
|
||||||
}
|
}
|
||||||
|
|
||||||
exchanges = list(EXCHANGE_SEC2VT.values())
|
exchanges = list(EXCHANGE_SOPT2VT.values())
|
||||||
|
|
||||||
def __init__(self, event_engine):
|
def __init__(self, event_engine):
|
||||||
"""Constructor"""
|
"""Constructor"""
|
||||||
super().__init__(event_engine, "SEC")
|
super().__init__(event_engine, "SOPT")
|
||||||
|
|
||||||
self.td_api = SecTdApi(self)
|
self.td_api = SoptTdApi(self)
|
||||||
self.md_api = SecMdApi(self)
|
self.md_api = SoptMdApi(self)
|
||||||
|
|
||||||
def connect(self, setting: dict):
|
def connect(self, setting: dict):
|
||||||
""""""
|
""""""
|
||||||
@ -212,12 +212,12 @@ class SecGateway(BaseGateway):
|
|||||||
self.event_engine.register(EVENT_TIMER, self.process_timer_event)
|
self.event_engine.register(EVENT_TIMER, self.process_timer_event)
|
||||||
|
|
||||||
|
|
||||||
class SecMdApi(MdApi):
|
class SoptMdApi(MdApi):
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
def __init__(self, gateway):
|
def __init__(self, gateway):
|
||||||
"""Constructor"""
|
"""Constructor"""
|
||||||
super(SecMdApi, self).__init__()
|
super(SoptMdApi, self).__init__()
|
||||||
|
|
||||||
self.gateway = gateway
|
self.gateway = gateway
|
||||||
self.gateway_name = gateway.gateway_name
|
self.gateway_name = gateway.gateway_name
|
||||||
@ -352,12 +352,12 @@ class SecMdApi(MdApi):
|
|||||||
self.exit()
|
self.exit()
|
||||||
|
|
||||||
|
|
||||||
class SecTdApi(TdApi):
|
class SoptTdApi(TdApi):
|
||||||
""""""
|
""""""
|
||||||
|
|
||||||
def __init__(self, gateway):
|
def __init__(self, gateway):
|
||||||
"""Constructor"""
|
"""Constructor"""
|
||||||
super(SecTdApi, self).__init__()
|
super(SoptTdApi, self).__init__()
|
||||||
|
|
||||||
self.test = []
|
self.test = []
|
||||||
|
|
||||||
@ -442,8 +442,8 @@ class SecTdApi(TdApi):
|
|||||||
symbol=symbol,
|
symbol=symbol,
|
||||||
exchange=exchange,
|
exchange=exchange,
|
||||||
orderid=orderid,
|
orderid=orderid,
|
||||||
direction=DIRECTION_SEC2VT[data["Direction"]],
|
direction=DIRECTION_SOPT2VT[data["Direction"]],
|
||||||
offset=OFFSET_SEC2VT[data["CombOffsetFlag"]],
|
offset=OFFSET_SOPT2VT[data["CombOffsetFlag"]],
|
||||||
price=data["LimitPrice"],
|
price=data["LimitPrice"],
|
||||||
volume=data["VolumeTotalOriginal"],
|
volume=data["VolumeTotalOriginal"],
|
||||||
status=Status.REJECTED,
|
status=Status.REJECTED,
|
||||||
@ -482,7 +482,7 @@ class SecTdApi(TdApi):
|
|||||||
position = PositionData(
|
position = PositionData(
|
||||||
symbol=data["InstrumentID"],
|
symbol=data["InstrumentID"],
|
||||||
exchange=symbol_exchange_map[data["InstrumentID"]],
|
exchange=symbol_exchange_map[data["InstrumentID"]],
|
||||||
direction=DIRECTION_SEC2VT[data["PosiDirection"]],
|
direction=DIRECTION_SOPT2VT[data["PosiDirection"]],
|
||||||
gateway_name=self.gateway_name
|
gateway_name=self.gateway_name
|
||||||
)
|
)
|
||||||
self.positions[key] = position
|
self.positions[key] = position
|
||||||
@ -538,12 +538,12 @@ class SecTdApi(TdApi):
|
|||||||
"""
|
"""
|
||||||
Callback of instrument query.
|
Callback of instrument query.
|
||||||
"""
|
"""
|
||||||
product = PRODUCT_SEC2VT.get(data["ProductClass"], None)
|
product = PRODUCT_SOPT2VT.get(data["ProductClass"], None)
|
||||||
|
|
||||||
if product:
|
if product:
|
||||||
contract = ContractData(
|
contract = ContractData(
|
||||||
symbol=data["InstrumentID"],
|
symbol=data["InstrumentID"],
|
||||||
exchange=EXCHANGE_SEC2VT[data["ExchangeID"]],
|
exchange=EXCHANGE_SOPT2VT[data["ExchangeID"]],
|
||||||
name=data["InstrumentName"],
|
name=data["InstrumentName"],
|
||||||
product=product,
|
product=product,
|
||||||
size=data["VolumeMultiple"],
|
size=data["VolumeMultiple"],
|
||||||
@ -554,7 +554,7 @@ class SecTdApi(TdApi):
|
|||||||
# For option only
|
# For option only
|
||||||
if contract.product == Product.OPTION:
|
if contract.product == Product.OPTION:
|
||||||
contract.option_underlying = data["UnderlyingInstrID"],
|
contract.option_underlying = data["UnderlyingInstrID"],
|
||||||
contract.option_type = OPTIONTYPE_SEC2VT.get(data["OptionsType"], None),
|
contract.option_type = OPTIONTYPE_SOPT2VT.get(data["OptionsType"], None),
|
||||||
contract.option_strike = data["StrikePrice"],
|
contract.option_strike = data["StrikePrice"],
|
||||||
contract.option_expiry = datetime.strptime(data["ExpireDate"], "%Y%m%d"),
|
contract.option_expiry = datetime.strptime(data["ExpireDate"], "%Y%m%d"),
|
||||||
|
|
||||||
@ -594,13 +594,13 @@ class SecTdApi(TdApi):
|
|||||||
symbol=symbol,
|
symbol=symbol,
|
||||||
exchange=exchange,
|
exchange=exchange,
|
||||||
orderid=orderid,
|
orderid=orderid,
|
||||||
type=ORDERTYPE_SEC2VT[data["OrderPriceType"]],
|
type=ORDERTYPE_SOPT2VT[data["OrderPriceType"]],
|
||||||
direction=DIRECTION_SEC2VT[data["Direction"]],
|
direction=DIRECTION_SOPT2VT[data["Direction"]],
|
||||||
offset=OFFSET_SEC2VT[data["CombOffsetFlag"]],
|
offset=OFFSET_SOPT2VT[data["CombOffsetFlag"]],
|
||||||
price=data["LimitPrice"],
|
price=data["LimitPrice"],
|
||||||
volume=data["VolumeTotalOriginal"],
|
volume=data["VolumeTotalOriginal"],
|
||||||
traded=data["VolumeTraded"],
|
traded=data["VolumeTraded"],
|
||||||
status=STATUS_SEC2VT[data["OrderStatus"]],
|
status=STATUS_SOPT2VT[data["OrderStatus"]],
|
||||||
time=data["InsertTime"],
|
time=data["InsertTime"],
|
||||||
gateway_name=self.gateway_name
|
gateway_name=self.gateway_name
|
||||||
)
|
)
|
||||||
@ -625,8 +625,8 @@ class SecTdApi(TdApi):
|
|||||||
exchange=exchange,
|
exchange=exchange,
|
||||||
orderid=orderid,
|
orderid=orderid,
|
||||||
tradeid=data["TradeID"],
|
tradeid=data["TradeID"],
|
||||||
direction=DIRECTION_SEC2VT[data["Direction"]],
|
direction=DIRECTION_SOPT2VT[data["Direction"]],
|
||||||
offset=OFFSET_SEC2VT[data["OffsetFlag"]],
|
offset=OFFSET_SOPT2VT[data["OffsetFlag"]],
|
||||||
price=data["Price"],
|
price=data["Price"],
|
||||||
volume=data["Volume"],
|
volume=data["Volume"],
|
||||||
time=data["TradeTime"],
|
time=data["TradeTime"],
|
||||||
@ -711,14 +711,14 @@ class SecTdApi(TdApi):
|
|||||||
"""
|
"""
|
||||||
self.order_ref += 1
|
self.order_ref += 1
|
||||||
|
|
||||||
sec_req = {
|
sopt_req = {
|
||||||
"InstrumentID": req.symbol,
|
"InstrumentID": req.symbol,
|
||||||
"ExchangeID": req.exchange.value,
|
"ExchangeID": req.exchange.value,
|
||||||
"LimitPrice": req.price,
|
"LimitPrice": req.price,
|
||||||
"VolumeTotalOriginal": int(req.volume),
|
"VolumeTotalOriginal": int(req.volume),
|
||||||
"OrderPriceType": ORDERTYPE_VT2SEC.get(req.type, ""),
|
"OrderPriceType": ORDERTYPE_VT2SOPT.get(req.type, ""),
|
||||||
"Direction": DIRECTION_VT2SEC.get(req.direction, ""),
|
"Direction": DIRECTION_VT2SOPT.get(req.direction, ""),
|
||||||
"CombOffsetFlag": OFFSET_VT2SEC.get(req.offset, ""),
|
"CombOffsetFlag": OFFSET_VT2SOPT.get(req.offset, ""),
|
||||||
"OrderRef": str(self.order_ref),
|
"OrderRef": str(self.order_ref),
|
||||||
"InvestorID": self.userid,
|
"InvestorID": self.userid,
|
||||||
"UserID": self.userid,
|
"UserID": self.userid,
|
||||||
@ -733,16 +733,16 @@ class SecTdApi(TdApi):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if req.type == OrderType.FAK:
|
if req.type == OrderType.FAK:
|
||||||
sec_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice
|
sopt_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice
|
||||||
sec_req["TimeCondition"] = THOST_FTDC_TC_IOC
|
sopt_req["TimeCondition"] = THOST_FTDC_TC_IOC
|
||||||
sec_req["VolumeCondition"] = THOST_FTDC_VC_AV
|
sopt_req["VolumeCondition"] = THOST_FTDC_VC_AV
|
||||||
elif req.type == OrderType.FOK:
|
elif req.type == OrderType.FOK:
|
||||||
sec_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice
|
sopt_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice
|
||||||
sec_req["TimeCondition"] = THOST_FTDC_TC_IOC
|
sopt_req["TimeCondition"] = THOST_FTDC_TC_IOC
|
||||||
sec_req["VolumeCondition"] = THOST_FTDC_VC_CV
|
sopt_req["VolumeCondition"] = THOST_FTDC_VC_CV
|
||||||
|
|
||||||
self.reqid += 1
|
self.reqid += 1
|
||||||
self.reqOrderInsert(sec_req, self.reqid)
|
self.reqOrderInsert(sopt_req, self.reqid)
|
||||||
|
|
||||||
orderid = f"{self.frontid}_{self.sessionid}_{self.order_ref}"
|
orderid = f"{self.frontid}_{self.sessionid}_{self.order_ref}"
|
||||||
order = req.create_order_data(orderid, self.gateway_name)
|
order = req.create_order_data(orderid, self.gateway_name)
|
||||||
@ -756,7 +756,7 @@ class SecTdApi(TdApi):
|
|||||||
"""
|
"""
|
||||||
frontid, sessionid, order_ref = req.orderid.split("_")
|
frontid, sessionid, order_ref = req.orderid.split("_")
|
||||||
|
|
||||||
sec_req = {
|
sopt_req = {
|
||||||
"InstrumentID": req.symbol,
|
"InstrumentID": req.symbol,
|
||||||
"Exchange": req.exchange,
|
"Exchange": req.exchange,
|
||||||
"OrderRef": order_ref,
|
"OrderRef": order_ref,
|
||||||
@ -768,7 +768,7 @@ class SecTdApi(TdApi):
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.reqid += 1
|
self.reqid += 1
|
||||||
self.reqOrderAction(sec_req, self.reqid)
|
self.reqOrderAction(sopt_req, self.reqid)
|
||||||
|
|
||||||
def query_account(self):
|
def query_account(self):
|
||||||
"""
|
"""
|
Loading…
Reference in New Issue
Block a user