Skip to main content

AlphaKit — 简洁的金融数据 API 工具包

Project description

AlphaKit SDK

简洁的 A 股市场数据 API 工具包。仅供个人学习使用。

安装

pip install alphakit-sdk

快速开始

import alphakit as ak

ak.set_token('your_token_here')
api = ak.AlphaKit()

# 默认获取最近一年日线
df = api.daily(ts_code='000001.SZ')
print(df)

客户端初始化

import alphakit as ak

# 全局 token
ak.set_token('your_token_here')
api = ak.AlphaKit()

# 实例化时传入
api = ak.AlphaKit(token='your_token_here')

API 接口

股票

# 股票列表
api.stock_basic()
api.stock_basic(ts_code='000001.SZ')

错误码

错误码 含义 处理
1001 Token 无效/过期 检查 token
1002 等级无权访问 升级等级
1003 IP 限制 检查 IP 绑定
1004 触发限频 降低请求频率
1005 当日配额用尽 等次日或提升配额
1006 参数错误 检查参数
1500 服务器错误 稍后重试
9999 网络失败 检查网络

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

alphakit_sdk-0.2.5.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alphakit_sdk-0.2.5-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file alphakit_sdk-0.2.5.tar.gz.

File metadata

  • Download URL: alphakit_sdk-0.2.5.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for alphakit_sdk-0.2.5.tar.gz
Algorithm Hash digest
SHA256 a615512b7f8bbe93bcbba363686882213875fe52e077226064c68e3fe6db18b8
MD5 23384f88c6580b540f7ec84266c33148
BLAKE2b-256 1e7d0d8e579b552ed72835dae3fe9923164a115968346d181703742ecaa28e87

See more details on using hashes here.

File details

Details for the file alphakit_sdk-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: alphakit_sdk-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for alphakit_sdk-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b54477093e51a2dccc774e97ac23b0d966496f96be0a3e287237463b2629d394
MD5 33fde16ea42560526faf096572f65012
BLAKE2b-256 b25e65a8d6d118df436b5bcefa540d5b2f6dc6af83ed7e6173bf45672daf54e4

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