mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-03 01:55:51 +00:00
Restore previous AMM docs
This commit is contained in:
@@ -7,7 +7,7 @@ labels:
|
||||
- Data Retention
|
||||
---
|
||||
# ledger_entry
|
||||
[[Source]](https://github.com/xrplf/rippled/blob/master/src/ripple/rpc/handlers/LedgerEntry.cpp "Source")
|
||||
[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/LedgerEntry.cpp "Source")
|
||||
|
||||
The `ledger_entry` method returns a single ledger object from the XRP Ledger in its raw format. See [ledger format][] for information on the different types of objects you can retrieve.
|
||||
|
||||
@@ -31,6 +31,7 @@ In addition to the general fields above, you must specify *exactly 1* of the fol
|
||||
|
||||
- [`index`](#get-ledger-object-by-id)
|
||||
- [`account_root`](#get-accountroot-object)
|
||||
- [`amm`](#get-amm-object) :not_enabled:
|
||||
- [`directory`](#get-directorynode-object)
|
||||
- [`offer`](#get-offer-object)
|
||||
- [`ripple_state`](#get-ripplestate-object)
|
||||
@@ -144,6 +145,73 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59
|
||||
|
||||
|
||||
|
||||
### Get AMM Object
|
||||
|
||||
_(Automated Market Maker (AMM) functionality is part of the proposed [XLS-30d](https://github.com/XRPLF/XRPL-Standards/discussions/78) extension :not_enabled: to the XRP Ledger protocol. You can use these features on AMM test networks, but there isn't an official amendment and they aren't available on the production Mainnet.)_
|
||||
|
||||
Retrieve an Automated Market-Maker (AMM) object from the ledger. This is similar to [amm_info method][], but the `ledger_entry` version returns only the ledger entry as stored.
|
||||
|
||||
| Field | Type | Description |
|
||||
|:-------------|:-----------------|:----------------------|
|
||||
| `amm` | Object or String | The [AMM](amm.html) to retrieve. If you specify a string, it must be the [object ID](ledger-object-ids.html) of the AMM, as hexadecimal. If you specify an object, it must contain `asset` and `asset2` sub-fields. |
|
||||
| `amm.asset` | Object | One of the two assets in this AMM's pool, as a [currency object without an amount](currency-formats.html#specifying-without-amounts). |
|
||||
| `amm.asset2` | Object | The other of the two assets in this AMM's pool, as a [currency object without an amount](currency-formats.html#specifying-without-amounts). |
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
*WebSocket*
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 3,
|
||||
"command": "ledger_entry",
|
||||
"amm": {
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency" : "TST",
|
||||
"issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
}
|
||||
}
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
```
|
||||
|
||||
*JSON-RPC*
|
||||
|
||||
```json
|
||||
{
|
||||
"method": "ledger_entry",
|
||||
"params": [
|
||||
{
|
||||
"amm": {
|
||||
"asset": {
|
||||
"currency": "XRP"
|
||||
},
|
||||
"asset2": {
|
||||
"currency" : "TST",
|
||||
"issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
|
||||
}
|
||||
},
|
||||
"ledger_index": "validated"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
*Commandline*
|
||||
|
||||
```sh
|
||||
rippled json ledger_entry '{ "amm": { "asset": { "currency": "XRP" }, "asset2": { "currency" : "TST", "issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd" } }, "ledger_index": "validated" }'
|
||||
```
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
[Try it! >](websocket-api-tool.html?server=wss%3A%2F%2Famm.devnet.rippletest.net%3A51233%2F#ledger_entry-amm)
|
||||
|
||||
|
||||
|
||||
### Get DirectoryNode Object
|
||||
|
||||
Retrieve a [DirectoryNode](directorynode.html), which contains a list of other ledger objects. Can be provided as string (object ID of the Directory) or as an object.
|
||||
@@ -206,9 +274,9 @@ Retrieve an [Offer object](offer.html), which defines an offer to exchange curre
|
||||
|
||||
| Field | Type | Description |
|
||||
|:------------------------|:---------------------------|:----------------------|
|
||||
| `offer` | Object or String | The [Offer object](offer.html) to retrieve. If a string, interpret as the Offer's [ledger entry ID](ledger-object-ids.html). If an object, requires the sub-fields `account` and `seq` to uniquely identify the offer. |
|
||||
| `offer` | Object or String | The [Offer object](offer.html) to retrieve. If a string, interpret as the [unique object ID](ledgers.html#tree-format) to the Offer. If an object, requires the sub-fields `account` and `seq` to uniquely identify the offer. |
|
||||
| `offer.account` | String - [Address][] | _(Required if `offer` is specified as an object)_ The account that placed the offer. |
|
||||
| `offer.seq` | Unsigned Integer | _(Required if `offer` is specified as an object)_ The [Sequence Number][] of the transaction that created the Offer entry. |
|
||||
| `offer.seq` | Unsigned Integer | _(Required if `offer` is specified as an object)_ The [Sequence Number][] of the transaction that created the Offer object. |
|
||||
|
||||
<!-- MULTICODE_BLOCK_START -->
|
||||
|
||||
@@ -564,7 +632,7 @@ rippled json ledger_entry '{ "ticket": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJ
|
||||
|
||||
Return an NFT Page in its raw ledger format.
|
||||
|
||||
| Field | Type | Description |
|
||||
| `Field` | Type | Description |
|
||||
|:------------------------|:---------------------------|:----------------------|
|
||||
| `nft_page` | String | The [object ID](ledger-object-ids.html) of an [NFT Page](nftokenpage.html) to retrieve. |
|
||||
|
||||
|
||||
@@ -0,0 +1,260 @@
|
||||
---
|
||||
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/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/AMMInfo.cpp "Source")
|
||||
|
||||
`{{currentpage.name}}` メソッドは、自動マーケットメーカー(AMM)インスタンスに関する情報を取得します。
|
||||
|
||||
_([AMM amendment][] :not_enabled:が必要。)_
|
||||
|
||||
|
||||
### リクエストのフォーマット
|
||||
|
||||
リクエストの例
|
||||
|
||||
{% 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' %}
|
||||
@@ -0,0 +1,259 @@
|
||||
---
|
||||
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/XRPLF/rippled/blob/master/src/ripple/rpc/handlers/AMMInfo.cpp "Source")
|
||||
|
||||
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' %}
|
||||
@@ -5,9 +5,9 @@ blurb: パブリックAPIメソッドを使用して、rippledサーバーと直
|
||||
labels:
|
||||
- コアサーバー
|
||||
top_nav_grouping: 人気ページ
|
||||
top_nav_name: パブリックAPIのメソッド
|
||||
top_nav_name: APIのメソッド
|
||||
---
|
||||
# パブリックAPIのメソッド
|
||||
# rippledのパブリックメソッド
|
||||
|
||||
以下のパブリックAPIメソッドを使用して、[XRP Ledgerサーバー](xrpl-servers.html)と直接通信します。パブリックメソッドは必ずしも一般大衆向けに設計されたのではありませんが、サーバーに接続されたあらゆるクライアントが使用します。パブリックメソッドは、サーバーを運用している組織のメンバーまたは顧客向けのものと考えてください。
|
||||
|
||||
@@ -43,9 +43,9 @@ XRP Ledgerのアカウントとは、XRPの保有者と取引の送信者を意
|
||||
トランザクションだけが、XRP Ledgerの共有されている状態を変更できます。XRP Ledgerに対するすべてのビジネスはトランザクションの形態をとります。以下のメソッドを使用して、トランザクションを処理します。
|
||||
|
||||
* **[`sign`](sign.html)** - トランザクションに暗号で署名します。
|
||||
* **[`sign_for`](sign_for.html)** - マルチシグに署名を提供します。
|
||||
* **[`sign_for`](sign_for.html)** - マルチ署名に署名を提供します。
|
||||
* **[`submit`](submit.html)** - トランザクションをネットワークに送信します。
|
||||
* **[`submit_multisigned`](submit_multisigned.html)** - マルチシグトランザクションをネットワークに送信します。
|
||||
* **[`submit_multisigned`](submit_multisigned.html)** - マルチ署名済みトランザクションをネットワークに送信します。
|
||||
* **[`transaction_entry`](transaction_entry.html)** - レジャーの特定のバージョンからトランザクションについての情報を取得します。
|
||||
* **[`tx`](tx.html)** - 手元にあるすべてのレジャーからトランザクションについての情報を取得します。
|
||||
* **[`tx_history`](tx_history.html)** - 最新の全トランザクションについての情報を取得します。
|
||||
@@ -55,6 +55,7 @@ XRP Ledgerのアカウントとは、XRPの保有者と取引の送信者を意
|
||||
|
||||
パスは、支払いが送信者から受信者に届くまでに中間ステップでたどる道筋を定義します。パスは、送信者と受信者をオーダーブックを介してつなぐことで、複数通貨間の支払いを可能にします。パスと他のオーダーブックに関しては、以下のメソッドを使用します。
|
||||
|
||||
* **[`amm_info`](amm_info.html)** :not_enabled: - 自動マーケットメイカー(AMM)についての情報を取得します。
|
||||
* **[`book_offers`](book_offers.html)** - 2つの通貨を交換するオファーに関する情報を取得します。
|
||||
* **[`deposit_authorized`](deposit_authorized.html)** - あるアカウントが別のアカウントへの支払いの直接送信について承認されているかどうかを調べます。
|
||||
* **[`nft_buy_offers`](nft_buy_offers.html)** - Retrieve a list of buy offers for a specified NFToken object.
|
||||
|
||||
@@ -59,6 +59,7 @@ By default, the following methods are [admin-only](admin-api-methods.html). They
|
||||
|
||||
Paths define a way for payments to flow through intermediary steps on their way from sender to receiver. Paths enable cross-currency payments by connecting sender and receiver through order books. Use these methods to work with paths and other books.
|
||||
|
||||
* **[`amm_info`](amm_info.html)** :not_enabled: - Get info about an Automated Market Maker (AMM).
|
||||
* **[`book_offers`](book_offers.html)** - Get info about offers to exchange two currencies.
|
||||
* **[`deposit_authorized`](deposit_authorized.html)** - Look up whether one account is authorized to send payments directly to another. <!-- STYLE_OVERRIDE: is authorized to -->
|
||||
* **[`nft_buy_offers`](nft_buy_offers.html)** - Retrieve a list of buy offers for a specified NFToken object.
|
||||
@@ -98,7 +99,6 @@ Use these methods to retrieve information using Clio server APIs.
|
||||
|
||||
* **[`server_info`](server_info-clio.html)** - Retrieve status of the Clio server.
|
||||
* **[`ledger`](ledger-clio.html)** - Get info about a ledger version using Clio server's `ledger` API.
|
||||
* **[`nft_history`](nft_history.html)** - Retrieve transaction history for the specified NFT using Clio server's `nft_history` API.
|
||||
* **[`nft_info`](nft_info.html)** - Retrieve information about the specified NFT using Clio server's `nft_info` API.
|
||||
|
||||
## [Utility Methods](utility-methods.html)
|
||||
|
||||
Reference in New Issue
Block a user