Package org.stellar.sdk.requests
Class TradeAggregationsRequestBuilder
java.lang.Object
org.stellar.sdk.requests.RequestBuilder
org.stellar.sdk.requests.TradeAggregationsRequestBuilder
Builds requests connected to trades.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.stellar.sdk.requests.RequestBuilder
RequestBuilder.Order
-
Constructor Summary
ConstructorDescriptionTradeAggregationsRequestBuilder
(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl serverURI, Asset baseAsset, Asset counterAsset, long startTime, long endTime, long resolution, long offset) -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Build and execute request.static Page
<TradeAggregationResponse> execute
(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl uri) Methods inherited from class org.stellar.sdk.requests.RequestBuilder
cursor, limit, order, setAssetParameter, setAssetsParameter
-
Constructor Details
-
TradeAggregationsRequestBuilder
-
-
Method Details
-
execute
public static Page<TradeAggregationResponse> execute(okhttp3.OkHttpClient httpClient, okhttp3.HttpUrl uri) - Parameters:
httpClient
-OkHttpClient
to use to send the request.uri
-HttpUrl
URI to send the request to.- Returns:
Page
ofTradeAggregationResponse
- Throws:
NetworkException
- All the exceptions below are subclasses of NetworkErrorBadRequestException
- if the request fails due to a bad request (4xx)BadResponseException
- if the request fails due to a bad response from the server (5xx)TooManyRequestsException
- if the request fails due to too many requests sent to the serverRequestTimeoutException
- When Horizon returns aTimeout
or connection timeout occurredUnknownResponseException
- if the server returns an unknown status codeConnectionErrorException
- When the request cannot be executed due to cancellation or connectivity problems, etc.
-
execute
Build and execute request.- Returns:
Page
ofTradeAggregationResponse
- Throws:
NetworkException
- All the exceptions below are subclasses of NetworkErrorBadRequestException
- if the request fails due to a bad request (4xx)BadResponseException
- if the request fails due to a bad response from the server (5xx)TooManyRequestsException
- if the request fails due to too many requests sent to the serverRequestTimeoutException
- When Horizon returns aTimeout
or connection timeout occurredUnknownResponseException
- if the server returns an unknown status codeConnectionErrorException
- When the request cannot be executed due to cancellation or connectivity problems, etc.
-