thsdk


Namethsdk JSON
Version 1.5.4 PyPI version JSON
download
home_pageNone
Summary同花顺
upload_time2025-08-06 01:30:32
maintainerNone
docs_urlNone
authorpanghu11033
requires_python>=3.9
licenseNone
keywords thsdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# THSDK

[![PyPI version](https://badge.fury.io/py/thsdk.svg)](https://badge.fury.io/py/thsdk)
[![PyPI Downloads](https://static.pepy.tech/badge/thsdk)](https://pepy.tech/projects/thsdk)

## Installation

```bash
pip install --upgrade thsdk
```

## Usage

```python
from thsdk import THS
import pandas as pd

with THS() as ths:
    response = ths.klines("USZA300033", count=100)
    print(pd.DataFrame(response.get_result()))


```

```
            时间     收盘价       成交量         总金额     开盘价     最高价     最低价
0   2025-01-06  252.85  10878507  2768722600  255.01  260.78  251.00
1   2025-01-07  261.00  14048646  3622089800  254.30  261.68  252.47
2   2025-01-08  258.91  14114265  3629279900  257.15  264.90  251.00
3   2025-01-09  257.88   8247352  2138059000  256.86  262.88  256.50
4   2025-01-10  250.55   9171541  2341876100  258.57  260.38  250.20
..         ...     ...       ...         ...     ...     ...     ...
96  2025-06-04  249.70   5294327  1318386680  246.00  251.38  244.80
97  2025-06-05  254.11   6488422  1636593300  249.73  255.55  248.46
98  2025-06-06  249.50   4678326  1173537940  254.18  254.80  249.00
99  2025-06-09  255.24   7754966  1976886800  249.72  257.00  249.72
100 2025-06-10  248.88   6180978  1548168800  255.00  255.77  246.50

[101 rows x 7 columns]
```

更多案例在thsdk库目录下的[examples]()。

## Link

- [同花顺量化平台](https://quant.10jqka.com.cn/view/)

- [同花顺PythonTrader智能交易](https://xdres.10jqka.com.cn/help/python/site/)

- [同花顺智能交易](https://www.forfunds.cn/platform/pcweb/productCenter/expert/)

- [同花顺python策略器API](https://www.showdoc.com.cn/THSPythonSE/3269126718101134)

- [同花顺高频行情接口 L1,L2](https://www.forfunds.cn/platform/pcweb/productCenter/DataFeed/)

- 同花顺python策略编辑器QQ群:1164717242,832421882

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "thsdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "thsdk",
    "author": "panghu11033",
    "author_email": "panghu11033@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2a/a8/1fbd5efe2496799d54e11bcf9ad1967fa5a37bcfe7551a61e3af8bfa3abe/thsdk-1.5.4.tar.gz",
    "platform": null,
    "description": "\n# THSDK\n\n[![PyPI version](https://badge.fury.io/py/thsdk.svg)](https://badge.fury.io/py/thsdk)\n[![PyPI Downloads](https://static.pepy.tech/badge/thsdk)](https://pepy.tech/projects/thsdk)\n\n## Installation\n\n```bash\npip install --upgrade thsdk\n```\n\n## Usage\n\n```python\nfrom thsdk import THS\nimport pandas as pd\n\nwith THS() as ths:\n    response = ths.klines(\"USZA300033\", count=100)\n    print(pd.DataFrame(response.get_result()))\n\n\n```\n\n```\n            \u65f6\u95f4     \u6536\u76d8\u4ef7       \u6210\u4ea4\u91cf         \u603b\u91d1\u989d     \u5f00\u76d8\u4ef7     \u6700\u9ad8\u4ef7     \u6700\u4f4e\u4ef7\n0   2025-01-06  252.85  10878507  2768722600  255.01  260.78  251.00\n1   2025-01-07  261.00  14048646  3622089800  254.30  261.68  252.47\n2   2025-01-08  258.91  14114265  3629279900  257.15  264.90  251.00\n3   2025-01-09  257.88   8247352  2138059000  256.86  262.88  256.50\n4   2025-01-10  250.55   9171541  2341876100  258.57  260.38  250.20\n..         ...     ...       ...         ...     ...     ...     ...\n96  2025-06-04  249.70   5294327  1318386680  246.00  251.38  244.80\n97  2025-06-05  254.11   6488422  1636593300  249.73  255.55  248.46\n98  2025-06-06  249.50   4678326  1173537940  254.18  254.80  249.00\n99  2025-06-09  255.24   7754966  1976886800  249.72  257.00  249.72\n100 2025-06-10  248.88   6180978  1548168800  255.00  255.77  246.50\n\n[101 rows x 7 columns]\n```\n\n\u66f4\u591a\u6848\u4f8b\u5728thsdk\u5e93\u76ee\u5f55\u4e0b\u7684[examples]()\u3002\n\n## Link\n\n- [\u540c\u82b1\u987a\u91cf\u5316\u5e73\u53f0](https://quant.10jqka.com.cn/view/)\n\n- [\u540c\u82b1\u987aPythonTrader\u667a\u80fd\u4ea4\u6613](https://xdres.10jqka.com.cn/help/python/site/)\n\n- [\u540c\u82b1\u987a\u667a\u80fd\u4ea4\u6613](https://www.forfunds.cn/platform/pcweb/productCenter/expert/)\n\n- [\u540c\u82b1\u987apython\u7b56\u7565\u5668API](https://www.showdoc.com.cn/THSPythonSE/3269126718101134)\n\n- [\u540c\u82b1\u987a\u9ad8\u9891\u884c\u60c5\u63a5\u53e3 L1\uff0cL2](https://www.forfunds.cn/platform/pcweb/productCenter/DataFeed/)\n\n- \u540c\u82b1\u987apython\u7b56\u7565\u7f16\u8f91\u5668QQ\u7fa4\uff1a1164717242\uff0c832421882\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\u540c\u82b1\u987a",
    "version": "1.5.4",
    "project_urls": null,
    "split_keywords": [
        "thsdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2aa81fbd5efe2496799d54e11bcf9ad1967fa5a37bcfe7551a61e3af8bfa3abe",
                "md5": "ae8579ff7ec3de3627045210dc80cfbe",
                "sha256": "eadb8c4e9d221459db80e5c1c4255ad6203ffc9ede1a1eeff377effe6dcff15d"
            },
            "downloads": -1,
            "filename": "thsdk-1.5.4.tar.gz",
            "has_sig": false,
            "md5_digest": "ae8579ff7ec3de3627045210dc80cfbe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 21113316,
            "upload_time": "2025-08-06T01:30:32",
            "upload_time_iso_8601": "2025-08-06T01:30:32.085823Z",
            "url": "https://files.pythonhosted.org/packages/2a/a8/1fbd5efe2496799d54e11bcf9ad1967fa5a37bcfe7551a61e3af8bfa3abe/thsdk-1.5.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-06 01:30:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "thsdk"
}
        
Elapsed time: 0.69603s