> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nxos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Assets and amounts

> How the API represents currencies, amounts, and precision.

## Assets

An asset is a currency or token that can be held, traded, and paid out. Each asset has a **code** (uppercase identifier) and a **scale** (number of decimal places).

| Code   | Type       | Scale | Example amount |
| ------ | ---------- | ----- | -------------- |
| `USD`  | Fiat       | 2     | `"10.50"`      |
| `EUR`  | Fiat       | 2     | `"100.00"`     |
| `USDC` | Stablecoin | 6     | `"10.500000"`  |
| `USDT` | Stablecoin | 6     | `"99.970000"`  |

Asset codes appear throughout the API — in quote requests (`fromAsset`, `toAsset`), payout bodies (`asset`), and balance responses.

## Amounts

All monetary amounts are **strings in major units** — the human-readable form of the currency. Ten US dollars is `"10.50"`, not `1000` or `10.5`.

```json theme={null}
{
  "amount": "10.50",
  "asset": "USD"
}
```

Amounts are always returned at the asset's **native precision**. A USD amount always has 2 decimal places; a USDC amount always has 6. This makes responses predictable — you never need to guess how many decimals to expect.

### Why strings?

JSON has no decimal type. A JSON number like `10.50` may lose its trailing zero when parsed, and large values can exceed the precision of IEEE 754 floating-point numbers. Strings preserve the exact representation.

<Warning>
  Parse amounts as arbitrary-precision decimals (e.g., `BigDecimal` in Java, `Decimal` in Python, `big.js` in JavaScript). Floating-point arithmetic introduces rounding errors that accumulate in financial calculations.
</Warning>

## Precision rules

When sending amounts to the API (e.g., in quote requests or payout bodies), provide them in major units as strings. The API validates that:

1. The value is a valid decimal string
2. The number of decimal places does not exceed the asset's scale

Amounts with too many decimal places are rejected with a `validation_error`.
