< BACK

Overview

Available Operations

  • get - Get ticker trend data
  • getList - Get ticker trend list data

get

Get ticker trend data

Example Usage

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()) {
            // handle response
        }
    }
}

Parameters

ParameterTypeRequiredDescription
requestGetTickerTrendDataRequest:heavy_check_mark:The request object to use for the request.

Response

GetTickerTrendDataResponse

Errors

Error TypeStatus CodeContent Type
models/errors/BzhttpResp400application/json
models/errors/HttpapiTickerTrendAPIResponse500application/json
models/errors/APIException4XX, 5XX*/*

getList

Get ticker trend list data

Example Usage

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()) {
            // handle response
        }
    }
}

Parameters

ParameterTypeRequiredDescription
requestGetTickerTrendListDataRequest:heavy_check_mark:The request object to use for the request.

Response

GetTickerTrendListDataResponse

Errors

Error TypeStatus CodeContent Type
models/errors/BzhttpResp400application/json
models/errors/HttpapiTrendingTickersListAPIResponse500application/json
models/errors/APIException4XX, 5XX*/*

Was this page helpful?