# Currency Formats

The XRP Ledger has three kinds of digital asset: XRP, [tokens](/es-es/docs/concepts/tokens), and [Multi-purpose Tokens (MPTs)](/es-es/docs/concepts/tokens/fungible-tokens/multi-purpose-tokens). All three types have high precision, although their formats are different.

_Added by the [MPTokensV1 amendment](/resources/known-amendments#mptokensv1). (Enabled: 2025-10-01)_

## Comparison

The following table summarizes some of the differences between XRP, tokens, and MPTs in the XRP Ledger:

| XRP | Tokens | MPTs |
|  --- | --- | --- |
| Has no issuer. | Always issued by an XRP Ledger account. | Always issued by an XRP Ledger account. |
| Specified as a string. | Specified as an object. | Specified as an object. |
| Tracked in [accounts](/es-es/docs/references/protocol/ledger-data/ledger-entry-types/accountroot). | Tracked in [trust lines](/es-es/docs/references/protocol/ledger-data/ledger-entry-types/ripplestate). | Tracked in holder's account. |
| Can never be created; can only be destroyed. | Can be issued or redeemed freely. | Can be issued or redeemed freely. |
| Minimum value: `0`. (Cannot be negative.) | Minimum value: `-9999999999999999e80`. Minimum nonzero absolute value: `1000000000000000e-96`. | Minimum value: `0`. (Cannot be negative.) |
| Maximum value `100000000000` (1011) XRP. That's `100000000000000000` (1017) "drops". | Maximum value `9999999999999999e80`. | Maximum value `0x7FFFFFFFFFFFFFFF`. |
| Precise to the nearest "drop" (0.000001 XRP) | 15 decimal digits of precision. |  |
| Can't be [frozen](/es-es/docs/concepts/tokens/fungible-tokens/freezes). | The issuer can [freeze](/es-es/docs/concepts/tokens/fungible-tokens/freezes) balances. | The issuer can lock balances individually and globally. |
| No transfer fees; XRP-to-XRP payments are always direct. | Can take indirect [paths](/es-es/docs/concepts/tokens/fungible-tokens/paths) with each issuer charging a percentage [transfer fee](/es-es/docs/concepts/tokens/fungible-tokens/transfer-fees). | Can charge a transfer fee for secondary sales of the token. |
| Can be used in [Payment Channels](/es-es/docs/concepts/payment-types/payment-channels) and [Escrow](/es-es/docs/concepts/payment-types/escrow). | Not compatible with Payment Channels or Escrow. | Not compatible with Payment Channels or Escrow. |


See [What is XRP?](/es-es/docs/introduction/what-is-xrp), [Tokens](/es-es/docs/concepts/tokens), and [Multi-purpose Tokens](/es-es/docs/concepts/tokens/fungible-tokens/multi-purpose-tokens).

## Specifying Currency Amounts

Use the appropriate format for the type of currency you want to specify:

- [XRP Amounts](#xrp-amounts)
- [Token Amounts](#token-amounts)
- [MPT Amounts](#mpt-amounts)


### XRP Amounts

To specify an amount of XRP, use a [String Number](#string-numbers) indicating *drops* of XRP, where each drop is equal to 0.000001 XRP. For example, to specify 13.1 XRP:

```
"13100000"
```

**Do not specify XRP as an object.**

XRP amounts cannot be negative.

### Token Amounts

To specify an amount of a [(fungible) token](/es-es/docs/concepts/tokens), use an `Amount` object. Tokens use the `currency`, `value`, and `issuer` fields.

| `Field` | Type | Description |
|  --- | --- | --- |
| `currency` | String - [Currency Code](#currency-codes) | Arbitrary currency code for the token. Cannot be `XRP`. |
| `value` | [String Number](#string-numbers) | Quoted decimal representation of the amount of the token. This can include scientific notation, such as `1.23e11` meaning 123,000,000,000. Both `e` and `E` may be used. This can be negative when displaying balances, but negative values are disallowed in other contexts such as specifying how much to send. |
| `issuer` | String | Generally, the [account](/es-es/docs/concepts/accounts) that issues this token. In special cases, this can refer to the account that holds the token instead (for example, in a [Clawback](/es-es/docs/references/protocol/transactions/types/clawback) transaction). |


These field names are case-sensitive.

For example, to represent $153.75 US dollars issued by account `r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59`, you would specify:

```json
{
    "currency": "USD",
    "value": "153.75",
    "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59"
}
```

### MPT Amounts

Specify the amount of MPTs using the `value` field.

| `Field` | Type | Description |
|  --- | --- | --- |
| `mpt_issuance_id` | String | Arbitrary unique identifier for a Multi-purpose Token. |
| `value` | [String Number](#string-numbers) | A string representing a positive integer value.  Valid values for this field are between 0x0 and 0x7FFFFFFFFFFFFFFF. Use `AssetScale` to enable values as fractions of the MPT value. See [MPT Precision](#mpt-precision). |


For example, to specify 1 million units of an MPT you would specify:

```json
{
    "mpt_issuance_id": 
	     "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47",
    "value": "1000000"
}
```

### Specifying Without Amounts

In some cases, you need to define an asset (which could be XRP or a token) without a specific amount, such as when defining an order book in the [decentralized exchange](/es-es/docs/concepts/tokens/decentralized-exchange).

To describe a token without an amount, specify it as a currency object, but omit the `value` field. For example:

```json
{
  "currency": "TST",
  "issuer": "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd"
}
```

To describe XRP without an amount, specify it as a JSON object with *only* a `currency` field. Never include an `issuer` field for XRP. For example:

```json
{
  "currency": "XRP"
}
```

To describe an MPT without an amount, specify it as a JSON object with *only* a `mpt_issuance_id` field. For example:

```json
{
  "mpt_issuance_id": "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47"
}
```

## String Numbers

XRP Ledger APIs generally use strings, rather than native JSON numbers, to represent numeric amounts of currency for both [XRP](/es-es/docs/introduction/what-is-xrp) and [tokens](/es-es/docs/concepts/tokens). This protects against a loss of precision when using JSON parsers, which may automatically try to represent all JSON numbers in a floating-point format. Within the String value, the numbers are serialized in the same way as native JSON numbers:

* Base-10.
* Non-zero-prefaced.
* May contain `.` as a decimal point. For example, ½ is represented as `0.5`. (American style, not European)
* Negative amounts start with the character `-`.
* May contain `E` or `e` to indicate being raised to a power of 10 (scientific notation). For example, `1.2E5` is equivalent to 1.2×105, or `120000`. Negative exponents are also possible.
* No comma (`,`) characters are used.


## XRP Precision

XRP has the same precision as a 64-bit unsigned integer where each unit is equivalent to 0.000001 XRP. It uses integer math, so that any amount less than a full drop is rounded down.

## Token Precision

Tokens can represent a wide variety of assets, including those typically measured in very small or very large denominations. This format uses significant digits and a power-of-ten exponent in a similar way to scientific notation. The format supports positive and negative significant digits and exponents within the specified range. Unlike typical floating-point representations of non-whole numbers, this format uses integer math for all calculations, so it always maintains 15 decimal digits of precision. Multiplication and division have adjustments to compensate for over-rounding in the least significant digits.

When sending token amounts in the XRP Ledger's peer-to-peer network, servers [serialize](/es-es/docs/references/protocol/binary-format) the amount to a 64-bit binary value.

For tokens that should not be divisible at all, see [Non-Fungible Tokens (NFTs)](/es-es/docs/concepts/tokens/nfts).

## MPT Precision

MPTs are always expressed in whole integers. You can change the `AssetScale` of your MPT to express the basic unit as a fraction of an MPT. The XRP Ledger doesn't use the `AssetScale` on-chain: this is for your convenience in specifying the basic unit.

For example, to express a value of 13.1 MPT, the MPT would require that the `AssetScale` be set to 1, and the `value` of the MPT set to 131.

```json
   "Amount": {
      "mpt_issuance_id":
        "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47",
      "value": "131"
    }
```

## Currency Codes

The [HTTP / WebSocket APIs](/es-es/docs/references/http-websocket-apis) support two formats of currency code:

- **[Standard Currency Codes](/es-es/docs/references/protocol/data-types/currency-formats#standard-currency-codes):** As a 3-character string such as `"EUR"` or `"USD"`.
- **[Nonstandard Currency Codes](/es-es/docs/references/protocol/data-types/currency-formats#nonstandard-currency-codes):** As a 160-bit hexadecimal string, such as `"444F4C4C415259444F4F00000000000000000000"`.


Tokens with the same code can [ripple](/es-es/docs/concepts/tokens/fungible-tokens/rippling) across connected trust lines. Currency codes have no other behavior built into the XRP Ledger.

### Standard Currency Codes

The standard format for currency codes is a three-character string such as `USD`. This is intended for use with [ISO 4217 Currency Codes](https://www.xe.com/iso4217.php). The following rules apply:

- Currency codes must be exactly 3 ASCII characters in length. The following characters are permitted: all uppercase and lowercase letters, digits, as well as the symbols `?`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `<`, `>`, `(`, `)`, `{`, `}`, `[`, `]`, and |.
- Currency codes are case-sensitive.
- The currency code `XRP` (all-uppercase) is disallowed. Real XRP typically does not use a currency code in the XRP Ledger protocol.


At the protocol level, this format is [serialized](/es-es/docs/references/protocol/binary-format#currency-codes) into a 160-bit binary value starting with `0x00`.

### Nonstandard Currency Codes

You can also use a 160-bit (40-character) hexadecimal string as the currency code. For example:
`444F4C4C415259444F4F00000000000000000000`

The token `RLUSD` is represented as:

`524C555344000000000000000000000000000000`

When creating a TrustSet or Payment transaction, use the hexadecimal value in the `currency` field.

#### Nonstandard Currency Code Considerations

When using or reading a nonstandard currency code, consider the following:

- Most interfaces that read currency codes convert nonstandard codes to ASCII when possible.
- Not all hexadecimal currency codes have a human-readable representation. See [Normalize Currency Codes](https://github.com/XRPLF/xrpl-dev-portal/tree/master/_code-samples/normalize-currency-codes).
- If you decode a nonstandard currency code as ASCII or UTF-8, it may contain non-printing characters or characters that are interpreted as markup when displayed.
- Be aware of "lookalike" currency codes that may display as XRP or another asset even though they represent a different currency.


For compatibility with some APIs, also note that the first 8 bits of a nonstandard currency code SHOULD NOT begin with `0x00`. At the protocol level, nonstandard currency codes *may* begin with `0x00`; however, some APIs may interpret codes beginning with `0x00` as standard currency codes and may not handle them correctly.

**Deprecated:** Some previous versions of [ripple-lib](https://github.com/XRPLF/xrpl.js) supported an "interest-bearing" or "demurraging" currency code type, such as `015841551A748AD2C1F76FF6ECB0CCCD00000000`. These codes have the first 8 bits `0x01`. Demurraging or interest-bearing currencies are no longer supported, but you may find them in historical ledger data. For more information, see [Demurrage](/es-es/docs/concepts/tokens/fungible-tokens/demurrage).