개요
사용 가능한 작업
가져오기
사용 예시
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()) {
// 응답 처리
}
}
}
매개변수
| 매개변수 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
request | GetTickerTrendDataRequest | :heavy_check_mark: | 이 요청에 사용할 요청 객체입니다. |
응답
오류
| 오류 유형 | 상태 코드 | 콘텐츠 유형 |
|---|---|---|
| models/errors/BzhttpResp | 400 | application/json |
| models/errors/HttpapiTickerTrendAPIResponse | 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |
getList
사용 예시
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()) {
// 응답 처리
}
}
}
매개변수
| 매개변수 | 타입 | 필수 여부 | 설명 |
|---|---|---|---|
request | GetTickerTrendListDataRequest | :heavy_check_mark: | 요청에 사용되는 요청 객체입니다. |
응답
오류
| 오류 유형 | 상태 코드 | 콘텐츠 타입 |
|---|---|---|
| models/errors/BzhttpResp | 400 | application/json |
| models/errors/HttpapiTrendingTickersListAPIResponse | 500 | application/json |
| models/errors/APIException | 4XX, 5XX | / |