# 导入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)

Logo

加入社区!打开量化的大门,首批课程上线啦!

更多推荐