mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
[DRAFT] updates to ledger_entry for AMM, type filter
This commit is contained in:
1
content/_snippets/lowercase-types.md
Normal file
1
content/_snippets/lowercase-types.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
The valid types are: `account`, `amendments`, `amm` :not_enabled:, `check`, `deposit_preauth`, `directory`, `escrow`, `nft_offer`, `offer`, `payment_channel`, `signer_list`, `state` (trust line), and `ticket`.
|
||||||
@@ -74,7 +74,7 @@ The request includes the following parameters:
|
|||||||
| `Field` | Type | Description |
|
| `Field` | Type | Description |
|
||||||
|:-------------------------|:-----------------|:-------------------------------|
|
|:-------------------------|:-----------------|:-------------------------------|
|
||||||
| `account` | String | A unique identifier for the account, most commonly the account's address. |
|
| `account` | String | A unique identifier for the account, most commonly the account's address. |
|
||||||
| `type` | String | _(Optional)_ If included, filter results to include only this type of ledger object. The valid types are: `check`, `deposit_preauth`, `escrow`, `offer`, `payment_channel`, `signer_list`, `ticket`, `state` (trust line), and `nft_offer`. <!-- Author's note: Omitted types that can't be owned by an account --> |
|
| `type` | String | _(Optional)_ If included, filter results to include only this type of ledger object. The valid types are: `check`, `deposit_preauth`, `escrow`, `nft_offer`, `offer`, `payment_channel`, `signer_list`, `state` (trust line), and `ticket`. <!-- Author's note: Omitted types that can't be owned by an account --> |
|
||||||
| `deletion_blockers_only` | Boolean | _(Optional)_ If `true`, the response only includes objects that would block this account from [being deleted](accounts.html#deletion-of-accounts). The default is `false`. [New in: rippled 1.4.0][] |
|
| `deletion_blockers_only` | Boolean | _(Optional)_ If `true`, the response only includes objects that would block this account from [being deleted](accounts.html#deletion-of-accounts). The default is `false`. [New in: rippled 1.4.0][] |
|
||||||
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
|
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
|
||||||
| `ledger_index` | String or Number | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
| `ledger_index` | String or Number | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||||
|
|||||||
@@ -50,13 +50,14 @@ An example of the request format:
|
|||||||
|
|
||||||
A request can include the following fields:
|
A request can include the following fields:
|
||||||
|
|
||||||
| `Field` | Type | Required? | Description |
|
| `Field` | Type | Required? | Description |
|
||||||
|:---------------|:--------------------------|:----------|----------------|
|
|:---------------|:-----------------|:----------|----------------|
|
||||||
| `ledger_hash` | String - [Hash][] | No | A 20-byte hex string identifying the ledger version to use. |
|
| `ledger_hash` | [Hash][] | No | A 20-byte hex string identifying the ledger version to use. |
|
||||||
| `ledger_index` | Number - [Ledger Index][] | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
| `ledger_index` | [Ledger Index][] | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||||
| `binary` | Boolean | No | If `true`, return ledger entries as hexadecimal strings instead of JSON. The default is `false`. |
|
| `binary` | Boolean | No | If `true`, return ledger entries as hexadecimal strings instead of JSON. The default is `false`. |
|
||||||
| `limit` | Integer | 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). The default is the maximum. |
|
| `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). The default is the maximum. |
|
||||||
| `marker` | [Marker][] | No | Value from a previous paginated response. Resume retrieving data where that response left off. |
|
| `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. Valid values include:
|
||||||
|
|
||||||
The `ledger` field is deprecated and may be removed without further notice.
|
The `ledger` field is deprecated and may be removed without further notice.
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ This method can retrieve several different types of data. You can select which t
|
|||||||
|
|
||||||
### General Fields
|
### General Fields
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:------------------------|:---------------------------|:----------------------|
|
|:------------------------|:---------------------------|:----------------------|
|
||||||
| `binary` | Boolean | _(Optional)_ If `true`, return the requested ledger object'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 object'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][] |
|
||||||
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
|
| `ledger_hash` | String | _(Optional)_ A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) |
|
||||||
@@ -31,6 +31,7 @@ In addition to the general fields above, you must specify *exactly 1* of the fol
|
|||||||
|
|
||||||
- [`index`](#get-ledger-object-by-id)
|
- [`index`](#get-ledger-object-by-id)
|
||||||
- [`account_root`](#get-accountroot-object)
|
- [`account_root`](#get-accountroot-object)
|
||||||
|
- [`amm`](#get-amm-object) :not_enabled:
|
||||||
- [`directory`](#get-directorynode-object)
|
- [`directory`](#get-directorynode-object)
|
||||||
- [`offer`](#get-offer-object)
|
- [`offer`](#get-offer-object)
|
||||||
- [`ripple_state`](#get-ripplestate-object)
|
- [`ripple_state`](#get-ripplestate-object)
|
||||||
@@ -47,7 +48,7 @@ In addition to the general fields above, you must specify *exactly 1* of the fol
|
|||||||
|
|
||||||
Retrieve any type of ledger object by its unique ID.
|
Retrieve any type of ledger object by its unique ID.
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:--------|:-------|:----------------------------------------------------------|
|
|:--------|:-------|:----------------------------------------------------------|
|
||||||
| `index` | String | The [object ID](ledger-object-ids.html) of a single object to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. |
|
| `index` | String | The [object ID](ledger-object-ids.html) of a single object to retrieve from the ledger, as a 64-character (256-bit) hexadecimal string. |
|
||||||
|
|
||||||
@@ -100,7 +101,7 @@ rippled json ledger_entry '{ "index": "7DB0788C020F02780A673DC74757F23823FA3014C
|
|||||||
|
|
||||||
Retrieve an [AccountRoot object](accountroot.html) by its address. This is roughly equivalent to the [account_info method][].
|
Retrieve an [AccountRoot object](accountroot.html) by its address. This is roughly equivalent to the [account_info method][].
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:------------------------|:---------------------------|:----------------------|
|
|:------------------------|:---------------------------|:----------------------|
|
||||||
| `account_root` | String - [Address][] | The classic address of the [AccountRoot object](accountroot.html) to retrieve. |
|
| `account_root` | String - [Address][] | The classic address of the [AccountRoot object](accountroot.html) to retrieve. |
|
||||||
|
|
||||||
@@ -143,12 +144,77 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Get AMM Object
|
||||||
|
|
||||||
|
_(Automated Market Maker (AMM) functionality is part of the proposed [XLS-30d](https://github.com/XRPLF/XRPL-Standards/discussions/78) extension :not_enabled: to the XRP Ledger protocol. You can use these features on AMM test networks, but there isn't an official amendment and they aren't available on the production Mainnet.)_
|
||||||
|
|
||||||
|
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). |
|
||||||
|
|
||||||
|
<!-- MULTICODE_BLOCK_START -->
|
||||||
|
|
||||||
|
*WebSocket*
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"command": "ledger_entry",
|
||||||
|
"amm": {
|
||||||
|
"asset": {
|
||||||
|
"XRP"
|
||||||
|
},
|
||||||
|
"asset2": {
|
||||||
|
"currency" : "TST",
|
||||||
|
"issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"ledger_index": "validated"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*JSON-RPC*
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"method": "ledger_entry",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"amm": {
|
||||||
|
"asset": {
|
||||||
|
"XRP"
|
||||||
|
},
|
||||||
|
"asset2": {
|
||||||
|
"currency" : "TST",
|
||||||
|
"issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ledger_index": "validated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
*Commandline*
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rippled json ledger_entry '{ "amm": { "asset": { "XRP" }, "asset2": { "currency" : "TST", "issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd" } }, "ledger_index": "validated" }'
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- MULTICODE_BLOCK_END -->
|
||||||
|
|
||||||
|
[Try it! >](websocket-api-tool.html?server=wss%3A%2F%2Famm.devnet.rippletest.net%3A51233%2F#ledger_entry-amm)
|
||||||
|
|
||||||
|
|
||||||
### Get DirectoryNode Object
|
### 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](directorynode.html), 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 |
|
| 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` | 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.sub_index` | Unsigned Integer | _(Optional)_ If provided, jumps to a later "page" of the [DirectoryNode](directorynode.html). |
|
||||||
@@ -204,7 +270,7 @@ rippled json ledger_entry '{ "directory": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwu
|
|||||||
|
|
||||||
Retrieve an [Offer object](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 object](offer.html), which defines an offer to exchange currency. Can be provided as string (unique index of the Offer) or as an object.
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:------------------------|:---------------------------|:----------------------|
|
|:------------------------|:---------------------------|:----------------------|
|
||||||
| `offer` | Object or String | The [Offer object](offer.html) to retrieve. If a string, interpret as the [unique object ID](ledgers.html#tree-format) to the Offer. If an object, requires the sub-fields `account` and `seq` to uniquely identify the offer. |
|
| `offer` | Object or String | The [Offer object](offer.html) to retrieve. If a string, interpret as the [unique object ID](ledgers.html#tree-format) to the Offer. 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.account` | String - [Address][] | _(Required if `offer` is specified as an object)_ The account that placed the offer. |
|
||||||
@@ -259,7 +325,7 @@ rippled json ledger_entry '{ "offer": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJY
|
|||||||
|
|
||||||
Retrieve a [RippleState object](ripplestate.html), which tracks a (non-XRP) currency balance between two accounts.
|
Retrieve a [RippleState object](ripplestate.html), which tracks a (non-XRP) currency balance between two accounts.
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:------------------------|:---------------------------|:----------------------|
|
|:------------------------|:---------------------------|:----------------------|
|
||||||
| `ripple_state` | Object | Object specifying the RippleState (trust line) object to retrieve. The `accounts` and `currency` sub-fields are required to uniquely specify the RippleState entry to retrieve. |
|
| `ripple_state` | Object | Object specifying the RippleState (trust line) object to retrieve. The `accounts` and `currency` sub-fields are required to uniquely specify the RippleState entry to retrieve. |
|
||||||
| `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 object](ripplestate.html). |
|
| `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 object](ripplestate.html). |
|
||||||
@@ -318,7 +384,7 @@ rippled json ledger_entry '{ "ripple_state": { "accounts": ["rf1BiGeXwwQoi8Z2ueF
|
|||||||
|
|
||||||
Retrieve a [Check object](check.html), which is a potential payment that can be cashed by its recipient. [New in: rippled 1.0.0][]
|
Retrieve a [Check object](check.html), which is a potential payment that can be cashed by its recipient. [New in: rippled 1.0.0][]
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:--------|:-------|:----------------------------------------------------------|
|
|:--------|:-------|:----------------------------------------------------------|
|
||||||
| `check` | String | The [object ID](ledger-object-ids.html) of a [Check object](check.html) to retrieve. |
|
| `check` | String | The [object ID](ledger-object-ids.html) of a [Check object](check.html) to retrieve. |
|
||||||
|
|
||||||
@@ -363,7 +429,7 @@ rippled json ledger_entry '{ "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D79
|
|||||||
|
|
||||||
Retrieve an [Escrow object](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 object](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][]
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:------------------------|:---------------------------|:----------------------|
|
|:------------------------|:---------------------------|:----------------------|
|
||||||
| `escrow` | Object or String | The [Escrow object](escrow-object.html) 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 object](escrow-object.html) 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.owner` | String - [Address][] | _(Required if `escrow` is specified as an object)_ The owner (sender) of the Escrow object. |
|
| `escrow.owner` | String - [Address][] | _(Required if `escrow` is specified as an object)_ The owner (sender) of the Escrow object. |
|
||||||
@@ -416,7 +482,7 @@ rippled json ledger_entry '{ "escrow": { "owner": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9
|
|||||||
|
|
||||||
Retrieve a [PayChannel object](paychannel.html), which holds XRP for asynchronous payments. [New in: rippled 1.0.0][]
|
Retrieve a [PayChannel object](paychannel.html), which holds XRP for asynchronous payments. [New in: rippled 1.0.0][]
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:------------------|:-------|:------------------------------------------------|
|
|:------------------|:-------|:------------------------------------------------|
|
||||||
| `payment_channel` | String | The [object ID](ledger-object-ids.html) of a [PayChannel object](paychannel.html) to retrieve. |
|
| `payment_channel` | String | The [object ID](ledger-object-ids.html) of a [PayChannel object](paychannel.html) to retrieve. |
|
||||||
|
|
||||||
@@ -460,7 +526,7 @@ rippled json ledger_entry '{ "payment_channel": "C7F634794B79DB40E87179A9D1BF05D
|
|||||||
|
|
||||||
Retrieve a [DepositPreauth object](depositpreauth-object.html), which tracks preauthorization for payments to accounts requiring [Deposit Authorization](depositauth.html). Can be provided as string (object ID of the DepositPreauth) or as an object. [New in: rippled 1.1.0][]
|
Retrieve a [DepositPreauth object](depositpreauth-object.html), which tracks preauthorization for payments to accounts requiring [Deposit Authorization](depositauth.html). Can be provided as string (object ID of the DepositPreauth) or as an object. [New in: rippled 1.1.0][]
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:-----------------------------|:---------------------|:-----------------------|
|
|:-----------------------------|:---------------------|:-----------------------|
|
||||||
| `deposit_preauth` | Object or String | Specify a [DepositPreauth object](depositpreauth-object.html) to retrieve. If a string, must be the [object ID](ledger-object-ids.html) of the DepositPreauth object, as hexadecimal. If an object, requires `owner` and `authorized` sub-fields. |
|
| `deposit_preauth` | Object or String | Specify a [DepositPreauth object](depositpreauth-object.html) to retrieve. If a string, must be the [object ID](ledger-object-ids.html) of the DepositPreauth object, 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.owner` | String - [Address][] | _(Required if `deposit_preauth` is specified as an object)_ The account that provided the preauthorization. |
|
||||||
@@ -512,7 +578,7 @@ rippled json ledger_entry '{ "deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFY
|
|||||||
|
|
||||||
Retrieve a [Ticket object](ticket.html), which represents a [sequence number][] set aside for future use. Can be provided as string (object ID of the Ticket) or as an object. _(Added by the [TicketBatch amendment][])_
|
Retrieve a [Ticket object](ticket.html), which represents a [sequence number][] set aside for future use. Can be provided as string (object ID of the Ticket) or as an object. _(Added by the [TicketBatch amendment][])_
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:--------------------|:---------------------|:----------------------|
|
|:--------------------|:---------------------|:----------------------|
|
||||||
| `ticket` | Object or String | The [Ticket object](ticket.html) to retrieve. If a string, must be the [object 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 object](ticket.html) to retrieve. If a string, must be the [object 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.account` | String - [Address][] | _(Required if `ticket` is specified as an object)_ The owner of the Ticket object. |
|
| `ticket.account` | String - [Address][] | _(Required if `ticket` is specified as an object)_ The owner of the Ticket object. |
|
||||||
@@ -565,7 +631,7 @@ rippled json ledger_entry '{ "ticket": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJ
|
|||||||
|
|
||||||
The response follows the [standard format][], with a successful result containing the following fields:
|
The response follows the [standard format][], with a successful result containing the following fields:
|
||||||
|
|
||||||
| `Field` | Type | Description |
|
| Field | Type | Description |
|
||||||
|:---------------|:-----------------|:-----------------------------------------|
|
|:---------------|:-----------------|:-----------------------------------------|
|
||||||
| `index` | String | The unique ID of this [ledger object](ledger-object-types.html). |
|
| `index` | String | The unique ID of this [ledger object](ledger-object-types.html). |
|
||||||
| `ledger_index` | Unsigned Integer | The [ledger index][] of the ledger that was used when retrieving this data. |
|
| `ledger_index` | Unsigned Integer | The [ledger index][] of the ledger that was used when retrieving this data. |
|
||||||
|
|||||||
@@ -74,9 +74,24 @@ For example, to represent $153.75 US dollars issued by account `r9cZA1mLK5R5Am25
|
|||||||
|
|
||||||
### Specifying Without Amounts
|
### Specifying Without Amounts
|
||||||
|
|
||||||
If you are specifying a token without an amount (typically for defining an order book in the [decentralized exchange](decentralized-exchange.html)) you should specify it as a currency object, but omit the `value` field.
|
In some cases, you need to define an asset (which could be XRP or a token) without a specific amount, such as when defining an order book in the [decentralized exchange](decentralized-exchange.html).
|
||||||
|
|
||||||
If you are specifying XRP without an amount (typically for defining an order book), you should specify it as a JSON object with _only_ a `currency` field. Never include an `issuer` field for XRP.
|
To describe a token without an amount, specify it as a currency object, but omit the `value` field. For example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"currency": "TST",
|
||||||
|
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
To describe XRP without an amount, specify it as a JSON object with _only_ a `currency` field. Never include an `issuer` field for XRP. For example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"currency": "XRP"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## String Numbers
|
## String Numbers
|
||||||
|
|||||||
Reference in New Issue
Block a user