Interface GetAggregatePriceResult
- All Superinterfaces:
XrplResult
- All Known Implementing Classes:
ImmutableGetAggregatePriceResult
Result object for
get_aggregate_price RPC calls.-
Method Summary
Modifier and TypeMethodDescriptionbuilder()Construct aGetAggregatePriceResultbuilder.The statistics from the collected oracle prices.The ledger index of the current open ledger, which was used when retrieving this information.default LedgerIndexThe identifying Hash of the ledger version used to generate this response.default Hash256The Ledger Index of the ledger version used to generate this response.default LedgerIndexdefault BigDecimalmedian()Get the median price as aBigDecimal.The median price, as aString.com.google.common.primitives.UnsignedIntegertime()The most recent timestamp out of all LastUpdateTime values.The trimmed statistics from the collected oracle prices.default booleanIf true, the information in this response comes from a validated ledger version.Methods inherited from interface org.xrpl.xrpl4j.model.client.XrplResult
status
-
Method Details
-
builder
Construct aGetAggregatePriceResultbuilder.- Returns:
- An
ImmutableGetAggregatePriceResult.Builder.
-
entireSet
AggregatePriceSet entireSet()The statistics from the collected oracle prices.- Returns:
- An
AggregatePriceSet.
-
trimmedSet
Optional<AggregatePriceSet> trimmedSet()The trimmed statistics from the collected oracle prices. Only appears if the trim field was specified in the request.- Returns:
- An
OptionalAggregatePriceSet.
-
medianString
String medianString()The median price, as aString.- Returns:
- A
String.
-
median
Get the median price as aBigDecimal.- Returns:
- A
BigDecimal.
-
time
com.google.common.primitives.UnsignedInteger time()The most recent timestamp out of all LastUpdateTime values.- Returns:
- An
UnsignedInteger.
-
ledgerHash
The identifying Hash of the ledger version used to generate this response.- Returns:
- A
Hash256containing the ledger hash.
-
ledgerHashSafe
- Returns:
- The value of
ledgerHash(). - Throws:
IllegalStateException- IfledgerHash()is empty.
-
ledgerIndex
Optional<LedgerIndex> ledgerIndex()The Ledger Index of the ledger version used to generate this response. Only present in responses to requests with ledger_index = "validated" or "closed".- Returns:
- A
LedgerIndex.
-
ledgerIndexSafe
- Returns:
- The value of
ledgerIndex(). - Throws:
IllegalStateException- IfledgerIndex()is empty.
-
ledgerCurrentIndex
Optional<LedgerIndex> ledgerCurrentIndex()The ledger index of the current open ledger, which was used when retrieving this information. Only present in responses to requests with ledger_index = "current".- Returns:
- An optionally-present
LedgerIndexrepresenting the current ledger index.
-
ledgerCurrentIndexSafe
- Returns:
- The value of
ledgerCurrentIndex(). - Throws:
IllegalStateException- IfledgerCurrentIndex()is empty.
-
validated
@Default default boolean validated()If true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change.- Returns:
trueif the information in this response comes from a validated ledger version,falseif not.
-