mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 04:05:49 +00:00
[DOC] rippled - account_currencies is ready to go
This commit is contained in:
@@ -496,7 +496,7 @@ Accounts are the core unit of authentication in the Ripple Network. Each account
|
|||||||
## account_currencies ##
|
## account_currencies ##
|
||||||
[[Source]<br>](https://github.com/ripple/rippled/blob/df966a9ac6dd986585ecccb206aff24452e41a30/src/ripple/rpc/handlers/AccountCurrencies.cpp "Source")
|
[[Source]<br>](https://github.com/ripple/rippled/blob/df966a9ac6dd986585ecccb206aff24452e41a30/src/ripple/rpc/handlers/AccountCurrencies.cpp "Source")
|
||||||
|
|
||||||
The `account_currencies` command retrieves a list of currencies that an account can send or receive. <span class='draft-commment'>(How is "can send" defined?)</span>
|
The `account_currencies` command retrieves a simple list of currencies that an account can send or receive, based on its trustlines. (This is not a thoroughly confirmed list, but it can be used to populate user interfaces.)
|
||||||
|
|
||||||
#### Request Format ####
|
#### Request Format ####
|
||||||
An example of the request format:
|
An example of the request format:
|
||||||
@@ -531,7 +531,6 @@ An example of the request format:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
The request includes the following parameters:
|
The request includes the following parameters:
|
||||||
@@ -539,10 +538,11 @@ 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. |
|
||||||
| strict | Boolean | (Optional) <span class='draft-comment'>If true, only accept an address or public key for the account parameter.</span> Defaults to false. |
|
| strict | Boolean | (Optional) If true, only accept an address or public key for the account parameter. Defaults to false. |
|
||||||
| ledger\_hash | String | (Optional) A 20-byte hex string for the ledger version to use. (See [Specifying a Ledger](#specifying-a-ledger-instance)) |
|
| ledger\_hash | String | (Optional) A 20-byte hex string for the ledger version to use. (See [Specifying a Ledger](#specifying-a-ledger-instance)) |
|
||||||
| ledger\_index | String or Unsigned Integer| (Optional) The sequence number of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying a Ledger](#specifying-a-ledger-instance))|
|
| ledger\_index | String or Unsigned Integer| (Optional) The sequence number of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying a Ledger](#specifying-a-ledger-instance))|
|
||||||
| account\_index | Unsigned Integer | (Optional) <span class='draft-comment'>Something to do with account sequence number??</span> Defaults to 0. |
|
|
||||||
|
The following field is deprecated and should not be provided: `account_index`.
|
||||||
|
|
||||||
#### Response Format ####
|
#### Response Format ####
|
||||||
|
|
||||||
@@ -632,6 +632,8 @@ The response follows the [standard format](#response-formatting), with a success
|
|||||||
| send\_currencies | Array of Strings | Array of currency codes for currencies that this account can send. Each currency is either a 3-letter [ISO 4217 Currency Code](http://www.xe.com/iso4217.php) or a 160-bit hex value according to the [currency format](https://wiki.ripple.com/Currency_format). |
|
| send\_currencies | Array of Strings | Array of currency codes for currencies that this account can send. Each currency is either a 3-letter [ISO 4217 Currency Code](http://www.xe.com/iso4217.php) or a 160-bit hex value according to the [currency format](https://wiki.ripple.com/Currency_format). |
|
||||||
| validated | Boolean | If `true`, this data comes from a validated ledger. |
|
| validated | Boolean | If `true`, this data comes from a validated ledger. |
|
||||||
|
|
||||||
|
*Note:* The currencies that an account can send or receive are defined based on a simple check of its trust lines. if an account has a trust line for a currency and enough room to increase its balance, it can receive that currency. If the trustline's balance can go down, the account can send that currency. This method *does not* check whether the trust line is frozen or authorized.
|
||||||
|
|
||||||
#### Possible Errors ####
|
#### Possible Errors ####
|
||||||
|
|
||||||
* Any of the [universal error types](#universal-errors).
|
* Any of the [universal error types](#universal-errors).
|
||||||
|
|||||||
Reference in New Issue
Block a user