# 导入tushare
import tushare as ts
# 初始化pro接口
pro = ts.pro_api('自己的token指令')
# 拉取数据
df = pro.daily(**{
"ts_code": "600027.SH",
"trade_date": "",
"start_date": "",
"end_date": "",
"offset": "",
"limit": ""
}, fields=[
"ts_code",
"trade_date",
"open",
"high",
"low",
"close",
"pre_close",
"change",
"pct_chg",
"vol",
"amount"
])
print(df)
python通过tushare获取股票日线行情数据
于 2022-07-06 11:47:20 首次发布