Skip to content

Latest commit

 

History

History
580 lines (412 loc) · 28.4 KB

extend_api.rst

File metadata and controls

580 lines (412 loc) · 28.4 KB

扩展 API

扩展API 是Ricequant从众多的数据源中整理、归纳和维护的众多数据类型的API,RQAlpha中不支持相应数据的获取和查询,如果想要使用扩展API 可以在 Ricequant 中免费使用。或者联系我们获取全功能支持的机构版。

未来我们可能会考虑以接口和授权的方式来开放数据源的获取,届时Extend API 将可以在RQAlpha中被调用。

您也可以通过按照接口规范来进行 API 的扩展。

get_fundamentals - 查询财务数据

get_price - 合约历史数据

get_dominant_future - 期货主力合约

get_securities_margin - 融资融券信息

get_shares - 流通股信息

get_turnover_rate - 历史换手率

logger.info(get_turnover_rate('000001.XSHE', count=5))
#[Out]
#           today    week   month  three_month  six_month    year  \
#2016-08-01  0.5190  0.4478  0.3213       0.2877     0.3442  0.5027
#2016-08-02  0.3070  0.4134  0.3112       0.2843     0.3427  0.5019
#2016-08-03  0.2902  0.3460  0.3102       0.2823     0.3432  0.4982
#2016-08-04  0.9189  0.4938  0.3331       0.2914     0.3482  0.4992
#2016-08-05  0.4962  0.5031  0.3426       0.2960     0.3504  0.4994

#          current_year   total
#2016-08-01        0.3585  1.1341
#2016-08-02        0.3570  1.1341
#2016-08-03        0.3565  1.1339
#2016-08-04        0.3604  1.1339
#2016-08-05        0.3613  1.1338

index_components - 指数成分股

get_dividend - 分红数据

get_split - 拆分数据

分级基金数据

雪球舆论数据