Skip to content

Commit

Permalink
Revert "Multi version ctpapi into one pypi project (#1)"
Browse files Browse the repository at this point in the history
This reverts commit ffcc6d6.
  • Loading branch information
Jedore committed Apr 14, 2023
1 parent acc416a commit 4634ccb
Show file tree
Hide file tree
Showing 30 changed files with 311 additions and 107 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-test-6315.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 6315 tests
test-windows:
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 6315 tests
4 changes: 2 additions & 2 deletions .github/workflows/python-test-6319.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 6319 tests
test-windows:
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 6319 tests
4 changes: 2 additions & 2 deletions .github/workflows/python-test-651.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 651 tests
test-windows:
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 651 tests
4 changes: 2 additions & 2 deletions .github/workflows/python-test-661.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 661 tests
test-windows:
Expand Down Expand Up @@ -63,4 +63,4 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 661 tests
6 changes: 3 additions & 3 deletions .github/workflows/python-test-667.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 667 tests
test-macos:
needs:
Expand All @@ -59,7 +59,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests/test_mdapi.py
pytest --ctp 667 tests/test_mdapi.py
test-windows:
Expand Down Expand Up @@ -89,4 +89,4 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 667 tests
6 changes: 3 additions & 3 deletions .github/workflows/python-test-669.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 669 tests
test-macos:
needs:
Expand All @@ -59,7 +59,7 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests/test_mdapi.py
pytest --ctp 669 tests/test_mdapi.py
test-windows:
Expand Down Expand Up @@ -89,4 +89,4 @@ jobs:
shell: bash
- name: Test
run: |
pytest tests
pytest --ctp 669 tests
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
<h1 align="center">openctp-ctp</h1>

<p align="center">
<a href="http://www.sfit.com.cn/5_2_DocumentDown_6.htm" target="_blank">
<img src="https://badgen.net/badge/ctpapi/6.3.15|6.3.19|6.5.1|6.6.1|6.6.7|6.6.9/cyan" />
</a>
<a href="#">
<img src="https://badgen.net/badge/platform/windows_x64|linux_x64|mac_x64/cyan" />
</a>
<a href="#">
<img src="https://badgen.net/badge/python/3.7|3.8|3.9|3.10|3.11/cyan" />
</a>
</p>

<p align="center">
<a href="https://pypi.org/project/openctp-ctp-6315" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp-6315/blue" />
</a>
<a href="https://pypi.org/project/openctp-ctp-6319" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp-6319/blue" />
</a>
<a href="https://pypi.org/project/openctp-ctp-651" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp-651/blue" />
</a>
</p>
<p align="center">
<a href="https://pypi.org/project/openctp-ctp" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp/blue" />
<a href="https://pypi.org/project/openctp-ctp-661" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp-661/blue" />
</a>
<a href="#">
<img src="https://badgen.net/badge/python/3.7|3.8|3.9|3.10|3.11/blue" />
<a href="https://pypi.org/project/openctp-ctp-667" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp-667/blue" />
</a>
<a href="https://pypi.org/project/openctp-ctp-669" target="_blank">
<img src="https://badgen.net/badge/pypi/openctp-ctp-669/blue" />
</a>
</p>

<p align="center">
<a href="https://github.com/Jedore/openctp-ctp-python/actions" target="_blank">
<img src="https://badgen.net/badge/CI-Test/passing/green?icon=github" />
</a>
Expand All @@ -25,23 +43,23 @@
</p>

<p align="center">
:rocket:<em>以 Python 的方式,简化对接 CTPAPI 的过程,节省精力,快速上手</em>
<em>:zap:以 Python 的方式,简化对接 CTPAPI 的过程,节省精力,快速上手:zap:</em>
</p>

-----

## 安装:hammer_and_wrench:

CTPAPI 6.6.7

```shell
# pip install openctp-ctp==<ctpapi version>
pip install openctp-ctp==6.3.15
pip install openctp-ctp==6.6.7
pip install openctp-ctp-667
```

## 代码示例:man_technologist:

```python
from openctp_ctp import mdapi, tdapi
from openctp_ctp_667 import mdapi, tdapi

md_api = mdapi.CThostFtdcMdApi.CreateFtdcMdApi("market")
td_api = tdapi.CThostFtdcTraderApi.CreateFtdcTraderApi('user_id')
Expand All @@ -50,7 +68,7 @@ td_api = tdapi.CThostFtdcTraderApi.CreateFtdcTraderApi('user_id')
- 行情 [demo](demo/mdapi.py)
- 交易 [demo](demo/tdapi.py)

## 功能:full_moon_with_face:
## 主要功能:smile:

- 支持多版本 CTPAPI
- 6.3.15_20190220
Expand All @@ -76,12 +94,11 @@ graph TD;
CTPAPI库<-->Simnow前置;
```

