mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-28 07:35:50 +00:00
rippled - XRP format clarifications
This commit is contained in:
@@ -343,7 +343,13 @@ Some API methods require you to specify an amount of currency. Depending on whet
|
||||
|
||||
#### XRP ####
|
||||
|
||||
Amounts of XRP are represented as strings. (JSON integers are limited to 32 bits, so integer overflows are possible.) XRP is formally specified in "drops", which are equivalent to 0.000001 (one 1-millionth) of an XRP each. Thus, to represent 1.0 XRP in a JSON document, you would write `"1000000"`.
|
||||
Amounts of XRP are represented as strings. (JSON integers are limited to 32 bits, so integer overflows are possible.) XRP is formally specified in "drops", which are equivalent to 0.000001 (one 1-millionth) of an XRP each. Thus, to represent 1.0 XRP in a JSON document, you would write:
|
||||
|
||||
```
|
||||
"1000000"
|
||||
```
|
||||
|
||||
**Do not specify XRP as an object.**
|
||||
|
||||
Unit tests are permitted to submit values of XRP (not drops) with a decimal point - for example, "1.23" meaning 1.23 XRP. All other cases should always specify XRP in drops, with no decimal point: e.g. "1230000" meaning 1.23 XRP.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user