> For the complete documentation index, see [llms.txt](https://docs-unified.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-unified.crypto-chief.com/getting-started/amounts-and-money.md). Agents can also search and read this documentation through its [MCP server](https://docs-unified.crypto-chief.com/~gitbook/mcp).

# Amounts and Money

## Amounts and Money

### Amounts

Every quantity of an asset is an object of strings:

```json
{ "raw": "1234500", "decimals": 6, "scale": null, "value": "1.2345" }
```

| Field      | Type            | Meaning                                                                                                        |
| ---------- | --------------- | -------------------------------------------------------------------------------------------------------------- |
| `raw`      | string          | Integer in base units, always present. Never a JSON number                                                     |
| `decimals` | integer \| null | Decimal places of the asset; `null` for XRP Ledger issued currencies and for tokens whose decimals are unknown |
| `scale`    | integer \| null | Exponent of XRP Ledger issued currencies (`xrp_iou`), where `decimals` is `null`; `null` elsewhere             |
| `value`    | string \| null  | `raw` with `decimals` or `scale` applied, without trailing zeros; `null` when both are unknown                 |

`value` is `raw × 10^(−decimals)`, or `raw × 10^(−scale)` for issued currencies: `{"raw": "125", "decimals": null, "scale": 1}` is `12.5`, `{"raw": "1", "decimals": null, "scale": -3}` is `1000`.

Parse amounts as decimal strings or big integers. A number that passes through a floating-point parser has been rounded.

#### Base units

| Family     | Native base unit                                                   |
| ---------- | ------------------------------------------------------------------ |
| EVM        | wei, 10⁻¹⁸                                                         |
| TRON       | sun, 10⁻⁶ TRX                                                      |
| Solana     | lamport, 10⁻⁹ SOL                                                  |
| TON        | nanoton, 10⁻⁹ GRAM                                                 |
| XRP Ledger | drop, 10⁻⁶ XRP                                                     |
| UTXO       | satoshi (and the litoshi and koinu of Litecoin and Dogecoin), 10⁻⁸ |

A token's base unit is 10^(−decimals) of the token.

#### Signs

Transfer amounts are never negative. **Balances** use a signed `raw` (`SignedAmount`): an XRP Ledger trust line held by its issuer is an obligation and has a negative `raw`. Every other balance is zero or positive.

#### Locked balances

A balance may carry `locked`, an `Amount` that is part of `amount` and cannot be spent freely: frozen TRX on TRON, the account reserve on XRP Ledger. `locked` is `null` where there is nothing locked.

### Money

Fiat values are added with `include=fiat` on balances, transfers, transactions and NFTs, in the currency of the `currency` parameter (`USD` by default):

```json
"quote":      { "currency": "USD", "unit_price": "0.9998", "as_of": "2026-11-29T10:00:00.000Z", "source": "exchange" },
"value_fiat": { "currency": "USD", "value": "1.23" }
```

| Field              | Meaning                                                                                                                                                                                                       |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `quote.unit_price` | Price of one unit of the asset, as a decimal string                                                                                                                                                           |
| `quote.as_of`      | Time of the price point used                                                                                                                                                                                  |
| `quote.source`     | `exchange` — exchange markets; `dex` — on-chain liquidity; `marketplace` — NFT marketplace listings; `onchain` — read from the ledger itself: what a transaction paid, or a sell offer recorded on the ledger |
| `quote.basis`      | NFTs only, absent for coins and tokens: `floor` — the lowest listing of the collection; `listing` — the best sell offer of this token; `sale` — what the transaction paid for this NFT                        |
| `value_fiat.value` | `amount.value × unit_price`, rounded to cents of the currency with banker's rounding                                                                                                                          |

* An asset is priced only when it is verified to be the instrument the price belongs to. Otherwise `quote` and `value_fiat` are `null` — never zero.
* **Transfers** are priced at the time of their block: `quote.as_of` is the price point closest to `block.timestamp`.
* **Balances** are priced now, or at `at` when the balance is read at a past time.
* **NFTs** are priced now by the floor of their collection or the best offer of the token; an **NFT transfer** only by the sale its transaction made. See [NFT prices](https://docs-unified.crypto-chief.com/api-reference/nfts.md#nft-prices).

#### Portfolio totals

[Balances of an address](https://docs-unified.crypto-chief.com/api-reference/balances.md) with `include=fiat` also return:

| Field            | Meaning                                                                    |
| ---------------- | -------------------------------------------------------------------------- |
| `total_fiat`     | Sum of `value_fiat` of the priced items, or `null` without `include=fiat`  |
| `priced_items`   | Items with a price                                                         |
| `unpriced_items` | Items without one                                                          |
| `complete`       | `true` when every requested network answered `ok` and every item is priced |

When `complete` is `false`, `total_fiat` is a lower bound: check `networks[]` for networks that failed and `unpriced_items` for assets without a price.

### Time

Times are ISO 8601 in UTC with milliseconds: `2026-11-29T10:00:00.000Z`. Parameters accept ISO 8601 or Unix seconds.
