[EN] fix oracle document

This commit is contained in:
tequ
2024-09-23 15:19:56 +09:00
parent 21227d816d
commit 4fd365d54a
2 changed files with 7 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ A price oracle object can store information for up to 10 token pairs.
| Field | JSON Type | Internal Type | Required? | Description |
|---------------------|-----------|---------------|-----------|-------------|
| `Owner` | String | AccountID | Yes | The XRPL account with update and delete privileges for the oracle. It's recommended to set up [multi-signing](https://xrpl.org/set-up-multi-signing.html) on this account. |
| `Owner` | String | AccountID | Yes | The XRPL account with update and delete privileges for the oracle. It's recommended to set up [multi-signing](../../../../tutorials/how-tos/manage-account-settings/set-up-multi-signing) on this account. |
| `Provider` | String | Blob | Yes | An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or DIA. This field is a string, up to 256 ASCII hex encoded characters (0x20-0x7E). |
| `PriceDataSeries` | Array | Array | Yes | An array of up to 10 `PriceData` objects, each representing the price information for a token pair. More than five `PriceData` objects require two owner reserves. |
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, represented in Unix time. |
@@ -65,7 +65,7 @@ A price oracle object can store information for up to 10 token pairs.
## Oracle Reserve
An `Oracle` object counts as one item for purposes of the [owner reserve](/docs/concepts/accounts/reserves.md#base-reserve-and-owner-reserve) if it contains one to five `PriceData` objects, and counts as two items if it contains six to ten `PriceData` objects.
An `Oracle` object counts as one item for purposes of the [owner reserve](../../../../concepts/accounts/reserves.md#base-reserve-and-owner-reserve) if it contains one to five `PriceData` objects, and counts as two items if it contains six to ten `PriceData` objects.
## Oracle ID Format

View File

@@ -11,7 +11,7 @@ _(Requires the [PriceOracle amendment][] {% not-enabled /%})_
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/SetOracle.cpp "Source")
Creates a new `Oracle` ledger entry or updates the fields of an existing one, using the Oracle ID.
Creates a new `Oracle` ledger entry or updates the fields of an existing one, using the Oracle Document ID.
## Example OracleSet JSON
@@ -52,13 +52,13 @@ Creates a new `Oracle` ledger entry or updates the fields of an existing one, us
### PriceData Fields
| `LastUpdateTime` | Number | UInt32 | Yes | The time the data was last updated, in [seconds since the Ripple Epoch][]. |
| Field | JSON Type | Internal Type | Required? | Description |
|---------------------|-----------|---------------|-----------|-------------|
| `BaseAsset` | String | Currency | Yes | The primary asset in a trading pair. Any valid identifier, such as a stock symbol, bond CUSIP, or currency code is allowed. For example, in the BTC/USD pair, BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset. |
| `QuoteAsset` | String | Currency | Yes | The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. For example, in the BTC/USD pair, BTC is the base asset; in 912810RR9/BTC, 912810RR9 is the base asset. |
| `AssetPrice` | Number | UInt64 | No | The asset price after applying the `Scale` precision level. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair. |
| `Scale` | Number | UInt8 | No | The scaling factor to apply to an asset price. For example, if `Scale` is 6 and original price is 0.155, then the scaled price is 155000. Valid scale ranges are 0-10. It's not included if the last update transaction didn't include the `BaseAsset`/`QuoteAsset` pair.|
| `QuoteAsset` | String | Currency | Yes | The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. For example, in the BTC/USD pair, USD is the quote asset; in 912810RR9/BTC, BTC is the quote asset. |
| `AssetPrice` | Number | UInt64 | No | The asset price after applying the `Scale` precision level. If it is not included, the PriceData object will be deleted. |
| `Scale` | Number | UInt8 | No | The scaling factor to apply to an asset price. For example, if `Scale` is 6 and original price is 0.155, then the scaled price is 155000. Valid scale ranges are 0-10. The default value is 0. |
`PriceData` is created or updated, following these rules: