Multi channels support for openctp-ctp
Project description
openctp-ctp-channels
openctp 提供了兼容各大柜台的统一 CTPAPI 兼容接口库,openctp-ctp 也继承了这个能力。
openctp-ctp-channels 简化了替换兼容接口库的过程,可以快速上手体验,连接不同的柜台环境。
快速使用
-
安装
pip install openctp-ctp-channels -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host=pypi.tuna.tsinghua.edu.cn
-
展示所有通道
$ openctp-channels show Support channels: ctp - 官方实现 tts - openctp TTS qq - 腾讯财经 sina - 新浪财经
-
展示当前通道
$ openctp-channels check Current channel: ctp
-
切换通道
$ openctp-channels switch tts Switch to tts channel. $ openctp-channels check Current channel: tts
切换通道 tts 成功后,即可使用 openctp-ctp 库连接 TTS 环境
支持通道
- TTS
- 新浪财经
只能查询行情,不可以交易,详情见 https://github.com/openctp/openctp/blob/master/ctp2Sina/readme.md - 腾讯财经
只能查询行情,不可以交易,详情见 https://github.com/openctp/openctp/blob/master/ctp2QQ/readme.md - 中泰XTP
- 华鑫TORA
- 易盛
- 易达
- 东方证券OST
- 量投QDP
- 东方财富EMT
代码示例
todo...
注意
- openctp-ctp 在被使用中时,无法切换通道
- 如果开启了网络代理,切换通道可能失败,关闭代理重试
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for openctp_ctp_channels-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 504a1cd734ce472e5724c2ef86565dc429f9d71077ed21b55fb23e2873e79f70 |
|
MD5 | 40c8efd85231997c8bc68a65f22068c3 |
|
BLAKE2b-256 | b89cf038155621c269003335338d6d1c8db3c28b00a2835f8ba5712dd9a10dc2 |
Close
Hashes for openctp_ctp_channels-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52cd2cd90719a66ecc02617cfbf3fbaa4faa943c37557cc70412b5c6120a217 |
|
MD5 | e31a249efa0b4c8860d7a57e396268a1 |
|
BLAKE2b-256 | 30aa634c7ebe5a9e8c4493ce41307090b7213b4c985f63a88c2e784c28f65a21 |