# Currencies and amounts

## Currency format

A currency is `XRP` or `CODE.issuer`, for example `USD.rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh`. `XRP` never has an issuer; every other currency needs one. The code is 3 letters or digits (A-Z, 0-9) or 40 hexadecimal digits and is upper-cased. The issuer must be a valid classic XRPL address (starts with `r`, 25 to 35 base58 characters, checksum verified); anything else is a 400 `invalid-parameters`.

Account addresses (for example on the account summary) follow the same rule.

## Amounts are strings

Amounts, prices and reserves travel as decimal strings, never as JSON numbers, so no precision is lost. Parse them with a decimal library, not a float. Request amounts (for example `amount` on the slippage endpoint) must also be positive decimal strings.

## Units

- Fees are in drops (1 XRP = 1,000,000 drops).
- Order book prices are in human units (XRP, not drops): `price` is `pays` per `gets`.
- `slippage_pct` is a percentage (`0.2` means 0.2 %).
- AMM `trading_fee` is a decimal fraction (`0.005` means 0.5 %).
