AlphaFeed

量化数据,即取即用

面向量化交易者的金融市场数据 API。覆盖 A 股、美股、港股。Python SDK 开箱即用。

pip install alphafeed

覆盖主流数据场景

实时行情

A股/美股/港股实时快照

K线数据

分钟/日/周/月多周期K线

五档盘口

A股五档盘口报价数据

日内分时

分钟级日内走势

标的元数据

全量标的基础信息

Python SDK

pip install alphafeed

几行代码,即刻接入

demo.py
from alphafeed import AlphaFeed
af = AlphaFeed(api_key="your-api-key")
# 获取多只股票日K线
df = af.klines.get("600519.SH", period="1d", to_dataframe=True)
print(df.tail())
# 批量获取多只股票实时行情
quotes = af.quotes.get(symbols=[
"600000.SH", "000001.SZ", "601318.SH", "600519.SH"
])
for q in quotes:
print(f"{q['symbol']}: {q['last_price']}")
# 一键获取全部 A 股实时行情(标的池查询)
all_cn = af.quotes.get(universes=["CN_Stock"])
print(f"共 {len(all_cn)} 只标的")
# 五档盘口
depth = af.depth.get("600519.SH")
for i in range(5):
print(f"Bid {i+1}: {depth['bid_prices'][i]} x {depth['bid_volumes'][i]}, Ask {i+1}: {depth['ask_prices'][i]} x {depth['ask_volumes'][i]}")

开始使用 AlphaFeed

免费注册,立即获取 API Key

免费注册