掘金量化

Python SDK

  1. 安装软件包,python.exe -m pip install gm -U -i https://mirrors.aliyun.com/pypi/simple/
  2. 获取token,安装掘金终端,登录账号后,在系统设置,可以查看和重新生成token。
  3. 测试
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'
)


https://www.myquant.cn/docs2/operatingInstruction/study/SDK%E4%B8%8B%E8%BD%BD%E5%8F%8A%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.html#python-sdk

资源

官网