TradesRequestBuilder class

Builds requests connected to trades. When an offer is fully or partially fulfilled, a trade happens. Trades can also be caused by successful path payments, because path payments involve fulfilling offers. A trade occurs between two parties—base and counter. Which is which is either arbitrary or determined by the calling query. See: Trades

Inheritance

Constructors

TradesRequestBuilder(Client httpClient, Uri serverURI)

Properties

hashCode int
The hash code for this object.
no setterinherited
httpClient ↔ Client
getter/setter pairinherited
queryParameters Map<String, String>
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uriBuilder Uri
getter/setter pairinherited

Methods

baseAsset(Asset asset) TradesRequestBuilder
buildUri() Uri
inherited
counterAsset(Asset asset) TradesRequestBuilder
cursor(String token) TradesRequestBuilder
Sets cursor parameter on the request. A cursor is a value that points to a specific location in a collection of resources. The cursor attribute itself is an opaque value meaning that users should not try to parse it.
override
encodeAsset(Asset asset) String
inherited
encodeAssets(List<Asset> assets) String
inherited
execute() Future<Page<TradeResponse>>
forAccount(String accountId) TradesRequestBuilder
Returns the trades for a given account by accountId. See: Trades for Account
limit(int number) TradesRequestBuilder
Sets limit parameter on the request. It defines maximum number of records to return. For range and default values check documentation of the endpoint requested.
override
liquidityPoolId(String poolId) TradesRequestBuilder
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offerId(String offerId) TradesRequestBuilder
order(RequestBuilderOrder direction) TradesRequestBuilder
Sets order parameter on the request.
override
setSegments(List<String> segments) RequestBuilder
inherited
stream() Stream<TradeResponse>
Allows to stream SSE events from horizon. Certain endpoints in Horizon can be called in streaming mode using Server-Sent Events. This mode will keep the connection to horizon open and horizon will continue to return responses as ledgers close. See: Streaming
toString() String
A string representation of this object.
inherited
tradeType(String tradeType) TradesRequestBuilder

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

requestExecute(Client httpClient, Uri uri) Future<Page<TradeResponse>>