This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.1 instead.
Reason given by maintainers: Version numbering adjustment, please use 0.1.0
TickerLab Python SDK
Official Python Client for the TickerLab Quantitative Financial Market Data Platform.
⚡ 快速安装 (Installation)
pip install tickerlab
# 或安装带有 Pandas 支持的完整版:
pip install "tickerlab[pandas]"
🚀 3 行代码快速上手 (Quickstart)
import tickerlab as tl
# 1. 设置您的 API Key (可在控制台 https://tickerlab.org/dashboard 生成)
tl.set_token("mc_live_your_api_key")
# 2. 获取股票日线行情 (自动返回 Pandas DataFrame)
df = tl.get_kline("000001.SZ", period="1d", start="2026-01-01", adjust="qfq")
print(df.tail())
# 3. 获取实时行情快照
snapshot = tl.get_snapshot("600519.SH")
print(snapshot)
# 4. 获取技术指标 (MACD / RSI / KDJ / BOLL / MA)
macd_df = tl.get_indicators("000001.SZ", indicator="macd")
print(macd_df.tail())
📚 常用 API 清单
| 方法 | 说明 | 返回类型 |
|---|---|---|
tl.get_kline(symbol, period='1d', start=None, end=None, adjust='qfq') |
获取历史 K 线时间序列 | pd.DataFrame |
tl.get_snapshot(symbol) |
实时市场行情快照 | dict / DataFrame |
tl.get_daily_basic(symbol, start=None, end=None) |
每日基本面与估值指标 (PE, PB, 换手率, 市值) | pd.DataFrame |
tl.get_indicators(symbol, indicator='macd', period='1d') |
计算技术指标 (MACD, RSI, KDJ 等) | pd.DataFrame |
tl.get_trade_calendar(start=None, end=None) |
交易日历与休市安排 (0-credit 免费) | pd.DataFrame |
tl.search_stocks(query='平安') |
快速代码/拼音/名称搜索 (0-credit 免费) | pd.DataFrame |
tl.get_stock_list() |
全市场股票基础列表 (0-credit 免费) | pd.DataFrame |
tl.get_macro(indicator='cpi') |
宏观经济数据 (CPI, PPI, GDP, PMI, LPR 等) | pd.DataFrame |
tl.get_market_sentiment() |
市场情绪与多空全景概览 | dict |
tl.get_financial_ratios(symbol) |
财务核心比率与财报核心指标 | pd.DataFrame |
tl.query(endpoint, params={}) |
通用底层接口调用 | Any |
🔑 环境变量支持
除了 tl.set_token(...) 外,SDK 会自动检测 TICKERLAB_API_KEY 环境变量:
export TICKERLAB_API_KEY="mc_live_xxxx"
import tickerlab as tl
# 无需手动 set_token,自动从环境变量加载
df = tl.get_kline("000001.SZ")
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tickerlab-1.0.0.tar.gz.
File metadata
- Download URL: tickerlab-1.0.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
587ceaa9ac4662574544840cf1385564a5a785bce4b3b3dd6847a4eb6b68f2ef
|
|
| MD5 |
f172f61915ac7c5a783d8a3db60ae639
|
|
| BLAKE2b-256 |
899cf38649f9bf567c04923bb18d3810c912ba8fff784722ad3e84ffcd6f4ea7
|
File details
Details for the file tickerlab-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tickerlab-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9691a3ed5697546a8f0207125b1f8a14c0feb5ab8dd5da441ae7887360121e3
|
|
| MD5 |
5486b564899a05d5bb7f7f340648d7e4
|
|
| BLAKE2b-256 |
878ec7d38f1f537d6fa8c03d772d9512323261d89c62217868c5703b9642f082
|