# 获取分析师评级概述

get_research_analyst_consensus(code)

  • 介绍

    获取指定股票近3个月的分析师综合评级、目标价区间及各档评级占比

  • 参数

    参数 类型 说明
    code str 股票代码
  • 返回

    参数 类型 说明
    ret RET_CODE 接口调用结果
    data dict 当 ret == RET_OK,返回分析师评级数据字典
    str 当 ret != RET_OK,返回错误描述
    • 返回字典包含以下字段:

      字段 类型 说明
      highest float 最高目标价
      average float 平均目标价
      lowest float 最低目标价
      rating ResearchRatingType 综合评级
      total int 总分析师人数
      update_time int 更新时间戳(秒,评级数据更新时间)
      update_time_str str 更新日期
      buy float Buy 评级占比
      hold float Hold 评级占比
      sell float Sell 评级占比
      strong_buy float Strong Buy 占比
      underperform float Underperform 占比
  • Example

import json
from moomoo import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_research_analyst_consensus("HK.00700")
if ret == RET_OK:
    print(json.dumps(data, indent=2, ensure_ascii=False))
else:
    print('error:', data)
quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
  • Output
{
  "highest": 820.0,
  "average": 716.0,
  "lowest": 579.51,
  "rating": 5,
  "total": 44,
  "update_time": 1778469178,
  "update_time_str": "2026-05-11",
  "buy": 22.727,
  "hold": 0.0,
  "sell": 0.0,
  "strong_buy": 77.273,
  "underperform": 0.0
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

接口限制

  • 每 30 秒内最多请求 30 次。
  • 支持正股及 REIT。