> ## Documentation Index
> Fetch the complete documentation index at: https://docs.benzinga.com/llms.txt
> Use this file to discover all available pages before exploring further.

# コンセンサス・レーティング

> consensusRatings()

[\< 戻る](/ja/sdks/languages/java#consensusratings)

<div id="overview">
  ## 概要
</div>

<div id="available-operations">
  ### 利用可能な操作
</div>

* [取得](#get) - コンセンサス・レーティングの取得

<div id="get">
  ## 取得
</div>

指定したシンボルのコンセンサスレーティングを取得します。

<div id="example-usage">
  ### 使用例
</div>

```java theme={null}
package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.operations.GetConsensusRatingsV1Request;
import org.benzinga.BZClient.models.operations.GetConsensusRatingsV1Response;

public class Application {

    public static void main(String[] args) throws Exception {

        Bzclient sdk = Bzclient.builder()
                .apiKeyAuth("<YOUR_API_KEY_HERE>")
            .build();

        GetConsensusRatingsV1Request req = GetConsensusRatingsV1Request.builder()
                .build();

        GetConsensusRatingsV1Response res = sdk.consensusRatings().get()
                .request(req)
                .call();

        if (res.apiConsensusRating().isPresent()) {
            // レスポンスを処理する
        }
    }
}
```

<div id="parameters">
  ### パラメータ
</div>

| パラメータ     | 型                                                                                       | 必須                   | 説明                       |
| --------- | --------------------------------------------------------------------------------------- | -------------------- | ------------------------ |
| `request` | [GetConsensusRatingsV1Request](../../models/operations/GetConsensusRatingsV1Request.md) | :heavy\_check\_mark: | このリクエストで使用するリクエストオブジェクト。 |

<div id="response">
  ### レスポンス
</div>

**[GetConsensusRatingsV1Response](../../models/operations/GetConsensusRatingsV1Response.md)**

<div id="errors">
  ### エラー
</div>

| エラータイプ                     | ステータスコード | コンテンツタイプ |
| -------------------------- | -------- | -------- |
| models/errors/APIException | 4XX, 5XX | */*      |
