Skip to content

Latest commit

 

History

History
127 lines (90 loc) · 6.24 KB

File metadata and controls

127 lines (90 loc) · 6.24 KB

TickerTrends

(tickerTrends())

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 com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.errors.BzhttpResp;
import com.benzinga.bzclient.models.errors.HttpapiTickerTrendAPIResponse;
import com.benzinga.bzclient.models.operations.GetTickerTrendDataRequest;
import com.benzinga.bzclient.models.operations.GetTickerTrendDataResponse;
import java.lang.Exception;

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

Parameter Type Required Description
request GetTickerTrendDataRequest ✔️ The request object to use for the request.

Response

GetTickerTrendDataResponse

Errors

Error Type Status Code Content Type
models/errors/BzhttpResp 400 application/json
models/errors/HttpapiTickerTrendAPIResponse 500 application/json
models/errors/APIException 4XX, 5XX */*

getList

Get ticker trend list data

Example Usage

package hello.world;

import com.benzinga.bzclient.Bzclient;
import com.benzinga.bzclient.models.errors.BzhttpResp;
import com.benzinga.bzclient.models.errors.HttpapiTrendingTickersListAPIResponse;
import com.benzinga.bzclient.models.operations.GetTickerTrendListDataRequest;
import com.benzinga.bzclient.models.operations.GetTickerTrendListDataResponse;
import java.lang.Exception;

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

Parameter Type Required Description
request GetTickerTrendListDataRequest ✔️ The request object to use for the request.

Response

GetTickerTrendListDataResponse

Errors

Error Type Status Code Content Type
models/errors/BzhttpResp 400 application/json
models/errors/HttpapiTrendingTickersListAPIResponse 500 application/json
models/errors/APIException 4XX, 5XX */*