finshare
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesefinshare - 金融数据获取工具
finshare - 金融数据获取工具
finshare 是一个专业的中国金融数据获取工具库,完全免费,无需 API Key。
finshare 是一个专业的中国金融数据获取工具库,完全免费,无需 API Key。
安装
安装
bash
pip install finsharebash
pip install finshare主要功能
主要功能
1. 获取股票K线数据
1. 获取股票K线数据
python
import finshare as fspython
import finshare as fs获取历史K线
获取历史K线
df = fs.get_historical_data('000001.SZ', start='2024-01-01', end='2024-12-31')
print(df.head())
undefineddf = fs.get_historical_data('000001.SZ', start='2024-01-01', end='2024-12-31')
print(df.head())
undefined2. 获取实时快照
2. 获取实时快照
python
undefinedpython
undefined单只股票
单只股票
snapshot = fs.get_snapshot_data('000001.SZ')
print(f"最新价: {snapshot.last_price}")
snapshot = fs.get_snapshot_data('000001.SZ')
print(f"最新价: {snapshot.last_price}")
批量获取
批量获取
snapshots = fs.get_batch_snapshots(['000001.SZ', '600519.SH'])
undefinedsnapshots = fs.get_batch_snapshots(['000001.SZ', '600519.SH'])
undefined3. 资金流向数据
3. 资金流向数据
python
undefinedpython
undefined个股资金流向
个股资金流向
df = fs.get_money_flow('000001.SZ')
df = fs.get_money_flow('000001.SZ')
行业资金流向
行业资金流向
df = fs.get_money_flow_industry()
undefineddf = fs.get_money_flow_industry()
undefined4. 龙虎榜数据
4. 龙虎榜数据
python
undefinedpython
undefined获取龙虎榜
获取龙虎榜
df = fs.get_lhb()
df = fs.get_lhb()
龙虎榜明细
龙虎榜明细
df = fs.get_lhb_detail('000001.SZ')
undefineddf = fs.get_lhb_detail('000001.SZ')
undefined5. 融资融券
5. 融资融券
python
undefinedpython
undefined融资融券数据
融资融券数据
df = fs.get_margin()
df = fs.get_margin()
个股融资融券明细
个股融资融券明细
df = fs.get_margin_detail('000001.SZ')
undefineddf = fs.get_margin_detail('000001.SZ')
undefined6. 基金数据
6. 基金数据
python
undefinedpython
undefined基金净值
基金净值
df = fs.get_fund_nav('161039', '2024-01-01', '2024-12-31')
df = fs.get_fund_nav('161039', '2024-01-01', '2024-12-31')
基金信息
基金信息
info = fs.get_fund_info('161039')
info = fs.get_fund_info('161039')
基金列表
基金列表
funds = fs.get_fund_list()
undefinedfunds = fs.get_fund_list()
undefined7. 期货数据
7. 期货数据
python
undefinedpython
undefined期货K线
期货K线
df = fs.get_future_kline('cu0', '2024-06-01', '2024-07-17')
df = fs.get_future_kline('cu0', '2024-06-01', '2024-07-17')
期货快照
期货快照
snapshot = fs.get_future_snapshot('cu0')
undefinedsnapshot = fs.get_future_snapshot('cu0')
undefined8. 证券列表
8. 证券列表
python
undefinedpython
undefined股票列表
股票列表
stocks = fs.get_stock_list()
stocks = fs.get_stock_list()
ETF列表
ETF列表
etfs = fs.get_etf_list()
etfs = fs.get_etf_list()
LOF列表
LOF列表
lofs = fs.get_lof_list()
lofs = fs.get_lof_list()
期货列表
期货列表
futures = fs.get_future_list()
undefinedfutures = fs.get_future_list()
undefined支持的数据源
支持的数据源
- 东方财富
- 腾讯财经
- 新浪财经
- 通达信
- BaoStock
- 东方财富
- 腾讯财经
- 新浪财经
- 通达信
- BaoStock
更多信息
更多信息
- 官网: https://meepoquant.com
- GitHub: https://github.com/finvfamily/finshare
- Discord: https://discord.gg/XT5f8ZGB
- 官网: https://meepoquant.com
- GitHub: https://github.com/finvfamily/finshare
- Discord: https://discord.gg/XT5f8ZGB