# vn.py框架的CTP底层接口
<p align="center">
<img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png"/>
</p>
<p align="center">
<img src ="https://img.shields.io/badge/version-6.5.1-blueviolet.svg"/>
<img src ="https://img.shields.io/badge/platform-windows|linux-yellow.svg"/>
<img src ="https://img.shields.io/badge/python-3.7-blue.svg" />
<img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
</p>
## 说明
基于CTP期货版的6.5.1接口封装开发,接口中自带的是【穿透式实盘环境】的dll文件。
## 安装
下载解压后在cmd中运行
```
python setup.py install
```
## 使用
以脚本方式启动(script/run.py):
```
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
from vnpy_ctp import CtpGateway
def main():
"""主入口函数"""
qapp = create_qapp()
event_engine = EventEngine()
main_engine = MainEngine(event_engine)
main_engine.add_gateway(CtpGateway)
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
qapp.exec()
if __name__ == "__main__":
main()
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共82个文件
h:43个
cpp:18个
py:6个
资源分类:Python库 所属语言:Python 资源全名:vnpy_ctp-6.5.1.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
vnpy_ctp-6.5.1.0.tar.gz (82个子文件)
vnpy_ctp-6.5.1
MANIFEST.in 55B
PKG-INFO 3KB
setup.cfg 1002B
setup.py 2KB
vnpy_ctp.egg-info
PKG-INFO 3KB
requires.txt 5B
SOURCES.txt 3KB
top_level.txt 9B
dependency_links.txt 1B
README.md 1KB
vnpy_ctp
gateway
__init__.py 35B
ctp_gateway.py 30KB
api
vnctptd.pyd 1.97MB
vnctp
vnctp.h 3KB
vnctpmd
stdafx.cpp 21B
stdafx.h 376B
vnctpmd.cpp 26KB
dllmain.cpp 448B
targetver.h 296B
vnctpmd.h 6KB
vnctptd
stdafx.cpp 21B
vnctptd.cpp 412KB
stdafx.h 374B
vnctptd.h 50KB
dllmain.cpp 448B
targetver.h 296B
libthostmduserapi_se.so 4.47MB
include
ctp
ThostFtdcUserApiDataType.h 255KB
ThostFtdcTraderApi.h 36KB
ThostFtdcMdApi.h 6KB
ThostFtdcUserApiStruct.h 247KB
pybind11
chrono.h 7KB
attr.h 19KB
functional.h 3KB
pytypes.h 51KB
numpy.h 66KB
stl.h 14KB
options.h 2KB
common.h 122B
eval.h 4KB
embed.h 7KB
buffer_info.h 4KB
iostream.h 5KB
stl_bind.h 22KB
eigen.h 29KB
complex.h 2KB
detail
common.h 37KB
class.h 25KB
init.h 16KB
internals.h 13KB
descr.h 8KB
typeid.h 1KB
cast.h 86KB
operators.h 9KB
pybind11.h 89KB
thostmduserapi_se.dll 2.72MB
ctp_constant.py 40KB
generator
ctp_td_source_function.cpp 58KB
ctp_md_source_module.cpp 891B
ctp_md_header_on.h 1020B
ctp_md_header_define.h 392B
ctp_md_source_function.cpp 2KB
ctp_td_header_define.h 5KB
ctp_md_header_function.h 161B
ctp_td_header_process.h 6KB
ctp_td_source_module.cpp 13KB
ctp_td_header_function.h 5KB
ctp_td_source_process.cpp 219KB
ctp_td_source_switch.cpp 12KB
ctp_md_header_process.h 584B
ctp_md_source_task.cpp 6KB
ctp_td_header_on.h 11KB
ctp_md_source_process.cpp 9KB
ctp_td_source_task.cpp 71KB
ctp_md_source_switch.cpp 1KB
ctp_md_source_on.cpp 3KB
ctp_td_source_on.cpp 33KB
__init__.py 83B
libthosttraderapi_se.so 5.07MB
vnctpmd.pyd 867KB
thosttraderapi_se.dll 3.08MB
__init__.py 1KB
共 82 条
- 1
资源评论
- fsmichael99012023-07-04资源中能够借鉴的内容很多,值得学习的地方也很多,大家一起进步!
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功