mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 04:05:49 +00:00
Rename API method categories
This commit is contained in:
@@ -0,0 +1,198 @@
|
||||
---
|
||||
html: account_channels.html
|
||||
parent: account-methods.html
|
||||
blurb: アカウントのPayment Channelに関する情報を返します。
|
||||
labels:
|
||||
- Payment Channel
|
||||
---
|
||||
# account_channels
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/release/src/ripple/rpc/handlers/AccountChannels.cpp "Source")
|
||||
|
||||
_([PayChan Amendment][]が有効になっている必要があります。[新規: rippled 0.33.0][])_
|
||||
|
||||
`account_channels`メソッドは、アカウントのPayment Channelに関する情報を返します。指定されたアカウントがChannelの送金元であり、送金先ではないChannelのみが含まれます。(Channelの「送金元」と「所有者」は同一です。)取得された情報はすべて、特定バージョンのレジャーに関連付けられています。
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"command": "account_channels",
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_channels",
|
||||
"params": [{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"ledger_index": "validated"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```bash
|
||||
#Syntax: account_channels <account> [<destination_account>] [<ledger>]
|
||||
rippled account_channels rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn ra5nK24KXen9AHvsdFTKHSANinZseWnPcX validated
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる>](websocket-api-tool.html#account_channels)
|
||||
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|:----------------------|:-------------------------------------------|:--------|
|
||||
| `account` | 文字列 | アカウントの一意のID。通常はアカウントの[アドレス][]です。要求は、このアカウントがChannelの所有者/送金元であるChannelを返します。 |
|
||||
| `destination_account` | 文字列 | _(省略可)_ アカウントの一意のID。通常はアカウントの[アドレス][]です。指定されている場合、フィルタリングによりこのアカウントを送金先とするPayment Channelに絞り込まれます。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進文字列。([レジャーの指定][]を参照してください) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用する[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
|
||||
| `limit` | 整数 | _(省略可)_ 取得するトランザクション数を制限します。サーバーはこの値に従う必要はありません。10以上400以下の範囲で値を指定する必要があります。デフォルトでは200です。 |
|
||||
| `marker` | [マーカー][] | _(省略可)_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。 |
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"result": {
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"channels": [
|
||||
{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"amount": "1000",
|
||||
"balance": "0",
|
||||
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
|
||||
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
|
||||
"settle_delay": 60
|
||||
}
|
||||
],
|
||||
"ledger_hash": "1EDBBA3C793863366DF5B31C2174B6B5E6DF6DB89A7212B86838489148E2A581",
|
||||
"ledger_index": 71766314,
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"channels": [
|
||||
{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"amount": "1000",
|
||||
"balance": "0",
|
||||
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
|
||||
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
|
||||
"settle_delay": 60
|
||||
}
|
||||
],
|
||||
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
|
||||
"ledger_index": 71766343,
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"channels": [
|
||||
{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"amount": "1000",
|
||||
"balance": "0",
|
||||
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
|
||||
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
|
||||
"settle_delay": 60
|
||||
}
|
||||
],
|
||||
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
|
||||
"ledger_index": 71766343,
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|:-----------|:-------------------------------------------|:-------------------|
|
||||
| `account` | 文字列 | Payment Channelの送金元/所有者のアドレス。これは要求の`account`フィールドに対応しています。 |
|
||||
| `channels` | channelオブジェクトの配列 | この`account`が所有するPayment Channel。 |
|
||||
| `ledger_hash` | 文字列 | この応答の生成に使用されたレジャーバージョンの識別用[ハッシュ][]。[新規: rippled 0.90.0][] |
|
||||
| `ledger_index` | 数値 | この応答の生成に使用されたレジャーバージョンの[レジャーインデックス][]。[新規: rippled 0.90.0][] |
|
||||
| `validated` | ブール値 | _(省略される場合があります)_`true`の場合、この応答の情報は検証済みレジャーバージョンから取り込まれます。trueでない場合、情報は変更されることがあります。[新規: rippled 0.90.0][] |
|
||||
| `limit` | 数値 | _(省略される場合があります)_ この要求から実際に返されるchannelオブジェクトの数の制限。 |
|
||||
| `marker` | [マーカー][] | _(省略される場合があります)_ ページネーションのサーバー定義の値。この値を次のコールに渡して、このコールで終わった箇所から結果の取得を再開します。この後に追加のページがない場合は省略されます。 |
|
||||
|
||||
各Channelオブジェクトのフィールドは次のとおりです。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|-------|------|-------------|
|
||||
| `account` | 文字列 | Channelの所有者([アドレス][]として)。 |
|
||||
| `amount` | 文字列 | このChannelに割り当てられる[XRP、drop単位][]の合計額。 |
|
||||
| `balance` | 文字列 | 使用されているレジャーバージョンにおいて、このChannelから支払われた[XRP、drop単位][]の合計額。(Channelに残っているXRPの額を計算するには、`balance`を`amount`から差し引きます。) |
|
||||
| `channel_id` | 文字列 | このChannelの一意のID(64文字の16進数文字列)。レジャーの状態データの[channelオブジェクトのID](paychannel.html#paychannel-idのフォーマット)でもあります。 |
|
||||
| `destination_account` | 文字列 | Channelの送金先アカウント([アドレス][]として)。このアカウントだけが、Channelがオープンしている間にXRPを受領できます。 |
|
||||
| `public_key` | 文字列 | _(省略される場合があります)_ XRP Ledgerの[base58][]フォーマットのPayment Channelの公開鍵。このChannelに対する署名付きクレームは、一致するキーペアを使用して清算する必要があります。 |
|
||||
| `public_key_hex` | 文字列 | _(省略される場合があります)_ Payment Channel作成時にChannelの公開鍵を指定している場合はその公開鍵(16進数フォーマット)。このChannelに対する署名付きクレームは、一致するキーペアを使用して清算する必要があります。 |
|
||||
| `settle_delay` | 符号なし整数 | Payment Channelの所有者がChannel閉鎖を依頼した後に、そのChannelが開いている必要がある秒数。 |
|
||||
| `expiration` | 符号なし整数 | _(省略される場合があります)_ このChannelに設定された有効期限([Rippleエポック以降の経過秒数][])。この有効期限の日付は変更可能です。これが最新の検証済みレジャーの閉鎖時刻よりも前の場合、Channelは有効期限切れです。 |
|
||||
| `cancel_after` | 符号なし整数 | _(省略される場合があります)_ このChannelの変更不可能な有効期限がChannel作成時に指定されている場合はその有効期限([Rippleエポック以降の経過秒数][])。これが最新の検証済みレジャーの閉鎖時刻よりも前の場合、Channelは有効期限切れです。 |
|
||||
| `source_tag` | 符号なし整数 | _(省略される場合があります)_ このPayment Channelを通じた支払いの[送金元タグ](become-an-xrp-ledger-gateway.html#source-and-destination-tags)として使用される32ビット符号なし整数(Channel作成時に指定されている場合)。送金元アカウントでのPayment Channelの送金人またはその他の目的を示します。通常、このChannelからの支払いを差し戻す場合、返金の`DestinationTag`にこの値を指定する必要があります。 |
|
||||
| `destination_tag` | 符号なし整数 | _(省略される場合があります)_ このChannelを通じた支払いの[送金先タグ](become-an-xrp-ledger-gateway.html#source-and-destination-tags)として使用される32ビット符号なし整数(Channel作成時に指定されている場合)。送金先アカウントでのPayment Channelの受取人またはその他の目的を示します。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* [汎用エラータイプ][]のすべて。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されているアドレスが、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,197 @@
|
||||
---
|
||||
html: account_channels.html
|
||||
parent: account-methods.html
|
||||
blurb: Get a list of payment channels where the account is the source of the channel.
|
||||
labels:
|
||||
- Payment Channels
|
||||
---
|
||||
# account_channels
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountChannels.cpp "Source")
|
||||
|
||||
_(Added by the [PayChan amendment][]. [New in: rippled 0.33.0][])_
|
||||
|
||||
The `account_channels` method returns information about an account's Payment Channels. This includes only channels where the specified account is the channel's source, not the destination. (A channel's "source" and "owner" are the same.) All information retrieved is relative to a particular version of the ledger.
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"command": "account_channels",
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_channels",
|
||||
"params": [{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"ledger_index": "validated"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```bash
|
||||
#Syntax: account_channels <account> [<destination_account>] [<ledger>]
|
||||
rippled account_channels rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn ra5nK24KXen9AHvsdFTKHSANinZseWnPcX validated
|
||||
```
|
||||
|
||||
[Try it! >](websocket-api-tool.html#account_channels)
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| Field | Type | Description |
|
||||
|:----------------------|:---------------------------|:------------------------|
|
||||
| `account` | String | The unique identifier of an account, typically the account's [Address][]. The request returns channels where this account is the channel's owner/source. |
|
||||
| `destination_account` | String | _(Optional)_ The unique identifier of an account, typically the account's [Address][]. If provided, filter results to payment channels whose destination is this account. |
|
||||
| `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 to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| `limit` | Integer | _(Optional)_ Limit the number of transactions to retrieve. Cannot be less than 10 or more than 400. The default is 200. |
|
||||
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. [Updated in: rippled 1.5.0][] |
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"result": {
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"channels": [
|
||||
{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"amount": "1000",
|
||||
"balance": "0",
|
||||
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
|
||||
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
|
||||
"settle_delay": 60
|
||||
}
|
||||
],
|
||||
"ledger_hash": "1EDBBA3C793863366DF5B31C2174B6B5E6DF6DB89A7212B86838489148E2A581",
|
||||
"ledger_index": 71766314,
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"channels": [
|
||||
{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"amount": "1000",
|
||||
"balance": "0",
|
||||
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
|
||||
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
|
||||
"settle_delay": 60
|
||||
}
|
||||
],
|
||||
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
|
||||
"ledger_index": 71766343,
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"channels": [
|
||||
{
|
||||
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
|
||||
"amount": "1000",
|
||||
"balance": "0",
|
||||
"channel_id": "C7F634794B79DB40E87179A9D1BF05D05797AE7E92DF8E93FD6656E8C4BE3AE7",
|
||||
"destination_account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
|
||||
"public_key": "aBR7mdD75Ycs8DRhMgQ4EMUEmBArF8SEh1hfjrT2V9DQTLNbJVqw",
|
||||
"public_key_hex": "03CFD18E689434F032A4E84C63E2A3A6472D684EAF4FD52CA67742F3E24BAE81B2",
|
||||
"settle_delay": 60
|
||||
}
|
||||
],
|
||||
"ledger_hash": "27F530E5C93ED5C13994812787C1ED073C822BAEC7597964608F2C049C2ACD2D",
|
||||
"ledger_index": 71766343,
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|:---------------|:-------------------------|:---------------------------------|
|
||||
| `account` | String | The address of the source/owner of the payment channels. This corresponds to the `account` field of the request. |
|
||||
| `channels` | Array of Channel Objects | Payment channels owned by this `account`. [Updated in: rippled 1.5.0][] |
|
||||
| `ledger_hash` | String | _(May be omitted)_ The identifying [Hash][] of the ledger version used to generate this response. [New in: rippled 0.90.0][] |
|
||||
| `ledger_index` | Number | The [Ledger Index][] of the ledger version used to generate this response. [New in: rippled 0.90.0][] |
|
||||
| `validated` | Boolean | _(May be omitted)_ If `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. [New in: rippled 0.90.0][] |
|
||||
| `limit` | Number | _(May be omitted)_ The limit to how many channel objects were actually returned by this request. |
|
||||
| `marker` | [Marker][] | _(May be omitted)_ Server-defined value for pagination. Pass this to the next call to resume getting results where this call left off. Omitted when there are no additional pages after this one. |
|
||||
|
||||
Each Channel Object has the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|:----------------------|:-----------------|:----------------------------------|
|
||||
| `account` | String | The owner of the channel, as an [Address][]. |
|
||||
| `amount` | String | The total amount of [XRP, in drops][] allocated to this channel. |
|
||||
| `balance` | String | The total amount of [XRP, in drops][], paid out from this channel, as of the ledger version used. (You can calculate the amount of XRP left in the channel by subtracting `balance` from `amount`.) |
|
||||
| `channel_id` | String | A unique ID for this channel, as a 64-character hexadecimal string. This is also the [ID of the channel object](paychannel.html#paychannel-id-format) in the ledger's state data. |
|
||||
| `destination_account` | String | The destination account of the channel, as an [Address][]. Only this account can receive the XRP in the channel while it is open. |
|
||||
| `settle_delay` | Unsigned Integer | The number of seconds the payment channel must stay open after the owner of the channel requests to close it. |
|
||||
| `public_key` | String | _(May be omitted)_ The public key for the payment channel in the XRP Ledger's [base58][] format. Signed claims against this channel must be redeemed with the matching key pair. |
|
||||
| `public_key_hex` | String | _(May be omitted)_ The public key for the payment channel in hexadecimal format, if one was specified at channel creation. Signed claims against this channel must be redeemed with the matching key pair. |
|
||||
| `expiration` | Unsigned Integer | _(May be omitted)_ Time, in [seconds since the Ripple Epoch][], when this channel is set to expire. This expiration date is mutable. If this is before the close time of the most recent validated ledger, the channel is expired. |
|
||||
| `cancel_after` | Unsigned Integer | _(May be omitted)_ Time, in [seconds since the Ripple Epoch][], of this channel's immutable expiration, if one was specified at channel creation. If this is before the close time of the most recent validated ledger, the channel is expired. |
|
||||
| `source_tag` | Unsigned Integer | _(May be omitted)_ A 32-bit unsigned integer to use as a [source tag](become-an-xrp-ledger-gateway.html#source-and-destination-tags) for payments through this payment channel, if one was specified at channel creation. This indicates the payment channel's originator or other purpose at the source account. Conventionally, if you bounce payments from this channel, you should specify this value in the `DestinationTag` of the return payment. |
|
||||
| `destination_tag` | Unsigned Integer | _(May be omitted)_ A 32-bit unsigned integer to use as a [destination tag](become-an-xrp-ledger-gateway.html#source-and-destination-tags) for payments through this channel, if one was specified at channel creation. This indicates the payment channel's beneficiary or other purpose at the destination account. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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' %}
|
||||
@@ -0,0 +1,158 @@
|
||||
---
|
||||
html: account_currencies.html
|
||||
parent: account-methods.html
|
||||
blurb: アカウントが送金または受領できる通貨のリストを返します。
|
||||
labels:
|
||||
- トークン
|
||||
---
|
||||
# account_currencies
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/df966a9ac6dd986585ecccb206aff24452e41a30/src/ripple/rpc/handlers/AccountCurrencies.cpp "Source")
|
||||
|
||||
`account_currencies`コマンドは、アカウントのトラストラインに基づいてそのアカウントが送金または受領できる通貨のリストを返します。(このリストは完全に確認されたリストではありませんが、ユーザーインターフェイスへの入力に使用できます。)
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"command": "account_currencies",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"strict": true,
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
{
|
||||
"method": "account_currencies",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"account_index": 0,
|
||||
"ledger_index": "validated",
|
||||
"strict": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる>](websocket-api-tool.html#account_currencies)
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントの[アドレス][]です。 |
|
||||
| `strict` | ブール値 | _(省略可)_ trueの場合は、アカウントパラメーターにアドレスまたは公開鍵だけを受け入れます。デフォルトではfalseです。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進文字列。([レジャーの指定][]を参照してください) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用する[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
|
||||
|
||||
以下のフィールドは廃止予定であるため、指定しないでください。`account_index`.
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"result": {
|
||||
"ledger_index": 11775844,
|
||||
"receive_currencies": [
|
||||
"BTC",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"MXN",
|
||||
"USD",
|
||||
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
|
||||
],
|
||||
"send_currencies": [
|
||||
"ASP",
|
||||
"BTC",
|
||||
"CHF",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"JPY",
|
||||
"MXN",
|
||||
"USD"
|
||||
],
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"ledger_index": 11775823,
|
||||
"receive_currencies": [
|
||||
"BTC",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"MXN",
|
||||
"USD",
|
||||
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
|
||||
],
|
||||
"send_currencies": [
|
||||
"ASP",
|
||||
"BTC",
|
||||
"CHF",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"JPY",
|
||||
"MXN",
|
||||
"USD"
|
||||
],
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------------|:---------------------------|:-------------------------|
|
||||
| `ledger_hash` | 文字列 - [ハッシュ][] | (省略される場合があります)このデータの取得に使用するレジャーバージョンの識別用ハッシュ(16進数)。 |
|
||||
| `ledger_index` | 整数 - [レジャーインデックス][] | このデータの取得に使用するレジャーバージョンのシーケンス番号。 |
|
||||
| `receive_currencies` | 文字列の配列 | このアカウントが受領できる通貨の[通貨コード][]の配列。 |
|
||||
| `send_currencies` | 文字列の配列 | このアカウントが送金できる通貨の[通貨コード][]の配列。 |
|
||||
| `validated` | ブール値 | `true`の場合、このデータは検証済みレジャーから取得されます。 |
|
||||
|
||||
**注記:** アカウントが送金または受領できる通貨は、アカウントのトラストラインのチェックに基づいて定義されます。アカウントに通貨のトラストラインがあり、残高を増額できる余裕がある場合、その通貨を受領できます。トラストラインの残高を減らせる場合、アカウントはその通貨を送金できます。このメソッドでは、トラストラインが[凍結](freezes.html)または承認されているかどうかは確認 _されません_ 。
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* [汎用エラータイプ][]のすべて。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されているアドレスが、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
|
||||
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,180 @@
|
||||
---
|
||||
html: account_currencies.html
|
||||
parent: account-methods.html
|
||||
blurb: Get a list of currencies an account can send or receive.
|
||||
labels:
|
||||
- Tokens
|
||||
---
|
||||
# account_currencies
|
||||
[[Source]](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, based on its trust lines. (This is not a thoroughly confirmed list, but it can be used to populate user interfaces.)
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "account_currencies",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"strict": true,
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_currencies",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"account_index": 0,
|
||||
"ledger_index": "validated",
|
||||
"strict": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: account_currencies account [ledger_index|ledger_hash] [strict]
|
||||
rippled account_currencies rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn validated strict
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html#account_currencies)
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
|
||||
| `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 to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| `strict` | Boolean | _(Optional)_ If `true`, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is `false`. |
|
||||
|
||||
The following field is deprecated and should not be provided: `account_index`.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"ledger_index": 11775844,
|
||||
"receive_currencies": [
|
||||
"BTC",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"MXN",
|
||||
"USD",
|
||||
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
|
||||
],
|
||||
"send_currencies": [
|
||||
"ASP",
|
||||
"BTC",
|
||||
"CHF",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"JPY",
|
||||
"MXN",
|
||||
"USD"
|
||||
],
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"ledger_index": 11775823,
|
||||
"receive_currencies": [
|
||||
"BTC",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"MXN",
|
||||
"USD",
|
||||
"015841551A748AD2C1F76FF6ECB0CCCD00000000"
|
||||
],
|
||||
"send_currencies": [
|
||||
"ASP",
|
||||
"BTC",
|
||||
"CHF",
|
||||
"CNY",
|
||||
"DYM",
|
||||
"EUR",
|
||||
"JOE",
|
||||
"JPY",
|
||||
"MXN",
|
||||
"USD"
|
||||
],
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"ledger_hash" : "F43A801ED4562FA744A35755B86BE898D91C5643BF499924EA3C69491B8C28D1",
|
||||
"ledger_index" : 56843649,
|
||||
"receive_currencies" : [ "USD" ],
|
||||
"send_currencies" : [ "NGN", "TRC" ],
|
||||
"status" : "success",
|
||||
"validated" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------------|:---------------------------|:-------------------------|
|
||||
| `ledger_hash` | String - [Hash][] | (May be omitted) The identifying hash of the ledger version used to retrieve this data, as hex. |
|
||||
| `ledger_index` | Integer - [Ledger Index][] | The ledger index of the ledger version used to retrieve this data. |
|
||||
| `receive_currencies` | Array of Strings | Array of [Currency Code][]s for currencies that this account can receive. |
|
||||
| `send_currencies` | Array of Strings | Array of [Currency Code][]s for currencies that this account can send. |
|
||||
| `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 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 trust line's balance can go down, the account can send that currency. This method _doesn't_ check whether the trust line is [frozen](freezes.html) or authorized.
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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-api-links.md' %}
|
||||
@@ -0,0 +1,220 @@
|
||||
---
|
||||
html: account_info.html
|
||||
parent: account-methods.html
|
||||
blurb: アカウントとそのアクティビティおよびXRP残高についての情報を取得します。
|
||||
labels:
|
||||
- アカウント
|
||||
- XRP
|
||||
---
|
||||
# account_info
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountInfo.cpp "Source")
|
||||
|
||||
`account_info`コマンドは、アカウントとそのアクティビティおよびXRP残高についての情報を取得します。取得されたすべての情報は、特定バージョンのレジャーに関連付けられています。
|
||||
|
||||
## 要求フォーマット
|
||||
|
||||
account_info要求の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"id": 2,
|
||||
"command": "account_info",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"strict": true,
|
||||
"ledger_index": "current",
|
||||
"queue": true
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
{
|
||||
"method": "account_info",
|
||||
"params": [
|
||||
{
|
||||
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"strict": true,
|
||||
"ledger_index": "current",
|
||||
"queue": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```
|
||||
#Syntax: account_info account [ledger_index|ledger_hash] [strict]
|
||||
rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 true
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる>](websocket-api-tool.html#account_info)
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、最もよく使用されるのはアカウントの[アドレス][]です。 |
|
||||
| `strict` | ブール値 | (省略可能、デフォルトはFalse)Trueに設定すると、`account`フィールドに指定できる項目は公開鍵またはXRP Ledgerアドレスのみになります。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可能)_ 使用するレジャーバージョンの20バイトの16進文字列。([レジャーの指定][]を参照してください。) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可能)_ 使用するレジャーのシーケンス番号、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください。) |
|
||||
| `queue` | ブール値 | _(省略可能)_ `true`にして[FeeEscalation Amendment][]を有効にすると、このアカウントに関連するキューに入れられたトランザクションについてのステータスも返されます。これを使用できるのは、現在開いているレジャーのデータを問い合わせる場合のみです。[新規: rippled 0.33.0][] |
|
||||
| `signer_lists` | ブール値 | _(省略可能)_`true`にして[MultiSign Amendment][]を有効にすると、このアカウントに関連するすべての[SignerListオブジェクト](signerlist.html)も返されます。[新規: rippled 0.31.0][] |
|
||||
|
||||
次のフィールドは廃止予定のため、指定しないでください。`ident`、`ledger`。
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"id": 5,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account_data": {
|
||||
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"Balance": "999999999960",
|
||||
"Flags": 8388608,
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"OwnerCount": 0,
|
||||
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
|
||||
"PreviousTxnLgrSeq": 3,
|
||||
"Sequence": 6,
|
||||
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
|
||||
},
|
||||
"ledger_current_index": 4,
|
||||
"queue_data": {
|
||||
"auth_change_queued": true,
|
||||
"highest_sequence": 10,
|
||||
"lowest_sequence": 6,
|
||||
"max_spend_drops_total": "500",
|
||||
"transactions": [
|
||||
{
|
||||
"auth_change": false,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 6
|
||||
},
|
||||
...(trimmed for length) ...
|
||||
{
|
||||
"LastLedgerSequence": 10,
|
||||
"auth_change": true,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 10
|
||||
}
|
||||
],
|
||||
"txn_count": 5
|
||||
},
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
{
|
||||
"result": {
|
||||
"account_data": {
|
||||
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"Balance": "999999999960",
|
||||
"Flags": 8388608,
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"OwnerCount": 0,
|
||||
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
|
||||
"PreviousTxnLgrSeq": 3,
|
||||
"Sequence": 6,
|
||||
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
|
||||
},
|
||||
"ledger_current_index": 4,
|
||||
"queue_data": {
|
||||
"auth_change_queued": true,
|
||||
"highest_sequence": 10,
|
||||
"lowest_sequence": 6,
|
||||
"max_spend_drops_total": "500",
|
||||
"transactions": [
|
||||
{
|
||||
"auth_change": false,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 6
|
||||
},
|
||||
...(trimmed for length) ...
|
||||
{
|
||||
"LastLedgerSequence": 10,
|
||||
"auth_change": true,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 10
|
||||
}
|
||||
],
|
||||
"txn_count": 5
|
||||
},
|
||||
"status": "success",
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
応答は[標準フォーマット][]に従い、要求されたアカウントとそのデータ、アカウントの適用先レジャーが結果として表示されます。以下のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------------|:--------|:------------------------------------------|
|
||||
| `account_data` | オブジェクト | このアカウントの情報を含む[AccountRootレジャーオブジェクト](accountroot.html)がレジャーに保管されているとおりに表示されます。 |
|
||||
| `signer_lists` | 配列 | (要求に`signer_lists`が指定されていて、少なくとも1つのSignerListがアカウントに関連する場合を除いて省略されます。)[マルチ署名](multi-signing.html)用にアカウントに関連付けられた[SignerListレジャーオブジェクト](signerlist.html)の配列。アカウントが所有できるSignerListは最大1つであるため、この配列のメンバーは存在するとすれば、1メンバーのみです。[新規: rippled 0.31.0][] |
|
||||
| `ledger_current_index` | 整数 | (`ledger_index`が代わりに指定されている場合は省略されます。)この情報を取得したときに使用されていた最新のレジャーのシーケンス番号。この情報には、これより新しいレジャーの変更は一切含まれません。 |
|
||||
| `ledger_index` | 整数 | (`ledger_current_index`が代わりに指定されている場合は省略されます。)この情報を取得したときに使用されていたレジャーのシーケンス番号。この情報には、これより新しいレジャーの変更は一切含まれません。 |
|
||||
| `queue_data` | オブジェクト | (`queue`が`true`と指定され、現在開いているレジャーを問い合わせている場合を除いて省略されます。)このアカウントによって送信された[キューに入れられたトランザクション](transaction-cost.html#キューに入れられたトランザクション)についての情報。この情報にはローカル`rippled`サーバーの状態が示されますが、コンセンサスネットワーク内の他のサーバーとは異なる場合があります。示される値はキューイングメカニズムによって「大まかに」計算されるため、一部のフィールドは省略される場合があります。 |
|
||||
| `validated` | ブール値 | このデータが検証済みのレジャーバージョンのものである場合はTrueです。省略されているかFalseが設定されている場合、このデータは最終のものではありません。[新規: rippled 0.26.0][] |
|
||||
|
||||
`queue_data`パラメーターが存在する場合、以下のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:------------------------|:--------|:-----------------------------------------|
|
||||
| `txn_count` | 整数 | このアドレスからキューに入れられたトランザクションの数。 |
|
||||
| `auth_change_queued` | ブール値 | (省略される場合があります)キュー内のトランザクションがこのアドレスの[トランザクションの承認方法](transaction-basics.html#トランザクションの承認)を変更するかどうかを示します。`true`の場合、トランザクションが実行されているかキューから除外されるまで、このアドレスはトランザクションをこれ以上キューに入れることができません。 |
|
||||
| `lowest_sequence` | 整数 | (省略される場合があります)このアドレスによってキューに入れられたトランザクションのうち最も低い[シーケンス番号][]。 |
|
||||
| `highest_sequence` | 整数 | (省略される場合があります)このアドレスによってキューに入れられたトランザクションのうち最も高い[シーケンス番号][]。 |
|
||||
| `max_spend_drops_total` | 文字列 | (省略される場合があります)キュー内のすべてのトランザクションが利用可能なXRPを最大限消費する場合に、このアドレスから差し引くことができる[XRPのdrop数][]を示す整数の金額。 |
|
||||
| `transactions` | 配列 | (省略される場合があります)このアドレスからキューに入れられた各トランザクションについての情報。 |
|
||||
|
||||
`transactions`配列内の各オブジェクト(存在する場合)には、以下のフィールドのいずれかまたはすべてが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:------------------|:--------|:-----------------------------------------------|
|
||||
| `auth_change` | ブール値 | このトランザクションがこのアドレスの[トランザクション承認の方法](transaction-basics.html#トランザクションの承認)を変更するかどうかを示します。 |
|
||||
| `fee` | 文字列 | このトランザクションの[トランザクションコスト](transaction-cost.html)([XRPのdrop数][])。 |
|
||||
| `fee_level` | 文字列 | このタイプのトランザクションの最少コストと比較した、このトランザクションのトランザクションコスト([手数料レベル][])。 |
|
||||
| `max_spend_drops` | 文字列 | このトランザクションで送信または消却できる[XRPのdrop数][]の最高額。 |
|
||||
| `seq` | 整数 | このトランザクションの[シーケンス番号][]。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* いずれかの[汎用エラータイプ][]。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。例えば、要求で`queue`を`true`と指定したが、現在開いているレジャーではない`ledger_index`を指定した場合です。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定したアドレスが、レジャー内のアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
|
||||
[手数料レベル]: transaction-cost.html#手数料レベル
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,245 @@
|
||||
---
|
||||
html: account_info.html
|
||||
parent: account-methods.html
|
||||
blurb: Get basic data about an account.
|
||||
labels:
|
||||
- Accounts
|
||||
- XRP
|
||||
---
|
||||
# account_info
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountInfo.cpp "Source")
|
||||
|
||||
The `account_info` command retrieves information about an account, its activity, and its XRP balance. All information retrieved is relative to a particular version of the ledger.
|
||||
|
||||
## Request Format
|
||||
|
||||
An example of an account_info request:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"command": "account_info",
|
||||
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"strict": true,
|
||||
"ledger_index": "current",
|
||||
"queue": true
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_info",
|
||||
"params": [
|
||||
{
|
||||
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"strict": true,
|
||||
"ledger_index": "current",
|
||||
"queue": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: account_info account [ledger_index|ledger_hash] [strict]
|
||||
rippled account_info rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn validated strict
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html#account_info)
|
||||
|
||||
The request contains the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
|
||||
| `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 to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| `queue` | Boolean | _(Optional)_ If `true`, and the [FeeEscalation amendment][] is enabled, also returns stats about queued transactions associated with this account. Can only be used when querying for the data from the current open ledger. [New in: rippled 0.33.0][] Not available from servers in [Reporting Mode][]. |
|
||||
| `signer_lists` | Boolean | _(Optional)_ If `true`, and the [MultiSign amendment][] is enabled, also returns any [SignerList objects](signerlist.html) associated with this account. [New in: rippled 0.31.0][] |
|
||||
| `strict` | Boolean | _(Optional)_ If `true`, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is `false`. |
|
||||
|
||||
The following fields are deprecated and should not be provided: `ident`, `ledger`.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 5,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account_data": {
|
||||
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"Balance": "999999999960",
|
||||
"Flags": 8388608,
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"OwnerCount": 0,
|
||||
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
|
||||
"PreviousTxnLgrSeq": 3,
|
||||
"Sequence": 6,
|
||||
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
|
||||
},
|
||||
"ledger_current_index": 4,
|
||||
"queue_data": {
|
||||
"auth_change_queued": true,
|
||||
"highest_sequence": 10,
|
||||
"lowest_sequence": 6,
|
||||
"max_spend_drops_total": "500",
|
||||
"transactions": [
|
||||
{
|
||||
"auth_change": false,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 6
|
||||
},
|
||||
... (trimmed for length) ...
|
||||
{
|
||||
"LastLedgerSequence": 10,
|
||||
"auth_change": true,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 10
|
||||
}
|
||||
],
|
||||
"txn_count": 5
|
||||
},
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"account_data": {
|
||||
"Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"Balance": "999999999960",
|
||||
"Flags": 8388608,
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"OwnerCount": 0,
|
||||
"PreviousTxnID": "4294BEBE5B569A18C0A2702387C9B1E7146DC3A5850C1E87204951C6FDAA4C42",
|
||||
"PreviousTxnLgrSeq": 3,
|
||||
"Sequence": 6,
|
||||
"index": "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
|
||||
},
|
||||
"ledger_current_index": 4,
|
||||
"queue_data": {
|
||||
"auth_change_queued": true,
|
||||
"highest_sequence": 10,
|
||||
"lowest_sequence": 6,
|
||||
"max_spend_drops_total": "500",
|
||||
"transactions": [
|
||||
{
|
||||
"auth_change": false,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 6
|
||||
},
|
||||
... (trimmed for length) ...
|
||||
{
|
||||
"LastLedgerSequence": 10,
|
||||
"auth_change": true,
|
||||
"fee": "100",
|
||||
"fee_level": "2560",
|
||||
"max_spend_drops": "100",
|
||||
"seq": 10
|
||||
}
|
||||
],
|
||||
"txn_count": 5
|
||||
},
|
||||
"status": "success",
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"account_data" : {
|
||||
"Account" : "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
|
||||
"Balance" : "9986",
|
||||
"Flags" : 1114112,
|
||||
"LedgerEntryType" : "AccountRoot",
|
||||
"OwnerCount" : 0,
|
||||
"PreviousTxnID" : "0705FE3F52057924C288296EF0EBF668E0C1A3646FBA8FAF9B73DCC0A797B4B2",
|
||||
"PreviousTxnLgrSeq" : 51948740,
|
||||
"RegularKey" : "rhLkGGNZdjSpnHJw4XAFw1Jy7PD8TqxoET",
|
||||
"Sequence" : 192220,
|
||||
"index" : "92FA6A9FC8EA6018D5D16532D7795C91BFB0831355BDFDA177E86C8BF997985F"
|
||||
},
|
||||
"ledger_hash" : "8169428EDF7F046F817CE44F5F1DF23AD9FAEFFA2CBA7645C3254D66AA79B46E",
|
||||
"ledger_index" : 56843712,
|
||||
"status" : "success",
|
||||
"validated" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with the result containing the requested account, its data, and a ledger to which it applies, as the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:--------|:------------------------------------------|
|
||||
| `account_data` | Object | The [AccountRoot ledger object](accountroot.html) with this account's information, as stored in the ledger. |
|
||||
| `signer_lists` | Array | _(Omitted unless the request specified `signer_lists` and at least one SignerList is associated with the account.)_ Array of [SignerList ledger objects](signerlist.html) associated with this account for [Multi-Signing](multi-signing.html). Since an account can own at most one SignerList, this array must have exactly one member if it is present. [New in: rippled 0.31.0][] |
|
||||
| `ledger_current_index` | Integer | _(Omitted if `ledger_index` is provided instead)_ The [ledger index][] of the current in-progress ledger, which was used when retrieving this information. |
|
||||
| `ledger_index` | Integer | _(Omitted if `ledger_current_index` is provided instead)_ The [ledger index][] of the ledger version used when retrieving this information. The information does not contain any changes from ledger versions newer than this one. |
|
||||
| `queue_data` | Object | _(Omitted unless `queue` specified as `true` and querying the current open ledger.)_ Information about [queued transactions](transaction-cost.html#queued-transactions) sent by this account. This information describes the state of the local `rippled` server, which may be different from other servers in the [peer-to-peer XRP Ledger network](consensus-network.html). Some fields may be omitted because the values are calculated "lazily" by the queuing mechanism. |
|
||||
| `validated` | Boolean | True if this data is from a validated ledger version; if omitted or set to false, this data is not final. [New in: rippled 0.26.0][] |
|
||||
|
||||
The `queue_data` parameter, if present, contains the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:------------------------|:--------|:-----------------------------------------|
|
||||
| `txn_count` | Integer | Number of queued transactions from this address. |
|
||||
| `auth_change_queued` | Boolean | (May be omitted) Whether a transaction in the queue changes this address's [ways of authorizing transactions](transaction-basics.html#authorizing-transactions). If `true`, this address can queue no further transactions until that transaction has been executed or dropped from the queue. |
|
||||
| `lowest_sequence` | Integer | (May be omitted) The lowest [Sequence Number][] among transactions queued by this address. |
|
||||
| `highest_sequence` | Integer | (May be omitted) The highest [Sequence Number][] among transactions queued by this address. |
|
||||
| `max_spend_drops_total` | String | (May be omitted) Integer amount of [drops of XRP][] that could be debited from this address if every transaction in the queue consumes the maximum amount of XRP possible. |
|
||||
| `transactions` | Array | (May be omitted) Information about each queued transaction from this address. |
|
||||
|
||||
Each object in the `transactions` array, if present, may contain any or all of the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:------------------|:--------|:-----------------------------------------------|
|
||||
| `auth_change` | Boolean | Whether this transaction changes this address's [ways of authorizing transactions](transaction-basics.html#authorizing-transactions). |
|
||||
| `fee` | String | The [Transaction Cost](transaction-cost.html) of this transaction, in [drops of XRP][]. |
|
||||
| `fee_level` | String | The transaction cost of this transaction, relative to the minimum cost for this type of transaction, in [fee levels][]. |
|
||||
| `max_spend_drops` | String | The maximum amount of [XRP, in drops][], this transaction could send or destroy. |
|
||||
| `seq` | Integer | The [Sequence Number][] of this transaction. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. For example, the request specified `queue` as `true` but specified a `ledger_index` that is not the current open ledger.
|
||||
* `actNotFound` - The address specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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.
|
||||
|
||||
[fee levels]: transaction-cost.html#fee-levels
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,195 @@
|
||||
---
|
||||
html: account_lines.html
|
||||
parent: account-methods.html
|
||||
blurb: アカウントのトラストラインに関する情報を返します。
|
||||
labels:
|
||||
- トークン
|
||||
---
|
||||
# account_lines
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountLines.cpp "Source")
|
||||
|
||||
`account_lines`メソッドは、アカウントのトラストラインに関する情報(XRP以外のあらゆる通貨の残高と資産など)を返します。取得された情報はすべて、特定バージョンのレジャーに関連付けられています。
|
||||
|
||||
## 要求フォーマット
|
||||
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"id": 1,
|
||||
"command": "account_lines",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
{
|
||||
"method": "account_lines",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる >](websocket-api-tool.html#account_lines)
|
||||
|
||||
要求には以下のパラメーターを指定できます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:-------------------------------------------|:---------------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントの[アドレス][]です。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進文字列。([レジャーの指定][]を参照してください) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
|
||||
| `peer` | 文字列 | _(省略可)_ 2番目のアカウントの[アドレス][]。指定されている場合は、2つのアカウントを結ぶトラストラインだけが出力されます。 |
|
||||
| `limit` | 整数 | (省略可、デフォルト値は可変)取得するトラストラインの数を制限します。サーバーはこの値を受け入れる必要はありません。10以上400以下の範囲で値を指定する必要があります。[新規: rippled 0.26.4][] |
|
||||
| `marker` | [マーカー][] | _(省略可)_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。[新規: rippled 0.26.4][] |
|
||||
|
||||
以下のパラメーターは廃止予定であり、今後予告なしに削除される可能性があります。`ledger`および`peer_index`。
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"id": 1,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"lines": [
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "ASP",
|
||||
"limit": "0",
|
||||
"limit_peer": "10",
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "XAU",
|
||||
"limit": "0",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"no_ripple_peer": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"balance": "3.497605752725159",
|
||||
"currency": "USD",
|
||||
"limit": "5",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"lines": [
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "ASP",
|
||||
"limit": "0",
|
||||
"limit_peer": "10",
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "XAU",
|
||||
"limit": "0",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"no_ripple_peer": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
|
||||
"balance": "0",
|
||||
"currency": "015841551A748AD2C1F76FF6ECB0CCCD00000000",
|
||||
"limit": "10.01037626125837",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
}
|
||||
],
|
||||
"status": "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合には、アカウントのアドレスとトラストラインオブジェクトの配列が含まれています。具体的には、結果オブジェクトには以下のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------------|:---------------------------|:-----------------------|
|
||||
| `account` | 文字列 | この要求に対応するアカウントの一意の[アドレス][]。トラストラインのための「パースペクティブアカウント」です。 |
|
||||
| `lines` | 配列 | トラストラインオブジェクトからなる配列。以下で説明します。トラストラインの数が多い場合は、一度に`limit`の数までのトラストラインが返されます。 |
|
||||
| `ledger_current_index` | 整数 - [レジャーインデックス][] | _(`ledger_hash`または`ledger_index`が指定されている場合は省略)_ この情報の取得時に使用した、現行のオープンレジャーのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
|
||||
| `ledger_index` | 整数 - [レジャーインデックス][] | _(`ledger_current_index`が代わりに指定されている場合は省略)_ このデータの取得時に使用されたレジャーバージョンのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
|
||||
| `ledger_hash` | 文字列 - [ハッシュ][] | _(省略される場合があります)_ このデータの取得時に使用されたレジャーバージョンの識別用ハッシュ。[新規: rippled 0.26.4-sp1][] |
|
||||
| `marker` | [マーカー][] | 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。この後に追加のページがない場合は省略されます。[新規: rippled 0.26.4][] |
|
||||
|
||||
各トラストラインオブジェクトには以下のフィールドの組み合わせが含まれています。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------|:-----------------|:---------------------------------------|
|
||||
| `account` | 文字列 | このトラストラインの相手側の一意の[アドレス][]。 |
|
||||
| `balance` | 文字列 | 現在このラインに対して保留されている残高(数値)の表示。残高がプラスの場合はパースペクティブアカウントがその額を保有しており、マイナスの場合はパースペクティブアカウントがその額を借用しています。 |
|
||||
| `currency` | 文字列 | このトラストラインが保有できる通貨を示す[通貨コード][]。 |
|
||||
| `limit` | 文字列 | このアカウントがピアアカウントからの借用を希望する特定の通貨の上限額。 |
|
||||
| `limit_peer` | 文字列 | 相手側アカウントがパースペクティブアカウントからの借用を希望する特定の通貨の上限額。 |
|
||||
| `quality_in` | 符号なし整数 | このアカウントが、このトラストラインの入金時残高を評価する際のレート(この数値対10億単位の比率)。(たとえば5億の場合は0.5:1の比率を表します。)特殊なケースとして、0は1:1の比率として扱われます。 |
|
||||
| `quality_out` | 符号なし整数 | このアカウントが、このトラストラインの出金時残高を評価する際のレート(この数値対10億単位の比率)。(たとえば5億の場合は0.5:1の比率を表します。)特殊なケースとして、0は1:1の比率として扱われます。 |
|
||||
| `no_ripple` | ブール値 | (省略される場合があります)このアカウントでこのラインに対し[NoRippleフラグ](rippling.html)が有効な場合は、`true`。省略されている場合は、`false`と同じです。 |
|
||||
| `no_ripple_peer` | ブール値 | (省略される場合があります)ピアアカウントでこのラインに対し[NoRippleフラグ](rippling.html)が有効な場合は`true`。省略されている場合は、`false`と同じです。 |
|
||||
| `authorized` | ブール値 | (省略される場合があります)このアカウントが[このトラストラインを承認した](authorized-trust-lines.html)場合は、`true`。省略されている場合は、`false`と同じです。 |
|
||||
| `peer_authorized` | ブール値 | (省略される場合があります)ピアアカウントが[このトラストラインを承認した](authorized-trust-lines.html)場合は`true`。省略されている場合は、`false`と同じです。 |
|
||||
| `freeze` | ブール値 | (省略される場合があります)このアカウントがこのトラストラインを[凍結](freezes.html)した場合は`true`。省略されている場合は、`false`と同じです。 |
|
||||
| `freeze_peer` | ブール値 | (省略される場合があります)ピアアカウントがこのトラストラインを[凍結](freezes.html)した場合は、`true`。省略されている場合は、`false`と同じです。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* いずれかの[汎用エラータイプ][]。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
* `actMalformed` - 指定されている`marker`フィールドが受け入れられない場合。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,449 @@
|
||||
---
|
||||
html: account_lines.html
|
||||
parent: account-methods.html
|
||||
blurb: Get info about an account's trust lines.
|
||||
labels:
|
||||
- Tokens
|
||||
---
|
||||
# account_lines
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountLines.cpp "Source")
|
||||
|
||||
The `account_lines` method returns information about an account's trust lines, including balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger.
|
||||
|
||||
## Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"command": "account_lines",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_lines",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: account_lines <account> [<peer>] [<ledger_index>|<ledger_hash>]
|
||||
rippled account_lines r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html#account_lines)
|
||||
|
||||
The request accepts the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:-------------------------------------------|:---------------|
|
||||
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
|
||||
| `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 to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
| `peer` | String | _(Optional)_ The [Address][] of a second account. If provided, show only lines of trust connecting the two accounts. |
|
||||
| `limit` | Integer | (Optional, default varies) Limit the number of trust lines to retrieve. The server is not required to honor this value. Must be within the inclusive range 10 to 400. [New in: rippled 0.26.4][] |
|
||||
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. [New in: rippled 0.26.4][] |
|
||||
|
||||
The following parameters are deprecated and may be removed without further notice: `ledger` and `peer_index`.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"lines": [
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "ASP",
|
||||
"limit": "0",
|
||||
"limit_peer": "10",
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "XAU",
|
||||
"limit": "0",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"no_ripple_peer": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"balance": "3.497605752725159",
|
||||
"currency": "USD",
|
||||
"limit": "5",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"lines": [
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "ASP",
|
||||
"limit": "0",
|
||||
"limit_peer": "10",
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance": "0",
|
||||
"currency": "XAU",
|
||||
"limit": "0",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"no_ripple_peer": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
},
|
||||
{
|
||||
"account": "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
|
||||
"balance": "0",
|
||||
"currency": "015841551A748AD2C1F76FF6ECB0CCCD00000000",
|
||||
"limit": "10.01037626125837",
|
||||
"limit_peer": "0",
|
||||
"no_ripple": true,
|
||||
"quality_in": 0,
|
||||
"quality_out": 0
|
||||
}
|
||||
],
|
||||
"status": "success"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"account" : "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_current_index" : 56867265,
|
||||
"lines" : [
|
||||
{
|
||||
"account" : "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance" : "0",
|
||||
"currency" : "ASP",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "10",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance" : "0",
|
||||
"currency" : "XAU",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"no_ripple_peer" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"balance" : "5",
|
||||
"currency" : "USD",
|
||||
"limit" : "5",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4",
|
||||
"balance" : "481.992867407479",
|
||||
"currency" : "MXN",
|
||||
"limit" : "1000",
|
||||
"limit_peer" : "0",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"balance" : "0.793598266778297",
|
||||
"currency" : "EUR",
|
||||
"limit" : "1",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
|
||||
"balance" : "0",
|
||||
"currency" : "CNY",
|
||||
"limit" : "3",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E",
|
||||
"balance" : "1.336889190631542",
|
||||
"currency" : "DYM",
|
||||
"limit" : "3",
|
||||
"limit_peer" : "0",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"balance" : "0.3488146605801446",
|
||||
"currency" : "CHF",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "0",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"balance" : "0",
|
||||
"currency" : "BTC",
|
||||
"limit" : "3",
|
||||
"limit_peer" : "0",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"balance" : "11.68225001668339",
|
||||
"currency" : "USD",
|
||||
"limit" : "5000",
|
||||
"limit_peer" : "0",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rpgKWEmNqSDAGFhy5WDnsyPqfQxbWxKeVd",
|
||||
"balance" : "-0.00111",
|
||||
"currency" : "BTC",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "10",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rBJ3YjwXi2MGbg7GVLuTXUWQ8DjL7tDXh4",
|
||||
"balance" : "-0.0008744482690504699",
|
||||
"currency" : "BTC",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "10",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"balance" : "0",
|
||||
"currency" : "USD",
|
||||
"limit" : "1",
|
||||
"limit_peer" : "0",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
|
||||
"balance" : "9.07619790068559",
|
||||
"currency" : "CNY",
|
||||
"limit" : "100",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"balance" : "7.292695098901099",
|
||||
"currency" : "JPY",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"balance" : "0",
|
||||
"currency" : "AUX",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"no_ripple_peer" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "r9vbV3EHvXWjSkeQ6CAcYVPGeq7TuiXY2X",
|
||||
"balance" : "0.0004557360418801623",
|
||||
"currency" : "USD",
|
||||
"limit" : "1",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"balance" : "12.41688780720394",
|
||||
"currency" : "EUR",
|
||||
"limit" : "100",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rfF3PNkwkq1DygW2wum2HK3RGfgkJjdPVD",
|
||||
"balance" : "35",
|
||||
"currency" : "USD",
|
||||
"limit" : "500",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rwUVoVMSURqNyvocPCcvLu3ygJzZyw8qwp",
|
||||
"balance" : "-5",
|
||||
"currency" : "JOE",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "50",
|
||||
"no_ripple_peer" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2",
|
||||
"balance" : "0",
|
||||
"currency" : "USD",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "100",
|
||||
"no_ripple_peer" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rE6R3DWF9fBD7CyiQciePF9SqK58Ubp8o2",
|
||||
"balance" : "0",
|
||||
"currency" : "JOE",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "100",
|
||||
"no_ripple_peer" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rs9M85karFkCRjvc6KMWn8Coigm9cbcgcx",
|
||||
"balance" : "0",
|
||||
"currency" : "015841551A748AD2C1F76FF6ECB0CCCD00000000",
|
||||
"limit" : "10.01037626125837",
|
||||
"limit_peer" : "0",
|
||||
"no_ripple" : true,
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
},
|
||||
{
|
||||
"account" : "rEhDDUUNxpXgEHVJtC2cjXAgyx5VCFxdMF",
|
||||
"balance" : "0",
|
||||
"currency" : "USD",
|
||||
"limit" : "0",
|
||||
"limit_peer" : "1",
|
||||
"quality_in" : 0,
|
||||
"quality_out" : 0
|
||||
}
|
||||
],
|
||||
"status" : "success",
|
||||
"validated" : false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the address of the account and an array of trust line objects. Specifically, the result object contains the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:---------------------------|:-----------------------|
|
||||
| `account` | String | Unique [Address][] of the account this request corresponds to. This is the "perspective account" for purpose of the trust lines. |
|
||||
| `lines` | Array | Array of trust line objects, as described below. If the number of trust lines is large, only returns up to the `limit` at a time. |
|
||||
| `ledger_current_index` | Integer - [Ledger Index][] | _(Omitted if `ledger_hash` or `ledger_index` provided)_ The ledger index of the current open ledger, which was used when retrieving this information. [New in: rippled 0.26.4-sp1][] |
|
||||
| `ledger_index` | Integer - [Ledger Index][] | _(Omitted if `ledger_current_index` provided instead)_ The ledger index of the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `ledger_hash` | String - [Hash][] | _(May be omitted)_ The identifying hash the ledger version that was used when retrieving this data. [New in: rippled 0.26.4-sp1][] |
|
||||
| `marker` | [Marker][] | 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 additional pages after this one. [New in: rippled 0.26.4][] |
|
||||
|
||||
Each trust line object has some combination of the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------|:-----------------|:---------------------------------------|
|
||||
| `account` | String | The unique [Address][] of the counterparty to this trust line. |
|
||||
| `balance` | String | Representation of the numeric balance currently held against this line. A positive balance means that the perspective account holds value; a negative balance means that the perspective account owes value. |
|
||||
| `currency` | String | A [Currency Code][] identifying what currency this trust line can hold. |
|
||||
| `limit` | String | The maximum amount of the given currency that this account is willing to owe the peer account |
|
||||
| `limit_peer` | String | The maximum amount of currency that the counterparty account is willing to owe the perspective account |
|
||||
| `quality_in` | Unsigned Integer | Rate at which the account values incoming balances on this trust line, as a ratio of this value per 1 billion units. (For example, a value of 500 million represents a 0.5:1 ratio.) As a special case, 0 is treated as a 1:1 ratio. |
|
||||
| `quality_out` | Unsigned Integer | Rate at which the account values outgoing balances on this trust line, as a ratio of this value per 1 billion units. (For example, a value of 500 million represents a 0.5:1 ratio.) As a special case, 0 is treated as a 1:1 ratio. |
|
||||
| `no_ripple` | Boolean | _(May be omitted)_ If `true`, this account has enabled the [No Ripple flag](rippling.html) for this trust line. If present and `false`, this account has disabled the No Ripple flag, but, because the account also has the Default Ripple flag disabled, that is not considered [the default state](ripplestate.html#contributing-to-the-owner-reserve). If omitted, the account has the No Ripple flag disabled for this trust line and Default Ripple enabled. [Updated in: rippled 1.7.0][] |
|
||||
| `no_ripple_peer` | Boolean | _(May be omitted)_ If `true`, the peer account has enabled the [No Ripple flag](rippling.html) for this trust line. If present and `false`, this account has disabled the No Ripple flag, but, because the account also has the Default Ripple flag disabled, that is not considered [the default state](ripplestate.html#contributing-to-the-owner-reserve). If omitted, the account has the No Ripple flag disabled for this trust line and Default Ripple enabled. [Updated in: rippled 1.7.0][] |
|
||||
| `authorized` | Boolean | _(May be omitted)_ If `true`, this account has [authorized this trust line](authorized-trust-lines.html). The default is `false`. |
|
||||
| `peer_authorized`| Boolean | _(May be omitted)_ If `true`, the peer account has [authorized this trust line](authorized-trust-lines.html). The default is `false`. |
|
||||
| `freeze` | Boolean | _(May be omitted)_ If `true`, this account has [frozen](freezes.html) this trust line. The default is `false`. |
|
||||
| `freeze_peer` | Boolean | _(May be omitted)_ If `true`, the peer account has [frozen](freezes.html) this trust line. The default is `false`. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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.
|
||||
* `actMalformed` - If the `marker` field provided is not acceptable.
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,165 @@
|
||||
---
|
||||
html: account_nfts.html
|
||||
parent: account-methods.html
|
||||
blurb: Get a list of all NFTs for an account.
|
||||
labels:
|
||||
- Non-fungible Tokens, NFTs
|
||||
status: not_enabled
|
||||
---
|
||||
# account_nfts
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountObjects.cpp "Source")
|
||||
|
||||
The `account_nfts` method returns a list of `NFToken` objects for the specified account.
|
||||
|
||||
{% include '_snippets/nfts-disclaimer.md' %}
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
{% include '_snippets/no-cli-syntax.md' %}
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "account_nfts",
|
||||
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_nfts",
|
||||
"params": [{
|
||||
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
|
||||
"ledger_index": "validated"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html?server=wss%3A%2F%2Fxls20-sandbox.rippletest.net%3A51233%2F#account_nfts)
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| Field | Type | Description |
|
||||
|:---------------|:-----------------|:-----------------------------------------|
|
||||
| `account` | String | The unique identifier of an account, typically the account's [Address][]. The request returns a list of NFTs owned by this account. |
|
||||
| `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][]) |
|
||||
| `limit` | Integer | _(Optional)_ Limit the number of [token pages][NFTokenPage object] to retrieve. Each page can contain up to 32 NFTs. The `limit` value cannot be lower than 20 or more than 400. The default is 100. |
|
||||
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. |
|
||||
|
||||
|
||||
## Response Format
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
|
||||
"account_nfts": [
|
||||
{
|
||||
"Flags": 1,
|
||||
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
|
||||
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
|
||||
"NFTokenTaxon": 0,
|
||||
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
|
||||
"nft_serial": 4
|
||||
},
|
||||
{
|
||||
"Flags": 1,
|
||||
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
|
||||
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005",
|
||||
"NFTokenTaxon": 0,
|
||||
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
|
||||
"nft_serial": 5
|
||||
}
|
||||
],
|
||||
"ledger_hash": "7971093E67341E325251268A5B7CD665EF450B126F67DF8384D964DF834961E8",
|
||||
"ledger_index": 2380540,
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
|
||||
"account_nfts": [
|
||||
{
|
||||
"Flags": 1,
|
||||
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
|
||||
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
|
||||
"NFTokenTaxon": 0,
|
||||
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
|
||||
"nft_serial": 4
|
||||
},
|
||||
{
|
||||
"Flags": 1,
|
||||
"Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
|
||||
"NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005",
|
||||
"NFTokenTaxon": 0,
|
||||
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
|
||||
"nft_serial": 5
|
||||
}
|
||||
],
|
||||
"ledger_hash": "46497E9FF17A993324F1A0A693DC068B467184023C7FD162812265EAAFEB97CB",
|
||||
"ledger_index": 2380559,
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:-----------------|:-----------------------------------------|
|
||||
| `account` | String | The account that owns the list of NFTs |
|
||||
| `account_nfts` | Array | A list of NFTs owned by the account, formatted as **NFT Objects** (see below). |
|
||||
| `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 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. |
|
||||
| `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. |
|
||||
|
||||
### NFT Objects
|
||||
|
||||
Each object in the `account_nfts` array represents one [NFToken][] and has the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------|:-------------------------------------|
|
||||
| `Flags` | Number | A bit-map of boolean flags enabled for this NFToken. See [NFToken Flags](nftoken.html#nftoken-flags) for possible values. |
|
||||
| `Issuer` | String - [Address][] | The account that issued this NFToken. |
|
||||
| `NFTokenID` | String | The unique identifier of this NFToken, in hexadecimal. |
|
||||
| `NFTokenTaxon` | Number | The unscrambled version of this token's [taxon](nftoken.html#taxon). Several tokens with the same taxon might represent instances of a limited series. |
|
||||
| `URI` | String | The URI data associated with this NFToken, in hexadecimal. |
|
||||
| `nft_serial` | Number | The token sequence number of this NFToken, which is unique for its issuer. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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' %}
|
||||
@@ -0,0 +1,630 @@
|
||||
---
|
||||
html: account_objects.html
|
||||
parent: account-methods.html
|
||||
blurb: アカウントが所有するすべてのオブジェクトを返します。
|
||||
labels:
|
||||
- アカウント
|
||||
- データ保持
|
||||
---
|
||||
# account_objects
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/399c43cae6e90a428e9ce6a988123972b0f03c99/src/ripple/rpc/handlers/AccountObjects.cpp "Source")
|
||||
|
||||
`account_objects`コマンドは、アカウントが所有するすべてのオブジェクトの生[レジャーフォーマット][]を返します。アカウントのトラストラインと残高の概要については、[account_linesメソッド][]を参照してください。
|
||||
|
||||
アカウントの`account_objects`応答に含まれる可能性のあるオブジェクトのタイプには以下のものがあります。
|
||||
|
||||
- 現在処理中、資金化されていない、または有効期限切れで削除されていないオーダーの[Offerオブジェクト](offer.html)。(詳細は、[オファーのライフサイクル](offers.html#オファーのライフサイクル)を参照してください。)
|
||||
- このアカウント側がデフォルト状態にないトラストラインの[RippleStateオブジェクト](ripplestate.html)。
|
||||
- アカウントの[SignerList](signerlist.html)(アカウントで[マルチ署名](multi-signing.html)が有効な場合)。
|
||||
- 実行されていないかまたは取り消されていない保留中の支払いの[Escrowオブジェクト](escrow.html)。
|
||||
- オープンPayment Channelの[PayChannelオブジェクト](paychannel.html)。
|
||||
- 保留中のCheckの[Checkオブジェクト](check.html)。
|
||||
- Deposit Preauthorizationの[DepositPreauthオブジェクト](depositpreauth-object.html)。[新規: rippled 1.1.0][]
|
||||
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"id": 1,
|
||||
"command": "account_objects",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index": "validated",
|
||||
"type": "state",
|
||||
"limit": 10
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
{
|
||||
"method": "account_objects",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index": "validated",
|
||||
"limit": 10,
|
||||
"type": "state"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```
|
||||
#Syntax: account_objects <account> [<ledger>]
|
||||
rippled account_objects r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 validated
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:-------------------------------------------|:---------------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、最も一般的にはアカウントのアドレスが使用されます。 |
|
||||
| `type` | 文字列 | _(省略可)_ 指定されている場合、結果をフィルタリングしてこのタイプのレジャーオブジェクトのみが含まれるようにします。有効なタイプは`check`、`deposit_preauth`、`escrow`、`offer`、`payment_channel`、`signer_list`、および`state`(トラストライン)です。 <!-- Author's note: Omitted types from this list that can't be owned by an account, and ticket until Tickets are enabled: https://github.com/ripple/rippled/blob/1dbc5a57e6b0e90a9da0d6e56f2f5a99e6ac1d8c/src/ripple/rpc/impl/RPCHelpers.cpp#L676-L686 --> |
|
||||
| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進文字列。([レジャーの指定][]を参照してください) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
|
||||
| `limit` | 符号なし整数 | _(省略可)_ 結果に含めることができるオブジェクトの最大数。非管理者接続では10以上400以下の範囲で値を指定する必要があります。デフォルトでは200です。 |
|
||||
| `marker` | [マーカー][] | _(省略可)_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。 |
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```
|
||||
{
|
||||
"id": 8,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"account_objects": [
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "ASP",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 65536,
|
||||
"HighLimit": {
|
||||
"currency": "ASP",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "ASP",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "10"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "BF7555B0F018E3C5E2A3FF9437A1A5092F32903BE246202F988181B9CED0D862",
|
||||
"PreviousTxnLgrSeq": 1438879,
|
||||
"index": "2243B0B630EA6F7330B654EFA53E27A7609D9484E535AB11B7F946DF3D247CE9"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "XAU",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 3342336,
|
||||
"HighLimit": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "79B26D7D34B950AC2C2F91A299A6888FABB376DD76CFF79D56E805BF439F6942",
|
||||
"PreviousTxnLgrSeq": 5982530,
|
||||
"index": "9ED4406351B7A511A012A9B5E7FE4059FA2F7650621379C0013492C315E25B97"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 1114112,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "5"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "6FE8C824364FB1195BCFEDCB368DFEE3980F7F78D3BF4DC4174BB4C86CF8C5CE",
|
||||
"PreviousTxnLgrSeq": 10555014,
|
||||
"index": "2DECFAC23B77D5AEA6116C15F5C6D4669EBAEE9E7EE050A40FE2B1E47B6A9419"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "MXN",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "481.992867407479"
|
||||
},
|
||||
"Flags": 65536,
|
||||
"HighLimit": {
|
||||
"currency": "MXN",
|
||||
"issuer": "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "MXN",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "1000"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "A467BACE5F183CDE1F075F72435FE86BAD8626ED1048EDEFF7562A4CC76FD1C5",
|
||||
"PreviousTxnLgrSeq": 3316170,
|
||||
"index": "EC8B9B6B364AF6CB6393A423FDD2DDBA96375EC772E6B50A3581E53BFBDFDD9A"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "EUR",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0.793598266778297"
|
||||
},
|
||||
"Flags": 1114112,
|
||||
"HighLimit": {
|
||||
"currency": "EUR",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "EUR",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "1"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "E9345D44433EA368CFE1E00D84809C8E695C87FED18859248E13662D46A0EC46",
|
||||
"PreviousTxnLgrSeq": 5447146,
|
||||
"index": "4513749B30F4AF8DA11F077C448128D6486BF12854B760E4E5808714588AA915"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 2228224,
|
||||
"HighLimit": {
|
||||
"currency": "CNY",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "3"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "0000000000000008",
|
||||
"PreviousTxnID": "2FDDC81F4394695B01A47913BEC4281AC9A283CC8F903C14ADEA970F60E57FCF",
|
||||
"PreviousTxnLgrSeq": 5949673,
|
||||
"index": "578C327DA8944BDE2E10C9BA36AFA2F43E06C8D1E8819FB225D266CBBCFDE5CE"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "DYM",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "1.336889190631542"
|
||||
},
|
||||
"Flags": 65536,
|
||||
"HighLimit": {
|
||||
"currency": "DYM",
|
||||
"issuer": "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "DYM",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "3"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "6DA2BD02DFB83FA4DAFC2651860B60071156171E9C021D9E0372A61A477FFBB1",
|
||||
"PreviousTxnLgrSeq": 8818732,
|
||||
"index": "5A2A5FF12E71AEE57564E624117BBA68DEF78CD564EF6259F92A011693E027C7"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "CHF",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "-0.3488146605801446"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "CHF",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "CHF",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "000000000000008C",
|
||||
"PreviousTxnID": "722394372525A13D1EAAB005642F50F05A93CF63F7F472E0F91CDD6D38EB5869",
|
||||
"PreviousTxnLgrSeq": 2687590,
|
||||
"index": "F2DBAD20072527F6AD02CE7F5A450DBC72BE2ABB91741A8A3ADD30D5AD7A99FB"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "BTC",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "BTC",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "3"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "BTC",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "0000000000000043",
|
||||
"PreviousTxnID": "03EDF724397D2DEE70E49D512AECD619E9EA536BE6CFD48ED167AE2596055C9A",
|
||||
"PreviousTxnLgrSeq": 8317037,
|
||||
"index": "767C12AF647CDF5FEB9019B37018748A79C50EDAF87E8D4C7F39F78AA7CA9765"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "-16.00534471983042"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "5000"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "000000000000004A",
|
||||
"PreviousTxnID": "CFFF5CFE623C9543308C6529782B6A6532207D819795AAFE85555DB8BF390FE7",
|
||||
"PreviousTxnLgrSeq": 14365854,
|
||||
"index": "826CF5BFD28F3934B518D0BDF3231259CBD3FD0946E3C3CA0C97D2C75D2D1A09"
|
||||
}
|
||||
],
|
||||
"ledger_hash": "053DF17D2289D1C4971C22F235BC1FCA7D4B3AE966F842E5819D0749E0B8ECD3",
|
||||
"ledger_index": 14378733,
|
||||
"limit": 10,
|
||||
"marker": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93,94A9F05FEF9A153229E2E997E64919FD75AAE2028C8153E8EBDB4440BD3ECBB5",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"account_objects": [
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "ASP",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 65536,
|
||||
"HighLimit": {
|
||||
"currency": "ASP",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "ASP",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "10"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "BF7555B0F018E3C5E2A3FF9437A1A5092F32903BE246202F988181B9CED0D862",
|
||||
"PreviousTxnLgrSeq": 1438879,
|
||||
"index": "2243B0B630EA6F7330B654EFA53E27A7609D9484E535AB11B7F946DF3D247CE9"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "XAU",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 3342336,
|
||||
"HighLimit": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "79B26D7D34B950AC2C2F91A299A6888FABB376DD76CFF79D56E805BF439F6942",
|
||||
"PreviousTxnLgrSeq": 5982530,
|
||||
"index": "9ED4406351B7A511A012A9B5E7FE4059FA2F7650621379C0013492C315E25B97"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 1114112,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "5"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "6FE8C824364FB1195BCFEDCB368DFEE3980F7F78D3BF4DC4174BB4C86CF8C5CE",
|
||||
"PreviousTxnLgrSeq": 10555014,
|
||||
"index": "2DECFAC23B77D5AEA6116C15F5C6D4669EBAEE9E7EE050A40FE2B1E47B6A9419"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "MXN",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "481.992867407479"
|
||||
},
|
||||
"Flags": 65536,
|
||||
"HighLimit": {
|
||||
"currency": "MXN",
|
||||
"issuer": "rHpXfibHgSb64n8kK9QWDpdbfqSpYbM9a4",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "MXN",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "1000"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "A467BACE5F183CDE1F075F72435FE86BAD8626ED1048EDEFF7562A4CC76FD1C5",
|
||||
"PreviousTxnLgrSeq": 3316170,
|
||||
"index": "EC8B9B6B364AF6CB6393A423FDD2DDBA96375EC772E6B50A3581E53BFBDFDD9A"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "EUR",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0.793598266778297"
|
||||
},
|
||||
"Flags": 1114112,
|
||||
"HighLimit": {
|
||||
"currency": "EUR",
|
||||
"issuer": "rLEsXccBGNR3UPuPu2hUXPjziKC3qKSBun",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "EUR",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "1"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "E9345D44433EA368CFE1E00D84809C8E695C87FED18859248E13662D46A0EC46",
|
||||
"PreviousTxnLgrSeq": 5447146,
|
||||
"index": "4513749B30F4AF8DA11F077C448128D6486BF12854B760E4E5808714588AA915"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 2228224,
|
||||
"HighLimit": {
|
||||
"currency": "CNY",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "3"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rnuF96W4SZoCJmbHYBFoJZpR8eCaxNvekK",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "0000000000000008",
|
||||
"PreviousTxnID": "2FDDC81F4394695B01A47913BEC4281AC9A283CC8F903C14ADEA970F60E57FCF",
|
||||
"PreviousTxnLgrSeq": 5949673,
|
||||
"index": "578C327DA8944BDE2E10C9BA36AFA2F43E06C8D1E8819FB225D266CBBCFDE5CE"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "DYM",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "1.336889190631542"
|
||||
},
|
||||
"Flags": 65536,
|
||||
"HighLimit": {
|
||||
"currency": "DYM",
|
||||
"issuer": "rGwUWgN5BEg3QGNY3RX2HfYowjUTZdid3E",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "DYM",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "3"
|
||||
},
|
||||
"LowNode": "0000000000000000",
|
||||
"PreviousTxnID": "6DA2BD02DFB83FA4DAFC2651860B60071156171E9C021D9E0372A61A477FFBB1",
|
||||
"PreviousTxnLgrSeq": 8818732,
|
||||
"index": "5A2A5FF12E71AEE57564E624117BBA68DEF78CD564EF6259F92A011693E027C7"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "CHF",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "-0.3488146605801446"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "CHF",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "0"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "CHF",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "000000000000008C",
|
||||
"PreviousTxnID": "722394372525A13D1EAAB005642F50F05A93CF63F7F472E0F91CDD6D38EB5869",
|
||||
"PreviousTxnLgrSeq": 2687590,
|
||||
"index": "F2DBAD20072527F6AD02CE7F5A450DBC72BE2ABB91741A8A3ADD30D5AD7A99FB"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "BTC",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "BTC",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "3"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "BTC",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "0000000000000043",
|
||||
"PreviousTxnID": "03EDF724397D2DEE70E49D512AECD619E9EA536BE6CFD48ED167AE2596055C9A",
|
||||
"PreviousTxnLgrSeq": 8317037,
|
||||
"index": "767C12AF647CDF5FEB9019B37018748A79C50EDAF87E8D4C7F39F78AA7CA9765"
|
||||
},
|
||||
{
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "-16.00534471983042"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "5000"
|
||||
},
|
||||
"HighNode": "0000000000000000",
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"value": "0"
|
||||
},
|
||||
"LowNode": "000000000000004A",
|
||||
"PreviousTxnID": "CFFF5CFE623C9543308C6529782B6A6532207D819795AAFE85555DB8BF390FE7",
|
||||
"PreviousTxnLgrSeq": 14365854,
|
||||
"index": "826CF5BFD28F3934B518D0BDF3231259CBD3FD0946E3C3CA0C97D2C75D2D1A09"
|
||||
}
|
||||
],
|
||||
"ledger_hash": "4C99E5F63C0D0B1C2283B4F5DCE2239F80CE92E8B1A6AED1E110C198FC96E659",
|
||||
"ledger_index": 14380380,
|
||||
"limit": 10,
|
||||
"marker": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93,94A9F05FEF9A153229E2E997E64919FD75AAE2028C8153E8EBDB4440BD3ECBB5",
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `account` | 文字列 | この要求に対応するアカウントの一意の[アドレス][]。 |
|
||||
| `account_objects` | 配列 | このアカウントが所有するオブジェクトの配列。各オブジェクトは、生[レジャーフォーマット][]です。 |
|
||||
| `ledger_hash` | 文字列 | (省略される場合があります)この応答の生成に使用されたレジャーの識別用ハッシュ。 |
|
||||
| `ledger_index` | 数値 - [レジャーインデックス][] | _(省略される場合があります)_ この応答の生成に使用されたレジャーバージョンのレジャーインデックス。 |
|
||||
| `ledger_current_index` | 数値 - [レジャーインデックス][] | _(省略される場合があります)_ この応答の生成に使用された現在処理中のレジャーバージョンのレジャーインデックス。 |
|
||||
| `limit` | 数値 | _(省略される場合があります)_ この要求で使用されていた制限(制限の使用がある場合)。 |
|
||||
| `marker` | [マーカー][] | 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。この後に追加のページがない場合は省略されます。 |
|
||||
| `validated` | ブール値 | このフィールドが含まれていて`true`に設定されている場合、この応答内の情報は検証済みのレジャーバージョンから取得されています。そうでない場合、情報は変更されることがあります。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* いずれかの[汎用エラータイプ][]。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,196 @@
|
||||
---
|
||||
html: account_offers.html
|
||||
parent: account-methods.html
|
||||
blurb: 特定のアカウントから出されたオファーのリストを取得します。
|
||||
labels:
|
||||
- 分散型取引所
|
||||
---
|
||||
# account_offers
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountOffers.cpp "Source")
|
||||
|
||||
`account_offers`メソッドは、特定の[アカウント](accounts.html)から出された[オファー](offers.html)のうち、特定の[レジャーバージョン](ledgers.html)で未処理であったオファーのリストを取得します。
|
||||
|
||||
## 要求フォーマット
|
||||
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"command": "account_offers",
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_offers",
|
||||
"params": [
|
||||
{
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```sh
|
||||
#Syntax: account_offers account [ledger_index]
|
||||
rippled account_offers r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 current
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる >](websocket-api-tool.html#account_offers)
|
||||
|
||||
要求には以下のパラメーターを指定できます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:----------------------------|:------------------------------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントの[アドレス][]です。 |
|
||||
| `ledger` | 符号なし整数または文字列 | _(**廃止予定**、省略可)_ 使用するレジャーバージョンの一意のID(レジャーインデックス、ハッシュ、「validated」などのショートカットなど)。 |
|
||||
| `ledger_hash` | 文字列 - [ハッシュ][] | _(省略可)_ 使用するレジャーバージョンを識別する20バイトの16進文字列。 |
|
||||
| `ledger_index` | 数値 - [レジャーインデックス][] | (省略可、デフォルトでは`current`)使用するレジャーの[レジャーインデックス][]、またはレジャーを動的に選択するための「current」、「closed」、「validated」のいずれか。([レジャーの指定][]を参照してください) |
|
||||
| `limit` | 整数 | (省略可、デフォルト値は可変)取得するトランザクションの数を制限します。サーバーはこの値を受け入れる必要はありません。10以上400以下の範囲で値を指定する必要があります。[新規: rippled 0.26.4][] |
|
||||
| `marker` | [マーカー][] | _(省略可)_ 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。[新規: rippled 0.26.4][] |
|
||||
|
||||
以下のパラメーターは廃止予定であり、今後予告なしに削除される可能性があります。`ledger`。
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 9,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
|
||||
"ledger_current_index": 18539550,
|
||||
"offers": [
|
||||
{
|
||||
"flags": 0,
|
||||
"quality": "0.00000000574666765650638",
|
||||
"seq": 6577664,
|
||||
"taker_gets": "33687728098",
|
||||
"taker_pays": {
|
||||
"currency": "EUR",
|
||||
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
|
||||
"value": "193.5921774819578"
|
||||
}
|
||||
},
|
||||
{
|
||||
"flags": 0,
|
||||
"quality": "7989247009094510e-27",
|
||||
"seq": 6572128,
|
||||
"taker_gets": "2361918758",
|
||||
"taker_pays": {
|
||||
"currency": "XAU",
|
||||
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
|
||||
"value": "0.01886995237307572"
|
||||
}
|
||||
},
|
||||
... trimmed for length ...
|
||||
],
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
|
||||
"ledger_current_index": 18539596,
|
||||
"offers": [{
|
||||
"flags": 0,
|
||||
"quality": "0.000000007599140009999998",
|
||||
"seq": 6578020,
|
||||
"taker_gets": "29740867287",
|
||||
"taker_pays": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "226.0050145327418"
|
||||
}
|
||||
}, {
|
||||
"flags": 0,
|
||||
"quality": "7989247009094510e-27",
|
||||
"seq": 6572128,
|
||||
"taker_gets": "2361918758",
|
||||
"taker_pays": {
|
||||
"currency": "XAU",
|
||||
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
|
||||
"value": "0.01886995237307572"
|
||||
}
|
||||
}, {
|
||||
"flags": 0,
|
||||
"quality": "0.00000004059594001318974",
|
||||
"seq": 6576905,
|
||||
"taker_gets": "3892952574",
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y",
|
||||
"value": "158.0380691682966"
|
||||
}
|
||||
},
|
||||
|
||||
...
|
||||
|
||||
],
|
||||
"status": "success",
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `account` | 文字列 | オファーを出したアカウントを識別する一意の[アドレス][] |
|
||||
| `offers` | 配列 | オブジェクトの配列。各オブジェクトは、このアカウントが出したオファーの中で、レジャーバージョンが要求された時点で未処理のオファーを表します。オファーの数が多い場合は、一度に`limit`の数までのオファーが返されます。 |
|
||||
| `ledger_current_index` | 数値 - [レジャーインデックス][] | _(`ledger_hash`または`ledger_index`が指定されている場合は省略可)_ このデータの取得時に使用した、現在処理中のレジャーバージョンのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
|
||||
| `ledger_index` | 数値 - [レジャーインデックス][] | _(`ledger_current_index`が代わりに指定されている場合は省略可)_ 要求に従って、このデータの取得時に使用されたレジャーバージョンのレジャーインデックス。[新規: rippled 0.26.4-sp1][] |
|
||||
| `ledger_hash` | 文字列 - [ハッシュ][] | _(省略される場合があります)_ このデータの取得時に使用されたレジャーバージョンの識別用ハッシュ。[新規: rippled 0.26.4-sp1][] |
|
||||
| `marker` | [マーカー][] | _(省略される場合があります)_ 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。この後に情報ページがない場合は省略されます。[新規: rippled 0.26.4][] |
|
||||
|
||||
|
||||
各Offerオブジェクトのフィールドを次に示します。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-------------|:-----------------|:-------------------------------------------|
|
||||
| `flags` | 符号なし整数 | このオファーエントリに対してビットフラグとして設定されているオプション。 |
|
||||
| `seq` | 符号なし整数 | このエントリを作成したトランザクションのシーケンス番号。(トランザクションの[シーケンス番号](basic-data-types.html#アカウントシーケンス)はアカウントに関連付けられています。) |
|
||||
| `taker_gets` | 文字列またはオブジェクト | オファーを受け入れるアカウントが受領する額。XRPまたは通貨指定オブジェクトの額を表す文字列として示されます。([通貨額の指定][通貨額]を参照してください。) |
|
||||
| `taker_pays` | 文字列またはオブジェクト | オファーを受け入れるアカウントが提供する額。XRPまたは通貨指定オブジェクトの額を表す文字列として示されます。([通貨額の指定][通貨額]を参照してください。) |
|
||||
| `quality` | 文字列 | オファーの為替レート。元の`taker_pays`を元の`taker_gets`で割った比率です。オファーの実行時には、最も好ましい(最も低い)クオリティのオファーが最初に消費されます。同じクオリティのオファーは古いものから新しいものの順で実行されます。[新規: rippled 0.29.0][] |
|
||||
| `expiration` | 符号なし整数 | (省略される場合があります)この時刻の経過後は、資金化されなかったオファーとみなされます([Rippleエポック以降の経過秒数][])。関連項目: [オファーの有効期限](offers.html#オファーの有効期限)。[新規: rippled 0.30.1][] |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* いずれかの[汎用エラータイプ][]。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
* `actMalformed` - 指定されている`marker`フィールドが受け入れられない場合。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,223 @@
|
||||
---
|
||||
html: account_offers.html
|
||||
parent: account-methods.html
|
||||
blurb: Get info about an account's currency exchange offers.
|
||||
labels:
|
||||
- Decentralized Exchange
|
||||
---
|
||||
# account_offers
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountOffers.cpp "Source")
|
||||
|
||||
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
|
||||
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 9,
|
||||
"command": "account_offers",
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_offers",
|
||||
"params": [
|
||||
{
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
#Syntax: account_offers account [ledger_index] [strict]
|
||||
rippled account_offers rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM current strict
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html#account_offers)
|
||||
|
||||
A request can include the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:----------------------------|:------------------------------|
|
||||
| `account` | String | A unique identifier for the account, most commonly the account's [Address][]. |
|
||||
| `ledger` | Unsigned Integer, or String | _(**Deprecated**, Optional)_ A unique identifier for the ledger version to use, such as a ledger index, a hash, or a shortcut such as "validated". |
|
||||
| `ledger_hash` | String - [Hash][] | _(Optional)_ A 20-byte hex string identifying the ledger version to use. |
|
||||
| `ledger_index` | Number - [Ledger Index][] | (Optional, defaults to `current`) The [ledger index][] of the ledger to use, or "current", "closed", or "validated" to select a ledger dynamically. (See [Specifying Ledgers][]) |
|
||||
| `limit` | Integer | (Optional, default varies) Limit the number of transactions to retrieve. The server is not required to honor this value. Must be within the inclusive range 10 to 400. [New in: rippled 0.26.4][] |
|
||||
| `marker` | [Marker][] | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. [New in: rippled 0.26.4][] |
|
||||
| `strict` | Boolean | _(Optional)_ If `true`, then the `account` field only accepts a public key or XRP Ledger address. Otherwise, `account` can be a secret or passphrase (not recommended). The default is `false`. |
|
||||
|
||||
The following parameter is deprecated and may be removed without further notice: `ledger`.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 9,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
|
||||
"ledger_current_index": 18539550,
|
||||
"offers": [
|
||||
{
|
||||
"flags": 0,
|
||||
"quality": "0.00000000574666765650638",
|
||||
"seq": 6577664,
|
||||
"taker_gets": "33687728098",
|
||||
"taker_pays": {
|
||||
"currency": "EUR",
|
||||
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
|
||||
"value": "193.5921774819578"
|
||||
}
|
||||
},
|
||||
{
|
||||
"flags": 0,
|
||||
"quality": "7989247009094510e-27",
|
||||
"seq": 6572128,
|
||||
"taker_gets": "2361918758",
|
||||
"taker_pays": {
|
||||
"currency": "XAU",
|
||||
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
|
||||
"value": "0.01886995237307572"
|
||||
}
|
||||
},
|
||||
... trimmed for length ...
|
||||
],
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"account": "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
|
||||
"ledger_current_index": 18539596,
|
||||
"offers": [{
|
||||
"flags": 0,
|
||||
"quality": "0.000000007599140009999998",
|
||||
"seq": 6578020,
|
||||
"taker_gets": "29740867287",
|
||||
"taker_pays": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "226.0050145327418"
|
||||
}
|
||||
}, {
|
||||
"flags": 0,
|
||||
"quality": "7989247009094510e-27",
|
||||
"seq": 6572128,
|
||||
"taker_gets": "2361918758",
|
||||
"taker_pays": {
|
||||
"currency": "XAU",
|
||||
"issuer": "rrh7rf1gV2pXAoqA8oYbpHd8TKv5ZQeo67",
|
||||
"value": "0.01886995237307572"
|
||||
}
|
||||
}, {
|
||||
"flags": 0,
|
||||
"quality": "0.00000004059594001318974",
|
||||
"seq": 6576905,
|
||||
"taker_gets": "3892952574",
|
||||
"taker_pays": {
|
||||
"currency": "CNY",
|
||||
"issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y",
|
||||
"value": "158.0380691682966"
|
||||
}
|
||||
},
|
||||
|
||||
...
|
||||
|
||||
],
|
||||
"status": "success",
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"account" : "rpP2JgiMyTF5jR5hLG3xHCPi1knBb1v9cM",
|
||||
"ledger_current_index" : 57110969,
|
||||
"offers" : [
|
||||
{
|
||||
"flags" : 0,
|
||||
"quality" : "1499850014.892974",
|
||||
"seq" : 7916201,
|
||||
"taker_gets" : {
|
||||
"currency" : "BCH",
|
||||
"issuer" : "rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds",
|
||||
"value" : "0.5268598580881351"
|
||||
},
|
||||
"taker_pays" : "790210766"
|
||||
}
|
||||
],
|
||||
"status" : "success",
|
||||
"validated" : false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
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` | 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:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-------------|:-----------------|:-------------------------------------------|
|
||||
| `flags` | Unsigned integer | Options set for this offer entry as bit-flags. |
|
||||
| `seq` | Unsigned integer | Sequence number of the transaction that created this entry. (Transaction [sequence numbers](basic-data-types.html#account-sequence) are relative to accounts.) |
|
||||
| `taker_gets` | String or Object | The amount the account accepting the offer receives, as a String representing an amount in XRP, or a currency specification object. (See [Specifying Currency Amounts][Currency Amount]) |
|
||||
| `taker_pays` | String or Object | The amount the account accepting the offer provides, as a String representing an amount in XRP, or a currency specification object. (See [Specifying Currency Amounts][Currency Amount]) |
|
||||
| `quality` | String | The exchange rate of the offer, as the ratio of the original `taker_pays` divided by the original `taker_gets`. When executing offers, the offer with the most favorable (lowest) quality is consumed first; offers with the same quality are executed from oldest to newest. [New in: rippled 0.29.0][] |
|
||||
| `expiration` | Unsigned integer | (May be omitted) A time after which this offer is considered unfunded, as the number of [seconds since the Ripple Epoch][]. See also: [Offer Expiration](offers.html#offer-expiration). [New in: rippled 0.30.1][] |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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.
|
||||
* `actMalformed` - The `marker` field provided is incorrect.
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,601 @@
|
||||
---
|
||||
html: account_tx.html
|
||||
parent: account-methods.html
|
||||
blurb: 指定したアカウントに関連するトランザクションのリストを取得します。
|
||||
labels:
|
||||
- Accounts
|
||||
- Payments
|
||||
---
|
||||
# account_tx
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountTx.cpp "Source")
|
||||
|
||||
`account_tx`メソッドは、指定したアカウントに関連するトランザクションのリストを取得します。
|
||||
|
||||
## 要求フォーマット
|
||||
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"command": "account_tx",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index_min": -1,
|
||||
"ledger_index_max": -1,
|
||||
"binary": false,
|
||||
"limit": 2,
|
||||
"forward": false
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_tx",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"binary": false,
|
||||
"forward": false,
|
||||
"ledger_index_max": -1,
|
||||
"ledger_index_min": -1,
|
||||
"limit": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*コマンドライン*
|
||||
|
||||
```sh
|
||||
#Syntax account_tx account ledger_index_min ledger_index_max [offset] [limit] [binary] [count] [forward]
|
||||
rippled -- account_tx r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 -1 -1 2 5 1 0 1
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる >](websocket-api-tool.html#account_tx)
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-------------------|:-------------------------------------------|:-----------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、最も一般的にはアカウントのアドレスが使用されます。 |
|
||||
| `ledger_index_min` | 整数 | _(省略可能)_ 含めるトランザクションのレジャーのうち最古のものを指定するのに使用します。`-1`の値は、使用可能な検証済みレジャーのうち最古のバージョンを使用するよう、サーバーに指示します。 |
|
||||
| `ledger_index_max` | 整数 | _(省略可能)_ 含めるトランザクションのレジャーのうち最新のものを指定するのに使用します。`-1`の値は、使用可能な検証済みレジャーのうち最新のバージョンを使用するよう、サーバーに指示します。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可能)_ 単一のレジャーからのみトランザクションを検索するのに使用します。([レジャーの指定][]を参照してください) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可能)_ 単一のレジャーからのみトランザクションを検索するのに使用します。([レジャーの指定][]を参照してください) |
|
||||
| `binary` | ブール値 | _(省略可能)_ デフォルトは`false`です。`true`に設定すると、JSONの代わりに16進文字列でトランザクションが返されます。 |
|
||||
| `forward` | ブール値 | _(省略可能)_ デフォルトは`false`です。`true`に設定すると、最も古いレジャーを先頭としてインデックスが付けられた値が返されます。そうしない場合、最新のレジャーを先頭として結果にインデックスが付けられます。(結果を示した各ページの中身は順序よく整理されていない場合がありますが、ページ全体としては順序付けされています。) |
|
||||
| `limit` | 整数 | _(省略可能)_ デフォルトは変化します。取得するトランザクションの数を制限します。サーバーはこの値を受け入れる必要はありません。 |
|
||||
| `marker` | [マーカー][] | 以前にページネーションされた応答の値。その応答を停止した箇所からデータの取得を再開します。サーバーが使用できるレジャーの範囲に変更があっても、この値は変わりません。 |
|
||||
|
||||
次の各フィールドは省略可能とされていますが、要求内で**1つ以上は使用する必要があります**: `ledger_index`、`ledger_hash`、`ledger_index_min`、または`ledger_index_max`。
|
||||
|
||||
次のフィールドは廃止されました: `offset`、`count`、`descending`、`ledger_max`、`ledger_min`。 [削除: rippled 1.7.0][]
|
||||
|
||||
### 照会されたデータの繰り返し
|
||||
|
||||
他のページネーションメソッドと同様に、`marker`フィールドを使用すると複数ページのデータが返されます。
|
||||
|
||||
複数の要求の合間に、`"ledger_index_min": -1`と`"ledger_index_max": -1`が変更されて、以前とは異なるレジャーバージョンを参照する場合があります。`marker`フィールドを使用すると、要求からのレジャー範囲に変更がある場合でも、マーカーが示すポイントが要求で指定されたレジャーの範囲外でない限り、安全にページネーションできます。
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index_max": 6542489,
|
||||
"ledger_index_min": 32570,
|
||||
"limit": 2,
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Balance": "9999999980",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 2,
|
||||
"Sequence": 3
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
|
||||
"PreviousFields": {
|
||||
"Balance": "9999999990",
|
||||
"OwnerCount": 1,
|
||||
"Sequence": 2
|
||||
},
|
||||
"PreviousTxnID": "389720F6FD8A144F171708F9ECB334D704CBCFEFBCDA152D931AC34FB5F9E32B",
|
||||
"PreviousTxnLgrSeq": 95405
|
||||
}
|
||||
},
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LedgerIndex": "718C6D58DD3BBAAAEBFE48B8FBE3C32C9F6F2EBC395233BA95D0057078EE07DB",
|
||||
"NewFields": {
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "100"
|
||||
},
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"RootIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"Balance": "78991384535796",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 3,
|
||||
"Sequence": 188
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "B33FDD5CF3445E1A7F2BE9B06336BEBD73A5E3EE885D3EF93F7E3E2992E46F1A",
|
||||
"PreviousTxnID": "E9E1988A0F061679E5D14DE77DB0163CE0BBDC00F29E396FFD1DA0366E7D8904",
|
||||
"PreviousTxnLgrSeq": 195455
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"ExchangeRate": "4E11C37937E08000",
|
||||
"Flags": 0,
|
||||
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
|
||||
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
|
||||
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
|
||||
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
|
||||
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": "10",
|
||||
"Flags": 0,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"value": "100"
|
||||
},
|
||||
"Sequence": 2,
|
||||
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
|
||||
"TransactionType": "TrustSet",
|
||||
"TxnSignature": "304402200EF81EC32E0DFA9BE376B20AFCA11765ED9FEA04CA8B77C7178DAA699F7F5AFF02202DA484DBD66521AC317D84F7717EC4614E2F5DB743E313E8B48440499CC0DBA4",
|
||||
"date": 413620090,
|
||||
"hash": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
|
||||
"inLedger": 195480,
|
||||
"ledger_index": 195480
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Balance": "9999999970",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 3,
|
||||
"Sequence": 4
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
|
||||
"PreviousFields": {
|
||||
"Balance": "9999999980",
|
||||
"OwnerCount": 2,
|
||||
"Sequence": 3
|
||||
},
|
||||
"PreviousTxnID": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
|
||||
"PreviousTxnLgrSeq": 195480
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
|
||||
"RootIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06",
|
||||
"PreviousTxnID": "0222B59280D165D40C464EA75AAD08A4D152C46A38C0625DEECF6EE87FC5B9E1",
|
||||
"PreviousTxnLgrSeq": 343555
|
||||
}
|
||||
},
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959",
|
||||
"NewFields": {
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "100"
|
||||
},
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"ExchangeRate": "4E11C37937E08000",
|
||||
"Flags": 0,
|
||||
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
|
||||
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
|
||||
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
|
||||
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
|
||||
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": "10",
|
||||
"Flags": 0,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
|
||||
"value": "100"
|
||||
},
|
||||
"Sequence": 3,
|
||||
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
|
||||
"TransactionType": "TrustSet",
|
||||
"TxnSignature": "3044022058A89552068D1A274EE72BA71363E33E54E6608BC28A84DEC6EE530FC2B5C979022029F4D1EA1237A1F717C5F5EC526E6CFB6DF54C30BADD25EDDE7D2FDBC8F17E34",
|
||||
"date": 416347560,
|
||||
"hash": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8",
|
||||
"inLedger": 343570,
|
||||
"ledger_index": 343570
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
],
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index_max": 8696227,
|
||||
"ledger_index_min": 32570,
|
||||
"limit": 2,
|
||||
"status": "success",
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Balance": "9999999980",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 2,
|
||||
"Sequence": 3
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
|
||||
"PreviousFields": {
|
||||
"Balance": "9999999990",
|
||||
"OwnerCount": 1,
|
||||
"Sequence": 2
|
||||
},
|
||||
"PreviousTxnID": "389720F6FD8A144F171708F9ECB334D704CBCFEFBCDA152D931AC34FB5F9E32B",
|
||||
"PreviousTxnLgrSeq": 95405
|
||||
}
|
||||
},
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LedgerIndex": "718C6D58DD3BBAAAEBFE48B8FBE3C32C9F6F2EBC395233BA95D0057078EE07DB",
|
||||
"NewFields": {
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "100"
|
||||
},
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"RootIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "77F65EFF930ED7E93C6CC839C421E394D6B1B6A47CEA8A140D63EC9C712F46F5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"Balance": "78991384535796",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 3,
|
||||
"Sequence": 188
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "B33FDD5CF3445E1A7F2BE9B06336BEBD73A5E3EE885D3EF93F7E3E2992E46F1A",
|
||||
"PreviousTxnID": "E9E1988A0F061679E5D14DE77DB0163CE0BBDC00F29E396FFD1DA0366E7D8904",
|
||||
"PreviousTxnLgrSeq": 195455
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"ExchangeRate": "4E11C37937E08000",
|
||||
"Flags": 0,
|
||||
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
|
||||
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
|
||||
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
|
||||
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
|
||||
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": "10",
|
||||
"Flags": 0,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3kmLJN5D28dHuH8vZNUZpMC43pEHpaocV",
|
||||
"value": "100"
|
||||
},
|
||||
"Sequence": 2,
|
||||
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
|
||||
"TransactionType": "TrustSet",
|
||||
"TxnSignature": "304402200EF81EC32E0DFA9BE376B20AFCA11765ED9FEA04CA8B77C7178DAA699F7F5AFF02202DA484DBD66521AC317D84F7717EC4614E2F5DB743E313E8B48440499CC0DBA4",
|
||||
"date": 413620090,
|
||||
"hash": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
|
||||
"inLedger": 195480,
|
||||
"ledger_index": 195480
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Balance": "9999999970",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 3,
|
||||
"Sequence": 4
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
|
||||
"PreviousFields": {
|
||||
"Balance": "9999999980",
|
||||
"OwnerCount": 2,
|
||||
"Sequence": 3
|
||||
},
|
||||
"PreviousTxnID": "002AA492496A1543DBD3680BF8CF21B6D6A078CE4A01D2C1A4B63778033792CE",
|
||||
"PreviousTxnLgrSeq": 195480
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Flags": 0,
|
||||
"Owner": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
|
||||
"RootIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "A39F044D860C5B5846AA7E0FAAD44DC8897F0A62B2F628AA073B21B3EC146010"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "E0D7BDE68B468FF0B8D948FD865576517DA987569833A05374ADB9A72E870A06",
|
||||
"PreviousTxnID": "0222B59280D165D40C464EA75AAD08A4D152C46A38C0625DEECF6EE87FC5B9E1",
|
||||
"PreviousTxnLgrSeq": 343555
|
||||
}
|
||||
},
|
||||
{
|
||||
"CreatedNode": {
|
||||
"LedgerEntryType": "RippleState",
|
||||
"LedgerIndex": "EA4BF03B4700123CDFFB6EB09DC1D6E28D5CEB7F680FB00FC24BC1C3BB2DB959",
|
||||
"NewFields": {
|
||||
"Balance": {
|
||||
"currency": "USD",
|
||||
"issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
|
||||
"value": "0"
|
||||
},
|
||||
"Flags": 131072,
|
||||
"HighLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"value": "100"
|
||||
},
|
||||
"LowLimit": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
|
||||
"value": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"ExchangeRate": "4E11C37937E08000",
|
||||
"Flags": 0,
|
||||
"RootIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93",
|
||||
"TakerGetsCurrency": "0000000000000000000000000000000000000000",
|
||||
"TakerGetsIssuer": "0000000000000000000000000000000000000000",
|
||||
"TakerPaysCurrency": "0000000000000000000000004254430000000000",
|
||||
"TakerPaysIssuer": "5E7B112523F68D2F5E879DB4EAC51C6698A69304"
|
||||
},
|
||||
"LedgerEntryType": "DirectoryNode",
|
||||
"LedgerIndex": "F60ADF645E78B69857D2E4AEC8B7742FEABC8431BD8611D099B428C3E816DF93"
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 0,
|
||||
"TransactionResult": "tesSUCCESS"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": "10",
|
||||
"Flags": 0,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "r3PDtZSa5LiYp1Ysn1vMuMzB59RzV3W9QH",
|
||||
"value": "100"
|
||||
},
|
||||
"Sequence": 3,
|
||||
"SigningPubKey": "02BC8C02199949B15C005B997E7C8594574E9B02BA2D0628902E0532989976CF9D",
|
||||
"TransactionType": "TrustSet",
|
||||
"TxnSignature": "3044022058A89552068D1A274EE72BA71363E33E54E6608BC28A84DEC6EE530FC2B5C979022029F4D1EA1237A1F717C5F5EC526E6CFB6DF54C30BADD25EDDE7D2FDBC8F17E34",
|
||||
"date": 416347560,
|
||||
"hash": "53354D84BAE8FDFC3F4DA879D984D24B929E7FEB9100D2AD9EFCD2E126BCCDC8",
|
||||
"inLedger": 343570,
|
||||
"ledger_index": 343570
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
],
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-------------------|:---------------------------|:---------------------------|
|
||||
| `account` | 文字列 | 関連するアカウントを識別する一意の[アドレス][]。 |
|
||||
| `ledger_index_min` | 整数 - [レジャーインデックス][] | トランザクションで実際に検索された最古のレジャーのレジャーインデックス。 |
|
||||
| `ledger_index_max` | 整数 - [レジャーインデックス][] | トランザクションで実際に検索された最新のレジャーのレジャーインデックス。 |
|
||||
| `limit` | 整数 | 要求で使用される`limit`値。(サーバーによって強制される実際の制限値とは異なる場合があります。) |
|
||||
| `marker` | [マーカー][] | 応答がページネーションされていることを示す、サーバーが定義した値。この値を次のコールに渡して、このコールで終わった箇所から再開します。 |
|
||||
| `transactions` | 配列 | 以降で説明する、要求の基準を満たすトランザクションの配列。 |
|
||||
| `validated` | ブール値 | このフィールドが含まれていて`true`に設定されている場合、この応答内の情報は検証済みのレジャーバージョンから取得されています。そうでない場合、情報は変更されることがあります。 |
|
||||
|
||||
**注記:** サーバーから返される`ledger_index_min`および`ledger_index_max`の値が要求で指定したものとは異なる場合があります。例えば、サーバーに手元の指定したバージョンがない場合など。
|
||||
|
||||
各トランザクションのオブジェクトには以下のフィールドが含まれます。含まれるフィールドは、JSONまたは16進文字列(`"binary":true`)フォーマットのどちらで要求されたかによって異なります。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:---------------------------------|:-------------------------|
|
||||
| `ledger_index` | 整数 | このトランザクションを含むレジャーバージョンの[レジャーインデックス][]。 |
|
||||
| `meta` | オブジェクト(JSON)または文字列(バイナリ) | `binary`がTrueの場合、これは16進文字列のトランザクションメタデータです。そうでない場合、トランザクションメタデータはJSONフォーマットになります。 |
|
||||
| `tx` | オブジェクト | (JSONモードのみ)トランザクションを定義するJSONオブジェクト。 |
|
||||
| `tx_blob` | 文字列 | (バイナリモードのみ)トランザクションを表す一意のハッシュ化された文字列。 |
|
||||
| `validated` | ブール値 | トランザクションが検証済みのレジャーに含まれるかどうか。検証済みのレジャーに含まれていないトランザクションはすべて、変更される場合があります。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* いずれかの[汎用エラータイプ][]。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actMalformed` - 要求の`account`フィールドに指定した[アドレス][]が、正しいフォーマットではありません。
|
||||
* `lgrIdxMalformed` - `ledger_index_min`または`ledger_index_max`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
* `lgrIdxsInvalid` - 要求で`ledger_index_min`の前にある`ledger_index_max`を指定したか、[ネットワークと同期](troubleshoot-the-rippled-server.html)されていないためにサーバーに検証済みレジャーの範囲が存在しません。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,465 @@
|
||||
---
|
||||
html: account_tx.html
|
||||
parent: account-methods.html
|
||||
blurb: Get info about an account's transactions.
|
||||
labels:
|
||||
- Payments
|
||||
- Accounts
|
||||
---
|
||||
# account_tx
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountTx.cpp "Source")
|
||||
|
||||
The `account_tx` method retrieves a list of transactions that involved the specified account.
|
||||
|
||||
## Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"command": "account_tx",
|
||||
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"ledger_index_min": -1,
|
||||
"ledger_index_max": -1,
|
||||
"binary": false,
|
||||
"limit": 2,
|
||||
"forward": false
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "account_tx",
|
||||
"params": [
|
||||
{
|
||||
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"binary": false,
|
||||
"forward": false,
|
||||
"ledger_index_max": -1,
|
||||
"ledger_index_min": -1,
|
||||
"limit": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
# Syntax: account_tx account [ledger_index_min [ledger_index_max]] [limit] [offset] [binary] [count] [descending]
|
||||
# For binary/count/descending, use the parameter name for true and omit for false.
|
||||
rippled -- account_tx rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w -1 -1 2 0 binary descending
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html#account_tx)
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-------------------|:-------------------------------------------|:-----------|
|
||||
| `account` | String | A unique identifier for the account, most commonly the account's address. |
|
||||
| `ledger_index_min` | Integer | _(Optional)_ Use to specify the earliest ledger to include transactions from. A value of `-1` instructs the server to use the earliest validated ledger version available. |
|
||||
| `ledger_index_max` | Integer | _(Optional)_ Use to specify the most recent ledger to include transactions from. A value of `-1` instructs the server to use the most recent validated ledger version available. |
|
||||
| `ledger_hash` | String | _(Optional)_ Use to look for transactions from a single ledger only. (See [Specifying Ledgers][].) |
|
||||
| `ledger_index` | String or Unsigned Integer | _(Optional)_ Use to look for transactions from a single ledger only. (See [Specifying Ledgers][].) |
|
||||
| `binary` | Boolean | _(Optional)_ Defaults to `false`. If set to `true`, returns transactions as hex strings instead of JSON. |
|
||||
| `forward` | Boolean | _(Optional)_ Defaults to `false`. If set to `true`, returns values indexed with the oldest ledger first. Otherwise, the results are indexed with the newest ledger first. (Each page of results may not be internally ordered, but the pages are overall ordered.) |
|
||||
| `limit` | Integer | _(Optional)_ Default varies. Limit the number of transactions to retrieve. The server is not required to honor this value. |
|
||||
| `marker` | [Marker][] | Value from a previous paginated response. Resume retrieving data where that response left off. This value is stable even if there is a change in the server's range of available ledgers. |
|
||||
|
||||
**You must use at least one of the following fields** in your request: `ledger_index`, `ledger_hash`, `ledger_index_min`, or `ledger_index_max`.
|
||||
|
||||
The following legacy fields are no longer supported: `offset`, `count`, `ledger_min`, `ledger_max`. [Removed in: rippled 1.7.0][]
|
||||
|
||||
|
||||
### Iterating over queried data
|
||||
|
||||
As with other paginated methods, you can use the `marker` field to return multiple pages of data.
|
||||
|
||||
In the time between requests, `"ledger_index_min": -1` and `"ledger_index_max": -1` may change to refer to different ledger versions than they did before. The `marker` field can safely paginate even if there are changes in the ledger range from the request, so long as the marker does not indicate a point outside the range of ledgers specified in the request.
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 2,
|
||||
"result": {
|
||||
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"ledger_index_max": 57111999,
|
||||
"ledger_index_min": 55886305,
|
||||
"limit": 2,
|
||||
"marker": {
|
||||
"ledger": 57111981,
|
||||
"seq": 16
|
||||
},
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"Balance": "3732969177079",
|
||||
"Flags": 131072,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 702817
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
|
||||
"PreviousFields": {
|
||||
"Balance": "3713891690008"
|
||||
},
|
||||
"PreviousTxnID": "D58864C16344ADCC15995C7986CFC607CB693E88F84D2E019F0A35FB29749202",
|
||||
"PreviousTxnLgrSeq": 57111994
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
|
||||
"Balance": "40010160",
|
||||
"Flags": 131072,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 466334
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9",
|
||||
"PreviousFields": {
|
||||
"Balance": "19117497271",
|
||||
"Sequence": 466333
|
||||
},
|
||||
"PreviousTxnID": "F6B8274D3D419A95A59681E5F55578084C395FF9051924360CA3EA745F5581E8",
|
||||
"PreviousTxnLgrSeq": 57111993
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 25,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "19077487071"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
|
||||
"Amount": "19077487071",
|
||||
"Destination": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"DestinationTag": 1,
|
||||
"Fee": "40",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 57112020,
|
||||
"Sequence": 466333,
|
||||
"SigningPubKey": "0381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A01",
|
||||
"TransactionType": "Payment",
|
||||
"TxnSignature": "3045022100CFC5FD057C7C685C690637AD1E639E2642BBC00EFD8E06E3F6C72FA924BC99D40220317D0708E814F69F874D641B6732E37A53B1220B493B2B8390D9EF51E8062515",
|
||||
"date": 649200260,
|
||||
"hash": "46BF0B576677B0DEA2D94591424A57A2DE8E3D89383631E16F40D09A513C656C",
|
||||
"inLedger": 57111998,
|
||||
"ledger_index": 57111998
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"Balance": "3713891690008",
|
||||
"Flags": 131072,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 702817
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
|
||||
"PreviousFields": {
|
||||
"Balance": "3714441690048",
|
||||
"Sequence": 702816
|
||||
},
|
||||
"PreviousTxnID": "FDD5007913B39027BAF10B31144DBC1F7DC147528DF31FF048A06DC5D3108BD6",
|
||||
"PreviousTxnLgrSeq": 57111981
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "r9dU6Z7P2i7MrDi1VUZ7uyq6J77eg86YtB",
|
||||
"Balance": "2629998983",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 10
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "27B96FE681B33825CC95DA197358B30D3A1721F2125F2D76022D46B2418ABA0A",
|
||||
"PreviousFields": {
|
||||
"Balance": "2079998983"
|
||||
},
|
||||
"PreviousTxnID": "44A47AC04C0C7237C32BE9A532B578D07641705D3A59DB9B3C5B6225001E39B7",
|
||||
"PreviousTxnLgrSeq": 56613857
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 16,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "550000000"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"Amount": "550000000",
|
||||
"Destination": "r9dU6Z7P2i7MrDi1VUZ7uyq6J77eg86YtB",
|
||||
"Fee": "40",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 57112016,
|
||||
"Sequence": 702816,
|
||||
"SigningPubKey": "020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A",
|
||||
"TransactionType": "Payment",
|
||||
"TxnSignature": "3045022100D589029EF63F9E528F6100C7A36D26AFFF84085EC9AC16DA8E30E11F390D4E87022011466E0FE4A90B89142EE47E535545EEA4A2D65E0BD234DFB447721218B59C9B",
|
||||
"date": 649200241,
|
||||
"hash": "D58864C16344ADCC15995C7986CFC607CB693E88F84D2E019F0A35FB29749202",
|
||||
"inLedger": 57111994,
|
||||
"ledger_index": 57111994
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
],
|
||||
"validated": true
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"ledger_index_max": 57112019,
|
||||
"ledger_index_min": 56248229,
|
||||
"limit": 2,
|
||||
"marker": {
|
||||
"ledger": 57112007,
|
||||
"seq": 13
|
||||
},
|
||||
"status": "success",
|
||||
"transactions": [
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"Balance": "3732290013101",
|
||||
"Flags": 131072,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 702820
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
|
||||
"PreviousFields": {
|
||||
"Balance": "3732745656171",
|
||||
"Sequence": 702819
|
||||
},
|
||||
"PreviousTxnID": "7C031FD5B710E3C048EEF31254089BEEC505900BCC9A842257A0319453333998",
|
||||
"PreviousTxnLgrSeq": 57112010
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "raLPjTYeGezfdb6crXZzcC8RkLBEwbBHJ5",
|
||||
"Balance": "4231510602153",
|
||||
"Flags": 0,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 96486
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "39DC5D448DECEFC3CD20818788E3DA891CA943935E8D7B12FCB5B5871FCB1638",
|
||||
"PreviousFields": {
|
||||
"Balance": "4231054959123"
|
||||
},
|
||||
"PreviousTxnID": "33D2014C832610293730028CA37857AC183BFCE3E42B9979C491FB8B82B3E9DC",
|
||||
"PreviousTxnLgrSeq": 57112004
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 12,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "455643030"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"Amount": "455643030",
|
||||
"Destination": "raLPjTYeGezfdb6crXZzcC8RkLBEwbBHJ5",
|
||||
"DestinationTag": 18240312,
|
||||
"Fee": "40",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 57112037,
|
||||
"Sequence": 702819,
|
||||
"SigningPubKey": "020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A",
|
||||
"TransactionType": "Payment",
|
||||
"TxnSignature": "30450221008602B2E390C0C7B65182C6DBC86292052C1961B2BEFB79C2C8431722C0ADB911022024B74DCF910A4C8C95572CF662EB7F5FF67E1AC4D7B9B7BFE2A8EE851EC16576",
|
||||
"date": 649200322,
|
||||
"hash": "08EF5BDA2825D7A28099219621CDBECCDECB828FEA202DEB6C7ACD5222D36C2C",
|
||||
"inLedger": 57112015,
|
||||
"ledger_index": 57112015
|
||||
},
|
||||
"validated": true
|
||||
},
|
||||
{
|
||||
"meta": {
|
||||
"AffectedNodes": [
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"Balance": "3732745656171",
|
||||
"Flags": 131072,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 702819
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574",
|
||||
"PreviousFields": {
|
||||
"Balance": "3732246155784"
|
||||
},
|
||||
"PreviousTxnID": "CCBCCB528F602007C937C496F0828C118E073DF180084CCD3646EC1E414844E4",
|
||||
"PreviousTxnLgrSeq": 57112007
|
||||
}
|
||||
},
|
||||
{
|
||||
"ModifiedNode": {
|
||||
"FinalFields": {
|
||||
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
|
||||
"Balance": "236476361",
|
||||
"Flags": 131072,
|
||||
"OwnerCount": 0,
|
||||
"Sequence": 466335
|
||||
},
|
||||
"LedgerEntryType": "AccountRoot",
|
||||
"LedgerIndex": "CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9",
|
||||
"PreviousFields": {
|
||||
"Balance": "735976788",
|
||||
"Sequence": 466334
|
||||
},
|
||||
"PreviousTxnID": "C528B32DD588EFAE2FE833E8AA92E6AE2DF2C8DB3DB8C6C4F334AD37B253D72A",
|
||||
"PreviousTxnLgrSeq": 57112010
|
||||
}
|
||||
}
|
||||
],
|
||||
"TransactionIndex": 33,
|
||||
"TransactionResult": "tesSUCCESS",
|
||||
"delivered_amount": "499500387"
|
||||
},
|
||||
"tx": {
|
||||
"Account": "rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg",
|
||||
"Amount": "499500387",
|
||||
"Destination": "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"DestinationTag": 1,
|
||||
"Fee": "40",
|
||||
"Flags": 2147483648,
|
||||
"LastLedgerSequence": 57112032,
|
||||
"Sequence": 466334,
|
||||
"SigningPubKey": "0381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A01",
|
||||
"TransactionType": "Payment",
|
||||
"TxnSignature": "3045022100C7EA1701FE48C75508EEBADBC9864CD3FFEDCEB48AB99AEA960BFA360AE163ED0220453C9577502924C9E1A9A450D4B950A44016813BC70E1F16A65A402528D730B7",
|
||||
"date": 649200302,
|
||||
"hash": "7C031FD5B710E3C048EEF31254089BEEC505900BCC9A842257A0319453333998",
|
||||
"inLedger": 57112010,
|
||||
"ledger_index": 57112010
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
],
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"account" : "rLNaPoKeeBjZe2qs6x52yVPZpZ8td4dc6w",
|
||||
"ledger_index_max" : 57112094,
|
||||
"ledger_index_min" : 57105464,
|
||||
"limit" : 2,
|
||||
"marker" : {
|
||||
"ledger" : 57112074,
|
||||
"seq" : 9
|
||||
},
|
||||
"status" : "success",
|
||||
"transactions" : [
|
||||
{
|
||||
"ledger_index" : 57112090,
|
||||
"meta" : "201C0000002EF8E51100612503677617551E0297F38EF4FED7004E074D246B4EA3E550D9AE0F61BE40E08D3432091D52CE56140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574E624000AB96E624000037771BFD270E1E7220002000024000AB96F2D0000000062400003776C784A418114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911E1E1E311006156F7D315E0E992B1F1AC66B309C9D68961AA327FE770101B74D4C975F8C5DEC96AE8240367761A624000000005478807811403C95DC0C7CE402E8044A5F13304108013CE9963E1E1F1031000",
|
||||
"tx_blob" : "120000228000000024000AB96E201B036776306140000000054788076840000000000000287321020A46D8D02AC780C59853ACA309EAA92E7D8E02DD72A0B6AC315A7D18A6C3276A74463044022054811EEF61ACCFA1B5FC6BB05D2FA49CF5174062740370328382E6EA557C0E6A0220480584D487638C333A87CA37100354BD36209E355E8DB9FE79791A56E24C1F268114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911831403C95DC0C7CE402E8044A5F13304108013CE9963",
|
||||
"validated" : true
|
||||
},
|
||||
{
|
||||
"ledger_index" : 57112087,
|
||||
"meta" : "201C00000026F8E5110061250367760A556B80EE9A9AD3FC40F471F29DCB80C678375137CE36220718902EF1EDCD375E7156140FA03FE8C39540CA8189BC7A7956795C712BC0A542C6409C041150703C8574E66240000376DEB77118E1E7220002000024000AB96E2D00000000624000037771BFD2708114D2E44C9FAF7BE9C536219800A6E698E4C7D2C911E1E1E511006125036776155591DA498D40AFD90670555F3D719883B48D224B4E4E906C634DEFA21163E8197756CC20FEBEA6D2AF969EC46F2BD92684D9FBABC3F238E841B5E056FE4EBF4379A9E62400071DA26240000001C0D849F8E1E722000200002400071DA32D0000000062400000012DCFE87881146914CB622B8E41E150DE431F48DA244A69809366E1E1F1031000",
|
||||
"tx_blob" : "12000022800000002400071DA22E00000001201B0367762D61400000009308615868400000000000002873210381575032E254BF4D699C3D8D6EFDB63B3A71F97475C6F6885BC7DAEEE55D9A0174473045022100E592BCCFD85CCE0B39075EFC66D6BCA594EBB451F12AD5AD9EE533A267F1381B02203635AB46AC110848FC44E797BD19D77A19E10A0F463AA5540B1C62E5D48C81F081146914CB622B8E41E150DE431F48DA244A698093668314D2E44C9FAF7BE9C536219800A6E698E4C7D2C911",
|
||||
"validated" : true
|
||||
}
|
||||
],
|
||||
"validated" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-------------------|:---------------------------|:---------------------------|
|
||||
| `account` | String | Unique [Address][] identifying the related account |
|
||||
| `ledger_index_min` | Integer - [Ledger Index][] | The ledger index of the earliest ledger actually searched for transactions. |
|
||||
| `ledger_index_max` | Integer - [Ledger Index][] | The ledger index of the most recent ledger actually searched for transactions. |
|
||||
| `limit` | Integer | The `limit` value used in the request. (This may differ from the actual limit value enforced by the server.) |
|
||||
| `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. |
|
||||
| `transactions` | Array | Array of transactions matching the request's criteria, as explained below. |
|
||||
| `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. |
|
||||
|
||||
**Note:** The server may respond with different values of `ledger_index_min` and `ledger_index_max` than you provided in the request, for example if it did not have the versions you specified on hand.
|
||||
|
||||
Each transaction object includes the following fields, depending on whether it was requested in JSON or hex string (`"binary":true`) format.
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------------------|:-------------------------|
|
||||
| `ledger_index` | Integer | The [ledger index][] of the ledger version that included this transaction. |
|
||||
| `meta` | Object (JSON) or String (Binary) | If `binary` is True, then this is a hex string of the transaction metadata. Otherwise, the transaction metadata is included in JSON format. |
|
||||
| `tx` | Object | (JSON mode only) JSON object defining the transaction |
|
||||
| `tx_blob` | String | (Binary mode only) Unique hashed String representing the transaction. |
|
||||
| `validated` | Boolean | Whether or not the transaction is included in a validated ledger. Any transaction not yet in a validated ledger is subject to change. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actMalformed` - The [Address][] specified in the `account` field of the request is not formatted properly.
|
||||
* `lgrIdxMalformed` - The ledger specified by the `ledger_index_min` or `ledger_index_max` does not exist, or if it does exist but the server does not have it.
|
||||
* `lgrIdxsInvalid` - Either the request specifies a `ledger_index_max` that is before the `ledger_index_min`, or the server does not have a validated ledger range because it is [not synced with the network](server-doesnt-sync.html).
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,230 @@
|
||||
---
|
||||
html: gateway_balances.html
|
||||
parent: account-methods.html
|
||||
blurb: 特定のアカウントから発行された残高の合計を計算します。
|
||||
labels:
|
||||
- トークン
|
||||
- アカウント
|
||||
---
|
||||
# gateway_balances
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/GatewayBalances.cpp "Source")
|
||||
|
||||
`gateway_balances`コマンドは、特定のアカウントから発行された残高の合計を計算します。オプションで、[運用アドレス](issuing-and-operational-addresses.html)が保有する額を除外できます。[新規: rippled 0.28.2][]
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "example_gateway_balances_1",
|
||||
"command": "gateway_balances",
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"strict": true,
|
||||
"hotwallet": ["rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ","ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"],
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "gateway_balances",
|
||||
"params": [
|
||||
{
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"hotwallet": [
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ",
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"
|
||||
],
|
||||
"ledger_index": "validated",
|
||||
"strict": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | 文字列 | チェックする[アドレス][]。[発行アドレス](issuing-and-operational-addresses.html)である必要があります。 |
|
||||
| `strict` | ブール値 | _(省略可)_ trueの場合は、アカウントパラメーターにアドレスまたは公開鍵だけを受け入れます。デフォルトではfalseです。 |
|
||||
| `hotwallet` | 文字列または配列 | _(省略可)_ 発行済み残高から除外する[運用アドレス](issuing-and-operational-addresses.html)、またはそのようなアドレスの配列。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進文字列。([レジャーの指定][]を参照してください) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用するレジャーバージョンの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください) |
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 3,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"assets": {
|
||||
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "5444166510000000e-26"
|
||||
}
|
||||
],
|
||||
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "4000000000000000e-27"
|
||||
}
|
||||
],
|
||||
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "1029900000000000e-26"
|
||||
}
|
||||
],
|
||||
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "4000000000000000e-30"
|
||||
}
|
||||
],
|
||||
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "8700000000000000e-30"
|
||||
}
|
||||
]
|
||||
},
|
||||
"balances": {
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "29826.1965999999"
|
||||
}
|
||||
],
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
|
||||
{
|
||||
"currency": "USD",
|
||||
"value": "13857.70416"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_hash": "61DDBF304AF6E8101576BF161D447CA8E4F0170DDFBEAFFD993DC9383D443388",
|
||||
"ledger_index": 14483195,
|
||||
"obligations": {
|
||||
"BTC": "5908.324927635318",
|
||||
"EUR": "992471.7419793958",
|
||||
"GBP": "4991.38706013193",
|
||||
"USD": "1997134.20229482"
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"assets": {
|
||||
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "5444166510000000e-26"
|
||||
}
|
||||
],
|
||||
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "4000000000000000e-27"
|
||||
}
|
||||
],
|
||||
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "1029900000000000e-26"
|
||||
}
|
||||
],
|
||||
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "4000000000000000e-30"
|
||||
}
|
||||
],
|
||||
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "8700000000000000e-30"
|
||||
}
|
||||
]
|
||||
},
|
||||
"balances": {
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "29826.1965999999"
|
||||
}
|
||||
],
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
|
||||
{
|
||||
"currency": "USD",
|
||||
"value": "13857.70416"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_hash": "980FECF48CA4BFDEC896692C31A50D484BDFE865EC101B00259C413AA3DBD672",
|
||||
"ledger_index": 14483212,
|
||||
"obligations": {
|
||||
"BTC": "5908.324927635318",
|
||||
"EUR": "992471.7419793958",
|
||||
"GBP": "4991.38706013193",
|
||||
"USD": "1997134.20229482"
|
||||
},
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
**注記:** このメソッドのコマンドライン構文はありません。コマンドラインからアクセスするには[jsonメソッド][]を使用してください。
|
||||
|
||||
この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------------|:--------------------------|:------------------------|
|
||||
| `account` | 文字列 - [アドレス][] | 残高を発行したアカウントのアドレス。 |
|
||||
| `obligations` | オブジェクト | (空の場合は省略)除外されていないアドレスに発行された額の合計。発行された価値の合計に対する通貨のマップとして示されます。 |
|
||||
| `balances` | オブジェク | _(空の場合は省略)_ 要求から`hotwallet`アドレスに発行された額。キーはアドレスであり、値はアドレスが保有する通貨額の配列です。 |
|
||||
| `assets` | オブジェクト | _(空の場合は省略)_ 他から発行された保有額の合計。推奨される構成では、[発行アドレス](issuing-and-operational-addresses.html)の保有額はありません。 |
|
||||
| `ledger_hash` | 文字列 - [ハッシュ][] | _(省略される場合があります)_ この応答の生成に使用されたレジャーバージョンの識別用ハッシュ。 |
|
||||
| `ledger_index` | 数値 - [レジャーインデックス][] | _(省略される場合があります)_ この応答の生成に使用されたレジャーバージョンのレジャーインデックス。 | |
|
||||
| `ledger_current_index` | 数値 - [レジャーインデックス][] | _(`ledger_current_index`が指定されている場合は省略)_ この情報の取得時に使用した、現在処理中のレジャーバージョンの[レジャーインデックス][]。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* いずれかの[汎用エラータイプ][]。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `invalidHotWallet` - `hotwallet`フィールドに指定されている1つ以上のアドレスが、要求に指定されているアカウントが発行した通貨を保有しているアカウントの[アドレス][]ではありません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,302 @@
|
||||
---
|
||||
html: gateway_balances.html
|
||||
parent: account-methods.html
|
||||
blurb: Calculate total amounts issued by an account.
|
||||
labels:
|
||||
- Tokens
|
||||
- Accounts
|
||||
---
|
||||
# gateway_balances
|
||||
[[Source]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/GatewayBalances.cpp "Source")
|
||||
|
||||
The `gateway_balances` command calculates the total balances issued by a given account, optionally excluding amounts held by [operational addresses](issuing-and-operational-addresses.html). [New in: rippled 0.28.2][]
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
{% include '_snippets/no-cli-syntax.md' %}
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "example_gateway_balances_1",
|
||||
"command": "gateway_balances",
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"strict": true,
|
||||
"hotwallet": ["rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ","ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"],
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "gateway_balances",
|
||||
"params": [
|
||||
{
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"hotwallet": [
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ",
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"
|
||||
],
|
||||
"ledger_index": "validated",
|
||||
"strict": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
```sh
|
||||
rippled json gateway_balances ' {"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", "hotwallet": ["rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ", "ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt"],"ledger_index": "validated","strict": true} '
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | String | The [Address][] to check. This should be the [issuing address](issuing-and-operational-addresses.html) |
|
||||
| `strict` | Boolean | _(Optional)_ If true, only accept an address or public key for the account parameter. Defaults to false. |
|
||||
| `hotwallet` | String or Array | _(Optional)_ An [operational address](issuing-and-operational-addresses.html) to exclude from the balances issued, or an array of such addresses. |
|
||||
| `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 version to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 3,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"assets": {
|
||||
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "5444166510000000e-26"
|
||||
}
|
||||
],
|
||||
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "4000000000000000e-27"
|
||||
}
|
||||
],
|
||||
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "1029900000000000e-26"
|
||||
}
|
||||
],
|
||||
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "4000000000000000e-30"
|
||||
}
|
||||
],
|
||||
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "8700000000000000e-30"
|
||||
}
|
||||
]
|
||||
},
|
||||
"balances": {
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "29826.1965999999"
|
||||
}
|
||||
],
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
|
||||
{
|
||||
"currency": "USD",
|
||||
"value": "13857.70416"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_hash": "61DDBF304AF6E8101576BF161D447CA8E4F0170DDFBEAFFD993DC9383D443388",
|
||||
"ledger_index": 14483195,
|
||||
"obligations": {
|
||||
"BTC": "5908.324927635318",
|
||||
"EUR": "992471.7419793958",
|
||||
"GBP": "4991.38706013193",
|
||||
"USD": "1997134.20229482"
|
||||
},
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"assets": {
|
||||
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "5444166510000000e-26"
|
||||
}
|
||||
],
|
||||
"rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "4000000000000000e-27"
|
||||
}
|
||||
],
|
||||
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "1029900000000000e-26"
|
||||
}
|
||||
],
|
||||
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "4000000000000000e-30"
|
||||
}
|
||||
],
|
||||
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6": [
|
||||
{
|
||||
"currency": "BTC",
|
||||
"value": "8700000000000000e-30"
|
||||
}
|
||||
]
|
||||
},
|
||||
"balances": {
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ": [
|
||||
{
|
||||
"currency": "EUR",
|
||||
"value": "29826.1965999999"
|
||||
}
|
||||
],
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt": [
|
||||
{
|
||||
"currency": "USD",
|
||||
"value": "13857.70416"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_hash": "980FECF48CA4BFDEC896692C31A50D484BDFE865EC101B00259C413AA3DBD672",
|
||||
"ledger_index": 14483212,
|
||||
"obligations": {
|
||||
"BTC": "5908.324927635318",
|
||||
"EUR": "992471.7419793958",
|
||||
"GBP": "4991.38706013193",
|
||||
"USD": "1997134.20229482"
|
||||
},
|
||||
"status": "success",
|
||||
"validated": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
```json
|
||||
{
|
||||
"result" : {
|
||||
"account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"assets" : {
|
||||
"r9F6wk8HkXrgYWoJ7fsv4VrUBVoqDVtzkH" : [
|
||||
{
|
||||
"currency" : "BTC",
|
||||
"value" : "5444166510000000e-26"
|
||||
}
|
||||
],
|
||||
"rPU6VbckqCLW4kb51CWqZdxvYyQrQVsnSj" : [
|
||||
{
|
||||
"currency" : "BTC",
|
||||
"value" : "1029900000000000e-26"
|
||||
}
|
||||
],
|
||||
"rpR95n1iFkTqpoy1e878f4Z1pVHVtWKMNQ" : [
|
||||
{
|
||||
"currency" : "BTC",
|
||||
"value" : "4000000000000000e-30"
|
||||
}
|
||||
],
|
||||
"rwmUaXsWtXU4Z843xSYwgt1is97bgY8yj6" : [
|
||||
{
|
||||
"currency" : "BTC",
|
||||
"value" : "8700000000000000e-30"
|
||||
}
|
||||
]
|
||||
},
|
||||
"balances" : {
|
||||
"rKm4uWpg9tfwbVSeATv4KxDe6mpE9yPkgJ" : [
|
||||
{
|
||||
"currency" : "EUR",
|
||||
"value" : "144816.1965999999"
|
||||
}
|
||||
],
|
||||
"ra7JkEzrgeKHdzKgo4EUUVBnxggY4z37kt" : [
|
||||
{
|
||||
"currency" : "USD",
|
||||
"value" : "6677.38614"
|
||||
}
|
||||
]
|
||||
},
|
||||
"frozen_balances" : {
|
||||
"r4keXr5myiU4iTLh68ZqZ2CgsJ8dM9FSW6" : [
|
||||
{
|
||||
"currency" : "BTC",
|
||||
"value" : "0.091207822800868"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_hash" : "6C789EAF25A931565E5936042EED037F287F3348B61A70777649552E0385B0E4",
|
||||
"ledger_index" : 57111383,
|
||||
"obligations" : {
|
||||
"BTC" : "1762.700511879441",
|
||||
"EUR" : "813792.4267005104",
|
||||
"GBP" : "4974.337212333351",
|
||||
"USD" : "6739710.218284974"
|
||||
},
|
||||
"status" : "success",
|
||||
"validated" : true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `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
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `invalidHotWallet` - One or more of the addresses specified in the `hotwallet` field is not the [Address][] of an account holding currency issued by the account from the request.
|
||||
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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' %}
|
||||
@@ -0,0 +1,192 @@
|
||||
---
|
||||
html: noripple_check.html
|
||||
parent: account-methods.html
|
||||
blurb: アカウントのDefaultRippleフィールドとそのトラストラインのNoRippleフラグの状態を、推奨される設定と比較して迅速にチェックします。
|
||||
labels:
|
||||
- トークン
|
||||
---
|
||||
# noripple_check
|
||||
[[ソース]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/NoRippleCheck.cpp "Source")
|
||||
|
||||
`noripple_check`コマンドを使用すると、[アカウントのDefaultRippleフィールドとそのトラストラインのNoRippleフラグ](rippling.html)の状態を、推奨される設定と比較して迅速にチェックできます。
|
||||
|
||||
## 要求フォーマット
|
||||
要求フォーマットの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 0,
|
||||
"command": "noripple_check",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"role": "gateway",
|
||||
"ledger_index": "current",
|
||||
"limit": 2,
|
||||
"transactions": true
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "noripple_check",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index": "current",
|
||||
"limit": 2,
|
||||
"role": "gateway",
|
||||
"transactions": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
**注記:** このメソッドのコマンドライン構文はありません。コマンドラインからアクセスするには[jsonメソッド][]を使用してください。
|
||||
|
||||
要求には以下のパラメーターが含まれます。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | 文字列 | アカウントの一意のIDであり、通常はアカウントのアドレスです。 |
|
||||
| `role` | 文字列 | アドレスが`gateway`と`user`のいずれを指しているか。推奨事項はアカウントの役割に応じて異なります。イシュアーのDefaultRippleを有効にし、すべてのトラストラインでNoRippleを無効にする必要があります。ユーザーのDefaultRippleを無効にし、すべてのトラストラインでNoRippleを有効にする必要があります。 |
|
||||
| `transactions` | ブール値 | _(省略可)_ `true`の場合、提案される[トランザクション](transaction-formats.html)(JSONオブジェクト)の配列を指定します。問題を修正するために、これらのトランザクションに署名して送信することができます。デフォルトではfalseです。 |
|
||||
| `limit` | 符号なし整数 | _(省略可)_ 結果に含めることができるトラストライン問題の最大数。デフォルトでは300です。 |
|
||||
| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進数文字列。([レジャーの指定][]を参照してください。) |
|
||||
| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用するレジャーのシーケンス番号、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照してください。) |
|
||||
|
||||
## 応答フォーマット
|
||||
|
||||
処理が成功した応答の例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 0,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"ledger_current_index": 14342939,
|
||||
"problems": [
|
||||
"You should immediately set your default ripple flag",
|
||||
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
|
||||
],
|
||||
"transactions": [
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Sequence": 1406,
|
||||
"SetFlag": 8,
|
||||
"TransactionType": "AccountSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "0"
|
||||
},
|
||||
"Sequence": 1407,
|
||||
"TransactionType": "TrustSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "5"
|
||||
},
|
||||
"Sequence": 1408,
|
||||
"TransactionType": "TrustSet"
|
||||
}
|
||||
],
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
{
|
||||
"result": {
|
||||
"ledger_current_index": 14380381,
|
||||
"problems": [
|
||||
"You should immediately set your default ripple flag",
|
||||
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
|
||||
],
|
||||
"status": "success",
|
||||
"transactions": [
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Sequence": 1406,
|
||||
"SetFlag": 8,
|
||||
"TransactionType": "AccountSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "0"
|
||||
},
|
||||
"Sequence": 1407,
|
||||
"TransactionType": "TrustSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "5"
|
||||
},
|
||||
"Sequence": 1408,
|
||||
"TransactionType": "TrustSet"
|
||||
}
|
||||
],
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれています。
|
||||
|
||||
| `Field` | 型 | 説明 |
|
||||
|:-----------------------|:-------|:-------------------------------------------|
|
||||
| `ledger_current_index` | 数値 | これらの結果の計算に使用するレジャーのシーケンス番号。 |
|
||||
| `problems` | 配列 | 人間が読み取ることができる形式の問題の記述が含まれている文字列の配列。アカウントのDefaultRipple設定が推奨に従っていない場合は、最大1つのエントリーが含まれます。加えて、NoRipple設定が推奨に従っていないトラストラインのエントリー(最大で`limit`に指定されている数)も含まれます。 |
|
||||
| `transactions` | 配列 | (省略される場合があります)要求で`transactions`が`true`に指定されている場合、これはJSONオブジェクトの配列です。各JSONオブジェクトは、JSON形式の[トランザクション](transaction-formats.html)で、記述されている問題の1つを修正します。この配列の長さは`problems`配列と同じであり、各エントリーは、その配列の同じインデックスで記述されている問題の修正を目的としています。 |
|
||||
|
||||
## 考えられるエラー
|
||||
|
||||
* [汎用エラータイプ][]のすべて。
|
||||
* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。
|
||||
* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。
|
||||
* `lgrNotFound` - `ledger_hash`または`ledger_index`に指定されているレジャーが存在しないか、存在しているがサーバーにはありません。
|
||||
|
||||
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
@@ -0,0 +1,195 @@
|
||||
---
|
||||
html: noripple_check.html
|
||||
parent: account-methods.html
|
||||
blurb: Get recommended changes to an account's Default Ripple and No Ripple settings.
|
||||
labels:
|
||||
- Tokens
|
||||
---
|
||||
# noripple_check
|
||||
[[Source]](https://github.com/ripple/rippled/blob/9111ad1a9dc37d49d085aa317712625e635197c0/src/ripple/rpc/handlers/NoRippleCheck.cpp "Source")
|
||||
|
||||
The `noripple_check` command provides a quick way to check the status of [the Default Ripple field for an account and the No Ripple flag of its trust lines](rippling.html), compared with the recommended settings.
|
||||
|
||||
|
||||
## Request Format
|
||||
An example of the request format:
|
||||
|
||||
{% include '_snippets/no-cli-syntax.md' %}
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 0,
|
||||
"command": "noripple_check",
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"role": "gateway",
|
||||
"ledger_index": "current",
|
||||
"limit": 2,
|
||||
"transactions": true
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "noripple_check",
|
||||
"params": [
|
||||
{
|
||||
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"ledger_index": "current",
|
||||
"limit": 2,
|
||||
"role": "gateway",
|
||||
"transactions": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------------|:---------------------------|:-------------------------------|
|
||||
| `account` | String | A unique identifier for the account, most commonly the account's address. |
|
||||
| `role` | String | Whether the address refers to a `gateway` or `user`. Recommendations depend on the role of the account. Issuers must have Default Ripple enabled and must disable No Ripple on all trust lines. Users should have Default Ripple disabled, and should enable No Ripple on all trust lines. |
|
||||
| `transactions` | Boolean | _(Optional)_ If `true`, include an array of suggested [transactions](transaction-formats.html), as JSON objects, that you can sign and submit to fix the problems. Defaults to false. |
|
||||
| `limit` | Unsigned Integer | _(Optional)_ The maximum number of trust line problems to include in the results. Defaults to 300. |
|
||||
| `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 to choose a ledger automatically. (See [Specifying Ledgers][]) |
|
||||
|
||||
## Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 0,
|
||||
"status": "success",
|
||||
"type": "response",
|
||||
"result": {
|
||||
"ledger_current_index": 14342939,
|
||||
"problems": [
|
||||
"You should immediately set your default ripple flag",
|
||||
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
|
||||
],
|
||||
"transactions": [
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Sequence": 1406,
|
||||
"SetFlag": 8,
|
||||
"TransactionType": "AccountSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "0"
|
||||
},
|
||||
"Sequence": 1407,
|
||||
"TransactionType": "TrustSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "5"
|
||||
},
|
||||
"Sequence": 1408,
|
||||
"TransactionType": "TrustSet"
|
||||
}
|
||||
],
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"ledger_current_index": 14380381,
|
||||
"problems": [
|
||||
"You should immediately set your default ripple flag",
|
||||
"You should clear the no ripple flag on your XAU line to r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"You should clear the no ripple flag on your USD line to rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
|
||||
],
|
||||
"status": "success",
|
||||
"transactions": [
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Sequence": 1406,
|
||||
"SetFlag": 8,
|
||||
"TransactionType": "AccountSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "XAU",
|
||||
"issuer": "r3vi7mWxru9rJCxETCyA1CHvzL96eZWx5z",
|
||||
"value": "0"
|
||||
},
|
||||
"Sequence": 1407,
|
||||
"TransactionType": "TrustSet"
|
||||
},
|
||||
{
|
||||
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
|
||||
"Fee": 10000,
|
||||
"Flags": 262144,
|
||||
"LimitAmount": {
|
||||
"currency": "USD",
|
||||
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
|
||||
"value": "5"
|
||||
},
|
||||
"Sequence": 1408,
|
||||
"TransactionType": "TrustSet"
|
||||
}
|
||||
],
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:-----------------------|:-------|:-------------------------------------------|
|
||||
| `ledger_current_index` | Number | The [ledger index][] of the ledger used to calculate these results. |
|
||||
| `problems` | Array | Array of strings with human-readable descriptions of the problems. This includes up to one entry if the account's Default Ripple setting is not as recommended, plus up to `limit` entries for trust lines whose No Ripple setting is not as recommended. |
|
||||
| `transactions` | Array | (May be omitted) If the request specified `transactions` as `true`, this is an array of JSON objects, each of which is the JSON form of a [transaction](transaction-formats.html) that should fix one of the described problems. The length of this array is the same as the `problems` array, and each entry is intended to fix the problem described at the same index into that array. |
|
||||
|
||||
## Possible Errors
|
||||
|
||||
* Any of the [universal error types][].
|
||||
* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
* `actNotFound` - The [Address][] specified in the `account` field of the request does not correspond to an account in the ledger.
|
||||
* `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' %}
|
||||
Reference in New Issue
Block a user