mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-21 04:05:49 +00:00
Merge commit '6e7a8b8ad389845d792b6798bf7b8ddebb7b540c' into ja-multisig
This commit is contained in:
@@ -8,7 +8,7 @@ labels:
|
||||
# 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.
|
||||
The `account_lines` method returns information about an account's trust lines, which contain balances in all non-XRP currencies and assets. All information retrieved is relative to a particular version of the ledger.
|
||||
|
||||
## Request Format
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ The types of objects that may appear in the `account_objects` response for an ac
|
||||
- [Check objects](check.html) for pending Checks.
|
||||
- [DepositPreauth objects](depositpreauth-object.html) for deposit preauthorizations. [New in: rippled 1.1.0][]
|
||||
- [Ticket objects](known-amendments.html#tickets) for Tickets.
|
||||
- [NFTokenPage objects](nftokenpage.html) for collections of NFTs.
|
||||
|
||||
|
||||
## Request Format
|
||||
|
||||
@@ -251,6 +251,8 @@ The response follows the [standard format][], with a successful result containin
|
||||
| `state` | Array | Array of JSON objects containing data from the ledger's state tree, as defined below. |
|
||||
| `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. |
|
||||
|
||||
If a `type` field is mentioned in the request, the `state` array will be empty if the first set of array objects does not match the type requested. In such cases, you can use the `marker` from this response to paginate and retrieve further data.
|
||||
|
||||
The format of each object in the `state` array depends on whether `binary` was set to true or not in the request. Each `state` object may include the following fields:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|
||||
@@ -1,261 +0,0 @@
|
||||
---
|
||||
html: amm_info.html
|
||||
parent: path-and-order-book-methods.html
|
||||
blurb: Get info about an Automted Market Maker (AMM) instance.
|
||||
status: not_enabled
|
||||
labels:
|
||||
- 分散型取引所
|
||||
- クロスカレンシー
|
||||
- AMM
|
||||
---
|
||||
# amm_info
|
||||
[[Source]](https://github.com/gregtatcam/rippled/blob/amm-core-functionality/src/ripple/rpc/handlers/AMMInfo.cpp "Source")
|
||||
<!-- TODO: Update source link to merged version when available -->
|
||||
|
||||
`{{currentpage.name}}` メソッドは、自動マーケットメーカー(AMM)インスタンスに関する情報を取得します。
|
||||
|
||||
{% include '_snippets/amm-disclaimer.ja.md' %}
|
||||
|
||||
|
||||
### リクエストのフォーマット
|
||||
|
||||
リクエストの例
|
||||
|
||||
{% include '_snippets/no-cli-syntax.ja.md' %}
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "{{currentpage.name}}",
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "{{currentpage.name}}",
|
||||
"params": [{
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[試してみる>](websocket-api-tool.html?server=wss%3A%2F%2Famm.devnet.rippletest.net%3A51233%2F#amm_info)
|
||||
|
||||
リクエストには以下のパラメーターが含まれます。
|
||||
|
||||
| `フィールド` | 型 | 説明 |
|
||||
|:-----------|:-----------------------|:-----------------------------------|
|
||||
| `asset` | オブジェクト または 文字列 | [通貨額][Currency Amount]のように、`currency`と`issuer`フィールドを持つオブジェクトとして(XRPの場合は`issuer`を省略)、検索するAMMの資産の一つを指定します。XRPの場合は、オブジェクトではなく文字列`XRP`として指定することができます。 |
|
||||
| `asset2` | オブジェクト または 文字列 | AMMの資産のもう一方を、`currency`と`issuer`フィールド(XRPの場合は`issuer`を省略)を持つオブジェクトとして、[通貨額][Currency Amount]のように指定することが可能です。 |
|
||||
|
||||
|
||||
### レスポンスのフォーマット
|
||||
|
||||
|
||||
処理が成功したレスポンスの例:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"amm": {
|
||||
"amm_account": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"amount": "296890496",
|
||||
"amount2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd",
|
||||
"value": "25.81656470648473"
|
||||
},
|
||||
"asset2_frozen": false,
|
||||
"auction_slot": {
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"auth_accounts": [
|
||||
{
|
||||
"account": "r3f2WpQMsAd8k4Zoijv2PZ78EYFJ2EdvgV"
|
||||
},
|
||||
{
|
||||
"account": "rnW8FAPgpQgA6VoESnVrUVJHBdq9QAtRZs"
|
||||
}
|
||||
],
|
||||
"discounted_fee": 0,
|
||||
"expiration": "2023-Jan-26 00:28:40.000000000 UTC",
|
||||
"price": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "0"
|
||||
},
|
||||
"time_interval": 0
|
||||
},
|
||||
"lp_token": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "87533.41976112682"
|
||||
},
|
||||
"trading_fee": 600,
|
||||
"vote_slots": [
|
||||
{
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"trading_fee": 600,
|
||||
"vote_weight": 9684
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_current_index": 316725,
|
||||
"validated": false
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"amm": {
|
||||
"amm_account": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"amount": "296890496",
|
||||
"amount2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd",
|
||||
"value": "25.81656470648473"
|
||||
},
|
||||
"asset2_frozen": false,
|
||||
"auction_slot": {
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"auth_accounts": [
|
||||
{
|
||||
"account": "r3f2WpQMsAd8k4Zoijv2PZ78EYFJ2EdvgV"
|
||||
},
|
||||
{
|
||||
"account": "rnW8FAPgpQgA6VoESnVrUVJHBdq9QAtRZs"
|
||||
}
|
||||
],
|
||||
"discounted_fee": 0,
|
||||
"expiration": "2023-Jan-26 00:28:40.000000000 UTC",
|
||||
"price": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "0"
|
||||
},
|
||||
"time_interval": 0
|
||||
},
|
||||
"lp_token": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "87533.41976112682"
|
||||
},
|
||||
"trading_fee": 600,
|
||||
"vote_slots": [
|
||||
{
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"trading_fee": 600,
|
||||
"vote_weight": 9684
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_current_index": 316745,
|
||||
"status": "success",
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
レスポンスは[標準フォーマット][]に従っており、成功した場合は以下のフィールドを含みます。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|:-----------------------|:---------------------|:----------------------------------------------------------|
|
||||
| `amm` | オブジェクト | リクエストに含まれる資産ペアの[**AMM詳細オブジェクト**](#amm詳細オブジェクト)です。 |
|
||||
| `ledger_current_index` | [レジャーインデックス][] | _(`ledger_index`の指定がある場合は省略)_ この情報を取得する際に使用された、現在の進行中の台帳の[レジャーインデックス][]。 |
|
||||
| `ledger_hash` | [ハッシュ][] | _(`ledger_current_index`の指定がある場合は省略)_ この情報を取得する際に使用された台帳のバージョンの識別ハッシュ。 |
|
||||
| `ledger_index` | [レジャーインデックス][] | _(`ledger_current_index`の指定がある場合は省略_ この情報を取得する際に使用した台帳のバージョンの[レジャーインデックス][]。 |
|
||||
| `validated` | 真偽値 | もし`true`なら、このリクエストに使用された台帳は検証済みで、これらの結果は最終的なものです。もし省略されるか `false` に設定されると、データは未確定で変更される可能性があります。 |
|
||||
|
||||
|
||||
### AMM詳細オブジェクト
|
||||
|
||||
フィールド `amm` は、台帳上の自動マーケットメーカー(AMM)の現在の状態を記述するオブジェクトであり、以下のフィールドを含みます。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|-----------------|------------|-------------|
|
||||
| `amm_account` | 文字列 | AMMアカウントの[アドレス][]です。 |
|
||||
| `amount` | [通貨額][] | AMMのプールにある1つの資産の合計額。(注記:リクエストに指定した`asset` _または_ `asset2`になります。) |
|
||||
| `amount2` | [通貨額][] | AMMのプール内の他の資産の合計額。(注意:リクエストに指定した`asset` _または_ `asset2`になります。) |
|
||||
| `asset_frozen` | 真偽値 | _(XRPの場合、省略)_ `true`の場合、`amount`の通貨は現在[凍結](freezes.html)されています。 |
|
||||
| `asset2_frozen` | 真偽値 | _(XRPの場合、省略)_ `true`の場合、`amount2`の通貨は現在[凍結](freezes.html)されています。 |
|
||||
| `auction_slot` | オブジェクト | _(省略される場合があります)_ 存在する場合、現在のオークションスロットの所有者を記述した[オークションスロットオブジェクト](#オークションスロットオブジェクト)です。 |
|
||||
| `lp_token` | [通貨額][] | このAMMのLPトークンの発行残高の合計。 |
|
||||
| `trading_fee` | 数値 | AMMの現在の取引手数料。単位は1/100,000で、1は0.001%の手数料に相当します。 |
|
||||
| `vote_slots` | 配列 | _(省略される場合があります)_ AMMの取引手数料に対する現在の投票数。[投票スロットオブジェクト](#投票スロットオブジェクト)として表示されます。 |
|
||||
|
||||
|
||||
### オークションスロットオブジェクト
|
||||
|
||||
`AMM` オブジェクトの `auction_slot` フィールドは、AMMの現在のオークションスロット保持者を表し、以下のフィールドを含みます。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|------------------|-----------|-------------|
|
||||
| `account` | 文字列 | オークションスロットを所有するアカウントの[アドレス][]です。 |
|
||||
| `auth_accounts` | 配列 | オークションスロットの所有者が、取引手数料の割引の対象として指定した追加アカウントのリスト。この配列の各メンバーは、1つのフィールド `account` を持つオブジェクトで、指定したアカウントのアドレスが含まれています。 |
|
||||
| `discounted_fee` | 数値 | このAMMに対して取引を行う際に、オークションスロットの保有者、および対象となるアカウントに適用される割引後の取引手数料です。これは常に0です。 |
|
||||
| `expiration` | 文字列 | このオークションスロットが期限切れとなるISO8601 UTCタイムスタンプ。期限切れになると、オークションスロットは適用されません (ただし、別のトランザクションで置き換えられるかクリーンアップされるまで、データは台帳に残ります)。 |
|
||||
| `price` | [通貨額][] | オークションスロット所有者がオークションスロットを獲得するために支払った金額(LPトークン単位)です。これは、現在のスロット所有者を競り落とすための価格に影響します。 |
|
||||
| `time_interval` | 数値 | このオークションスロットが現在入っている72分の時間間隔を0から19までで指定します。オークションスロットは24時間後(72分間隔で20回)に失効し、現在の保有者を競り落とすためのコストと、誰かが競り落とした場合に現在の保有者が払い戻される金額に影響します。 |
|
||||
|
||||
|
||||
### 投票スロットオブジェクト
|
||||
|
||||
`vote_slots`配列の各項目は、取引手数料を設定するための流動性供給者の投票権を表し、以下のフィールドを含みます。
|
||||
|
||||
| フィールド | 型 | 説明 |
|
||||
|---------------|-------|-------------|
|
||||
| `account` | 文字列 | この流動性供給者の[アドレス][]。 |
|
||||
| `trading_fee` | 数値 | この流動性供給者が投票した取引手数料。単位は1/100,000です。 |
|
||||
| `vote_weight` | 数値 | この流動性供給者の投票が、最終的な取引手数料にどれだけカウントさ れるかを表します。これは、この流動性供給者がAMMのLPトークンをどれだけ保有しているかに比例します。値は、この流動性供給者が保有するこのLPトークンの数の100,000倍を、発行済LPトークンの総数で割ったものになります。例えば、値が1000の場合、流動性供給者はこのAMMのLPトークンの1%を保有していることを意味します。 |
|
||||
|
||||
|
||||
### 考えられるエラー
|
||||
|
||||
- [汎用エラータイプ][]のすべて。
|
||||
- `actNotFound` - この資産ペアのAMMが存在しないか、リクエストで指定された発行アカウントが存在しません。
|
||||
- `invalidParams` - 1つまたは複数のフィールドの指定に誤りがあるか、1つまたは複数の必須フィールドが欠落しています。
|
||||
|
||||
|
||||
## 関連項目
|
||||
|
||||
- [AMMオブジェクト](amm.html) - AMMオブジェクトの正規の保存形式
|
||||
- [AMMBid][] - オークションスロットと入札の仕組みについての詳細はこちら
|
||||
- [AMMVote][] - 取引手数料の投票メカニズムの詳細はこちら
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -1,260 +0,0 @@
|
||||
---
|
||||
html: amm_info.html
|
||||
parent: path-and-order-book-methods.html
|
||||
blurb: Get info about an Automted Market Maker (AMM) instance.
|
||||
status: not_enabled
|
||||
labels:
|
||||
- Decentralized Exchange
|
||||
- Cross-Currency
|
||||
- AMM
|
||||
---
|
||||
# amm_info
|
||||
[[Source]](https://github.com/gregtatcam/rippled/blob/amm-core-functionality/src/ripple/rpc/handlers/AMMInfo.cpp "Source")
|
||||
<!-- TODO: Update source link to merged version when available -->
|
||||
|
||||
The `{{currentpage.name}}` method gets information about an Automated Market Maker (AMM) instance.
|
||||
|
||||
{% include '_snippets/amm-disclaimer.md' %}
|
||||
|
||||
|
||||
### Request Format
|
||||
|
||||
An example of the request format:
|
||||
|
||||
{% include '_snippets/no-cli-syntax.md' %}
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"command": "{{currentpage.name}}",
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "{{currentpage.name}}",
|
||||
"params": [{
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html?server=wss%3A%2F%2Famm.devnet.rippletest.net%3A51233%2F#amm_info)
|
||||
|
||||
The request includes the following parameters:
|
||||
|
||||
| `Field` | Type | Description |
|
||||
|:---------|:-----------------|:-----------------------------------|
|
||||
| `asset` | Object or String | One of the assets of the AMM to look up, as an object with `currency` and `issuer` fields (omit `issuer` for XRP), like [currency amounts][Currency Amount]. For XRP, you can specify as the string `XRP` instead of as an object. |
|
||||
| `asset2` | Object or String | The other of the assets of the AMM, as an object with `currency` and `issuer` fields (omit `issuer` for XRP), like [currency amounts][Currency Amount]. |
|
||||
|
||||
|
||||
### Response Format
|
||||
|
||||
An example of a successful response:
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"result": {
|
||||
"amm": {
|
||||
"amm_account": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"amount": "296890496",
|
||||
"amount2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd",
|
||||
"value": "25.81656470648473"
|
||||
},
|
||||
"asset2_frozen": false,
|
||||
"auction_slot": {
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"auth_accounts": [
|
||||
{
|
||||
"account": "r3f2WpQMsAd8k4Zoijv2PZ78EYFJ2EdvgV"
|
||||
},
|
||||
{
|
||||
"account": "rnW8FAPgpQgA6VoESnVrUVJHBdq9QAtRZs"
|
||||
}
|
||||
],
|
||||
"discounted_fee": 0,
|
||||
"expiration": "2023-Jan-26 00:28:40.000000000 UTC",
|
||||
"price": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "0"
|
||||
},
|
||||
"time_interval": 0
|
||||
},
|
||||
"lp_token": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "87533.41976112682"
|
||||
},
|
||||
"trading_fee": 600,
|
||||
"vote_slots": [
|
||||
{
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"trading_fee": 600,
|
||||
"vote_weight": 9684
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_current_index": 316725,
|
||||
"validated": false
|
||||
},
|
||||
"status": "success",
|
||||
"type": "response"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
200 OK
|
||||
|
||||
{
|
||||
"result": {
|
||||
"amm": {
|
||||
"amm_account": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"amount": "296890496",
|
||||
"amount2": {
|
||||
"currency": "TST",
|
||||
"issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd",
|
||||
"value": "25.81656470648473"
|
||||
},
|
||||
"asset2_frozen": false,
|
||||
"auction_slot": {
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"auth_accounts": [
|
||||
{
|
||||
"account": "r3f2WpQMsAd8k4Zoijv2PZ78EYFJ2EdvgV"
|
||||
},
|
||||
{
|
||||
"account": "rnW8FAPgpQgA6VoESnVrUVJHBdq9QAtRZs"
|
||||
}
|
||||
],
|
||||
"discounted_fee": 0,
|
||||
"expiration": "2023-Jan-26 00:28:40.000000000 UTC",
|
||||
"price": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "0"
|
||||
},
|
||||
"time_interval": 0
|
||||
},
|
||||
"lp_token": {
|
||||
"currency": "039C99CD9AB0B70B32ECDA51EAAE471625608EA2",
|
||||
"issuer": "rp9E3FN3gNmvePGhYnf414T2TkUuoxu8vM",
|
||||
"value": "87533.41976112682"
|
||||
},
|
||||
"trading_fee": 600,
|
||||
"vote_slots": [
|
||||
{
|
||||
"account": "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
|
||||
"trading_fee": 600,
|
||||
"vote_weight": 9684
|
||||
}
|
||||
]
|
||||
},
|
||||
"ledger_current_index": 316745,
|
||||
"status": "success",
|
||||
"validated": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
The response follows the [standard format][], with a successful result containing the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|:-----------------------|:-----------------|:----------------------------------------------------------|
|
||||
| `amm` | Object | An [**AMM Description Object**](#amm-description-object) for the requested asset pair. |
|
||||
| `ledger_current_index` | [Ledger Index][] | _(Omitted if `ledger_index` is provided instead)_ The [ledger index][] of the current in-progress ledger, which was used when retrieving this information. |
|
||||
| `ledger_hash` | [Hash][] | _(Omitted if `ledger_current_index` is provided instead)_ The identifying hash of the ledger version that was used when retrieving this data. |
|
||||
| `ledger_index` | [Ledger Index][] | _(Omitted if `ledger_current_index` is provided instead)_ The [ledger index][] of the ledger version used when retrieving this information. |
|
||||
| `validated` | Boolean | If `true`, the ledger used for this request is validated and these results are final; if omitted or set to `false`, the data is pending and may change. |
|
||||
|
||||
|
||||
### AMM Description Object
|
||||
|
||||
The `amm` field is an object describing the current status of an Automated Market Maker (AMM) in the ledger, and contains the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|-----------------|---------------------|-------------|
|
||||
| `amm_account` | String | The [Address][] of the AMM Account. |
|
||||
| `amount` | [Currency Amount][] | The total amount of one asset in the AMM's pool. (Note: This could be `asset` _or_ `asset2` from the request.) |
|
||||
| `amount2` | [Currency Amount][] | The total amount of the other asset in the AMM's pool. (Note: This could be `asset` _or_ `asset2` from the request.) |
|
||||
| `asset_frozen` | Boolean | _(Omitted for XRP)_ If `true`, the `amount` currency is currently [frozen](freezes.html). |
|
||||
| `asset2_frozen` | Boolean | _(Omitted for XRP)_ If `true`, the `amount2` currency is currently [frozen](freezes.html). |
|
||||
| `auction_slot` | Object | _(May be omitted)_ An [Auction Slot Object](#auction-slot-object) describing the current auction slot holder, if there is one. |
|
||||
| `lp_token` | [Currency Amount][] | The total amount of this AMM's LP Tokens outstanding. |
|
||||
| `trading_fee` | Number | The AMM's current trading fee, in units of 1/100,000; a value of 1 is equivalent to a 0.001% fee. |
|
||||
| `vote_slots` | Array | _(May be omitted)_ The current votes for the AMM's trading fee, as [Vote Slot Objects](#vote-slot-objects). |
|
||||
|
||||
|
||||
### Auction Slot Object
|
||||
|
||||
The `auction_slot` field of the `amm` object describes the current auction slot holder of the AMM, and contains the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|------------------|---------------------|-------------|
|
||||
| `account` | String | The [Address][] of the account that owns the auction slot. |
|
||||
| `auth_accounts` | Array | A list of additional accounts that the auction slot holder has designated as being eligible of the discounted trading fee. Each member of this array is an object with one field, `account`, containing the address of the designated account. |
|
||||
| `discounted_fee` | Number | The discounted trading fee that applies to the auction slot holder, and any eligible accounts, when trading against this AMM. This is always 0. |
|
||||
| `expiration` | String | The ISO 8601 UTC timestamp after which this auction slot expires. After expired, the auction slot does not apply (but the data can remain in the ledger until another transaction replaces it or cleans it up). |
|
||||
| `price` | [Currency Amount][] | The amount, in LP Tokens, that the auction slot holder paid to win the auction slot. This affects the price to outbid the current slot holder. |
|
||||
| `time_interval` | Number | The current 72-minute time interval this auction slot is in, from 0 to 19. The auction slot expires after 24 hours (20 intervals of 72 minutes) and affects the cost to outbid the current holder and how much the current holder is refunded if someone outbids them. |
|
||||
|
||||
|
||||
### Vote Slot Objects
|
||||
|
||||
Each entry in the `vote_slots` array represents one liquidity provider's vote to set the trading fee, and contains the following fields:
|
||||
|
||||
| Field | Type | Description |
|
||||
|---------------|--------|-------------|
|
||||
| `account` | String | The [Address][] of this liquidity provider. |
|
||||
| `trading_fee` | Number | The trading fee this liquidity provider voted for, in units of 1/100,000. |
|
||||
| `vote_weight` | Number | How much this liquidity provider's vote counts towards the final trading fee. This is proportional to how much of the AMM's LP Tokens this liquidity provider holds. The value is equal to 100,000 times the number of this LP Tokens this liquidity provider holds, divided by the total number of LP Tokens outstanding. For example, a value of 1000 means that the liquidity provider holds 1% of this AMM's LP Tokens. |
|
||||
|
||||
|
||||
### Possible Errors
|
||||
|
||||
- Any of the [universal error types][].
|
||||
- `actNotFound` - The AMM for this asset pair does not exist, or an issuing account specified in the request does not exist.
|
||||
- `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing.
|
||||
|
||||
|
||||
## See Also
|
||||
|
||||
- [AMM object](amm.html) - The canonical storage format of the AMM object
|
||||
- [AMMBid][] - More info on the auction slot and bidding mechanism
|
||||
- [AMMVote][] - More info on the trading fee voting mechanism
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
{% include '_snippets/tx-type-links.md' %}
|
||||
{% include '_snippets/rippled_versions.md' %}
|
||||
@@ -84,23 +84,23 @@ An example of a successful response:
|
||||
"state_accounting": {
|
||||
"connected": {
|
||||
"duration_us": "301410595",
|
||||
"transitions": 2
|
||||
"transitions": "2"
|
||||
},
|
||||
"disconnected": {
|
||||
"duration_us": "1207534",
|
||||
"transitions": 2
|
||||
"transitions": "2"
|
||||
},
|
||||
"full": {
|
||||
"duration_us": "3589171798767",
|
||||
"transitions": 2
|
||||
"transitions": "2"
|
||||
},
|
||||
"syncing": {
|
||||
"duration_us": "6182323",
|
||||
"transitions": 2
|
||||
"transitions": "2"
|
||||
},
|
||||
"tracking": {
|
||||
"duration_us": "43",
|
||||
"transitions": 2
|
||||
"transitions": "2"
|
||||
}
|
||||
},
|
||||
"time": "2021-Aug-24 20:44:43.466048 UTC",
|
||||
@@ -154,23 +154,23 @@ Headers
|
||||
"state_accounting": {
|
||||
"connected": {
|
||||
"duration_us": "172799714",
|
||||
"transitions": 1
|
||||
"transitions": "1"
|
||||
},
|
||||
"disconnected": {
|
||||
"duration_us": "309059",
|
||||
"transitions": 1
|
||||
"transitions": "1"
|
||||
},
|
||||
"full": {
|
||||
"duration_us": "6020429212246",
|
||||
"transitions": 143
|
||||
"transitions": "143"
|
||||
},
|
||||
"syncing": {
|
||||
"duration_us": "413813232",
|
||||
"transitions": 152
|
||||
"transitions": "152"
|
||||
},
|
||||
"tracking": {
|
||||
"duration_us": "266553605",
|
||||
"transitions": 152
|
||||
"transitions": "152"
|
||||
}
|
||||
},
|
||||
"time": "2021-Aug-24 20:43:43.043406 UTC",
|
||||
@@ -224,23 +224,23 @@ Headers
|
||||
"state_accounting": {
|
||||
"connected": {
|
||||
"duration_us": "172799714",
|
||||
"transitions": 1
|
||||
"transitions": "1"
|
||||
},
|
||||
"disconnected": {
|
||||
"duration_us": "309059",
|
||||
"transitions": 1
|
||||
"transitions": "1"
|
||||
},
|
||||
"full": {
|
||||
"duration_us": "6020429212246",
|
||||
"transitions": 143
|
||||
"transitions": "143"
|
||||
},
|
||||
"syncing": {
|
||||
"duration_us": "413813232",
|
||||
"transitions": 152
|
||||
"transitions": "152"
|
||||
},
|
||||
"tracking": {
|
||||
"duration_us": "266553605",
|
||||
"transitions": 152
|
||||
"transitions": "152"
|
||||
}
|
||||
},
|
||||
"time": "2021-Aug-24 20:43:43.043406 UTC",
|
||||
|
||||
Reference in New Issue
Block a user