개요
사용 가능한 작업
- 가져오기 - Bars V2 가져오기
가져오기
사용 예시
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()) {
// 응답 처리
}
}
}
Parameters
| 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: | 조회 간격 |
응답
오류
| 오류 유형 | 상태 코드 | 콘텐츠 유형 |
|---|---|---|
| models/errors/BzhttpResp | 400, 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |