Skip to main content

CTP gateway for enkeep 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/

安装

直接使用pip命令:

pip install ek_ctp

使用

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

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

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

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.1-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.1-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.1-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.1-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.1-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.1-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.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 89586d078e99cc8389d737e33ae0ed862fde96222f99f3fcbda1a47c9d37f2ab
MD5 004b2d71bc8952a80ef151c2d68a21a6
BLAKE2b-256 0a53fb431613ce46ff322dd911c1b5ef582df168b417a28cc5f33d949bfaf8a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b3fa650fb6f49dccef8b025ce099c2592782bb830bd9b2255b2317f4c04a8fa
MD5 edb3406791646dbfc5a3c51219aa1406
BLAKE2b-256 589471164ec12cf9c9dc1eaf61ce76b4ce77dc58e4bf0b8d69cf351cec82f46c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce001b927bd978fb9f5b7c06c0f188b17bb0d0566f5de185a8619c478e773d48
MD5 79eead0617e959f55ddbf79e9245f9df
BLAKE2b-256 b3e05da010ab35513f1cccef194aaac5628f22fd41538d24495cd558ef043652

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d69172352a63d6f40891b3eedfe11cda6f73b1e13874dac6202e92ef569a01d8
MD5 23b8a9c6ae51750005b14392c1594059
BLAKE2b-256 e25be992120373ed55b55bc381008e0275f3ae8f9ebd335c9c6389242e686c8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7338307e785fe5d09bda9c0b1a6326e3f807438a3fcf10d64b57be19b7f8c954
MD5 ca4006737578455cbcf9aa24b98ed1c0
BLAKE2b-256 dba1d26201a99d5bfc288bed8d88a1e6d5984b73cc0b4058d26b8a356c6dd488

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for enkeep_ctp-6.7.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f4d5481e9577414c690bef0aae13f93f0ba5b7805e9d3c1355850cfd0a43fba8
MD5 1a3e301f42f1bf142fa7c15e77ead846
BLAKE2b-256 343a05192d9f917654002ed95c9ebd3cff556ed4088a7e4619f1c661e736e7c3

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