CNABS OPENAPI SDK
Project description
CNABS Openapi Python Sdk
本模块为CNABS OPENAPI的 Python SDK 依赖包
- Requests: pip install requests
使用帮助
- 引入cnabssdk包
import cnabssdk.clients
import cnabssdk.deals
import cnabssdk.securities
- 初始化token Token 获得地址: https://www.cn-abs.com/openapi.html#/my-token
cnabssdk.init("20200915-20210915--xxxxx8dXSMAk")
- 获得产品列表等接口
deals = cnabssdk.deals.get_list('建元')
print('Count: ' + str(len(deals)))
deal = cnabssdk.deals.get_detail(deals[0].id)
print(deal.name)
securitylist = cnabssdk.securities.get_list(year= 2020)
print('Security Count: ' + str(len(securitylist)))
sec = cnabssdk.securities.get_detail(securitylist[0].id)
print(sec.short_name)
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
cnabs_sdk-0.0.5.tar.gz
(6.2 kB
view details)
Built Distribution
cnabs_sdk-0.0.5-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file cnabs_sdk-0.0.5.tar.gz
.
File metadata
- Download URL: cnabs_sdk-0.0.5.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b0251cfb20d9a267ace81c6056511f4ac98d659d69db47b1989006585eccd4d |
|
MD5 | a470a7ae755ff729854594ab5c5fd13f |
|
BLAKE2b-256 | dd8c3be12c72c92e025b8bbefbcc7f126be8398bcaecd36635a4d97a0894fcb2 |
File details
Details for the file cnabs_sdk-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: cnabs_sdk-0.0.5-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4e1c7907dbe36732edf03c90a901a673c884e97c56354687ff80bd7ffefabcd |
|
MD5 | eb80ceb1d7d256ce09be3b5d6c76b23b |
|
BLAKE2b-256 | 6a3f6b05ced826d320325d4b5b451c8cd0eb7e882461bef056619aa9079f9e2a |