当前位置:网站首页>掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺
掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺
2022-07-06 19:26:00 【人工智能曾小健】
# coding=utf-8
from __future__ import print_function, absolute_import
from gm.api import *
# 可以直接提取数据,掘金终端需要打开,接口取数是通过网络请求的方式,效率一般,行情数据可通过subscribe订阅方式
# 设置token, 查看已有token ID,在用户-密钥管理里获取
set_token('xxxxxxxxxxxxxxxd')
# 查询历史行情, 采用定点复权的方式, adjust指定前复权,adjust_end_time指定复权时间点
data = history(symbol='SHSE.600000', frequency='1d', start_time='2020-01-01', end_time='2022-07-04', # 09:00:00 16:00:00
fields='bob,open,high,low,close', adjust=ADJUST_POST, adjust_end_time='2022-07-05',df=True) #adjust_end_time='2020-12-31',
data['bob'] = data['bob'].astype(str)
data['bob'] = data['bob'].str[0:10]
data
边栏推荐
- Redis getting started complete tutorial: common exceptions on the client
- Kysl Haikang camera 8247 H9 ISAPI test
- Form validation of uniapp
- What management points should be paid attention to when implementing MES management system
- 测试优惠券要怎么写测试用例?
- Dotconnect for DB2 Data Provider
- The so-called consumer Internet only matches and connects industry information, and does not change the industry itself
- C language exercises_ one
- 6-6漏洞利用-SSH安全防御
- KYSL 海康摄像头 8247 h9 isapi测试
猜你喜欢
Redis Getting started tutoriel complet: positionnement et optimisation des problèmes
dotConnect for DB2数据提供者
uniapp的表单验证
Remember the problem analysis of oom caused by a Jap query
如何设计好接口测试用例?教你几个小技巧,轻松稿定
NuScenes数据集关于Radar数据的统计
A complete tutorial for getting started with redis: RDB persistence
Hash table and full comments
Es6中Promise的使用
What are the characteristics of the operation and maintenance management system
随机推荐
Classify the features of pictures with full connection +softmax
The 8 element positioning methods of selenium that you have to know are simple and practical
【2022国赛模拟】多边形——计算几何、二分答案、倍增
MySQL --- 常用函数 - 字符串函数
Metaforce force meta universe fossage 2.0 smart contract system development (source code deployment)
换个姿势做运维!GOPS 2022 · 深圳站精彩内容抢先看!
KYSL 海康摄像头 8247 h9 isapi测试
AWS learning notes (I)
Redis入門完整教程:問題定比特與優化
Huitong programming introductory course - 2A breakthrough
QPushButton-》函数精解
Remember the problem analysis of oom caused by a Jap query
Redis入门完整教程:复制原理
MySQL is an optimization artifact to improve the efficiency of massive data query
Contribution of Writing Series
MySQL
S120驱动器基本调试步骤总结
Summary of basic debugging steps of S120 driver
凌云出海记 | 易点天下&华为云:推动中国电商企业品牌全球化
CDB PDB 用户权限管理