Skip to main content
< 戻る

概要

利用可能な操作

  • get - Bars v2 を取得

get

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()) {
            // レスポンスを処理する
        }
    }
}

パラメーター

ParameterTypeRequiredDescription
symbolsString:heavy_check_mark:シンボル(カンマ区切りのシンボル一覧)
fromString:heavy_check_mark:開始日
toOptional<String>:heavy_minus_sign:終了日
intervalOptional<String>:heavy_minus_sign:間隔

レスポンス

GetBarsV2Response

エラー

エラー種別ステータスコードContent-Type
models/errors/BzhttpResp400, 500application/json
models/errors/APIException4XX, 5XX/