Migrate content syntax via script

The changes in this commit were auto-generated by running

tool/migrate.sh

Following this commit, the Dactyl build no longer works but the Redocly
build (mostly) should.
This commit is contained in:
mDuo13
2024-01-31 16:09:41 -08:00
parent 96121303b2
commit 554a3732d4
898 changed files with 19879 additions and 18631 deletions

View File

@@ -1,8 +1,12 @@
---
html: ledger-methods.html
parent: public-api-methods.html
template: pagetype-category.html.jinja
metadata:
indexPage: true
---
# Ledger Methods
A ledger version contains a header, a transaction tree, and a state tree, which contain account settings, trustlines, balances, transactions, and other data. Use these methods to retrieve ledger info.
A ledger version contains a header, a transaction tree, and a state tree, which contain account settings, trustlines, balances, transactions, and other data. Use these methods to retrieve ledger info.
{% child-pages /%}

View File

@@ -8,15 +8,14 @@ labels:
# ledger
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/LedgerHandler.cpp "Source")
Retrieve information about the public [ledger](ledgers.html).
Retrieve information about the public [ledger](../../../../concepts/ledgers/index.md).
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_ledger_req",
@@ -27,9 +26,9 @@ An example of the request format:
"owner_funds": false
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger",
@@ -43,19 +42,20 @@ An example of the request format:
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
#Syntax: ledger ledger_index|ledger_hash [full|tx]
# "full" is equivalent to "full": true
# "tx" is equivalent to "transactions": true
rippled ledger validated
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger)
The request can contain the following parameters:
@@ -67,7 +67,7 @@ The request can contain the following parameters:
| `expand` | Boolean | No | Provide full JSON-formatted information for transaction/account information instead of only hashes. The default is `false`. Ignored unless you request transactions, accounts, or both. |
| `owner_funds` | Boolean | No | If `true`, include `owner_funds` field in the metadata of OfferCreate transactions in the response. The default is `false`. Ignored unless transactions are included and `expand` is true. |
| `binary` | Boolean | No | If `true`, and `transactions` and `expand` are both also `true`, return transaction information in binary format (hexadecimal string) instead of JSON format. |
| `queue` | Boolean | No | If `true`, and the command is requesting the `current` ledger, includes an array of [queued transactions](transaction-cost.html#queued-transactions) in the results. |
| `queue` | Boolean | No | If `true`, and the command is requesting the `current` ledger, includes an array of [queued transactions](../../../../concepts/transactions/transaction-cost.md#queued-transactions) in the results. |
The `ledger` field is deprecated and may be removed without further notice. The `full`, `accounts`, and `type` fields (admin-only) are also deprecated; the Clio server does not implement these parameters.
@@ -76,40 +76,29 @@ The `ledger` field is deprecated and may be removed without further notice. The
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
{% tabs %}
*WebSocket*
{% tab label="WebSocket" %}
{% code-snippet file="/_api-examples/ledger/ws-response.json" language="json" /%}
{% /tab %}
```json
{% include '_api-examples/ledger/ws-response.json' %}
```
{% tab label="JSON-RPC" %}
{% code-snippet file="/_api-examples/ledger/jsonrpc-response.json" language="json" prefix="200 OK\n\n" /%}
{% /tab %}
*JSON-RPC*
{% tab label="Commandline" %}
{% code-snippet file="/_api-examples/ledger/jsonrpc-response.json" language="json" prefix="Loading: \"/etc/opt/ripple/rippled.cfg\"\n2023-Nov-01 21:38:14.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005\n\n" /%}
{% /tab %}
```json
200 OK
{% include '_api-examples/ledger/jsonrpc-response.json' %}
```
*Commandline*
```json
Loading: "/etc/opt/ripple/rippled.cfg"
2023-Nov-01 21:38:14.638871262 UTC HTTPClient:NFO Connecting to 127.0.0.1:5005
{% include '_api-examples/ledger/jsonrpc-response.json' %}
```
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The response follows the [standard format][], with a successful result containing information about the ledger, including the following fields:
| `Field` | Type | Description |
|:-------------------------------|:--------|:----------------------------------|
| `ledger` | Object | The complete [ledger header data](ledger-header.html) of this ledger, with some additional fields added for convenience. |
| `ledger.account_hash` | String | [Hash](basic-data-types.html#hashes) of all account state information in this ledger, as hexadecimal. |
| `ledger.close_flags` | Number | A bit-map of [flags relating to the closing of this ledger](ledger-header.html#close-flags). |
| `ledger` | Object | The complete [ledger header data](../../../protocol/ledger-data/ledger-header.md) of this ledger, with some additional fields added for convenience. |
| `ledger.account_hash` | String | [Hash](../../../protocol/data-types/basic-data-types.md#hashes) of all account state information in this ledger, as hexadecimal. |
| `ledger.close_flags` | Number | A bit-map of [flags relating to the closing of this ledger](../../../protocol/ledger-data/ledger-header.md#close-flags). |
| `ledger.close_time` | Number | The time this ledger was closed, in [seconds since the Ripple Epoch][]. |
| `ledger.close_time_human` | String | The time this ledger was closed, in human-readable format. Always uses the UTC time zone. |
| `ledger.close_time_resolution` | Number | Ledger close times are rounded to within this many seconds. |
@@ -119,7 +108,7 @@ The response follows the [standard format][], with a successful result containin
| `ledger.parent_close_time` | Number | The time at which the previous ledger was closed. |
| `ledger.parent_hash` | String | The unique identifying hash of the ledger that came immediately before this one, as hexadecimal. |
| `ledger.total_coins` | String | Total number of XRP drops in the network, as a quoted integer. (This decreases as transaction costs destroy XRP.) |
| `ledger.transaction_hash` | String | [Hash](basic-data-types.html#hashes) of the transaction information included in this ledger. |
| `ledger.transaction_hash` | String | [Hash](../../../protocol/data-types/basic-data-types.md#hashes) of the transaction information included in this ledger. |
| `ledger.transactions` | Array | _(Omitted unless requested)_ Transactions applied in this ledger version. By default, members are the transactions' identifying [Hash][] strings. If the request specified `expand` as true, members are full representations of the transactions instead, in either JSON or binary depending on whether the request specified `binary` as true. |
| `ledger_hash` | String | The unique identifying hash of the entire ledger, as hexadecimal. |
| `ledger_index` | Number | The [Ledger Index][] of this ledger. |
@@ -128,27 +117,27 @@ The response follows the [standard format][], with a successful result containin
The `ledger.accountState` field (omitted unless requested with `"full": true` or `"accounts": true`) is deprecated.
The following deprecated fields have been removed: `accepted`, `hash` (use `ledger_hash` instead), `seqNum` (use `ledger_index` instead), `totalCoins` (use `total_coins` instead). [Updated in: rippled 1.12.0][]
The following deprecated fields have been removed: `accepted`, `hash` (use `ledger_hash` instead), `seqNum` (use `ledger_index` instead), `totalCoins` (use `total_coins` instead). {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.12.0" %}Updated in: rippled 1.12.0{% /badge %}
Each member of the `queue_data` array represents one transaction in the queue. Some fields of this object may be omitted because they have not yet been calculated. The fields of this object are as follows:
| Field | Value | Description |
|:--------------------|:-----------------|:------------------------------------|
| `account` | String | The [Address][] of the sender for this queued transaction. |
| `tx` | String or Object | By default, this is a String containing the [identifying hash](basic-data-types.html#hashes) of the transaction. If transactions are expanded in binary format, this is an object whose only field is `tx_blob`, containing the binary form of the transaction as a decimal string. If transactions are expanded in JSON format, this is an object containing the [transaction object](transaction-formats.html) including the transaction's identifying hash in the `hash` field. |
| `tx` | String or Object | By default, this is a String containing the [identifying hash](../../../protocol/data-types/basic-data-types.md#hashes) of the transaction. If transactions are expanded in binary format, this is an object whose only field is `tx_blob`, containing the binary form of the transaction as a decimal string. If transactions are expanded in JSON format, this is an object containing the [transaction object](../../../protocol/transactions/index.md) including the transaction's identifying hash in the `hash` field. |
| `retries_remaining` | Number | How many times this transaction can be retried before being dropped. |
| `preflight_result` | String | The tentative result from preliminary transaction checking. This is always `tesSUCCESS`. |
| `last_result` | String | _(May be omitted)_ If this transaction was left in the queue after getting a [retriable (`ter`) result](ter-codes.html), this is the exact `ter` result code it got. |
| `auth_change` | Boolean | _(May be omitted)_ Whether this transaction changes this address's [ways of authorizing transactions](transactions.html#authorizing-transactions). |
| `fee` | String | _(May be omitted)_ The [Transaction Cost](transaction-cost.html) of this transaction, in [drops of XRP][]. |
| `last_result` | String | _(May be omitted)_ If this transaction was left in the queue after getting a [retriable (`ter`) result](../../../protocol/transactions/transaction-results/ter-codes.md), this is the exact `ter` result code it got. |
| `auth_change` | Boolean | _(May be omitted)_ Whether this transaction changes this address's [ways of authorizing transactions](../../../../concepts/transactions/index.md#authorizing-transactions). |
| `fee` | String | _(May be omitted)_ The [Transaction Cost](../../../../concepts/transactions/transaction-cost.md) of this transaction, in [drops of XRP][]. |
| `fee_level` | String | _(May be omitted)_ The transaction cost of this transaction, relative to the minimum cost for this type of transaction, in [fee levels][]. |
| `max_spend_drops` | String | _(May be omitted)_ The maximum amount of [XRP, in drops][], this transaction could potentially send or destroy. |
If the request specified `"owner_funds": true` and expanded transactions, the response has a field `owner_funds` in the `metaData` object of each [OfferCreate transaction][]. The purpose of this field is to make it easier to track the [funding status of offers](offers.html#lifecycle-of-an-offer) with each new validated ledger. This field is defined slightly differently than the version of this field in [Order Book subscription streams](subscribe.html#order-book-streams):
If the request specified `"owner_funds": true` and expanded transactions, the response has a field `owner_funds` in the `metaData` object of each [OfferCreate transaction][]. The purpose of this field is to make it easier to track the [funding status of offers](../../../../concepts/tokens/decentralized-exchange/offers.md#lifecycle-of-an-offer) with each new validated ledger. This field is defined slightly differently than the version of this field in [Order Book subscription streams](../subscription-methods/subscribe.md#order-book-streams):
| `Field` | Value | Description |
|:--------------|:-------|:----------------------------------------------------|
| `owner_funds` | String | Numeric amount of the `TakerGets` currency that the `Account` sending this OfferCreate transaction has after the execution of all transactions in this ledger. This does not check whether the currency amount is [frozen](freezes.html). |
| `owner_funds` | String | Numeric amount of the `TakerGets` currency that the `Account` sending this OfferCreate transaction has after the execution of all transactions in this ledger. This does not check whether the currency amount is [frozen](../../../../concepts/tokens/fungible-tokens/freezes.md). |
## Possible Errors
@@ -157,8 +146,4 @@ If the request specified `"owner_funds": true` and expanded transactions, the re
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
* `noPermission` - If you specified `full` or `accounts` as true, but are not connected to the server as an admin (usually, admin requires connecting on localhost).
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}

View File

@@ -13,19 +13,18 @@ The `ledger_closed` method returns the unique identifiers of the most recently c
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 2,
"command": "ledger_closed"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_closed",
@@ -34,27 +33,27 @@ An example of the request format:
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
#Syntax: ledger_closed
rippled ledger_closed
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_closed)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_closed)
This method accepts no parameters.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 1,
@@ -66,9 +65,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
200 OK
@@ -80,9 +79,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```json
{
"result" : {
@@ -92,8 +91,9 @@ An example of a successful response:
}
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The response follows the [standard format][], with a successful result containing the following fields:
@@ -106,6 +106,4 @@ The response follows the [standard format][], with a successful result containin
* Any of the [universal error types][].
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}

View File

@@ -8,25 +8,24 @@ labels:
# ledger_current
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/LedgerCurrent.cpp "Source")
The `ledger_current` method returns the unique identifiers of the current in-progress [ledger](ledgers.html). This command is mostly useful for testing, because the ledger returned is still in flux.
The `ledger_current` method returns the unique identifiers of the current in-progress [ledger](../../../../concepts/ledgers/index.md). This command is mostly useful for testing, because the ledger returned is still in flux.
## Request Format
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 2,
"command": "ledger_current"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_current",
@@ -35,17 +34,18 @@ An example of the request format:
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
#Syntax: ledger_current
rippled ledger_current
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_current)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_current)
The request contains no parameters.
@@ -53,10 +53,9 @@ The request contains no parameters.
## Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 2,
@@ -67,9 +66,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
200 OK
@@ -80,9 +79,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```json
{
"result" : {
@@ -91,8 +90,9 @@ An example of a successful response:
}
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The response follows the [standard format][], with a successful result containing the following field:
@@ -106,6 +106,4 @@ A `ledger_hash` field is not provided, because the hash of the current ledger is
* Any of the [universal error types][].
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}

View File

@@ -14,12 +14,11 @@ The `ledger_data` method retrieves contents of the specified ledger. You can ite
## Request Format
An example of the request format:
{% include '_snippets/no-cli-syntax.md' %}
{% partial file="/_snippets/no-cli-syntax.md" /%}
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 2,
@@ -29,9 +28,9 @@ An example of the request format:
"binary": true
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_data",
@@ -44,8 +43,9 @@ An example of the request format:
]
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
A request can include the following fields:
@@ -57,7 +57,7 @@ A request can include the following fields:
| `binary` | Boolean | No | If `true`, return ledger entries as hexadecimal strings instead of JSON. The default is `false`. |
| `limit` | Number | No | Limit the number of ledger entries to retrieve. The server may return fewer than this number of entries. Cannot be more than 2048 (when requesting binary) or 256 (when requesting JSON). Positive values outside this range are replaced with the closest valid option. The default is the maximum. |
| `marker` | [Marker][] | No | Value from a previous paginated response. Resume retrieving data where that response left off. |
| `type` | String | No | Filter results to a specific type of ledger entry. {% include '_snippets/lowercase-types.md' %} |
| `type` | String | No | Filter results to a specific type of ledger entry. {% partial file="/_snippets/lowercase-types.md" /%} |
The `ledger` field is deprecated and may be removed without further notice.
@@ -65,10 +65,9 @@ The `ledger` field is deprecated and may be removed without further notice.
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket (binary:true)*
{% tabs %}
{% tab label="WebSocket (binary:true)" %}
```json
{
"id": 2,
@@ -103,9 +102,9 @@ An example of a successful response:
"type": "response"
}
```
{% /tab %}
*WebSocket (binary:false)*
{% tab label="WebSocket (binary:false)" %}
```json
{
"id": 2,
@@ -202,9 +201,9 @@ An example of a successful response:
"type": "response"
}
```
{% /tab %}
*JSON-RPC (binary:true)*
{% tab label="JSON-RPC (binary:true)" %}
```json
200 OK
@@ -239,8 +238,9 @@ An example of a successful response:
}
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
The response follows the [standard format][], with a successful result containing the following fields:
@@ -258,8 +258,8 @@ The format of each object in the `state` array depends on whether `binary` was s
| `Field` | Type | Description |
|:--------------------|:----------|:-------------------------------------------|
| `data` | String | _(Only included if `"binary":true`)_ Hex representation of the requested data |
| `LedgerEntryType` | String | _(Only included if `"binary":false`)_ String indicating what type of ledger object this object represents. See [ledger object types](ledger-object-types.html) for the full list. |
| (Additional fields) | (Various) | _(Only included if `"binary":false`)_ Additional fields describing this object, depending on which [ledger object type](ledger-object-types.html) it is. |
| `LedgerEntryType` | String | _(Only included if `"binary":false`)_ String indicating what type of ledger object this object represents. See [ledger object types](../../../protocol/ledger-data/ledger-entry-types/index.md) for the full list. |
| (Additional fields) | (Various) | _(Only included if `"binary":false`)_ Additional fields describing this object, depending on which [ledger object type](../../../protocol/ledger-data/ledger-entry-types/index.md) it is. |
| `index` | String | Unique identifier for this ledger entry, as hex. |
## Possible Errors
@@ -268,6 +268,4 @@ The format of each object in the `state` array depends on whether `binary` was s
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
* `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it.
{% include '_snippets/rippled_versions.md' %}
{% include '_snippets/rippled-api-links.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}

View File

@@ -13,15 +13,15 @@ The `ledger_entry` method returns a single ledger entry from the XRP Ledger in i
## Request Format
This method can retrieve several different types of data. You can select which type of item to retrieve by passing the appropriate parameters, comprised of the general and type-specific fields listed below, and following the standard [request formatting](request-formatting.html). (For example, a WebSocket request always has the `command` field and optionally an `id` field, and a JSON-RPC request uses the `method` and `params` fields.)
This method can retrieve several different types of data. You can select which type of item to retrieve by passing the appropriate parameters, comprised of the general and type-specific fields listed below, and following the standard [request formatting](../../api-conventions/request-formatting.md). (For example, a WebSocket request always has the `command` field and optionally an `id` field, and a JSON-RPC request uses the `method` and `params` fields.)
{% include '_snippets/no-cli-syntax.md' %}
{% partial file="/_snippets/no-cli-syntax.md" /%}
### General Fields
| Field | Type | Description |
|:------------------------|:---------------------------|:----------------------|
| `binary` | Boolean | _(Optional)_ If `true`, return the requested ledger entry's contents as a hex string in the XRP Ledger's [binary format](serialization.html). Otherwise, return data in JSON format. The default is `false`. [Updated in: rippled 1.2.0][] |
| `binary` | Boolean | _(Optional)_ If `true`, return the requested ledger entry's contents as a hex string in the XRP Ledger's [binary format](../../../protocol/binary-format.md). Otherwise, return data in JSON format. The default is `false`. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.2.0" %}Updated in: rippled 1.2.0{% /badge %} |
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string (e.g. "validated" or "closed" or "current") to choose a ledger automatically. (See [Specifying Ledgers][]) |
@@ -31,7 +31,7 @@ In addition to the general fields above, you must specify *exactly 1* of the fol
- [`index`](#get-ledger-object-by-id)
- [`account_root`](#get-accountroot-object)
- [`amm`](#get-amm-object) :not_enabled:
- [`amm`](#get-amm-object) {% not-enabled /%}
- [`directory`](#get-directorynode-object)
- [`offer`](#get-offer-object)
- [`ripple_state`](#get-ripplestate-object)
@@ -51,12 +51,11 @@ Retrieve any type of ledger object by its unique ID.
| Field | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `index` | String | The [ledger entry ID](ledger-object-ids.html) of a single entry to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. |
| `index` | String | The [ledger entry ID](../../../protocol/ledger-data/common-fields.md) of a single entry to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"command": "ledger_entry",
@@ -64,9 +63,9 @@ Retrieve any type of ledger object by its unique ID.
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -78,38 +77,40 @@ Retrieve any type of ledger object by its unique ID.
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "index": "7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4", "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-by-object-id)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-by-object-id)
> **Tip:** You can use this type of request to get any singleton ledger entry, if it exists in the ledger data, because its ID is always the same. For example:
>
> - [`Amendments`](amendments-object.html) - `7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4`
> - [`FeeSettings`](feesettings.html) - `4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651`
> - [Recent History `LedgerHashes`](ledgerhashes.html) - `B4979A36CDC7F3D3D5C31A4EAE2AC7D7209DDA877588B9AFC66799692AB0D66B`
> - [`NegativeUNL`](negativeunl.html) - `2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244`
{% admonition type="success" name="Tip" %}
You can use this type of request to get any singleton ledger entry, if it exists in the ledger data, because its ID is always the same. For example:
- [`Amendments`](../../../protocol/ledger-data/ledger-entry-types/amendments.md) - `7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4`
- [`FeeSettings`](../../../protocol/ledger-data/ledger-entry-types/feesettings.md) - `4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651`
- [Recent History `LedgerHashes`](../../../protocol/ledger-data/ledger-entry-types/ledgerhashes.md) - `B4979A36CDC7F3D3D5C31A4EAE2AC7D7209DDA877588B9AFC66799692AB0D66B`
- [`NegativeUNL`](../../../protocol/ledger-data/ledger-entry-types/negativeunl.md) - `2E8A59AA9D3B5B186B0B9E0F62E6C02587CA74A4D778938E957B6357D364B244`
{% /admonition %}
### Get AccountRoot Object
Retrieve an [AccountRoot entry](accountroot.html) by its address. This is roughly equivalent to the [account_info method][].
Retrieve an [AccountRoot entry](../../../protocol/ledger-data/ledger-entry-types/accountroot.md) by its address. This is roughly equivalent to the [account_info method][].
| Field | Type | Description |
|:------------------------|:---------------------------|:----------------------|
| `account_root` | String - [Address][] | The classic address of the [AccountRoot entry](accountroot.html) to retrieve. |
| `account_root` | String - [Address][] | The classic address of the [AccountRoot entry](../../../protocol/ledger-data/ledger-entry-types/accountroot.md) to retrieve. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_accountroot",
@@ -118,9 +119,9 @@ Retrieve an [AccountRoot entry](accountroot.html) by its address. This is roughl
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -132,35 +133,35 @@ Retrieve an [AccountRoot entry](accountroot.html) by its address. This is roughl
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59", "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-accountroot)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-accountroot)
### Get AMM Object
_(Requires the [AMM amendment][] :not_enabled:)_
_(Requires the [AMM amendment][] {% not-enabled /%})_
Retrieve an Automated Market-Maker (AMM) object from the ledger. This is similar to [amm_info method][], but the `ledger_entry` version returns only the ledger entry as stored.
| Field | Type | Description |
|:-------------|:-----------------|:----------------------|
| `amm` | Object or String | The [AMM](amm.html) to retrieve. If you specify a string, it must be the [object ID](ledger-object-ids.html) of the AMM, as hexadecimal. If you specify an object, it must contain `asset` and `asset2` sub-fields. |
| `amm.asset` | Object | One of the two assets in this AMM's pool, as a [currency object without an amount](currency-formats.html#specifying-without-amounts). |
| `amm.asset2` | Object | The other of the two assets in this AMM's pool, as a [currency object without an amount](currency-formats.html#specifying-without-amounts). |
| `amm` | Object or String | The [AMM](../../../protocol/ledger-data/ledger-entry-types/amm.md) to retrieve. If you specify a string, it must be the [object ID](../../../protocol/ledger-data/common-fields.md) of the AMM, as hexadecimal. If you specify an object, it must contain `asset` and `asset2` sub-fields. |
| `amm.asset` | Object | One of the two assets in this AMM's pool, as a [currency object without an amount](../../../protocol/data-types/currency-formats.md#specifying-without-amounts). |
| `amm.asset2` | Object | The other of the two assets in this AMM's pool, as a [currency object without an amount](../../../protocol/data-types/currency-formats.md#specifying-without-amounts). |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 3,
@@ -177,9 +178,9 @@ Retrieve an Automated Market-Maker (AMM) object from the ledger. This is similar
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -199,34 +200,34 @@ Retrieve an Automated Market-Maker (AMM) object from the ledger. This is similar
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "amm": { "asset": { "currency": "XRP" }, "asset2": { "currency" : "TST", "issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd" } }, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html?server=wss%3A%2F%2Famm.devnet.rippletest.net%3A51233%2F#ledger_entry-amm)
[Try it! >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Famm.devnet.rippletest.net%3A51233%2F#ledger_entry-amm)
### Get DirectoryNode Object
Retrieve a [DirectoryNode](directorynode.html), which contains a list of other ledger objects. Can be provided as string (object ID of the Directory) or as an object.
Retrieve a [DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md), which contains a list of other ledger objects. Can be provided as string (object ID of the Directory) or as an object.
| Field | Type | Description |
|:------------------------|:---------------------------|:----------------------|
| `directory` | Object or String | The [DirectoryNode](directorynode.html) to retrieve. If a string, must be the [object ID](ledger-object-ids.html) of the directory, as hexadecimal. If an object, requires either `dir_root` or `owner` as a sub-field, plus optionally a `sub_index` sub-field. |
| `directory.sub_index` | Unsigned Integer | _(Optional)_ If provided, jumps to a later "page" of the [DirectoryNode](directorynode.html). |
| `directory` | Object or String | The [DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md) to retrieve. If a string, must be the [object ID](../../../protocol/ledger-data/common-fields.md) of the directory, as hexadecimal. If an object, requires either `dir_root` or `owner` as a sub-field, plus optionally a `sub_index` sub-field. |
| `directory.sub_index` | Unsigned Integer | _(Optional)_ If provided, jumps to a later "page" of the [DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md). |
| `directory.dir_root` | String | _(Optional)_ Unique index identifying the directory to retrieve, as a hex string. |
| `directory.owner` | String | _(Optional)_ Unique address of the account associated with this directory. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": 3,
@@ -238,9 +239,9 @@ Retrieve a [DirectoryNode](directorynode.html), which contains a list of other l
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -255,33 +256,33 @@ Retrieve a [DirectoryNode](directorynode.html), which contains a list of other l
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "directory": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "sub_index": 0 }, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-directorynode)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-directorynode)
### Get Offer Object
Retrieve an [Offer entry](offer.html), which defines an offer to exchange currency. Can be provided as string (unique index of the Offer) or as an object.
Retrieve an [Offer entry](../../../protocol/ledger-data/ledger-entry-types/offer.md), which defines an offer to exchange currency. Can be provided as string (unique index of the Offer) or as an object.
| Field | Type | Description |
|:------------------------|:---------------------------|:----------------------|
| `offer` | Object or String | If a string, interpret as [ledger entry ID](ledger-object-ids.html) of the Offer to retrieve. If an object, requires the sub-fields `account` and `seq` to uniquely identify the offer. |
| `offer` | Object or String | If a string, interpret as [ledger entry ID](../../../protocol/ledger-data/common-fields.md) of the Offer to retrieve. If an object, requires the sub-fields `account` and `seq` to uniquely identify the offer. |
| `offer.account` | String - [Address][] | _(Required if `offer` is specified as an object)_ The account that placed the offer. |
| `offer.seq` | Unsigned Integer | _(Required if `offer` is specified as an object)_ The [Sequence Number][] of the transaction that created the Offer entry. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_offer",
@@ -293,9 +294,9 @@ Retrieve an [Offer entry](offer.html), which defines an offer to exchange curren
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -310,16 +311,17 @@ Retrieve an [Offer entry](offer.html), which defines an offer to exchange curren
]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "offer": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "seq": 359}, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-offer)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-offer)
@@ -333,10 +335,9 @@ Retrieve a [RippleState entry][], which tracks a (non-XRP) currency balance betw
| `ripple_state.accounts` | Array | _(Required if `ripple_state` is specified)_ 2-length array of account [Address][]es, defining the two accounts linked by this RippleState entry. |
| `ripple_state.currency` | String | _(Required if `ripple_state` is specified)_ [Currency Code][] of the RippleState entry to retrieve. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_ripplestate",
@@ -351,9 +352,9 @@ Retrieve a [RippleState entry][], which tracks a (non-XRP) currency balance betw
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -369,31 +370,31 @@ Retrieve a [RippleState entry][], which tracks a (non-XRP) currency balance betw
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "ripple_state": { "accounts": ["rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW"], "currency": "USD"}, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-ripplestate)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-ripplestate)
### Get Check Object
Retrieve a [Check entry](check.html), which is a potential payment that can be cashed by its recipient. [New in: rippled 1.0.0][]
Retrieve a [Check entry](../../../protocol/ledger-data/ledger-entry-types/check.md), which is a potential payment that can be cashed by its recipient. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}New in: rippled 1.0.0{% /badge %}
| Field | Type | Description |
|:--------|:-------|:----------------------------------------------------------|
| `check` | String | The [object ID](ledger-object-ids.html) of a [Check entry](check.html) to retrieve. |
| `check` | String | The [object ID](../../../protocol/ledger-data/common-fields.md) of a [Check entry](../../../protocol/ledger-data/ledger-entry-types/check.md) to retrieve. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_check",
@@ -402,9 +403,9 @@ Retrieve a [Check entry](check.html), which is a potential payment that can be c
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -414,33 +415,33 @@ Retrieve a [Check entry](check.html), which is a potential payment that can be c
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D7944C28B95127C2659C47CBEB", "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-check)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-check)
### Get Escrow Object
Retrieve an [Escrow entry](escrow-object.html), which holds XRP until a specific time or condition is met. Can be provided as string (object ID of the Escrow) or as an object. [New in: rippled 1.0.0][]
Retrieve an [Escrow entry](../../../protocol/ledger-data/ledger-entry-types/escrow.md), which holds XRP until a specific time or condition is met. Can be provided as string (object ID of the Escrow) or as an object. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}New in: rippled 1.0.0{% /badge %}
| Field | Type | Description |
|:------------------------|:---------------------------|:----------------------|
| `escrow` | Object or String | The Escrow to retrieve. If a string, must be the [object ID](ledger-object-ids.html) of the Escrow, as hexadecimal. If an object, requires `owner` and `seq` sub-fields. |
| `escrow` | Object or String | The Escrow to retrieve. If a string, must be the [object ID](../../../protocol/ledger-data/common-fields.md) of the Escrow, as hexadecimal. If an object, requires `owner` and `seq` sub-fields. |
| `escrow.owner` | String - [Address][] | _(Required if `escrow` is specified as an object)_ The owner (sender) of the Escrow object. |
| `escrow.seq` | Unsigned Integer | _(Required if `escrow` is specified as an object)_ The [Sequence Number][] of the transaction that created the Escrow object. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_escrow",
@@ -452,9 +453,9 @@ Retrieve an [Escrow entry](escrow-object.html), which holds XRP until a specific
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -467,31 +468,31 @@ Retrieve an [Escrow entry](escrow-object.html), which holds XRP until a specific
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "escrow": { "owner": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9NTjKK", "seq": 126 }, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-escrow)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-escrow)
### Get PayChannel Object
Retrieve a [PayChannel entry](paychannel.html), which holds XRP for asynchronous payments. [New in: rippled 1.0.0][]
Retrieve a [PayChannel entry](../../../protocol/ledger-data/ledger-entry-types/paychannel.md), which holds XRP for asynchronous payments. {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}New in: rippled 1.0.0{% /badge %}
| Field | Type | Description |
|:------------------|:-------|:------------------------------------------------|
| `payment_channel` | String | The [object ID](ledger-object-ids.html) of the PayChannel to retrieve. |
| `payment_channel` | String | The [object ID](../../../protocol/ledger-data/common-fields.md) of the PayChannel to retrieve. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_paychannel",
@@ -500,9 +501,9 @@ Retrieve a [PayChannel entry](paychannel.html), which holds XRP for asynchronous
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -512,32 +513,32 @@ Retrieve a [PayChannel entry](paychannel.html), which holds XRP for asynchronous
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "payment_channel": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7", "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-paychannel)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-paychannel)
### Get DepositPreauth Object
Retrieve a [DepositPreauth entry](depositpreauth-object.html), which tracks preauthorization for payments to accounts requiring [Deposit Authorization](depositauth.html). [New in: rippled 1.1.0][]
Retrieve a [DepositPreauth entry](../../../protocol/ledger-data/ledger-entry-types/depositpreauth.md), which tracks preauthorization for payments to accounts requiring [Deposit Authorization](../../../../concepts/accounts/depositauth.md). {% badge href="https://github.com/XRPLF/rippled/releases/tag/1.1.0" %}New in: rippled 1.1.0{% /badge %}
| Field | Type | Description |
|:-----------------------------|:---------------------|:-----------------------|
| `deposit_preauth` | Object or String | Specify the DepositPreauth to retrieve. If a string, must be the [ledger entry ID](ledger-object-ids.html) of the DepositPreauth entry, as hexadecimal. If an object, requires `owner` and `authorized` sub-fields. |
| `deposit_preauth` | Object or String | Specify the DepositPreauth to retrieve. If a string, must be the [ledger entry ID](../../../protocol/ledger-data/common-fields.md) of the DepositPreauth entry, as hexadecimal. If an object, requires `owner` and `authorized` sub-fields. |
| `deposit_preauth.owner` | String - [Address][] | _(Required if `deposit_preauth` is specified as an object)_ The account that provided the preauthorization. |
| `deposit_preauth.authorized` | String - [Address][] | _(Required if `deposit_preauth` is specified as an object)_ The account that received the preauthorization. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_deposit_preauth",
@@ -549,9 +550,9 @@ Retrieve a [DepositPreauth entry](depositpreauth-object.html), which tracks prea
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -564,32 +565,32 @@ Retrieve a [DepositPreauth entry](depositpreauth-object.html), which tracks prea
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "authorized": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX" }, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-depositpreauth)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-depositpreauth)
### Get Ticket Object
Retrieve a [Ticket entry](ticket.html), which represents a [sequence number][] set aside for future use. _(Added by the [TicketBatch amendment][])_
Retrieve a [Ticket entry](../../../protocol/ledger-data/ledger-entry-types/ticket.md), which represents a [sequence number][] set aside for future use. _(Added by the [TicketBatch amendment][])_
| Field | Type | Description |
|:--------------------|:---------------------|:----------------------|
| `ticket` | Object or String | The Ticket to retrieve. If a string, must be the [ledger entry ID](ledger-object-ids.html) of the Ticket, as hexadecimal. If an object, the `account` and `ticket_seq` sub-fields are required to uniquely specify the Ticket entry. |
| `ticket` | Object or String | The Ticket to retrieve. If a string, must be the [ledger entry ID](../../../protocol/ledger-data/common-fields.md) of the Ticket, as hexadecimal. If an object, the `account` and `ticket_seq` sub-fields are required to uniquely specify the Ticket entry. |
| `ticket.account` | String - [Address][] | _(Required if `ticket` is specified as an object)_ The owner of the Ticket. |
| `ticket.ticket_seq` | Number | _(Required if `ticket` is specified as an object)_ The Ticket Sequence number of the Ticket to retrieve. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_ticket",
@@ -601,9 +602,9 @@ Retrieve a [Ticket entry](ticket.html), which represents a [sequence number][] s
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -616,16 +617,17 @@ Retrieve a [Ticket entry](ticket.html), which represents a [sequence number][] s
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "ticket": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "ticket_seq: 389 }, "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-ticket)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-ticket)
### Get NFT Page
@@ -634,12 +636,11 @@ Return an NFT Page in its raw ledger format.
| Field | Type | Description |
|:------------------------|:---------------------------|:----------------------|
| `nft_page` | String | The [ledger entry ID](ledger-object-ids.html) of an [NFT Page](nftokenpage.html) to retrieve. |
| `nft_page` | String | The [ledger entry ID](../../../protocol/ledger-data/common-fields.md) of an [NFT Page](../../../protocol/ledger-data/ledger-entry-types/nftokenpage.md) to retrieve. |
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_nft_page",
@@ -648,9 +649,9 @@ Return an NFT Page in its raw ledger format.
"ledger_index": "validated"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
{
"method": "ledger_entry",
@@ -660,16 +661,17 @@ Return an NFT Page in its raw ledger format.
}]
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```sh
rippled json ledger_entry '{ "nft_page": "255DD86DDF59D778081A06D02701E9B2C9F4F01DFFFFFFFFFFFFFFFFFFFFFFFF", "ledger_index": "validated" }'
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
[Try it! >](websocket-api-tool.html#ledger_entry-nft-page)
[Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-nft-page)
## Response Format
@@ -677,17 +679,16 @@ The response follows the [standard format][], with a successful result containin
| Field | Type | Description |
|:---------------|:-----------------|:-----------------------------------------|
| `index` | String | The unique ID of this [ledger entry](ledger-object-types.html). |
| `index` | String | The unique ID of this [ledger entry](../../../protocol/ledger-data/ledger-entry-types/index.md). |
| `ledger_index` | Unsigned Integer | The [ledger index][] of the ledger that was used when retrieving this data. |
| `node` | Object | _(Omitted if `"binary": true` specified.)_ Object containing the data of this ledger entry, according to the [ledger format][]. |
| `node_binary` | String | _(Omitted unless `"binary":true` specified)_ The [binary representation](serialization.html) of the ledger object, as hexadecimal. |
| `node_binary` | String | _(Omitted unless `"binary":true` specified)_ The [binary representation](../../../protocol/binary-format.md) of the ledger object, as hexadecimal. |
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
{% tabs %}
{% tab label="WebSocket" %}
```json
{
"id": "example_get_accountroot",
@@ -718,9 +719,9 @@ An example of a successful response:
"type": "response"
}
```
{% /tab %}
*JSON-RPC*
{% tab label="JSON-RPC" %}
```json
200 OK
@@ -751,9 +752,9 @@ An example of a successful response:
}
}
```
{% /tab %}
*Commandline*
{% tab label="Commandline" %}
```json
{
"result": {
@@ -782,8 +783,9 @@ An example of a successful response:
}
}
```
{% /tab %}
<!-- MULTICODE_BLOCK_END -->
{% /tabs %}
## Possible Errors
@@ -799,9 +801,4 @@ An example of a successful response:
* `malformedRequest` - The request provided an invalid combination of fields, or provided the wrong type for one or more fields.
* `unknownOption` - The fields provided in the request did not match any of the expected request formats.
<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}
{% raw-partial file="/_snippets/common-links.md" /%}