Files
freedakgmail 9c7d7abdd4 Initial commit
2026-07-17 18:49:35 +08:00

21 lines
746 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import akshare as ak
# 获取个股资金流向排名(全市场)
# 返回股票主力净流入、超大单、大单、中单、小单排名
df = ak.stock_individual_fund_flow_rank(indicator="今日")
print("=== 今日个股资金流向排名 ===")
print(df.head(10))
# 历史某股主力资金流向
print("\n=== 平安银行历史资金流向 ===")
df2 = ak.stock_individual_fund_flow(stock="000001", market="sz") # 平安银行
print(df2.head())
df2.to_csv("000001_zjlx.csv", index=False)
print("已保存到 000001_zjlx.csv")
# # B. Tushare Pro(需要注册获取token
# import tushare as ts
# ts.set_token('你的 token')
# pro = ts.pro_api()
# df = pro.moneyflow(ts_code='000001.SZ', start_date='20240101', end_date='20240122')