(tickerTrends())
Get ticker trend data
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
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetTickerTrendDataRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/BzhttpResp | 400 | application/json |
| models/errors/HttpapiTickerTrendAPIResponse | 500 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get ticker trend list data
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
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetTickerTrendListDataRequest | ✔️ | The request object to use for the request. |
GetTickerTrendListDataResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/BzhttpResp | 400 | application/json |
| models/errors/HttpapiTrendingTickersListAPIResponse | 500 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |