diff --git a/vnpy/api/sec/__init__.py b/vnpy/api/sec/__init__.py deleted file mode 100644 index ca651b72..00000000 --- a/vnpy/api/sec/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .vnsecmd import MdApi -from .vnsectd import TdApi -from .sec_constant import * diff --git a/vnpy/api/sec/vnsec/vnsec.sln b/vnpy/api/sec/vnsec/vnsec.sln deleted file mode 100644 index b43a5b3d..00000000 --- a/vnpy/api/sec/vnsec/vnsec.sln +++ /dev/null @@ -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 diff --git a/vnpy/api/sopt/__init__.py b/vnpy/api/sopt/__init__.py new file mode 100644 index 00000000..9358b5ae --- /dev/null +++ b/vnpy/api/sopt/__init__.py @@ -0,0 +1,3 @@ +from .vnsoptmd import MdApi +from .vnsopttd import TdApi +from .sopt_constant import * diff --git a/vnpy/api/sec/generator/generate_api_functions.py b/vnpy/api/sopt/generator/generate_api_functions.py similarity index 100% rename from vnpy/api/sec/generator/generate_api_functions.py rename to vnpy/api/sopt/generator/generate_api_functions.py diff --git a/vnpy/api/sec/generator/generate_data_type.py b/vnpy/api/sopt/generator/generate_data_type.py similarity index 100% rename from vnpy/api/sec/generator/generate_data_type.py rename to vnpy/api/sopt/generator/generate_data_type.py diff --git a/vnpy/api/sec/generator/generate_struct.py b/vnpy/api/sopt/generator/generate_struct.py similarity index 100% rename from vnpy/api/sec/generator/generate_struct.py rename to vnpy/api/sopt/generator/generate_struct.py diff --git a/vnpy/api/sec/include/pybind11/attr.h b/vnpy/api/sopt/include/pybind11/attr.h similarity index 100% rename from vnpy/api/sec/include/pybind11/attr.h rename to vnpy/api/sopt/include/pybind11/attr.h diff --git a/vnpy/api/sec/include/pybind11/buffer_info.h b/vnpy/api/sopt/include/pybind11/buffer_info.h similarity index 100% rename from vnpy/api/sec/include/pybind11/buffer_info.h rename to vnpy/api/sopt/include/pybind11/buffer_info.h diff --git a/vnpy/api/sec/include/pybind11/cast.h b/vnpy/api/sopt/include/pybind11/cast.h similarity index 100% rename from vnpy/api/sec/include/pybind11/cast.h rename to vnpy/api/sopt/include/pybind11/cast.h diff --git a/vnpy/api/sec/include/pybind11/chrono.h b/vnpy/api/sopt/include/pybind11/chrono.h similarity index 100% rename from vnpy/api/sec/include/pybind11/chrono.h rename to vnpy/api/sopt/include/pybind11/chrono.h diff --git a/vnpy/api/sec/include/pybind11/common.h b/vnpy/api/sopt/include/pybind11/common.h similarity index 100% rename from vnpy/api/sec/include/pybind11/common.h rename to vnpy/api/sopt/include/pybind11/common.h diff --git a/vnpy/api/sec/include/pybind11/complex.h b/vnpy/api/sopt/include/pybind11/complex.h similarity index 100% rename from vnpy/api/sec/include/pybind11/complex.h rename to vnpy/api/sopt/include/pybind11/complex.h diff --git a/vnpy/api/sec/include/pybind11/detail/class.h b/vnpy/api/sopt/include/pybind11/detail/class.h similarity index 100% rename from vnpy/api/sec/include/pybind11/detail/class.h rename to vnpy/api/sopt/include/pybind11/detail/class.h diff --git a/vnpy/api/sec/include/pybind11/detail/common.h b/vnpy/api/sopt/include/pybind11/detail/common.h similarity index 100% rename from vnpy/api/sec/include/pybind11/detail/common.h rename to vnpy/api/sopt/include/pybind11/detail/common.h diff --git a/vnpy/api/sec/include/pybind11/detail/descr.h b/vnpy/api/sopt/include/pybind11/detail/descr.h similarity index 100% rename from vnpy/api/sec/include/pybind11/detail/descr.h rename to vnpy/api/sopt/include/pybind11/detail/descr.h diff --git a/vnpy/api/sec/include/pybind11/detail/init.h b/vnpy/api/sopt/include/pybind11/detail/init.h similarity index 100% rename from vnpy/api/sec/include/pybind11/detail/init.h rename to vnpy/api/sopt/include/pybind11/detail/init.h diff --git a/vnpy/api/sec/include/pybind11/detail/internals.h b/vnpy/api/sopt/include/pybind11/detail/internals.h similarity index 100% rename from vnpy/api/sec/include/pybind11/detail/internals.h rename to vnpy/api/sopt/include/pybind11/detail/internals.h diff --git a/vnpy/api/sec/include/pybind11/detail/typeid.h b/vnpy/api/sopt/include/pybind11/detail/typeid.h similarity index 100% rename from vnpy/api/sec/include/pybind11/detail/typeid.h rename to vnpy/api/sopt/include/pybind11/detail/typeid.h diff --git a/vnpy/api/sec/include/pybind11/eigen.h b/vnpy/api/sopt/include/pybind11/eigen.h similarity index 100% rename from vnpy/api/sec/include/pybind11/eigen.h rename to vnpy/api/sopt/include/pybind11/eigen.h diff --git a/vnpy/api/sec/include/pybind11/embed.h b/vnpy/api/sopt/include/pybind11/embed.h similarity index 100% rename from vnpy/api/sec/include/pybind11/embed.h rename to vnpy/api/sopt/include/pybind11/embed.h diff --git a/vnpy/api/sec/include/pybind11/eval.h b/vnpy/api/sopt/include/pybind11/eval.h similarity index 100% rename from vnpy/api/sec/include/pybind11/eval.h rename to vnpy/api/sopt/include/pybind11/eval.h diff --git a/vnpy/api/sec/include/pybind11/functional.h b/vnpy/api/sopt/include/pybind11/functional.h similarity index 100% rename from vnpy/api/sec/include/pybind11/functional.h rename to vnpy/api/sopt/include/pybind11/functional.h diff --git a/vnpy/api/sec/include/pybind11/iostream.h b/vnpy/api/sopt/include/pybind11/iostream.h similarity index 100% rename from vnpy/api/sec/include/pybind11/iostream.h rename to vnpy/api/sopt/include/pybind11/iostream.h diff --git a/vnpy/api/sec/include/pybind11/numpy.h b/vnpy/api/sopt/include/pybind11/numpy.h similarity index 100% rename from vnpy/api/sec/include/pybind11/numpy.h rename to vnpy/api/sopt/include/pybind11/numpy.h diff --git a/vnpy/api/sec/include/pybind11/operators.h b/vnpy/api/sopt/include/pybind11/operators.h similarity index 100% rename from vnpy/api/sec/include/pybind11/operators.h rename to vnpy/api/sopt/include/pybind11/operators.h diff --git a/vnpy/api/sec/include/pybind11/options.h b/vnpy/api/sopt/include/pybind11/options.h similarity index 100% rename from vnpy/api/sec/include/pybind11/options.h rename to vnpy/api/sopt/include/pybind11/options.h diff --git a/vnpy/api/sec/include/pybind11/pybind11.h b/vnpy/api/sopt/include/pybind11/pybind11.h similarity index 100% rename from vnpy/api/sec/include/pybind11/pybind11.h rename to vnpy/api/sopt/include/pybind11/pybind11.h diff --git a/vnpy/api/sec/include/pybind11/pytypes.h b/vnpy/api/sopt/include/pybind11/pytypes.h similarity index 100% rename from vnpy/api/sec/include/pybind11/pytypes.h rename to vnpy/api/sopt/include/pybind11/pytypes.h diff --git a/vnpy/api/sec/include/pybind11/stl.h b/vnpy/api/sopt/include/pybind11/stl.h similarity index 100% rename from vnpy/api/sec/include/pybind11/stl.h rename to vnpy/api/sopt/include/pybind11/stl.h diff --git a/vnpy/api/sec/include/pybind11/stl_bind.h b/vnpy/api/sopt/include/pybind11/stl_bind.h similarity index 100% rename from vnpy/api/sec/include/pybind11/stl_bind.h rename to vnpy/api/sopt/include/pybind11/stl_bind.h diff --git a/vnpy/api/sec/include/Sec/ThostFtdcMdApi.h b/vnpy/api/sopt/include/sopt/ThostFtdcMdApi.h similarity index 100% rename from vnpy/api/sec/include/Sec/ThostFtdcMdApi.h rename to vnpy/api/sopt/include/sopt/ThostFtdcMdApi.h diff --git a/vnpy/api/sec/include/Sec/ThostFtdcTraderApi.h b/vnpy/api/sopt/include/sopt/ThostFtdcTraderApi.h similarity index 100% rename from vnpy/api/sec/include/Sec/ThostFtdcTraderApi.h rename to vnpy/api/sopt/include/sopt/ThostFtdcTraderApi.h diff --git a/vnpy/api/sec/include/Sec/ThostFtdcUserApiDataType.h b/vnpy/api/sopt/include/sopt/ThostFtdcUserApiDataType.h similarity index 100% rename from vnpy/api/sec/include/Sec/ThostFtdcUserApiDataType.h rename to vnpy/api/sopt/include/sopt/ThostFtdcUserApiDataType.h diff --git a/vnpy/api/sec/include/Sec/ThostFtdcUserApiStruct.h b/vnpy/api/sopt/include/sopt/ThostFtdcUserApiStruct.h similarity index 100% rename from vnpy/api/sec/include/Sec/ThostFtdcUserApiStruct.h rename to vnpy/api/sopt/include/sopt/ThostFtdcUserApiStruct.h diff --git a/vnpy/api/sec/libs/thostmduserapi_se.lib b/vnpy/api/sopt/libs/thostmduserapi_se.lib similarity index 100% rename from vnpy/api/sec/libs/thostmduserapi_se.lib rename to vnpy/api/sopt/libs/thostmduserapi_se.lib diff --git a/vnpy/api/sec/libs/thosttraderapi_se.lib b/vnpy/api/sopt/libs/thosttraderapi_se.lib similarity index 100% rename from vnpy/api/sec/libs/thosttraderapi_se.lib rename to vnpy/api/sopt/libs/thosttraderapi_se.lib diff --git a/vnpy/api/sec/sec_constant.py b/vnpy/api/sopt/sopt_constant.py similarity index 100% rename from vnpy/api/sec/sec_constant.py rename to vnpy/api/sopt/sopt_constant.py diff --git a/vnpy/api/sec/thostmduserapi_se.dll b/vnpy/api/sopt/thostmduserapi_se.dll similarity index 100% rename from vnpy/api/sec/thostmduserapi_se.dll rename to vnpy/api/sopt/thostmduserapi_se.dll diff --git a/vnpy/api/sec/thosttraderapi_se.dll b/vnpy/api/sopt/thosttraderapi_se.dll similarity index 100% rename from vnpy/api/sec/thosttraderapi_se.dll rename to vnpy/api/sopt/thosttraderapi_se.dll diff --git a/vnpy/api/sec/vnsec/vnsec.h b/vnpy/api/sopt/vnsopt/vnsopt.h similarity index 100% rename from vnpy/api/sec/vnsec/vnsec.h rename to vnpy/api/sopt/vnsopt/vnsopt.h diff --git a/vnpy/api/sopt/vnsopt/vnsopt.sln b/vnpy/api/sopt/vnsopt/vnsopt.sln new file mode 100644 index 00000000..12885285 --- /dev/null +++ b/vnpy/api/sopt/vnsopt/vnsopt.sln @@ -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 diff --git a/vnpy/api/sec/vnsec/vnsecmd/dllmain.cpp b/vnpy/api/sopt/vnsopt/vnsoptmd/dllmain.cpp similarity index 100% rename from vnpy/api/sec/vnsec/vnsecmd/dllmain.cpp rename to vnpy/api/sopt/vnsopt/vnsoptmd/dllmain.cpp diff --git a/vnpy/api/sec/vnsec/vnsecmd/stdafx.cpp b/vnpy/api/sopt/vnsopt/vnsoptmd/stdafx.cpp similarity index 100% rename from vnpy/api/sec/vnsec/vnsecmd/stdafx.cpp rename to vnpy/api/sopt/vnsopt/vnsoptmd/stdafx.cpp diff --git a/vnpy/api/sec/vnsec/vnsecmd/stdafx.h b/vnpy/api/sopt/vnsopt/vnsoptmd/stdafx.h similarity index 100% rename from vnpy/api/sec/vnsec/vnsecmd/stdafx.h rename to vnpy/api/sopt/vnsopt/vnsoptmd/stdafx.h diff --git a/vnpy/api/sec/vnsec/vnsecmd/targetver.h b/vnpy/api/sopt/vnsopt/vnsoptmd/targetver.h similarity index 100% rename from vnpy/api/sec/vnsec/vnsecmd/targetver.h rename to vnpy/api/sopt/vnsopt/vnsoptmd/targetver.h diff --git a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.cpp b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.cpp similarity index 99% rename from vnpy/api/sec/vnsec/vnsecmd/vnsecmd.cpp rename to vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.cpp index 2ccc5b83..766914c5 100644 --- a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.cpp +++ b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "vnsecmd.h" +#include "vnsoptmd.h" /////////////////////////////////////////////////////////////////////////// /////////////原生回调接口生成task @@ -793,7 +793,7 @@ public: }; }; -PYBIND11_MODULE(vnsecmd, m) +PYBIND11_MODULE(vnsoptmd, m) { class_ mdapi(m, "MdApi", module_local()); mdapi diff --git a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.h b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.h similarity index 99% rename from vnpy/api/sec/vnsec/vnsecmd/vnsecmd.h rename to vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.h index 37512cda..253d42e0 100644 --- a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.h +++ b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.h @@ -17,7 +17,7 @@ #include "ThostFtdcMdApi.h" #include "pybind11.h" -#include "vnsec.h" +#include "vnsopt.h" using namespace pybind11; class MdApi :public CThostFtdcMdSpi diff --git a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj similarity index 92% rename from vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj rename to vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj index 2fe231d8..d31b7bee 100644 --- a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj +++ b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj @@ -20,9 +20,9 @@ 15.0 - {3C13B49C-4A10-45A3-9FD5-4CB3A587EF8A} + {C2D4F5C9-D5EC-4823-93AF-7275E840E579} Win32Proj - vnsecmd + vnsoptmd 10.0.17763.0 @@ -73,22 +73,22 @@ true .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath) + C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath) true .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath) + C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath) false .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath) + C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath) false .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11\;C:\vnstudio\include;$(IncludePath) + C:\vnstudio\include;$(SolutionDir)..\include\sopt;$(SolutionDir);$(SolutionDir)..\include\pybind11\;$(IncludePath) @@ -165,7 +165,7 @@ - + @@ -175,7 +175,7 @@ Create Create - + diff --git a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj.filters b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj.filters similarity index 94% rename from vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj.filters rename to vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj.filters index f28e336a..50f9f452 100644 --- a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj.filters +++ b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj.filters @@ -21,7 +21,7 @@ 头文件 - + 头文件 @@ -29,7 +29,7 @@ 源文件 - + 源文件 diff --git a/vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj.user b/vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj.user similarity index 100% rename from vnpy/api/sec/vnsec/vnsecmd/vnsecmd.vcxproj.user rename to vnpy/api/sopt/vnsopt/vnsoptmd/vnsoptmd.vcxproj.user diff --git a/vnpy/api/sec/vnsec/vnsectd/dllmain.cpp b/vnpy/api/sopt/vnsopt/vnsopttd/dllmain.cpp similarity index 100% rename from vnpy/api/sec/vnsec/vnsectd/dllmain.cpp rename to vnpy/api/sopt/vnsopt/vnsopttd/dllmain.cpp diff --git a/vnpy/api/sec/vnsec/vnsectd/stdafx.cpp b/vnpy/api/sopt/vnsopt/vnsopttd/stdafx.cpp similarity index 100% rename from vnpy/api/sec/vnsec/vnsectd/stdafx.cpp rename to vnpy/api/sopt/vnsopt/vnsopttd/stdafx.cpp diff --git a/vnpy/api/sec/vnsec/vnsectd/stdafx.h b/vnpy/api/sopt/vnsopt/vnsopttd/stdafx.h similarity index 100% rename from vnpy/api/sec/vnsec/vnsectd/stdafx.h rename to vnpy/api/sopt/vnsopt/vnsopttd/stdafx.h diff --git a/vnpy/api/sec/vnsec/vnsectd/targetver.h b/vnpy/api/sopt/vnsopt/vnsopttd/targetver.h similarity index 100% rename from vnpy/api/sec/vnsec/vnsectd/targetver.h rename to vnpy/api/sopt/vnsopt/vnsopttd/targetver.h diff --git a/vnpy/api/sec/vnsec/vnsectd/vnsectd.cpp b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.cpp similarity index 99% rename from vnpy/api/sec/vnsec/vnsectd/vnsectd.cpp rename to vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.cpp index aab2e216..bdc7fd1d 100644 --- a/vnpy/api/sec/vnsec/vnsectd/vnsectd.cpp +++ b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#include "vnsectd.h" +#include "vnsopttd.h" /////////////////////////////////////////////////////////////////////////// /////////////原生回调接口生成task @@ -11686,7 +11686,7 @@ public: }; -PYBIND11_MODULE(vnsectd, m) +PYBIND11_MODULE(vnsopttd, m) { class_ tdapi(m, "TdApi", module_local()); tdapi @@ -11698,8 +11698,8 @@ PYBIND11_MODULE(vnsectd, m) .def("exit", &TdApi::exit) .def("getTradingDay", &TdApi::getTradingDay) .def("registerFront", &TdApi::registerFront) - .def("subscribePublicTopic",&TdApi::subscribePublicTopic) - .def("subscribePrivateTopic",&TdApi::subscribePrivateTopic) + .def("subscribePublicTopic", &TdApi::subscribePublicTopic) + .def("subscribePrivateTopic", &TdApi::subscribePrivateTopic) .def("reqAuthenticate", &TdApi::reqAuthenticate) .def("reqUserLogin", &TdApi::reqUserLogin) .def("reqUserLogout", &TdApi::reqUserLogout) diff --git a/vnpy/api/sec/vnsec/vnsectd/vnsectd.h b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.h similarity index 91% rename from vnpy/api/sec/vnsec/vnsectd/vnsectd.h rename to vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.h index 94156aa5..f5a8a835 100644 --- a/vnpy/api/sec/vnsec/vnsectd/vnsectd.h +++ b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.h @@ -136,7 +136,7 @@ #include "ThostFtdcTraderApi.h" #include "pybind11.h" -#include "vnsec.h" +#include "vnsopt.h" using namespace pybind11; @@ -157,7 +157,7 @@ public: //////////////////////////////////////////////////////////// //////////ԭSPIص //////////////////////////////////////////////////////////// - virtual void OnFrontConnected() ; + virtual void OnFrontConnected(); ///ͻ뽻׺̨ͨӶϿʱ÷áAPIԶӣͻ˿ɲ ///@param nReason ԭ @@ -166,393 +166,393 @@ public: /// 0x2001 ʱ /// 0x2002 ʧ /// 0x2003 յ - virtual void OnFrontDisconnected(int nReason) ; + virtual void OnFrontDisconnected(int nReason); ///ʱ档ʱδյʱ÷á ///@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); ///dzӦ - 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ȨԼӦ - 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ȨӦ - 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װĻص //////////////////////////////////////////////////////////// diff --git a/vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj similarity index 92% rename from vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj rename to vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj index 72e96170..3928feb4 100644 --- a/vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj +++ b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj @@ -20,9 +20,9 @@ 15.0 - {4A6E7B14-A7CB-488E-BE1B-86E1A438E67D} + {059048EC-18DC-4B7E-8A41-E2450619519F} Win32Proj - vnsectd + vnsopttd 10.0.17763.0 @@ -73,22 +73,22 @@ true .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) + $(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) true .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) + $(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) false .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) + $(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) false .pyd - $(SolutionDir);$(SolutionDir)..\include\Sec;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) + $(SolutionDir);$(SolutionDir)..\include\sopt;$(SolutionDir)..\include\pybind11;C:\vnstudio\include;$(IncludePath) @@ -165,7 +165,7 @@ - + @@ -175,7 +175,7 @@ Create Create - + diff --git a/vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj.filters b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj.filters similarity index 94% rename from vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj.filters rename to vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj.filters index 806ac0f9..fed29f27 100644 --- a/vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj.filters +++ b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj.filters @@ -21,7 +21,7 @@ 头文件 - + 头文件 @@ -29,7 +29,7 @@ 源文件 - + 源文件 diff --git a/vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj.user b/vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj.user similarity index 100% rename from vnpy/api/sec/vnsec/vnsectd/vnsectd.vcxproj.user rename to vnpy/api/sopt/vnsopt/vnsopttd/vnsopttd.vcxproj.user diff --git a/vnpy/api/sec/vnsecmd.pyd b/vnpy/api/sopt/vnsoptmd.pyd similarity index 63% rename from vnpy/api/sec/vnsecmd.pyd rename to vnpy/api/sopt/vnsoptmd.pyd index 05c6e06e..fd1029d4 100644 Binary files a/vnpy/api/sec/vnsecmd.pyd and b/vnpy/api/sopt/vnsoptmd.pyd differ diff --git a/vnpy/api/sec/vnsectd.pyd b/vnpy/api/sopt/vnsopttd.pyd similarity index 62% rename from vnpy/api/sec/vnsectd.pyd rename to vnpy/api/sopt/vnsopttd.pyd index 815b6d72..587720be 100644 Binary files a/vnpy/api/sec/vnsectd.pyd and b/vnpy/api/sopt/vnsopttd.pyd differ diff --git a/vnpy/gateway/sec/__init__.py b/vnpy/gateway/sec/__init__.py deleted file mode 100644 index ff390f1c..00000000 --- a/vnpy/gateway/sec/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .sec_gateway import SecGateway diff --git a/vnpy/gateway/sopt/__init__.py b/vnpy/gateway/sopt/__init__.py new file mode 100644 index 00000000..5f0597d4 --- /dev/null +++ b/vnpy/gateway/sopt/__init__.py @@ -0,0 +1 @@ +from .sopt_gateway import SoptGateway diff --git a/vnpy/gateway/sec/sec_gateway.py b/vnpy/gateway/sopt/sopt_gateway.py similarity index 90% rename from vnpy/gateway/sec/sec_gateway.py rename to vnpy/gateway/sopt/sopt_gateway.py index da79cb32..f0522fb9 100644 --- a/vnpy/gateway/sec/sec_gateway.py +++ b/vnpy/gateway/sopt/sopt_gateway.py @@ -3,7 +3,7 @@ from datetime import datetime -from vnpy.api.sec import ( +from vnpy.api.sopt import ( MdApi, TdApi, THOST_FTDC_OAS_Submitted, @@ -62,7 +62,7 @@ from vnpy.trader.utility import get_folder_path from vnpy.trader.event import EVENT_TIMER -STATUS_SEC2VT = { +STATUS_SOPT2VT = { THOST_FTDC_OAS_Submitted: Status.SUBMITTING, THOST_FTDC_OAS_Accepted: Status.SUBMITTING, THOST_FTDC_OAS_Rejected: Status.REJECTED, @@ -72,40 +72,40 @@ STATUS_SEC2VT = { THOST_FTDC_OST_Canceled: Status.CANCELLED } -DIRECTION_VT2SEC = { +DIRECTION_VT2SOPT = { Direction.LONG: THOST_FTDC_D_Buy, Direction.SHORT: THOST_FTDC_D_Sell } -DIRECTION_SEC2VT = {v: k for k, v in DIRECTION_VT2SEC.items()} -DIRECTION_SEC2VT[THOST_FTDC_PD_Long] = Direction.LONG -DIRECTION_SEC2VT[THOST_FTDC_PD_Short] = Direction.SHORT +DIRECTION_SOPT2VT = {v: k for k, v in DIRECTION_VT2SOPT.items()} +DIRECTION_SOPT2VT[THOST_FTDC_PD_Long] = Direction.LONG +DIRECTION_SOPT2VT[THOST_FTDC_PD_Short] = Direction.SHORT -ORDERTYPE_VT2SEC = { +ORDERTYPE_VT2SOPT = { OrderType.LIMIT: THOST_FTDC_OPT_LimitPrice, 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.CLOSE: THOST_FTDC_OFEN_Close, Offset.CLOSETODAY: THOST_FTDC_OFEN_CloseToday, 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, "SSE": Exchange.SSE } -PRODUCT_SEC2VT = { +PRODUCT_SOPT2VT = { THOST_FTDC_PC_Stock: Product.EQUITY, THOST_FTDC_PC_ETFOption: Product.OPTION, THOST_FTDC_PC_Combination: Product.SPREAD } -OPTIONTYPE_SEC2VT = { +OPTIONTYPE_SOPT2VT = { THOST_FTDC_CP_CallOptions: OptionType.CALL, THOST_FTDC_CP_PutOptions: OptionType.PUT } @@ -116,9 +116,9 @@ symbol_name_map = {} symbol_size_map = {} -class SecGateway(BaseGateway): +class SoptGateway(BaseGateway): """ - VN Trader Gateway for SEC . + VN Trader Gateway for SOPT . """ default_setting = { @@ -132,14 +132,14 @@ class SecGateway(BaseGateway): "产品信息": "" } - exchanges = list(EXCHANGE_SEC2VT.values()) + exchanges = list(EXCHANGE_SOPT2VT.values()) def __init__(self, event_engine): """Constructor""" - super().__init__(event_engine, "SEC") + super().__init__(event_engine, "SOPT") - self.td_api = SecTdApi(self) - self.md_api = SecMdApi(self) + self.td_api = SoptTdApi(self) + self.md_api = SoptMdApi(self) def connect(self, setting: dict): """""" @@ -212,12 +212,12 @@ class SecGateway(BaseGateway): self.event_engine.register(EVENT_TIMER, self.process_timer_event) -class SecMdApi(MdApi): +class SoptMdApi(MdApi): """""" def __init__(self, gateway): """Constructor""" - super(SecMdApi, self).__init__() + super(SoptMdApi, self).__init__() self.gateway = gateway self.gateway_name = gateway.gateway_name @@ -352,12 +352,12 @@ class SecMdApi(MdApi): self.exit() -class SecTdApi(TdApi): +class SoptTdApi(TdApi): """""" def __init__(self, gateway): """Constructor""" - super(SecTdApi, self).__init__() + super(SoptTdApi, self).__init__() self.test = [] @@ -442,8 +442,8 @@ class SecTdApi(TdApi): symbol=symbol, exchange=exchange, orderid=orderid, - direction=DIRECTION_SEC2VT[data["Direction"]], - offset=OFFSET_SEC2VT[data["CombOffsetFlag"]], + direction=DIRECTION_SOPT2VT[data["Direction"]], + offset=OFFSET_SOPT2VT[data["CombOffsetFlag"]], price=data["LimitPrice"], volume=data["VolumeTotalOriginal"], status=Status.REJECTED, @@ -482,7 +482,7 @@ class SecTdApi(TdApi): position = PositionData( symbol=data["InstrumentID"], exchange=symbol_exchange_map[data["InstrumentID"]], - direction=DIRECTION_SEC2VT[data["PosiDirection"]], + direction=DIRECTION_SOPT2VT[data["PosiDirection"]], gateway_name=self.gateway_name ) self.positions[key] = position @@ -538,12 +538,12 @@ class SecTdApi(TdApi): """ Callback of instrument query. """ - product = PRODUCT_SEC2VT.get(data["ProductClass"], None) + product = PRODUCT_SOPT2VT.get(data["ProductClass"], None) if product: contract = ContractData( symbol=data["InstrumentID"], - exchange=EXCHANGE_SEC2VT[data["ExchangeID"]], + exchange=EXCHANGE_SOPT2VT[data["ExchangeID"]], name=data["InstrumentName"], product=product, size=data["VolumeMultiple"], @@ -554,7 +554,7 @@ class SecTdApi(TdApi): # For option only if contract.product == Product.OPTION: 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_expiry = datetime.strptime(data["ExpireDate"], "%Y%m%d"), @@ -594,13 +594,13 @@ class SecTdApi(TdApi): symbol=symbol, exchange=exchange, orderid=orderid, - type=ORDERTYPE_SEC2VT[data["OrderPriceType"]], - direction=DIRECTION_SEC2VT[data["Direction"]], - offset=OFFSET_SEC2VT[data["CombOffsetFlag"]], + type=ORDERTYPE_SOPT2VT[data["OrderPriceType"]], + direction=DIRECTION_SOPT2VT[data["Direction"]], + offset=OFFSET_SOPT2VT[data["CombOffsetFlag"]], price=data["LimitPrice"], volume=data["VolumeTotalOriginal"], traded=data["VolumeTraded"], - status=STATUS_SEC2VT[data["OrderStatus"]], + status=STATUS_SOPT2VT[data["OrderStatus"]], time=data["InsertTime"], gateway_name=self.gateway_name ) @@ -625,8 +625,8 @@ class SecTdApi(TdApi): exchange=exchange, orderid=orderid, tradeid=data["TradeID"], - direction=DIRECTION_SEC2VT[data["Direction"]], - offset=OFFSET_SEC2VT[data["OffsetFlag"]], + direction=DIRECTION_SOPT2VT[data["Direction"]], + offset=OFFSET_SOPT2VT[data["OffsetFlag"]], price=data["Price"], volume=data["Volume"], time=data["TradeTime"], @@ -711,14 +711,14 @@ class SecTdApi(TdApi): """ self.order_ref += 1 - sec_req = { + sopt_req = { "InstrumentID": req.symbol, "ExchangeID": req.exchange.value, "LimitPrice": req.price, "VolumeTotalOriginal": int(req.volume), - "OrderPriceType": ORDERTYPE_VT2SEC.get(req.type, ""), - "Direction": DIRECTION_VT2SEC.get(req.direction, ""), - "CombOffsetFlag": OFFSET_VT2SEC.get(req.offset, ""), + "OrderPriceType": ORDERTYPE_VT2SOPT.get(req.type, ""), + "Direction": DIRECTION_VT2SOPT.get(req.direction, ""), + "CombOffsetFlag": OFFSET_VT2SOPT.get(req.offset, ""), "OrderRef": str(self.order_ref), "InvestorID": self.userid, "UserID": self.userid, @@ -733,16 +733,16 @@ class SecTdApi(TdApi): } if req.type == OrderType.FAK: - sec_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice - sec_req["TimeCondition"] = THOST_FTDC_TC_IOC - sec_req["VolumeCondition"] = THOST_FTDC_VC_AV + sopt_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice + sopt_req["TimeCondition"] = THOST_FTDC_TC_IOC + sopt_req["VolumeCondition"] = THOST_FTDC_VC_AV elif req.type == OrderType.FOK: - sec_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice - sec_req["TimeCondition"] = THOST_FTDC_TC_IOC - sec_req["VolumeCondition"] = THOST_FTDC_VC_CV + sopt_req["OrderPriceType"] = THOST_FTDC_OPT_LimitPrice + sopt_req["TimeCondition"] = THOST_FTDC_TC_IOC + sopt_req["VolumeCondition"] = THOST_FTDC_VC_CV self.reqid += 1 - self.reqOrderInsert(sec_req, self.reqid) + self.reqOrderInsert(sopt_req, self.reqid) orderid = f"{self.frontid}_{self.sessionid}_{self.order_ref}" order = req.create_order_data(orderid, self.gateway_name) @@ -756,7 +756,7 @@ class SecTdApi(TdApi): """ frontid, sessionid, order_ref = req.orderid.split("_") - sec_req = { + sopt_req = { "InstrumentID": req.symbol, "Exchange": req.exchange, "OrderRef": order_ref, @@ -768,7 +768,7 @@ class SecTdApi(TdApi): } self.reqid += 1 - self.reqOrderAction(sec_req, self.reqid) + self.reqOrderAction(sopt_req, self.reqid) def query_account(self): """