# Currencies

import { Badge } from "zudoku/ui/Badge";
import { Callout } from "zudoku/ui/Callout";

## Currencies

The Currencies resource lists all fiat and digital assets supported by the platform.

### Overview

Use `GET /v1/currencies` to retrieve supported currency definitions, including their decimal precision, blockchain network, and custody provider.

<Callout type="info" title="Precision">
  Identify a currency definition by `(key, network, provider)`. The same currency
  can have different precision at a bank, on a network, or with a custody provider.
</Callout>

### Currency Types

- <Badge>Fiat</Badge> Traditional currencies like USD.
- <Badge variant="secondary">Stablecoins</Badge> Digital assets pegged to fiat currencies (e.g., USDC, USDT).

### Data Model

Each currency object includes:

- `key`: The currency symbol (e.g., `USD`, `USDC`).
- `name`: Display name (e.g., `USD`, `Circle USD`).
- `decimals`: Number of decimal places for this key, network, and provider combination.
- `network`: The blockchain network, or `null` for balances held off-chain, including stablecoins held with a custody provider.
- `provider`: For example, `circle_mint` or `openfx`; `null` for a network currency or default fiat definition.

For example:

| `key` | `network` | `provider` | `decimals` |
| --- | --- | --- | --- |
| `USD` | `null` | `null` | 2 |
| `USD` | `null` | `openfx` | 2 |
| `USDC` | `null` | `circle_mint` | 6 |
| `USDC` | `BASE` | `null` | 6 |
| `USDC` | `STELLAR` | `null` | 7 |

For a wallet asset, match its currency and network with `provider: null`. For a ledger asset, match its currency and account provider with `network: null`. Account responses use uppercase providers such as `OPENFX`; match them to the lowercase currency provider `openfx`. A bank uses the default fiat definition, where both `network` and `provider` are `null`.

### Amounts in API Responses

Account balances, treasury balances, transfer amounts, and webhook amounts are decimal strings in currency units. For example, `"1.25"` USD represents that many US dollars. Amounts are already formatted using the relevant precision; trailing zeroes may be omitted, so one unit can be returned as `"1"`.

Aggregated treasury balances preserve the precision of the balances being combined. Use decimal arithmetic when processing these strings to retain all returned digits.

See the [API Reference](/api#tag/Currencies) for the full list.