> 生成Python扩展的逻辑,参考[Ralph Jing](https://github.com/nicai0609)
> [Python-CTPAPI](https://github.com/nicai0609/Python-CTPAPI) :+1:
> 转换流程主要参考[Ralph Jing](https://github.com/nicai0609)[Python-CTPAPI](https://github.com/nicai0609/Python-CTPAPI),感谢:pray:
## 更多信息:page_facing_up:

- [openctp](https://github.com/openctp/openctp)
- QQ交流群
- QQ交流群

<img src="https://user-images.githubusercontent.com/17944025/231727684-fb62f5f9-71d8-448f-9e35-255639756bb2.png" width="200px">
2 changes: 1 addition & 1 deletion ctp-6315/6315/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-present Jedore <jedore@protonmail.com>
#
# SPDX-License-Identifier: MIT
__version__ = '6.3.15'
__version__ = '1.0.0'
32 changes: 32 additions & 0 deletions ctp-6315/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# openctp-ctp-6315

[![PyPI - Version](https://badgen.net/badge/pypi/v1.0.0/blue)](https://pypi.org/project/openctp-ctp-6315)
[![PyPI - Python Version](https://badgen.net/badge/python/3.7|3.8|3.9|3.10|3.11/blue)](https://pypi.org/project/openctp-ctp-6315)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install openctp-ctp-6315
```

## Example

[Demo](https://github.com/Jedore/openctp-ctp-python/tree/main/demo)

```python
from openctp_ctp_6315 import mdapi, tdapi

md_api = mdapi.CThostFtdcMdApi.CreateFtdcMdApi("market")
td_api = tdapi.CThostFtdcTraderApi.CreateFtdcTraderApi('user_id')
```

## License

`openctp-ctp-6315` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
8 changes: 4 additions & 4 deletions ctp-6315/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "openctp-ctp"
description = 'A package for CTPAPI'
readme = "../PYPI_README.md"
name = "openctp-ctp-6315"
description = 'A package for CTPAPI-6.3.15'
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = ["openctp", "ctp", "ctpapi", "trading", "investment"]
Expand Down Expand Up @@ -75,7 +75,7 @@ exclude = [
]

[tool.hatch.build.sources]
"6315" = "openctp_ctp"
"6315" = "openctp_ctp_6315"

[tool.hatch.build.targets.sdist]

Expand Down
2 changes: 1 addition & 1 deletion ctp-6319/6319/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-present Jedore <jedore@protonmail.com>
#
# SPDX-License-Identifier: MIT
__version__ = '6.3.19'
__version__ = '1.0.0'
32 changes: 32 additions & 0 deletions ctp-6319/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# openctp-ctp-6319

[![PyPI - Version](https://badgen.net/badge/pypi/v1.0.0/blue)](https://pypi.org/project/openctp-ctp-6319)
[![PyPI - Python Version](https://badgen.net/badge/python/3.7|3.8|3.9|3.10|3.11/blue)](https://pypi.org/project/openctp-ctp-6319)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install openctp-ctp-6319
```

## Example

[Demo](https://github.com/Jedore/openctp-ctp-python/tree/main/demo)

```python
from openctp_ctp_6319 import mdapi, tdapi

md_api = mdapi.CThostFtdcMdApi.CreateFtdcMdApi("market")
td_api = tdapi.CThostFtdcTraderApi.CreateFtdcTraderApi('user_id')
```

## License

`openctp-ctp-6319` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
8 changes: 4 additions & 4 deletions ctp-6319/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "openctp-ctp"
description = 'A package for CTPAPI'
readme = "../PYPI_README.md"
name = "openctp-ctp-6319"
description = 'A package for CTPAPI-6.3.19'
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = ["openctp", "ctp", "ctpapi", "trading", "investment"]
Expand Down Expand Up @@ -75,7 +75,7 @@ exclude = [
]

[tool.hatch.build.sources]
"6319" = "openctp_ctp"
"6319" = "openctp_ctp_6319"

[tool.hatch.build.targets.sdist]

Expand Down
2 changes: 1 addition & 1 deletion ctp-651/651/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-present Jedore <jedore@protonmail.com>
#
# SPDX-License-Identifier: MIT
__version__ = '6.5.1'
__version__ = '1.0.0'
11 changes: 6 additions & 5 deletions PYPI_README.md → ctp-651/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# openctp-ctp
# openctp-ctp-651

[![PyPI - Python Version](https://badgen.net/badge/python/3.7|3.8|3.9|3.10|3.11/blue)](https://pypi.org/project/openctp-ctp)
[![PyPI - Version](https://badgen.net/badge/pypi/v1.0.0/blue)](https://pypi.org/project/openctp-ctp-651)
[![PyPI - Python Version](https://badgen.net/badge/python/3.7|3.8|3.9|3.10|3.11/blue)](https://pypi.org/project/openctp-ctp-651)

-----

Expand All @@ -12,20 +13,20 @@
## Installation

```console
pip install openctp-ctp
pip install openctp-ctp-651
```

## Example

[Demo](https://github.com/Jedore/openctp-ctp-python/tree/main/demo)

```python
from openctp_ctp import mdapi, tdapi
from openctp_ctp_651 import mdapi, tdapi

md_api = mdapi.CThostFtdcMdApi.CreateFtdcMdApi("market")
td_api = tdapi.CThostFtdcTraderApi.CreateFtdcTraderApi('user_id')
```

## License

`openctp-ctp` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
`openctp-ctp-651` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
8 changes: 4 additions & 4 deletions ctp-651/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "openctp-ctp"
description = 'A package for CTPAPI'
readme = "../PYPI_README.md"
name = "openctp-ctp-651"
description = 'A package for CTPAPI-6.5.1'
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
keywords = ["openctp", "ctp", "ctpapi", "trading", "investment"]
Expand Down Expand Up @@ -75,7 +75,7 @@ exclude = [
]

[tool.hatch.build.sources]
"651" = "openctp_ctp"
"651" = "openctp_ctp_651"

[tool.hatch.build.targets.sdist]

Expand Down
2 changes: 1 addition & 1 deletion ctp-661/661/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-present Jedore <jedore@protonmail.com>
#
# SPDX-License-Identifier: MIT
__version__ = '6.6.1'
__version__ = '1.0.0'
Loading

0 comments on commit 4634ccb

Please sign in to comment.