概要
利用可能な操作
- get - Bars v2 を取得
get
使用例
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()) {
// レスポンスを処理する
}
}
}
パラメーター
| 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: | 間隔 |
レスポンス
エラー
| エラー種別 | ステータスコード | Content-Type |
|---|---|---|
| models/errors/BzhttpResp | 400, 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |