mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-28 07:35:50 +00:00
More 'ledger index' standardization
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# account_offers
|
||||
[[Source]<br>](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountOffers.cpp "Source")
|
||||
|
||||
The `account_offers` method retrieves a list of offers made by a given account that are outstanding as of a particular ledger version.
|
||||
The `account_offers` method retrieves a list of [offers](offers.html) made by a given [account](accounts.html) that are outstanding as of a particular [ledger version](ledgers.html).
|
||||
|
||||
## Request Format
|
||||
|
||||
@@ -155,14 +155,14 @@ An example of a successful response:
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:-------------------------------------------|:-------|
|
||||
| `account` | String | Unique [Address][] identifying the account that made the offers |
|
||||
| `offers` | Array | Array of objects, where each object represents an offer made by this account that is outstanding as of the requested ledger version. If the number of offers is large, only returns up to `limit` at a time. |
|
||||
| `ledger_current_index` | Integer | (Omitted if `ledger_hash` or `ledger_index` provided) Sequence number of the ledger version used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `ledger_index` | Integer | (Omitted if `ledger_current_index` provided instead) Sequence number, provided in the request, of the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `ledger_hash` | String | _(May be omitted)_ Hex hash, provided in the request, of the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `marker` | [Marker][] | _(May be omitted)_ Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one. [New in: rippled 0.26.4][] |
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `account` | String | Unique [Address][] identifying the account that made the offers |
|
||||
| `offers` | Array | Array of objects, where each object represents an offer made by this account that is outstanding as of the requested ledger version. If the number of offers is large, only returns up to `limit` at a time. |
|
||||
| `ledger_current_index` | Number - [Ledger Index][] | _(Omitted if `ledger_hash` or `ledger_index` provided)_ The ledger index of the current in-progress ledger version, which was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `ledger_index` | Number - [Ledger Index][] | _(Omitted if `ledger_current_index` provided instead)_ The ledger index of the ledger version that was used when retrieving this data, as requested. [New in: rippled 0.26.4-sp1][] |
|
||||
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `marker` | [Marker][] | _(May be omitted)_ Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one. [New in: rippled 0.26.4][] |
|
||||
|
||||
|
||||
Each offer object contains the following fields:
|
||||
|
||||
@@ -199,15 +199,15 @@ An example of a successful response:
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:-------|:-------------------------------------------|
|
||||
| `account` | String | Unique [Address][] identifying the account that issued the balances. |
|
||||
| `obligations` | Object | (Omitted if empty) Total amounts issued to addresses not excluded, as a map of currencies to the total value issued. |
|
||||
| `balances` | Object | (Omitted if empty) Amounts issued to the `hotwallet` addresses from the request. The keys are addresses and the values are arrays of currency amounts they hold. |
|
||||
| `assets` | Object | (Omitted if empty) Total amounts held that are issued by others. In the recommended configuration, the [issuing address](issuing-and-operational-addresses.html) should have none. |
|
||||
| `ledger_hash` | String | (May be omitted) The identifying hash of the ledger that was used to generate this response. |
|
||||
| `ledger_index` | Number | _(May be omitted)_ The ledger index of the ledger version that was used to generate this response. |
|
||||
| `ledger_current_index` | Number | (May be omitted) The sequence number of the current in-progress ledger version that was used to generate this response. |
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `account` | String - [Address][] | The address of the account that issued the balances. |
|
||||
| `obligations` | Object | (Omitted if empty) Total amounts issued to addresses not excluded, as a map of currencies to the total value issued. |
|
||||
| `balances` | Object | _(Omitted if empty)_ Amounts issued to the `hotwallet` addresses from the request. The keys are addresses and the values are arrays of currency amounts they hold. |
|
||||
| `assets` | Object | _(Omitted if empty)_ Total amounts held that are issued by others. In the recommended configuration, the [issuing address](issuing-and-operational-addresses.html) should have none. |
|
||||
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version that was used to generate this response. |
|
||||
| `ledger_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the ledger version that was used to generate this response. |
|
||||
| `ledger_current_index` | Number - [Ledger Index][] | _(Omitted if `ledger_current_index` is provided)_ The [ledger index][] of the current in-progress ledger version, which was used to retrieve this information. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
|
||||
@@ -155,13 +155,13 @@ An example of a successful response:
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:-------------------------------------------|:------------------------------------------|
|
||||
| `ledger_current_index` | Integer | (Omitted if ledger version provided) Sequence number of the ledger version used when retrieving this data. |
|
||||
| `ledger_index` | Integer | (Omitted if ledger\_current\_index provided instead) Sequence number, provided in the request, of the ledger version that was used when retrieving this data. |
|
||||
| `ledger_hash` | String | (May be omitted) Hex hash, provided in the request, of the ledger version that was used when retrieving this data. |
|
||||
| `marker` | [Marker][] | (May be omitted) Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one. |
|
||||
| `offers` | Array | Array of offer objects, each of which has the fields of an [Offer object](offer.html) |
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `ledger_current_index` | Number - [Ledger Index][] | _(Omitted if `ledger_current_index` is provided)_ The [ledger index][] of the current in-progress ledger version, which was used to retrieve this information. |
|
||||
| `ledger_index` | Number - [Ledger Index][] | _(Omitted if `ledger_current_index` provided)_ The ledger index of the ledger version that was used when retrieving this data, as requested. |
|
||||
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version that was used when retrieving this data, as requested. |
|
||||
| `marker` | [Marker][] | _(May be omitted)_ Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one. |
|
||||
| `offers` | Array | Array of offer objects, each of which has the fields of an [Offer object](offer.html) |
|
||||
|
||||
In addition to the standard Offer fields, the following fields may be included in members of the `offers` array:
|
||||
|
||||
|
||||
@@ -117,15 +117,15 @@ Loading: "/etc/rippled.cfg"
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:---------------------|:-----------------------------|
|
||||
| `deposit_authorized` | Boolean | Whether the specified source account is authorized to send payments directly to the destination account. If `true`, either the destination account does not require [Deposit Authorization](depositauth.html) or the source account is preauthorized. |
|
||||
| `destination_account` | String - [Address][] | The destination account specified in the request. |
|
||||
| `ledger_hash` | String | _(May be omitted)_ The identifying hash of the ledger that was used to generate this response. |
|
||||
| `ledger_index` | Number | _(May be omitted)_ The [ledger index][] of the ledger version that was used to generate this response. |
|
||||
| `ledger_current_index` | Number | _(May be omitted)_ The sequence number of the current in-progress ledger version that was used to generate this response. |
|
||||
| `source_account` | String - [Address][] | The source account specified in the request. |
|
||||
| `validated` | Boolean | _(May be omitted)_ If `true`, the information comes from a validated ledger version. |
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `deposit_authorized` | Boolean | Whether the specified source account is authorized to send payments directly to the destination account. If `true`, either the destination account does not require [Deposit Authorization](depositauth.html) or the source account is preauthorized. |
|
||||
| `destination_account` | String - [Address][] | The destination account specified in the request. |
|
||||
| `ledger_hash` | String | _(May be omitted)_ The identifying hash of the ledger that was used to generate this response. |
|
||||
| `ledger_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the ledger version that was used to generate this response. |
|
||||
| `ledger_current_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the current in-progress ledger version, which was used to generate this response. |
|
||||
| `source_account` | String - [Address][] | The source account specified in the request. |
|
||||
| `validated` | Boolean | _(May be omitted)_ If `true`, the information comes from a validated ledger version. |
|
||||
|
||||
**Note:** A `deposit_authorized` status of `true` does not guarantee that a payment can be sent from the specified source to the specified destination. For example, the destination account may not have a [trust line](trust-lines-and-issuing.html) for the specified currency, or there may not be sufficient liquidity to deliver a payment.
|
||||
|
||||
|
||||
@@ -151,18 +151,18 @@ The `ledger` stream only sends `ledgerClosed` messages when [the consensus proce
|
||||
|
||||
The fields from a ledger stream message are as follows:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:--------------------|:-----------------|:------------------------------------|
|
||||
| `type` | String | `ledgerClosed` indicates this is from the ledger stream |
|
||||
| `fee_base` | Unsigned Integer | Cost of the 'reference transaction' in drops of XRP. (See [Transaction Cost](transaction-cost.html) If the ledger includes a [SetFee pseudo-transaction](setfee.html) the new transaction cost applies to all transactions after this ledger. |
|
||||
| `fee_ref` | Unsigned Integer | Cost of the 'reference transaction' in 'fee units'. |
|
||||
| `ledger_hash` | String | Unique hash of the ledger that was closed, as hex |
|
||||
| `ledger_index` | Unsigned Integer | Sequence number of the ledger that was closed |
|
||||
| `ledger_time` | Unsigned Integer | The time this ledger was closed, in [seconds since the Ripple Epoch][] |
|
||||
| `reserve_base` | Unsigned Integer | The minimum reserve, in drops of XRP, that is required for an account. If the ledger includes a [SetFee pseudo-transaction](setfee.html) the new base reserve applies after this ledger. |
|
||||
| `reserve_inc` | Unsigned Integer | The increase in account reserve that is added for each item the account owns, such as offers or trust lines. If the ledger includes a [SetFee pseudo-transaction](setfee.html) the new owner reserve applies after this ledger. |
|
||||
| `txn_count` | Unsigned Integer | Number of new transactions included in this ledger |
|
||||
| `validated_ledgers` | String | (May be omitted) Range of ledgers that the server has available. This may be discontiguous. This field is not returned if the server is not connected to the network, or if it is connected but has not yet obtained a ledger from the network. |
|
||||
| `Field` | Type | Description |
|
||||
|:--------------------|:--------------------------|:---------------------------|
|
||||
| `type` | String | `ledgerClosed` indicates this is from the ledger stream |
|
||||
| `fee_base` | Number | The [reference transaction cost](transaction-cost.html#reference-transaction-cost) as of this ledger version, in [drops of XRP][]. If this ledger version includes a [SetFee pseudo-transaction](setfee.html) the new transaction cost applies starting with the following ledger version. |
|
||||
| `fee_ref` | Number | The [reference transaction cost](transaction-cost.html#reference-transaction-cost) in "fee units". |
|
||||
| `ledger_hash` | String - [Hash][] | The identifying hash of the ledger version that was closed. |
|
||||
| `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger that was closed. |
|
||||
| `ledger_time` | Number | The time this ledger was closed, in [seconds since the Ripple Epoch][] |
|
||||
| `reserve_base` | Number | The minimum [reserve](reserves.html), in [drops of XRP][], that is required for an account. If this ledger version includes a [SetFee pseudo-transaction](setfee.html) the new base reserve applies starting with the following ledger version. |
|
||||
| `reserve_inc` | Number | The [owner reserve](reserves.html#owner-reserves) for each object an account owns in the ledger, in [drops of XRP][]. If the ledger includes a [SetFee pseudo-transaction](setfee.html) the new owner reserve applies after this ledger. |
|
||||
| `txn_count` | Number | Number of new transactions included in this ledger version. |
|
||||
| `validated_ledgers` | String | _(May be omitted)_ Range of ledgers that the server has available. This may be discontiguous. This field is not returned if the server is not connected to the network, or if it is connected but has not yet obtained a ledger from the network. |
|
||||
|
||||
|
||||
## Validations Stream
|
||||
@@ -338,18 +338,18 @@ The `accounts_proposed` subscription works the same way, except it also includes
|
||||
|
||||
Transaction stream messages have the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:------------------------|:-----------------|:--------------------------------|
|
||||
| `type` | String | `transaction` indicates this is the notification of a transaction, which could come from several possible streams. |
|
||||
| `engine_result` | String | String [Transaction result code](transaction-results.html) |
|
||||
| `engine_result_code` | Number | Numeric [transaction response code](transaction-results.html), if applicable. |
|
||||
| `engine_result_message` | String | Human-readable explanation for the transaction response |
|
||||
| `ledger_current_index` | Unsigned Integer | (Omitted for validated transactions) Sequence number of the current ledger version for which this transaction is currently proposed |
|
||||
| `ledger_hash` | String | (Omitted for unvalidated transactions) Unique hash of the ledger version that includes this transaction, as hex |
|
||||
| `ledger_index` | Unsigned Integer | (Omitted for unvalidated transactions) Sequence number of the ledger version that includes this transaction |
|
||||
| `meta` | Object | (Omitted for unvalidated transactions) Various metadata about the transaction, including which ledger entries it affected |
|
||||
| `transaction` | Object | The [definition of the transaction](transaction-formats.html) in JSON format |
|
||||
| `validated` | Boolean | If true, this transaction is included in a validated ledger. Responses from the `transaction` stream should always be validated. |
|
||||
| `Field` | Type | Description |
|
||||
|:------------------------|:--------------------------|:-----------------------|
|
||||
| `type` | String | `transaction` indicates this is the notification of a transaction, which could come from several possible streams. |
|
||||
| `engine_result` | String | String [Transaction result code](transaction-results.html) |
|
||||
| `engine_result_code` | Number | Numeric [transaction response code](transaction-results.html), if applicable. |
|
||||
| `engine_result_message` | String | Human-readable explanation for the transaction response |
|
||||
| `ledger_current_index` | Number - [Ledger Index][] | _(Unvalidated transactions only)_ The ledger index of the current in-progress [ledger version](ledgers.html) for which this transaction is currently proposed. |
|
||||
| `ledger_hash` | String - [Hash][] | _(Validated transactions only)_ The identifying hash of the ledger version that includes this transaction |
|
||||
| `ledger_index` | Number - [Ledger Index][] | _(Validated transactions only)_ The ledger index of the ledger version that includes this transaction. |
|
||||
| `meta` | Object | _(Validated transactions only)_ The [transaction metadata](transaction-metadata.html), which shows the exact outcome of the transaction in detail. |
|
||||
| `transaction` | Object | The [definition of the transaction](transaction-formats.html) in JSON format |
|
||||
| `validated` | Boolean | If `true`, this transaction is included in a validated ledger and its outcome is final. Responses from the `transaction` stream should always be validated. |
|
||||
|
||||
|
||||
## Peer Status Stream
|
||||
|
||||
@@ -195,12 +195,12 @@ An example of a successful response:
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:-----------------|:-----------------------------------------|
|
||||
| `ledger_index` | Unsigned Integer | Sequence number of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
| `ledger_hash` | String | (May be omitted) Unique hash of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
| `metadata` | Object | Various metadata about the transaction. |
|
||||
| `tx_json` | Object | JSON representation of the [Transaction object](transaction-formats.html) |
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:--------------------------|:--------------------------------|
|
||||
| `ledger_index` | Number - [Ledger Index][] | The ledger index of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash of the ledger version the transaction was found in; this is the same as the one from the request. |
|
||||
| `metadata` | Object | The [transaction metadata](transaction-metadata.html), which shows the exact results of the transaction in detail. |
|
||||
| `tx_json` | Object | JSON representation of the [Transaction object](transaction-formats.html) |
|
||||
|
||||
There are a couple possible reasons the server may fail to find the transaction:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user