Skip to main content

CTP gateway for enkeep_trade quant trading framework.

Project description

enkeep框架的CTP底层接口

说明

基于CTP期货版的6.7.7接口封装开发,接口中自带的是【穿透式实盘环境】的dll文件。

tips:

打包

使用 cibuildwheel 自动化构建 如果你希望自动化整个流程,可以使用 cibuildwheel,它支持多平台自动构建和打包。

pip install cibuildwheel

cibuildwheel --output-dir dist

发布

先安装一下 twine:

python -m pip install twine
twine upload dist/*

没有账户去注册一个 https://pypi.org/

使用

以脚本方式启动(script/run.py):

from enkeep_trade.event import EventEngine
from enkeep_trade.trader.engine import MainEngine
from enkeep_trade.trader.ui import MainWindow, create_qapp

from enkeep_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()

Mac系统支持

由于新版本CTP的Mac系统API项目结构发生了较大变化,改为了使用framework目录的结构,因此无法再直接从PyPI下载预编译好的wheel二进制包进行安装。

用户需要克隆(或下载)本仓库的源代码到本地后自行编译安装,具体命令如下:

git clone https://github.com/vnpy/enkeep_ctp.git

cd enkeep_ctp

pip3 install .

相关注意事项如下:

源码编译需要依赖XCode开发工具中的C++编译器,请务必先安装好。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

enkeep_ctp-6.7.7.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

enkeep_ctp-6.7.7.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

enkeep_ctp-6.7.7.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

enkeep_ctp-6.7.7.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

enkeep_ctp-6.7.7.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

enkeep_ctp-6.7.7.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

File details

Details for the file enkeep_ctp-6.7.7.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a0c770fd95173116cb716ca531317b85694a943d9797366e8f38262a9b164fe
MD5 0565071f532412cbe0e6bb565f8cb59c
BLAKE2b-256 e8ddc29b3a0db3c4da994071856313b593f0d10e43b5e54975b68ab3fdd8ac24

See more details on using hashes here.

File details

Details for the file enkeep_ctp-6.7.7.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 784b046b214e1961c9b31ec9827d718a1aea59e8663bf458ba7ee2131ca9bf2c
MD5 4e143c55813781ca14816480d062b77b
BLAKE2b-256 fcedeb9106af0918f4b754312a3e7ed7bffe238b68c23fd3dbd9d5cc5c18f12a

See more details on using hashes here.

File details

Details for the file enkeep_ctp-6.7.7.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4032b04c8cd1e7f5731e6aba4001a92b651fd0ec0b9865f0ece4b9ff4a28c164
MD5 ecd9d589e9ac35b366ce2e3e658c77bc
BLAKE2b-256 1b6f2f1abb692be0222bd487e3193b925cc070643fa61a7791197d91e0e39106

See more details on using hashes here.

File details

Details for the file enkeep_ctp-6.7.7.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f84fb6aa6645c966d00733573b9b8e8d061c0ad56f1f6b640afcedb7c768507
MD5 f40be81d9eaf5f7abee7c2ea012107a4
BLAKE2b-256 a307b60490aa5cb26e0d071bb44a44b28a02f0b31437f34754330ee4e47a2458

See more details on using hashes here.

File details

Details for the file enkeep_ctp-6.7.7.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea60c7ebb66efa52335b12923609ceb87602fbe68f8cc2fd1f8ffa75e2014e21
MD5 bb0a67db851044f813f566277dd720f5
BLAKE2b-256 3ccc2f831ffd8fbca87f01fd79c45ee365739dd01498787deafb0accc179c51a

See more details on using hashes here.

File details

Details for the file enkeep_ctp-6.7.7.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d2c8c8bb743d9550beefedffc8632fa117500f42abbc13da5e340d74dc5a7e4
MD5 bd02de6350b01a4fedb0b73539488257
BLAKE2b-256 37246fb3c77890994d3553b3a9f67d70f0192adeee314a0a913585047414d768

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page