当前位置:网站首页>掘金量化:通过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
边栏推荐
- Babbitt | metauniverse daily must read: is IP authorization the way to break the circle of NFT? What are the difficulties? How should holder choose the cooperation platform
- Common fitting models and application methods of PCL
- Es6中Promise的使用
- What are the applications and benefits of MES management system
- Unity uses maskablegraphic to draw a line with an arrow
- HAVE FUN | “飞船计划”活动最新进展
- 2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
- INS/GPS组合导航类型简介
- Qpushbutton- "function refinement"
- Digital scrolling increases effect
猜你喜欢

Change your posture to do operation and maintenance! GOPs 2022 Shenzhen station highlights first!

HAVE FUN | “飞船计划”活动最新进展

What are the characteristics of the operation and maintenance management system
Django database (SQLite) basic introductory tutorial

Dotconnect for DB2 Data Provider

Redis getting started complete tutorial: client management
Django数据库(SQlite)基本入门使用教程

数字滚动增加效果

2022 spring recruitment begins, and a collection of 10000 word interview questions will help you

一文读懂Faster RCNN
随机推荐
Qpushbutton- "function refinement"
A complete tutorial for getting started with redis: problem location and optimization
普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
PSINS中19维组合导航模块sinsgps详解(滤波部分)
新标杆!智慧化社会治理
HAVE FUN | “飞船计划”活动最新进展
用全连接+softmax对图片的feature进行分类
巴比特 | 元宇宙每日必读:IP授权是NFT的破圈之路吗?它的难点在哪里?Holder该如何选择合作平台?...
Utilisation de la promesse dans es6
c语言(字符串)如何把字符串中某个指定的字符删除?
Here comes a white paper to uncover the technology behind Clickhouse, a node with 10000 bytes!
ERROR: Could not find a version that satisfies the requirement xxxxx (from versions: none)解决办法
从控制理论的角度谈数据分析
写作系列之contribution
Safety delivery engineer
数字滚动增加效果
慧通编程入门课程 - 2A闯关
Error in fasterxml tostringserializerbase
What are the applications and benefits of MES management system
uniapp的表单验证