ctpbee-opt-api 0.1.0__cp310-cp310-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ctpbee_api/__init__.py +17 -0
- ctpbee_api/ctp/__init__.py +3 -0
- ctpbee_api/ctp/ctp_constant.py +1253 -0
- ctpbee_api/ctp/generator/concat.py +93 -0
- ctpbee_api/ctp/generator/const.py +325 -0
- ctpbee_api/ctp/generator/ctp_constant.py +1274 -0
- ctpbee_api/ctp/generator/ctp_md_header_define.h +13 -0
- ctpbee_api/ctp/generator/ctp_md_header_function.h +6 -0
- ctpbee_api/ctp/generator/ctp_md_header_on.h +26 -0
- ctpbee_api/ctp/generator/ctp_md_header_process.h +26 -0
- ctpbee_api/ctp/generator/ctp_md_source_function.cpp +42 -0
- ctpbee_api/ctp/generator/ctp_md_source_module.cpp +18 -0
- ctpbee_api/ctp/generator/ctp_md_source_on.cpp +156 -0
- ctpbee_api/ctp/generator/ctp_md_source_process.cpp +282 -0
- ctpbee_api/ctp/generator/ctp_md_source_switch.cpp +78 -0
- ctpbee_api/ctp/generator/ctp_md_source_task.cpp +211 -0
- ctpbee_api/ctp/generator/ctp_struct.py +5640 -0
- ctpbee_api/ctp/generator/ctp_td_header_define.h +130 -0
- ctpbee_api/ctp/generator/ctp_td_header_function.h +174 -0
- ctpbee_api/ctp/generator/ctp_td_header_on.h +260 -0
- ctpbee_api/ctp/generator/ctp_td_header_process.h +260 -0
- ctpbee_api/ctp/generator/ctp_td_source_function.cpp +1456 -0
- ctpbee_api/ctp/generator/ctp_td_source_module.cpp +222 -0
- ctpbee_api/ctp/generator/ctp_td_source_on.cpp +1572 -0
- ctpbee_api/ctp/generator/ctp_td_source_process.cpp +5472 -0
- ctpbee_api/ctp/generator/ctp_td_source_switch.cpp +780 -0
- ctpbee_api/ctp/generator/ctp_td_source_task.cpp +2444 -0
- ctpbee_api/ctp/generator/ctp_typedef.py +800 -0
- ctpbee_api/ctp/generator/generate_api_functions.py +345 -0
- ctpbee_api/ctp/generator/generate_data_type.py +76 -0
- ctpbee_api/ctp/generator/generate_struct.py +84 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcMdApi.h +168 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcTraderApi.h +770 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcUserApiDataType.h +6878 -0
- ctpbee_api/ctp/include/mac/ctp/ThostFtdcUserApiStruct.h +10915 -0
- ctpbee_api/ctp/include/mac/pybind11/attr.h +690 -0
- ctpbee_api/ctp/include/mac/pybind11/buffer_info.h +208 -0
- ctpbee_api/ctp/include/mac/pybind11/cast.h +1704 -0
- ctpbee_api/ctp/include/mac/pybind11/chrono.h +225 -0
- ctpbee_api/ctp/include/mac/pybind11/common.h +2 -0
- ctpbee_api/ctp/include/mac/pybind11/complex.h +74 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/class.h +743 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/common.h +1255 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/descr.h +171 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/init.h +434 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/internals.h +656 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/ctp/include/mac/pybind11/detail/typeid.h +65 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen/common.h +9 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/ctp/include/mac/pybind11/eigen.h +12 -0
- ctpbee_api/ctp/include/mac/pybind11/embed.h +316 -0
- ctpbee_api/ctp/include/mac/pybind11/eval.h +156 -0
- ctpbee_api/ctp/include/mac/pybind11/functional.h +137 -0
- ctpbee_api/ctp/include/mac/pybind11/gil.h +239 -0
- ctpbee_api/ctp/include/mac/pybind11/iostream.h +265 -0
- ctpbee_api/ctp/include/mac/pybind11/numpy.h +1998 -0
- ctpbee_api/ctp/include/mac/pybind11/operators.h +202 -0
- ctpbee_api/ctp/include/mac/pybind11/options.h +92 -0
- ctpbee_api/ctp/include/mac/pybind11/pybind11.h +2890 -0
- ctpbee_api/ctp/include/mac/pybind11/pytypes.h +2557 -0
- ctpbee_api/ctp/include/mac/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/ctp/include/mac/pybind11/stl.h +447 -0
- ctpbee_api/ctp/include/mac/pybind11/stl_bind.h +851 -0
- ctpbee_api/ctp/include/mac/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcMdApi.h +168 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcTraderApi.h +770 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcUserApiDataType.h +6878 -0
- ctpbee_api/ctp/include/new/ctp/ThostFtdcUserApiStruct.h +10915 -0
- ctpbee_api/ctp/include/new/pybind11/attr.h +690 -0
- ctpbee_api/ctp/include/new/pybind11/buffer_info.h +208 -0
- ctpbee_api/ctp/include/new/pybind11/cast.h +1704 -0
- ctpbee_api/ctp/include/new/pybind11/chrono.h +225 -0
- ctpbee_api/ctp/include/new/pybind11/common.h +2 -0
- ctpbee_api/ctp/include/new/pybind11/complex.h +74 -0
- ctpbee_api/ctp/include/new/pybind11/detail/class.h +743 -0
- ctpbee_api/ctp/include/new/pybind11/detail/common.h +1255 -0
- ctpbee_api/ctp/include/new/pybind11/detail/descr.h +171 -0
- ctpbee_api/ctp/include/new/pybind11/detail/init.h +434 -0
- ctpbee_api/ctp/include/new/pybind11/detail/internals.h +656 -0
- ctpbee_api/ctp/include/new/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/ctp/include/new/pybind11/detail/typeid.h +65 -0
- ctpbee_api/ctp/include/new/pybind11/eigen/common.h +9 -0
- ctpbee_api/ctp/include/new/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/ctp/include/new/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/ctp/include/new/pybind11/eigen.h +12 -0
- ctpbee_api/ctp/include/new/pybind11/embed.h +316 -0
- ctpbee_api/ctp/include/new/pybind11/eval.h +156 -0
- ctpbee_api/ctp/include/new/pybind11/functional.h +137 -0
- ctpbee_api/ctp/include/new/pybind11/gil.h +239 -0
- ctpbee_api/ctp/include/new/pybind11/iostream.h +265 -0
- ctpbee_api/ctp/include/new/pybind11/numpy.h +1998 -0
- ctpbee_api/ctp/include/new/pybind11/operators.h +202 -0
- ctpbee_api/ctp/include/new/pybind11/options.h +92 -0
- ctpbee_api/ctp/include/new/pybind11/pybind11.h +2890 -0
- ctpbee_api/ctp/include/new/pybind11/pytypes.h +2557 -0
- ctpbee_api/ctp/include/new/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/ctp/include/new/pybind11/stl.h +447 -0
- ctpbee_api/ctp/include/new/pybind11/stl_bind.h +851 -0
- ctpbee_api/ctp/include/new/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcMdApi.h +168 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcTraderApi.h +770 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcUserApiDataType.h +6878 -0
- ctpbee_api/ctp/include/previous/ctp/ThostFtdcUserApiStruct.h +10915 -0
- ctpbee_api/ctp/include/previous/pybind11/attr.h +489 -0
- ctpbee_api/ctp/include/previous/pybind11/buffer_info.h +108 -0
- ctpbee_api/ctp/include/previous/pybind11/cast.h +2067 -0
- ctpbee_api/ctp/include/previous/pybind11/chrono.h +162 -0
- ctpbee_api/ctp/include/previous/pybind11/common.h +2 -0
- ctpbee_api/ctp/include/previous/pybind11/complex.h +61 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/class.h +626 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/common.h +803 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/descr.h +185 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/init.h +335 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/internals.h +285 -0
- ctpbee_api/ctp/include/previous/pybind11/detail/typeid.h +53 -0
- ctpbee_api/ctp/include/previous/pybind11/eigen.h +604 -0
- ctpbee_api/ctp/include/previous/pybind11/embed.h +194 -0
- ctpbee_api/ctp/include/previous/pybind11/eval.h +117 -0
- ctpbee_api/ctp/include/previous/pybind11/functional.h +85 -0
- ctpbee_api/ctp/include/previous/pybind11/iostream.h +200 -0
- ctpbee_api/ctp/include/previous/pybind11/numpy.h +1601 -0
- ctpbee_api/ctp/include/previous/pybind11/operators.h +168 -0
- ctpbee_api/ctp/include/previous/pybind11/options.h +65 -0
- ctpbee_api/ctp/include/previous/pybind11/pybind11.h +1965 -0
- ctpbee_api/ctp/include/previous/pybind11/pytypes.h +1332 -0
- ctpbee_api/ctp/include/previous/pybind11/stl.h +376 -0
- ctpbee_api/ctp/include/previous/pybind11/stl_bind.h +599 -0
- ctpbee_api/ctp/libs/libcomunicationkey.a +0 -0
- ctpbee_api/ctp/libs/libcrypto.a +0 -0
- ctpbee_api/ctp/libs/libssl.a +0 -0
- ctpbee_api/ctp/libs/thostmduserapi_se.lib +0 -0
- ctpbee_api/ctp/libs/thosttraderapi_se.lib +0 -0
- ctpbee_api/ctp/libthostmduserapi_se.so +0 -0
- ctpbee_api/ctp/libthosttraderapi_se.so +0 -0
- ctpbee_api/ctp/thostmduserapi_se.dll +0 -0
- ctpbee_api/ctp/thosttraderapi_se.dll +0 -0
- ctpbee_api/ctp/vnctp/vnctp.h +189 -0
- ctpbee_api/ctp/vnctp/vnctp.sln +41 -0
- ctpbee_api/ctp/vnctp/vnctpmd/dllmain.cpp +19 -0
- ctpbee_api/ctp/vnctp/vnctpmd/stdafx.cpp +1 -0
- ctpbee_api/ctp/vnctp/vnctpmd/stdafx.h +17 -0
- ctpbee_api/ctp/vnctp/vnctpmd/targetver.h +8 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.cpp +953 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.h +209 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.vcxproj +200 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.vcxproj.filters +54 -0
- ctpbee_api/ctp/vnctp/vnctpmd/vnctpmd.vcxproj.user +4 -0
- ctpbee_api/ctp/vnctp/vnctptd/dllmain.cpp +19 -0
- ctpbee_api/ctp/vnctp/vnctptd/stdafx.cpp +1 -0
- ctpbee_api/ctp/vnctp/vnctptd/stdafx.h +16 -0
- ctpbee_api/ctp/vnctp/vnctptd/targetver.h +8 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.cpp +12148 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.h +1329 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.vcxproj +198 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.vcxproj.filters +54 -0
- ctpbee_api/ctp/vnctp/vnctptd/vnctptd.vcxproj.user +4 -0
- ctpbee_api/ctp/vnctpmd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp/vnctptd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp_mini/__init__.py +3 -0
- ctpbee_api/ctp_mini/generator/generate_api_functions.py +343 -0
- ctpbee_api/ctp_mini/generator/generate_data_type.py +76 -0
- ctpbee_api/ctp_mini/generator/generate_struct.py +85 -0
- ctpbee_api/ctp_mini/generator/mini_constant.py +1186 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_define.h +13 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_function.h +4 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_on.h +26 -0
- ctpbee_api/ctp_mini/generator/mini_md_header_process.h +26 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_function.cpp +29 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_module.cpp +17 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_on.cpp +156 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_process.cpp +264 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_switch.cpp +78 -0
- ctpbee_api/ctp_mini/generator/mini_md_source_task.cpp +203 -0
- ctpbee_api/ctp_mini/generator/mini_struct.py +4599 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_define.h +63 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_function.h +84 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_on.h +126 -0
- ctpbee_api/ctp_mini/generator/mini_td_header_process.h +126 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_function.cpp +663 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_module.cpp +107 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_on.cpp +756 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_process.cpp +2492 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_switch.cpp +378 -0
- ctpbee_api/ctp_mini/generator/mini_td_source_task.cpp +1193 -0
- ctpbee_api/ctp_mini/generator/mini_typedef.py +755 -0
- ctpbee_api/ctp_mini/generator/package/vnminimd.cpp +886 -0
- ctpbee_api/ctp_mini/generator/package/vnminimd.h +205 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcMdApi.h +148 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcTraderApi.h +419 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcUserApiDataType.h +6458 -0
- ctpbee_api/ctp_mini/include/new/mini/ThostFtdcUserApiStruct.h +8890 -0
- ctpbee_api/ctp_mini/include/new/pybind11/attr.h +690 -0
- ctpbee_api/ctp_mini/include/new/pybind11/buffer_info.h +208 -0
- ctpbee_api/ctp_mini/include/new/pybind11/cast.h +1704 -0
- ctpbee_api/ctp_mini/include/new/pybind11/chrono.h +225 -0
- ctpbee_api/ctp_mini/include/new/pybind11/common.h +2 -0
- ctpbee_api/ctp_mini/include/new/pybind11/complex.h +74 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/class.h +743 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/common.h +1255 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/descr.h +171 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/init.h +434 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/internals.h +656 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/ctp_mini/include/new/pybind11/detail/typeid.h +65 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen/common.h +9 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eigen.h +12 -0
- ctpbee_api/ctp_mini/include/new/pybind11/embed.h +316 -0
- ctpbee_api/ctp_mini/include/new/pybind11/eval.h +156 -0
- ctpbee_api/ctp_mini/include/new/pybind11/functional.h +137 -0
- ctpbee_api/ctp_mini/include/new/pybind11/gil.h +239 -0
- ctpbee_api/ctp_mini/include/new/pybind11/iostream.h +265 -0
- ctpbee_api/ctp_mini/include/new/pybind11/numpy.h +1998 -0
- ctpbee_api/ctp_mini/include/new/pybind11/operators.h +202 -0
- ctpbee_api/ctp_mini/include/new/pybind11/options.h +92 -0
- ctpbee_api/ctp_mini/include/new/pybind11/pybind11.h +2890 -0
- ctpbee_api/ctp_mini/include/new/pybind11/pytypes.h +2557 -0
- ctpbee_api/ctp_mini/include/new/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/ctp_mini/include/new/pybind11/stl.h +447 -0
- ctpbee_api/ctp_mini/include/new/pybind11/stl_bind.h +851 -0
- ctpbee_api/ctp_mini/include/new/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcMdApi.h +148 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcTraderApi.h +419 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcUserApiDataType.h +6458 -0
- ctpbee_api/ctp_mini/include/previous/mini/ThostFtdcUserApiStruct.h +8890 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/attr.h +489 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/buffer_info.h +108 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/cast.h +2067 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/chrono.h +162 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/common.h +2 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/complex.h +61 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/class.h +626 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/common.h +803 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/descr.h +185 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/init.h +335 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/internals.h +285 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/detail/typeid.h +53 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/eigen.h +604 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/embed.h +194 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/eval.h +117 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/functional.h +85 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/iostream.h +200 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/numpy.h +1601 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/operators.h +168 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/options.h +65 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/pybind11.h +1965 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/pytypes.h +1332 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/stl.h +376 -0
- ctpbee_api/ctp_mini/include/previous/pybind11/stl_bind.h +599 -0
- ctpbee_api/ctp_mini/libs/thostmduserapi.lib +0 -0
- ctpbee_api/ctp_mini/libs/thosttraderapi.lib +0 -0
- ctpbee_api/ctp_mini/libthostmduserapi.so +0 -0
- ctpbee_api/ctp_mini/libthosttraderapi.so +0 -0
- ctpbee_api/ctp_mini/mini_constant.py +1186 -0
- ctpbee_api/ctp_mini/thostmduserapi.dll +0 -0
- ctpbee_api/ctp_mini/thosttraderapi.dll +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_mini.h +146 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_mini.sln +41 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/dllmain.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/stdafx.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/stdafx.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/targetver.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.cpp +886 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.h +203 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.vcxproj +183 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.vcxproj.filters +54 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minimd/vnctp_minimd.vcxproj.user +4 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/dllmain.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/stdafx.cpp +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/stdafx.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/targetver.h +0 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.cpp +5716 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.h +680 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.vcxproj +180 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.vcxproj.filters +54 -0
- ctpbee_api/ctp_mini/vnctp_mini/vnctp_minitd/vnctp_minitd.vcxproj.user +4 -0
- ctpbee_api/ctp_mini/vnctp_minimd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp_mini/vnctp_minitd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/ctp_mini/vnctp_minitd.lib +0 -0
- ctpbee_api/rohon/RohonBaseV64.dll +0 -0
- ctpbee_api/rohon/WinDataCollect.dll +0 -0
- ctpbee_api/rohon/__init__.py +3 -0
- ctpbee_api/rohon/generator/generate_api_functions.py +348 -0
- ctpbee_api/rohon/generator/generate_data_type.py +76 -0
- ctpbee_api/rohon/generator/generate_struct.py +84 -0
- ctpbee_api/rohon/generator/rohon_constant.py +1242 -0
- ctpbee_api/rohon/generator/rohon_md_header_define.h +13 -0
- ctpbee_api/rohon/generator/rohon_md_header_function.h +6 -0
- ctpbee_api/rohon/generator/rohon_md_header_on.h +26 -0
- ctpbee_api/rohon/generator/rohon_md_header_process.h +26 -0
- ctpbee_api/rohon/generator/rohon_md_source_function.cpp +40 -0
- ctpbee_api/rohon/generator/rohon_md_source_module.cpp +18 -0
- ctpbee_api/rohon/generator/rohon_md_source_on.cpp +156 -0
- ctpbee_api/rohon/generator/rohon_md_source_process.cpp +271 -0
- ctpbee_api/rohon/generator/rohon_md_source_switch.cpp +78 -0
- ctpbee_api/rohon/generator/rohon_md_source_task.cpp +211 -0
- ctpbee_api/rohon/generator/rohon_struct.py +4958 -0
- ctpbee_api/rohon/generator/rohon_td_header_define.h +125 -0
- ctpbee_api/rohon/generator/rohon_td_header_function.h +164 -0
- ctpbee_api/rohon/generator/rohon_td_header_on.h +250 -0
- ctpbee_api/rohon/generator/rohon_td_header_process.h +250 -0
- ctpbee_api/rohon/generator/rohon_td_source_function.cpp +1338 -0
- ctpbee_api/rohon/generator/rohon_td_source_module.cpp +209 -0
- ctpbee_api/rohon/generator/rohon_td_source_on.cpp +1500 -0
- ctpbee_api/rohon/generator/rohon_td_source_process.cpp +5125 -0
- ctpbee_api/rohon/generator/rohon_td_source_switch.cpp +750 -0
- ctpbee_api/rohon/generator/rohon_td_source_task.cpp +2339 -0
- ctpbee_api/rohon/generator/rohon_typedef.py +781 -0
- ctpbee_api/rohon/include/new/pybind11/attr.h +690 -0
- ctpbee_api/rohon/include/new/pybind11/buffer_info.h +208 -0
- ctpbee_api/rohon/include/new/pybind11/cast.h +1704 -0
- ctpbee_api/rohon/include/new/pybind11/chrono.h +225 -0
- ctpbee_api/rohon/include/new/pybind11/common.h +2 -0
- ctpbee_api/rohon/include/new/pybind11/complex.h +74 -0
- ctpbee_api/rohon/include/new/pybind11/detail/class.h +743 -0
- ctpbee_api/rohon/include/new/pybind11/detail/common.h +1255 -0
- ctpbee_api/rohon/include/new/pybind11/detail/descr.h +171 -0
- ctpbee_api/rohon/include/new/pybind11/detail/init.h +434 -0
- ctpbee_api/rohon/include/new/pybind11/detail/internals.h +656 -0
- ctpbee_api/rohon/include/new/pybind11/detail/type_caster_base.h +1177 -0
- ctpbee_api/rohon/include/new/pybind11/detail/typeid.h +65 -0
- ctpbee_api/rohon/include/new/pybind11/eigen/common.h +9 -0
- ctpbee_api/rohon/include/new/pybind11/eigen/matrix.h +714 -0
- ctpbee_api/rohon/include/new/pybind11/eigen/tensor.h +516 -0
- ctpbee_api/rohon/include/new/pybind11/eigen.h +12 -0
- ctpbee_api/rohon/include/new/pybind11/embed.h +316 -0
- ctpbee_api/rohon/include/new/pybind11/eval.h +156 -0
- ctpbee_api/rohon/include/new/pybind11/functional.h +137 -0
- ctpbee_api/rohon/include/new/pybind11/gil.h +239 -0
- ctpbee_api/rohon/include/new/pybind11/iostream.h +265 -0
- ctpbee_api/rohon/include/new/pybind11/numpy.h +1998 -0
- ctpbee_api/rohon/include/new/pybind11/operators.h +202 -0
- ctpbee_api/rohon/include/new/pybind11/options.h +92 -0
- ctpbee_api/rohon/include/new/pybind11/pybind11.h +2890 -0
- ctpbee_api/rohon/include/new/pybind11/pytypes.h +2557 -0
- ctpbee_api/rohon/include/new/pybind11/stl/filesystem.h +116 -0
- ctpbee_api/rohon/include/new/pybind11/stl.h +447 -0
- ctpbee_api/rohon/include/new/pybind11/stl_bind.h +851 -0
- ctpbee_api/rohon/include/new/pybind11/type_caster_pyobject_ptr.h +61 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcMdApi.h +168 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcTraderApi.h +739 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcUserApiDataType.h +6708 -0
- ctpbee_api/rohon/include/new/rohon/ThostFtdcUserApiStruct.h +9580 -0
- ctpbee_api/rohon/include/previous/pybind11/attr.h +489 -0
- ctpbee_api/rohon/include/previous/pybind11/buffer_info.h +108 -0
- ctpbee_api/rohon/include/previous/pybind11/cast.h +2067 -0
- ctpbee_api/rohon/include/previous/pybind11/chrono.h +162 -0
- ctpbee_api/rohon/include/previous/pybind11/common.h +2 -0
- ctpbee_api/rohon/include/previous/pybind11/complex.h +61 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/class.h +626 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/common.h +803 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/descr.h +185 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/init.h +335 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/internals.h +285 -0
- ctpbee_api/rohon/include/previous/pybind11/detail/typeid.h +53 -0
- ctpbee_api/rohon/include/previous/pybind11/eigen.h +604 -0
- ctpbee_api/rohon/include/previous/pybind11/embed.h +194 -0
- ctpbee_api/rohon/include/previous/pybind11/eval.h +117 -0
- ctpbee_api/rohon/include/previous/pybind11/functional.h +85 -0
- ctpbee_api/rohon/include/previous/pybind11/iostream.h +200 -0
- ctpbee_api/rohon/include/previous/pybind11/numpy.h +1601 -0
- ctpbee_api/rohon/include/previous/pybind11/operators.h +168 -0
- ctpbee_api/rohon/include/previous/pybind11/options.h +65 -0
- ctpbee_api/rohon/include/previous/pybind11/pybind11.h +1965 -0
- ctpbee_api/rohon/include/previous/pybind11/pytypes.h +1332 -0
- ctpbee_api/rohon/include/previous/pybind11/stl.h +376 -0
- ctpbee_api/rohon/include/previous/pybind11/stl_bind.h +599 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcMdApi.h +168 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcTraderApi.h +739 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcUserApiDataType.h +6708 -0
- ctpbee_api/rohon/include/previous/rohon/ThostFtdcUserApiStruct.h +9580 -0
- ctpbee_api/rohon/libLinuxDataCollect.so +0 -0
- ctpbee_api/rohon/librohonbase.so +0 -0
- ctpbee_api/rohon/librohonbase.so.1.1 +0 -0
- ctpbee_api/rohon/librohonbase.so.1.1.0.1 +0 -0
- ctpbee_api/rohon/libs/thostmduserapi_se.lib +0 -0
- ctpbee_api/rohon/libs/thosttraderapi_se.lib +0 -0
- ctpbee_api/rohon/libthostmduserapi_se.so +0 -0
- ctpbee_api/rohon/libthosttraderapi_se.so +0 -0
- ctpbee_api/rohon/rohon_constant.py +1242 -0
- ctpbee_api/rohon/thostmduserapi_se.dll +0 -0
- ctpbee_api/rohon/thosttraderapi_se.dll +0 -0
- ctpbee_api/rohon/vnrohon/.vs/vnrohon/v15/.suo +0 -0
- ctpbee_api/rohon/vnrohon/.vs/vnrohon/v15/Browse.VC.db +0 -0
- ctpbee_api/rohon/vnrohon/.vs/vnrohon/v15/Solution.VC.db +0 -0
- ctpbee_api/rohon/vnrohon/vnrohon.h +147 -0
- ctpbee_api/rohon/vnrohon/vnrohon.sln +41 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/dllmain.cpp +19 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/framework.h +5 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/pch.cpp +5 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/pch.h +13 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.cpp +931 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.h +207 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.vcxproj +188 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.vcxproj.filters +54 -0
- ctpbee_api/rohon/vnrohon/vnrohonmd/vnrohonmd.vcxproj.user +4 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/dllmain.cpp +19 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/framework.h +5 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/pch.cpp +5 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/pch.h +13 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.cpp +11395 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.h +1259 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.vcxproj +188 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.vcxproj.filters +54 -0
- ctpbee_api/rohon/vnrohon/vnrohontd/vnrohontd.vcxproj.user +4 -0
- ctpbee_api/rohon/vnrohonmd.cp310-win_amd64.pyd +0 -0
- ctpbee_api/rohon/vnrohontd.cp310-win_amd64.pyd +0 -0
- ctpbee_opt_api-0.1.0.dist-info/METADATA +46 -0
- ctpbee_opt_api-0.1.0.dist-info/RECORD +414 -0
- ctpbee_opt_api-0.1.0.dist-info/WHEEL +5 -0
- ctpbee_opt_api-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#define ONFRONTCONNECTED 0
|
|
2
|
+
#define ONFRONTDISCONNECTED 1
|
|
3
|
+
#define ONHEARTBEATWARNING 2
|
|
4
|
+
#define ONRSPUSERLOGIN 3
|
|
5
|
+
#define ONRSPUSERLOGOUT 4
|
|
6
|
+
#define ONRSPQRYMULTICASTINSTRUMENT 5
|
|
7
|
+
#define ONRSPERROR 6
|
|
8
|
+
#define ONRSPSUBMARKETDATA 7
|
|
9
|
+
#define ONRSPUNSUBMARKETDATA 8
|
|
10
|
+
#define ONRSPSUBFORQUOTERSP 9
|
|
11
|
+
#define ONRSPUNSUBFORQUOTERSP 10
|
|
12
|
+
#define ONRTNDEPTHMARKETDATA 11
|
|
13
|
+
#define ONRTNFORQUOTERSP 12
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
virtual void onFrontConnected() {};
|
|
2
|
+
|
|
3
|
+
virtual void onFrontDisconnected(int reqid) {};
|
|
4
|
+
|
|
5
|
+
virtual void onHeartBeatWarning(int reqid) {};
|
|
6
|
+
|
|
7
|
+
virtual void onRspUserLogin(const dict &data, const dict &error, int reqid, bool last) {};
|
|
8
|
+
|
|
9
|
+
virtual void onRspUserLogout(const dict &data, const dict &error, int reqid, bool last) {};
|
|
10
|
+
|
|
11
|
+
virtual void onRspQryMulticastInstrument(const dict &data, const dict &error, int reqid, bool last) {};
|
|
12
|
+
|
|
13
|
+
virtual void onRspError(const dict &error, int reqid, bool last) {};
|
|
14
|
+
|
|
15
|
+
virtual void onRspSubMarketData(const dict &data, const dict &error, int reqid, bool last) {};
|
|
16
|
+
|
|
17
|
+
virtual void onRspUnSubMarketData(const dict &data, const dict &error, int reqid, bool last) {};
|
|
18
|
+
|
|
19
|
+
virtual void onRspSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) {};
|
|
20
|
+
|
|
21
|
+
virtual void onRspUnSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) {};
|
|
22
|
+
|
|
23
|
+
virtual void onRtnDepthMarketData(const dict &data) {};
|
|
24
|
+
|
|
25
|
+
virtual void onRtnForQuoteRsp(const dict &data) {};
|
|
26
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
void processFrontConnected(Task *task);
|
|
2
|
+
|
|
3
|
+
void processFrontDisconnected(Task *task);
|
|
4
|
+
|
|
5
|
+
void processHeartBeatWarning(Task *task);
|
|
6
|
+
|
|
7
|
+
void processRspUserLogin(Task *task);
|
|
8
|
+
|
|
9
|
+
void processRspUserLogout(Task *task);
|
|
10
|
+
|
|
11
|
+
void processRspQryMulticastInstrument(Task *task);
|
|
12
|
+
|
|
13
|
+
void processRspError(Task *task);
|
|
14
|
+
|
|
15
|
+
void processRspSubMarketData(Task *task);
|
|
16
|
+
|
|
17
|
+
void processRspUnSubMarketData(Task *task);
|
|
18
|
+
|
|
19
|
+
void processRspSubForQuoteRsp(Task *task);
|
|
20
|
+
|
|
21
|
+
void processRspUnSubForQuoteRsp(Task *task);
|
|
22
|
+
|
|
23
|
+
void processRtnDepthMarketData(Task *task);
|
|
24
|
+
|
|
25
|
+
void processRtnForQuoteRsp(Task *task);
|
|
26
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
int MdApi::reqUserLogin(const dict &req, int reqid)
|
|
2
|
+
{
|
|
3
|
+
CThostFtdcReqUserLoginField myreq = CThostFtdcReqUserLoginField();
|
|
4
|
+
memset(&myreq, 0, sizeof(myreq));
|
|
5
|
+
getString(req, "TradingDay", myreq.TradingDay);
|
|
6
|
+
getString(req, "BrokerID", myreq.BrokerID);
|
|
7
|
+
getString(req, "UserID", myreq.UserID);
|
|
8
|
+
getString(req, "Password", myreq.Password);
|
|
9
|
+
getString(req, "UserProductInfo", myreq.UserProductInfo);
|
|
10
|
+
getString(req, "InterfaceProductInfo", myreq.InterfaceProductInfo);
|
|
11
|
+
getString(req, "ProtocolInfo", myreq.ProtocolInfo);
|
|
12
|
+
getString(req, "MacAddress", myreq.MacAddress);
|
|
13
|
+
getString(req, "OneTimePassword", myreq.OneTimePassword);
|
|
14
|
+
getString(req, "reserve1", myreq.reserve1);
|
|
15
|
+
getString(req, "LoginRemark", myreq.LoginRemark);
|
|
16
|
+
getInt(req, "ClientIPPort", &myreq.ClientIPPort);
|
|
17
|
+
getString(req, "ClientIPAddress", myreq.ClientIPAddress);
|
|
18
|
+
int i = this->api->ReqUserLogin(&myreq, reqid);
|
|
19
|
+
return i;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
int MdApi::reqUserLogout(const dict &req, int reqid)
|
|
23
|
+
{
|
|
24
|
+
CThostFtdcUserLogoutField myreq = CThostFtdcUserLogoutField();
|
|
25
|
+
memset(&myreq, 0, sizeof(myreq));
|
|
26
|
+
getString(req, "BrokerID", myreq.BrokerID);
|
|
27
|
+
getString(req, "UserID", myreq.UserID);
|
|
28
|
+
int i = this->api->ReqUserLogout(&myreq, reqid);
|
|
29
|
+
return i;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
int MdApi::reqQryMulticastInstrument(const dict &req, int reqid)
|
|
33
|
+
{
|
|
34
|
+
CThostFtdcQryMulticastInstrumentField myreq = CThostFtdcQryMulticastInstrumentField();
|
|
35
|
+
memset(&myreq, 0, sizeof(myreq));
|
|
36
|
+
getInt(req, "TopicID", &myreq.TopicID);
|
|
37
|
+
getString(req, "reserve1", myreq.reserve1);
|
|
38
|
+
getString(req, "InstrumentID", myreq.InstrumentID);
|
|
39
|
+
int i = this->api->ReqQryMulticastInstrument(&myreq, reqid);
|
|
40
|
+
return i;
|
|
41
|
+
};
|
|
42
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.def("reqUserLogin", &MdApi::reqUserLogin)
|
|
2
|
+
.def("reqUserLogout", &MdApi::reqUserLogout)
|
|
3
|
+
.def("reqQryMulticastInstrument", &MdApi::reqQryMulticastInstrument)
|
|
4
|
+
|
|
5
|
+
.def("onFrontConnected", &MdApi::onFrontConnected)
|
|
6
|
+
.def("onFrontDisconnected", &MdApi::onFrontDisconnected)
|
|
7
|
+
.def("onHeartBeatWarning", &MdApi::onHeartBeatWarning)
|
|
8
|
+
.def("onRspUserLogin", &MdApi::onRspUserLogin)
|
|
9
|
+
.def("onRspUserLogout", &MdApi::onRspUserLogout)
|
|
10
|
+
.def("onRspQryMulticastInstrument", &MdApi::onRspQryMulticastInstrument)
|
|
11
|
+
.def("onRspError", &MdApi::onRspError)
|
|
12
|
+
.def("onRspSubMarketData", &MdApi::onRspSubMarketData)
|
|
13
|
+
.def("onRspUnSubMarketData", &MdApi::onRspUnSubMarketData)
|
|
14
|
+
.def("onRspSubForQuoteRsp", &MdApi::onRspSubForQuoteRsp)
|
|
15
|
+
.def("onRspUnSubForQuoteRsp", &MdApi::onRspUnSubForQuoteRsp)
|
|
16
|
+
.def("onRtnDepthMarketData", &MdApi::onRtnDepthMarketData)
|
|
17
|
+
.def("onRtnForQuoteRsp", &MdApi::onRtnForQuoteRsp)
|
|
18
|
+
;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
void onFrontConnected() override
|
|
2
|
+
{
|
|
3
|
+
try
|
|
4
|
+
{
|
|
5
|
+
PYBIND11_OVERLOAD(void, MdApi, onFrontConnected);
|
|
6
|
+
}
|
|
7
|
+
catch (const error_already_set &e)
|
|
8
|
+
{
|
|
9
|
+
cout << e.what() << endl;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
void onFrontDisconnected(int reqid) override
|
|
14
|
+
{
|
|
15
|
+
try
|
|
16
|
+
{
|
|
17
|
+
PYBIND11_OVERLOAD(void, MdApi, onFrontDisconnected, reqid);
|
|
18
|
+
}
|
|
19
|
+
catch (const error_already_set &e)
|
|
20
|
+
{
|
|
21
|
+
cout << e.what() << endl;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
void onHeartBeatWarning(int reqid) override
|
|
26
|
+
{
|
|
27
|
+
try
|
|
28
|
+
{
|
|
29
|
+
PYBIND11_OVERLOAD(void, MdApi, onHeartBeatWarning, reqid);
|
|
30
|
+
}
|
|
31
|
+
catch (const error_already_set &e)
|
|
32
|
+
{
|
|
33
|
+
cout << e.what() << endl;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
void onRspUserLogin(const dict &data, const dict &error, int reqid, bool last) override
|
|
38
|
+
{
|
|
39
|
+
try
|
|
40
|
+
{
|
|
41
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspUserLogin, data, error, reqid, last);
|
|
42
|
+
}
|
|
43
|
+
catch (const error_already_set &e)
|
|
44
|
+
{
|
|
45
|
+
cout << e.what() << endl;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
void onRspUserLogout(const dict &data, const dict &error, int reqid, bool last) override
|
|
50
|
+
{
|
|
51
|
+
try
|
|
52
|
+
{
|
|
53
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspUserLogout, data, error, reqid, last);
|
|
54
|
+
}
|
|
55
|
+
catch (const error_already_set &e)
|
|
56
|
+
{
|
|
57
|
+
cout << e.what() << endl;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
void onRspQryMulticastInstrument(const dict &data, const dict &error, int reqid, bool last) override
|
|
62
|
+
{
|
|
63
|
+
try
|
|
64
|
+
{
|
|
65
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspQryMulticastInstrument, data, error, reqid, last);
|
|
66
|
+
}
|
|
67
|
+
catch (const error_already_set &e)
|
|
68
|
+
{
|
|
69
|
+
cout << e.what() << endl;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
void onRspError(const dict &error, int reqid, bool last) override
|
|
74
|
+
{
|
|
75
|
+
try
|
|
76
|
+
{
|
|
77
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspError, error, reqid, last);
|
|
78
|
+
}
|
|
79
|
+
catch (const error_already_set &e)
|
|
80
|
+
{
|
|
81
|
+
cout << e.what() << endl;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
void onRspSubMarketData(const dict &data, const dict &error, int reqid, bool last) override
|
|
86
|
+
{
|
|
87
|
+
try
|
|
88
|
+
{
|
|
89
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspSubMarketData, data, error, reqid, last);
|
|
90
|
+
}
|
|
91
|
+
catch (const error_already_set &e)
|
|
92
|
+
{
|
|
93
|
+
cout << e.what() << endl;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
void onRspUnSubMarketData(const dict &data, const dict &error, int reqid, bool last) override
|
|
98
|
+
{
|
|
99
|
+
try
|
|
100
|
+
{
|
|
101
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspUnSubMarketData, data, error, reqid, last);
|
|
102
|
+
}
|
|
103
|
+
catch (const error_already_set &e)
|
|
104
|
+
{
|
|
105
|
+
cout << e.what() << endl;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
void onRspSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) override
|
|
110
|
+
{
|
|
111
|
+
try
|
|
112
|
+
{
|
|
113
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspSubForQuoteRsp, data, error, reqid, last);
|
|
114
|
+
}
|
|
115
|
+
catch (const error_already_set &e)
|
|
116
|
+
{
|
|
117
|
+
cout << e.what() << endl;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
void onRspUnSubForQuoteRsp(const dict &data, const dict &error, int reqid, bool last) override
|
|
122
|
+
{
|
|
123
|
+
try
|
|
124
|
+
{
|
|
125
|
+
PYBIND11_OVERLOAD(void, MdApi, onRspUnSubForQuoteRsp, data, error, reqid, last);
|
|
126
|
+
}
|
|
127
|
+
catch (const error_already_set &e)
|
|
128
|
+
{
|
|
129
|
+
cout << e.what() << endl;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
void onRtnDepthMarketData(const dict &data) override
|
|
134
|
+
{
|
|
135
|
+
try
|
|
136
|
+
{
|
|
137
|
+
PYBIND11_OVERLOAD(void, MdApi, onRtnDepthMarketData, data);
|
|
138
|
+
}
|
|
139
|
+
catch (const error_already_set &e)
|
|
140
|
+
{
|
|
141
|
+
cout << e.what() << endl;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
void onRtnForQuoteRsp(const dict &data) override
|
|
146
|
+
{
|
|
147
|
+
try
|
|
148
|
+
{
|
|
149
|
+
PYBIND11_OVERLOAD(void, MdApi, onRtnForQuoteRsp, data);
|
|
150
|
+
}
|
|
151
|
+
catch (const error_already_set &e)
|
|
152
|
+
{
|
|
153
|
+
cout << e.what() << endl;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
void MdApi::processFrontConnected(Task *task)
|
|
2
|
+
{
|
|
3
|
+
gil_scoped_acquire acquire;
|
|
4
|
+
this->onFrontConnected();
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
void MdApi::processFrontDisconnected(Task *task)
|
|
8
|
+
{
|
|
9
|
+
gil_scoped_acquire acquire;
|
|
10
|
+
this->onFrontDisconnected(task->task_id);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
void MdApi::processHeartBeatWarning(Task *task)
|
|
14
|
+
{
|
|
15
|
+
gil_scoped_acquire acquire;
|
|
16
|
+
this->onHeartBeatWarning(task->task_id);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
void MdApi::processRspUserLogin(Task *task)
|
|
20
|
+
{
|
|
21
|
+
gil_scoped_acquire acquire;
|
|
22
|
+
dict data;
|
|
23
|
+
if (task->task_data)
|
|
24
|
+
{
|
|
25
|
+
CThostFtdcRspUserLoginField *task_data = (CThostFtdcRspUserLoginField*)task->task_data;
|
|
26
|
+
data["TradingDay"] = toUtf(task_data->TradingDay);
|
|
27
|
+
data["LoginTime"] = toUtf(task_data->LoginTime);
|
|
28
|
+
data["BrokerID"] = toUtf(task_data->BrokerID);
|
|
29
|
+
data["UserID"] = toUtf(task_data->UserID);
|
|
30
|
+
data["SystemName"] = toUtf(task_data->SystemName);
|
|
31
|
+
data["FrontID"] = task_data->FrontID;
|
|
32
|
+
data["SessionID"] = task_data->SessionID;
|
|
33
|
+
data["MaxOrderRef"] = toUtf(task_data->MaxOrderRef);
|
|
34
|
+
data["SHFETime"] = toUtf(task_data->SHFETime);
|
|
35
|
+
data["DCETime"] = toUtf(task_data->DCETime);
|
|
36
|
+
data["CZCETime"] = toUtf(task_data->CZCETime);
|
|
37
|
+
data["FFEXTime"] = toUtf(task_data->FFEXTime);
|
|
38
|
+
data["INETime"] = toUtf(task_data->INETime);
|
|
39
|
+
data["SysVersion"] = toUtf(task_data->SysVersion);
|
|
40
|
+
delete task_data;
|
|
41
|
+
}
|
|
42
|
+
dict error;
|
|
43
|
+
if (task->task_error)
|
|
44
|
+
{
|
|
45
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
46
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
47
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
48
|
+
delete task_error;
|
|
49
|
+
}
|
|
50
|
+
this->onRspUserLogin(data, error, task->task_id, task->task_last);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
void MdApi::processRspUserLogout(Task *task)
|
|
54
|
+
{
|
|
55
|
+
gil_scoped_acquire acquire;
|
|
56
|
+
dict data;
|
|
57
|
+
if (task->task_data)
|
|
58
|
+
{
|
|
59
|
+
CThostFtdcUserLogoutField *task_data = (CThostFtdcUserLogoutField*)task->task_data;
|
|
60
|
+
data["BrokerID"] = toUtf(task_data->BrokerID);
|
|
61
|
+
data["UserID"] = toUtf(task_data->UserID);
|
|
62
|
+
delete task_data;
|
|
63
|
+
}
|
|
64
|
+
dict error;
|
|
65
|
+
if (task->task_error)
|
|
66
|
+
{
|
|
67
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
68
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
69
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
70
|
+
delete task_error;
|
|
71
|
+
}
|
|
72
|
+
this->onRspUserLogout(data, error, task->task_id, task->task_last);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
void MdApi::processRspQryMulticastInstrument(Task *task)
|
|
76
|
+
{
|
|
77
|
+
gil_scoped_acquire acquire;
|
|
78
|
+
dict data;
|
|
79
|
+
if (task->task_data)
|
|
80
|
+
{
|
|
81
|
+
CThostFtdcMulticastInstrumentField *task_data = (CThostFtdcMulticastInstrumentField*)task->task_data;
|
|
82
|
+
data["TopicID"] = task_data->TopicID;
|
|
83
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
84
|
+
data["InstrumentNo"] = task_data->InstrumentNo;
|
|
85
|
+
data["CodePrice"] = task_data->CodePrice;
|
|
86
|
+
data["VolumeMultiple"] = task_data->VolumeMultiple;
|
|
87
|
+
data["PriceTick"] = task_data->PriceTick;
|
|
88
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
89
|
+
delete task_data;
|
|
90
|
+
}
|
|
91
|
+
dict error;
|
|
92
|
+
if (task->task_error)
|
|
93
|
+
{
|
|
94
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
95
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
96
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
97
|
+
delete task_error;
|
|
98
|
+
}
|
|
99
|
+
this->onRspQryMulticastInstrument(data, error, task->task_id, task->task_last);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
void MdApi::processRspError(Task *task)
|
|
103
|
+
{
|
|
104
|
+
gil_scoped_acquire acquire;
|
|
105
|
+
dict error;
|
|
106
|
+
if (task->task_error)
|
|
107
|
+
{
|
|
108
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
109
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
110
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
111
|
+
delete task_error;
|
|
112
|
+
}
|
|
113
|
+
this->onRspError(error, task->task_id, task->task_last);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
void MdApi::processRspSubMarketData(Task *task)
|
|
117
|
+
{
|
|
118
|
+
gil_scoped_acquire acquire;
|
|
119
|
+
dict data;
|
|
120
|
+
if (task->task_data)
|
|
121
|
+
{
|
|
122
|
+
CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data;
|
|
123
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
124
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
125
|
+
delete task_data;
|
|
126
|
+
}
|
|
127
|
+
dict error;
|
|
128
|
+
if (task->task_error)
|
|
129
|
+
{
|
|
130
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
131
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
132
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
133
|
+
delete task_error;
|
|
134
|
+
}
|
|
135
|
+
this->onRspSubMarketData(data, error, task->task_id, task->task_last);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
void MdApi::processRspUnSubMarketData(Task *task)
|
|
139
|
+
{
|
|
140
|
+
gil_scoped_acquire acquire;
|
|
141
|
+
dict data;
|
|
142
|
+
if (task->task_data)
|
|
143
|
+
{
|
|
144
|
+
CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data;
|
|
145
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
146
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
147
|
+
delete task_data;
|
|
148
|
+
}
|
|
149
|
+
dict error;
|
|
150
|
+
if (task->task_error)
|
|
151
|
+
{
|
|
152
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
153
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
154
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
155
|
+
delete task_error;
|
|
156
|
+
}
|
|
157
|
+
this->onRspUnSubMarketData(data, error, task->task_id, task->task_last);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
void MdApi::processRspSubForQuoteRsp(Task *task)
|
|
161
|
+
{
|
|
162
|
+
gil_scoped_acquire acquire;
|
|
163
|
+
dict data;
|
|
164
|
+
if (task->task_data)
|
|
165
|
+
{
|
|
166
|
+
CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data;
|
|
167
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
168
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
169
|
+
delete task_data;
|
|
170
|
+
}
|
|
171
|
+
dict error;
|
|
172
|
+
if (task->task_error)
|
|
173
|
+
{
|
|
174
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
175
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
176
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
177
|
+
delete task_error;
|
|
178
|
+
}
|
|
179
|
+
this->onRspSubForQuoteRsp(data, error, task->task_id, task->task_last);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
void MdApi::processRspUnSubForQuoteRsp(Task *task)
|
|
183
|
+
{
|
|
184
|
+
gil_scoped_acquire acquire;
|
|
185
|
+
dict data;
|
|
186
|
+
if (task->task_data)
|
|
187
|
+
{
|
|
188
|
+
CThostFtdcSpecificInstrumentField *task_data = (CThostFtdcSpecificInstrumentField*)task->task_data;
|
|
189
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
190
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
191
|
+
delete task_data;
|
|
192
|
+
}
|
|
193
|
+
dict error;
|
|
194
|
+
if (task->task_error)
|
|
195
|
+
{
|
|
196
|
+
CThostFtdcRspInfoField *task_error = (CThostFtdcRspInfoField*)task->task_error;
|
|
197
|
+
error["ErrorID"] = task_error->ErrorID;
|
|
198
|
+
error["ErrorMsg"] = toUtf(task_error->ErrorMsg);
|
|
199
|
+
delete task_error;
|
|
200
|
+
}
|
|
201
|
+
this->onRspUnSubForQuoteRsp(data, error, task->task_id, task->task_last);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
void MdApi::processRtnDepthMarketData(Task *task)
|
|
205
|
+
{
|
|
206
|
+
gil_scoped_acquire acquire;
|
|
207
|
+
dict data;
|
|
208
|
+
if (task->task_data)
|
|
209
|
+
{
|
|
210
|
+
CThostFtdcDepthMarketDataField *task_data = (CThostFtdcDepthMarketDataField*)task->task_data;
|
|
211
|
+
data["TradingDay"] = toUtf(task_data->TradingDay);
|
|
212
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
213
|
+
data["ExchangeID"] = toUtf(task_data->ExchangeID);
|
|
214
|
+
data["reserve2"] = toUtf(task_data->reserve2);
|
|
215
|
+
data["LastPrice"] = task_data->LastPrice;
|
|
216
|
+
data["PreSettlementPrice"] = task_data->PreSettlementPrice;
|
|
217
|
+
data["PreClosePrice"] = task_data->PreClosePrice;
|
|
218
|
+
data["PreOpenInterest"] = task_data->PreOpenInterest;
|
|
219
|
+
data["OpenPrice"] = task_data->OpenPrice;
|
|
220
|
+
data["HighestPrice"] = task_data->HighestPrice;
|
|
221
|
+
data["LowestPrice"] = task_data->LowestPrice;
|
|
222
|
+
data["Volume"] = task_data->Volume;
|
|
223
|
+
data["Turnover"] = task_data->Turnover;
|
|
224
|
+
data["OpenInterest"] = task_data->OpenInterest;
|
|
225
|
+
data["ClosePrice"] = task_data->ClosePrice;
|
|
226
|
+
data["SettlementPrice"] = task_data->SettlementPrice;
|
|
227
|
+
data["UpperLimitPrice"] = task_data->UpperLimitPrice;
|
|
228
|
+
data["LowerLimitPrice"] = task_data->LowerLimitPrice;
|
|
229
|
+
data["PreDelta"] = task_data->PreDelta;
|
|
230
|
+
data["CurrDelta"] = task_data->CurrDelta;
|
|
231
|
+
data["UpdateTime"] = toUtf(task_data->UpdateTime);
|
|
232
|
+
data["UpdateMillisec"] = task_data->UpdateMillisec;
|
|
233
|
+
data["BidPrice1"] = task_data->BidPrice1;
|
|
234
|
+
data["BidVolume1"] = task_data->BidVolume1;
|
|
235
|
+
data["AskPrice1"] = task_data->AskPrice1;
|
|
236
|
+
data["AskVolume1"] = task_data->AskVolume1;
|
|
237
|
+
data["BidPrice2"] = task_data->BidPrice2;
|
|
238
|
+
data["BidVolume2"] = task_data->BidVolume2;
|
|
239
|
+
data["AskPrice2"] = task_data->AskPrice2;
|
|
240
|
+
data["AskVolume2"] = task_data->AskVolume2;
|
|
241
|
+
data["BidPrice3"] = task_data->BidPrice3;
|
|
242
|
+
data["BidVolume3"] = task_data->BidVolume3;
|
|
243
|
+
data["AskPrice3"] = task_data->AskPrice3;
|
|
244
|
+
data["AskVolume3"] = task_data->AskVolume3;
|
|
245
|
+
data["BidPrice4"] = task_data->BidPrice4;
|
|
246
|
+
data["BidVolume4"] = task_data->BidVolume4;
|
|
247
|
+
data["AskPrice4"] = task_data->AskPrice4;
|
|
248
|
+
data["AskVolume4"] = task_data->AskVolume4;
|
|
249
|
+
data["BidPrice5"] = task_data->BidPrice5;
|
|
250
|
+
data["BidVolume5"] = task_data->BidVolume5;
|
|
251
|
+
data["AskPrice5"] = task_data->AskPrice5;
|
|
252
|
+
data["AskVolume5"] = task_data->AskVolume5;
|
|
253
|
+
data["AveragePrice"] = task_data->AveragePrice;
|
|
254
|
+
data["ActionDay"] = toUtf(task_data->ActionDay);
|
|
255
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
256
|
+
data["ExchangeInstID"] = toUtf(task_data->ExchangeInstID);
|
|
257
|
+
data["BandingUpperPrice"] = task_data->BandingUpperPrice;
|
|
258
|
+
data["BandingLowerPrice"] = task_data->BandingLowerPrice;
|
|
259
|
+
delete task_data;
|
|
260
|
+
}
|
|
261
|
+
this->onRtnDepthMarketData(data);
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
void MdApi::processRtnForQuoteRsp(Task *task)
|
|
265
|
+
{
|
|
266
|
+
gil_scoped_acquire acquire;
|
|
267
|
+
dict data;
|
|
268
|
+
if (task->task_data)
|
|
269
|
+
{
|
|
270
|
+
CThostFtdcForQuoteRspField *task_data = (CThostFtdcForQuoteRspField*)task->task_data;
|
|
271
|
+
data["TradingDay"] = toUtf(task_data->TradingDay);
|
|
272
|
+
data["reserve1"] = toUtf(task_data->reserve1);
|
|
273
|
+
data["ForQuoteSysID"] = toUtf(task_data->ForQuoteSysID);
|
|
274
|
+
data["ForQuoteTime"] = toUtf(task_data->ForQuoteTime);
|
|
275
|
+
data["ActionDay"] = toUtf(task_data->ActionDay);
|
|
276
|
+
data["ExchangeID"] = toUtf(task_data->ExchangeID);
|
|
277
|
+
data["InstrumentID"] = toUtf(task_data->InstrumentID);
|
|
278
|
+
delete task_data;
|
|
279
|
+
}
|
|
280
|
+
this->onRtnForQuoteRsp(data);
|
|
281
|
+
};
|
|
282
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
case ONFRONTCONNECTED:
|
|
2
|
+
{
|
|
3
|
+
this->processFrontConnected(&task);
|
|
4
|
+
break;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
case ONFRONTDISCONNECTED:
|
|
8
|
+
{
|
|
9
|
+
this->processFrontDisconnected(&task);
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
case ONHEARTBEATWARNING:
|
|
14
|
+
{
|
|
15
|
+
this->processHeartBeatWarning(&task);
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
case ONRSPUSERLOGIN:
|
|
20
|
+
{
|
|
21
|
+
this->processRspUserLogin(&task);
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
case ONRSPUSERLOGOUT:
|
|
26
|
+
{
|
|
27
|
+
this->processRspUserLogout(&task);
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
case ONRSPQRYMULTICASTINSTRUMENT:
|
|
32
|
+
{
|
|
33
|
+
this->processRspQryMulticastInstrument(&task);
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
case ONRSPERROR:
|
|
38
|
+
{
|
|
39
|
+
this->processRspError(&task);
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
case ONRSPSUBMARKETDATA:
|
|
44
|
+
{
|
|
45
|
+
this->processRspSubMarketData(&task);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
case ONRSPUNSUBMARKETDATA:
|
|
50
|
+
{
|
|
51
|
+
this->processRspUnSubMarketData(&task);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
case ONRSPSUBFORQUOTERSP:
|
|
56
|
+
{
|
|
57
|
+
this->processRspSubForQuoteRsp(&task);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
case ONRSPUNSUBFORQUOTERSP:
|
|
62
|
+
{
|
|
63
|
+
this->processRspUnSubForQuoteRsp(&task);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
case ONRTNDEPTHMARKETDATA:
|
|
68
|
+
{
|
|
69
|
+
this->processRtnDepthMarketData(&task);
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
case ONRTNFORQUOTERSP:
|
|
74
|
+
{
|
|
75
|
+
this->processRtnForQuoteRsp(&task);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
|