# アナリスト評価コンセンサスの取得

get_research_analyst_consensus(code)

  • 説明

    指定銘柄の過去3ヶ月間のアナリスト総合評価、目標株価レンジ、各評価区分の割合を取得します

  • パラメータ

    パラメータ 説明
    code str 銘柄コード
  • 戻り値

    パラメータ 説明
    ret RET_CODE API 呼び出し結果
    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

API 制限

  • 30秒以内に最大30リクエスト。
  • 普通株式および REIT をサポート。