Skip to main content
< 戻る

概要

利用可能な操作

  • get - ティッカー・トレンドデータを取得
  • getList - ティッカー・トレンドリストデータを取得

get

ticker のトレンドデータを取得

使用例

package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.errors.BzhttpResp;
import org.benzinga.BZClient.models.errors.HttpapiTickerTrendAPIResponse;
import org.benzinga.BZClient.models.operations.GetTickerTrendDataRequest;
import org.benzinga.BZClient.models.operations.GetTickerTrendDataResponse;

public class Application {

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

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

        GetTickerTrendDataRequest req = GetTickerTrendDataRequest.builder()
                .interval("<value>")
                .tickers("<value>")
                .source("<value>")
                .build();

        GetTickerTrendDataResponse res = sdk.tickerTrends().get()
                .request(req)
                .call();

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

パラメータ

パラメータ必須説明
requestGetTickerTrendDataRequest:heavy_check_mark:このリクエストに使用するリクエストオブジェクト。

レスポンス

GetTickerTrendDataResponse

エラー

エラー種別ステータスコードコンテンツタイプ
models/errors/BzhttpResp400application/json
models/errors/HttpapiTickerTrendAPIResponse500application/json
models/errors/APIException4XX, 5XX/

getList

tickerトレンドリストのデータを取得します

使用例

package hello.world;

import java.lang.Exception;
import org.benzinga.BZClient.Bzclient;
import org.benzinga.BZClient.models.errors.BzhttpResp;
import org.benzinga.BZClient.models.errors.HttpapiTrendingTickersListAPIResponse;
import org.benzinga.BZClient.models.operations.GetTickerTrendListDataRequest;
import org.benzinga.BZClient.models.operations.GetTickerTrendListDataResponse;

public class Application {

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

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

        GetTickerTrendListDataRequest req = GetTickerTrendListDataRequest.builder()
                .interval("<value>")
                .tickers("<value>")
                .source("<value>")
                .build();

        GetTickerTrendListDataResponse res = sdk.tickerTrends().getList()
                .request(req)
                .call();

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

パラメータ

パラメータ必須説明
requestGetTickerTrendListDataRequest:heavy_check_mark:リクエストで使用するリクエストオブジェクト。

レスポンス

GetTickerTrendListDataResponse

エラー

エラー種別ステータスコードコンテンツタイプ
models/errors/BzhttpResp400application/json
models/errors/HttpapiTrendingTickersListAPIResponse500application/json
models/errors/APIException4XX, 5XX/