掘金量化
Python SDK
- 安装软件包,
python.exe -m pip install gm -U -i https://mirrors.aliyun.com/pypi/simple/ - 获取token,安装掘金终端,登录账号后,在系统设置,可以查看和重新生成token。
- 测试
import gm.api as gm
gm.set_token("xxxxxxxx")
# 获取历史K线示例
history = gm.history(
symbol='SHFE.rb2405',
frequency='1d', # 日线
start_time='2023-01-01',
end_time='2023-12-31'
)