Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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')
|
||||
Reference in New Issue
Block a user