> ## 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.

# Bars

> bars()

[\< 뒤로](/ko/sdks/languages/java#bars)

<div id="overview">
  ## 개요
</div>

<div id="available-operations">
  ### 사용 가능한 작업
</div>

* [가져오기](#get) - Bars V2 가져오기

<div id="get">
  ## 가져오기
</div>

Bars V2 가져오기

<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.errors.BzhttpResp;
import org.benzinga.BZClient.models.operations.GetBarsV2Response;

public class Application {

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

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

        GetBarsV2Response res = sdk.bars().get()
                .symbols("<value>")
                .from("<value>")
                .to("<value>")
                .interval("<value>")
                .call();

        if (res.responseBodies().isPresent()) {
            // 응답 처리
        }
    }
}
```

<div id="parameters">
  ### Parameters
</div>

| Parameter  | Type                | Required             | Description     |
| ---------- | ------------------- | -------------------- | --------------- |
| `symbols`  | *String*            | :heavy\_check\_mark: | 심볼 (콤마로 구분된 목록) |
| `from`     | *String*            | :heavy\_check\_mark: | 시작일             |
| `to`       | *Optional\<String>* | :heavy\_minus\_sign: | 종료일             |
| `interval` | *Optional\<String>* | :heavy\_minus\_sign: | 조회 간격           |

<div id="response">
  ### 응답
</div>

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

<div id="errors">
  ### 오류
</div>

| 오류 유형                      | 상태 코드    | 콘텐츠 유형           |
| -------------------------- | -------- | ---------------- |
| models/errors/BzhttpResp   | 400, 500 | application/json |
| models/errors/APIException | 4XX, 5XX | */*              |
