Skip to content

Commit 3eb9131

Browse files
authored
Merge pull request #2786 from XRPLF/oracle-fixes
clarify decimal input and hexadecimal api response
2 parents 30fc1f5 + e520211 commit 3eb9131

File tree

4 files changed

+4
-239
lines changed
  • @i18n/ja/docs/references/http-websocket-apis/public-api-methods
  • docs/references/protocol

4 files changed

+4
-239
lines changed

@i18n/ja/docs/references/http-websocket-apis/public-api-methods/clio-methods/version.md

Lines changed: 0 additions & 111 deletions
This file was deleted.

@i18n/ja/docs/references/http-websocket-apis/public-api-methods/server-info-methods/version.md

Lines changed: 0 additions & 124 deletions
This file was deleted.

docs/references/protocol/ledger-data/ledger-entry-types/oracle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ A price oracle object can store information for up to 10 token pairs.
5959
|---------------------|-----------|---------------|-----------|-------------|
6060
| `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. |
6161
| `QuoteAsset` | String | Currency | Yes | The quote asset in a trading pair. The quote asset denotes the price of one unit of the base asset. |
62-
| `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. |
62+
| `AssetPrice` | String | 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. Displayed in hexadecimal format. |
6363
| `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. |
6464

6565

docs/references/protocol/transactions/types/oracleset.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Creates a new `Oracle` ledger entry or updates the fields of an existing one, us
5555
| Field | JSON Type | Internal Type | Required? | Description |
5656
|---------------------|-----------|---------------|-----------|-------------|
5757
| `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. |
58-
| `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. |
59-
| `AssetPrice` | Number | UInt64 | No | The asset price after applying the `Scale` precision level. If it is not included, the PriceData object will be deleted. |
60-
| `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. |
58+
| `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. |
59+
| `AssetPrice` | String | 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. It's recommended you provide this value as a hexadecimal, but [client libraries](https://xrpl.org/docs/references#client-libraries) will accept decimal numbers and convert to hexadecimal strings. |
60+
| `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.|
6161

6262
`PriceData` is created or updated, following these rules:
6363

0 commit comments

Comments
 (0)