---
url: /topics/money.md
---
# Money

The Quarzo API represents each Money value with two fields:

```json
{
  "amount": "10050",
  "currency": "EUR"
}
```

This value represents €100.50.

The API, the webhooks, the SDK and the MCP tools use this format, in requests and in responses.

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `amount` | string | An integer amount in the minor unit of the currency. |
| `currency` | string | An uppercase ISO 4217 currency code that Quarzo supports. |

The API sends `amount` as text so that clients can keep exact values.
Do not convert a large `amount` to a JavaScript `number`.

## Minor unit

The minor unit is the smallest unit of a currency. For `EUR`, the minor unit is the cent.

The ISO 4217 exponent of the currency gives the number of decimal places. The Money value has no `scale` field.

Use this rule to read a Money value:

```text
decimal value = amount / 10^exponent
```

For `amount = "10050"` and `currency = "EUR"`, the exponent is `2` and the result is `100.50`.

## Supported currencies

| Currency | Exponent | Minor unit | Example | Decimal value |
| --- | --- | --- | --- | --- |
| `EUR` | `2` | cent | `{ "amount": "1000", "currency": "EUR" }` | €10.00 |
| `USD` | `2` | cent | `{ "amount": "1000", "currency": "USD" }` | $10.00 |

The API refuses a currency that is not in this table.

## Format of the amount

The `amount` field is a string that matches this pattern:

```text
^(0|-?[1-9][0-9]*)$
```

* `"0"` is zero.
* `"1000"` is a positive amount.
* `"-1000"` is a negative amount. Only the fields that permit a negative value contain it.

The `amount` field does not contain these items:

* a decimal point
* a `+` sign
* a leading zero
* a space
* an `n` suffix

## Requests

The API accepts only this format. A request field that must be greater than zero refuses `"0"` and a negative amount.

The API returns `400` with the code `parameter_invalid` for each of these values:

```json
{ "amount": 10050, "currency": "EUR" }
```

The amount is a JSON number.

```json
{ "amount": "100.50", "currency": "EUR" }
```

The amount has a decimal point.

```json
{ "amount": "10050", "currency": "EUR", "scale": 2 }
```

The value has a `scale` field.

```json
{ "value": 10050, "currency": "EUR" }
```

The value uses the former `value` field.

## Client handling

Keep `amount` as text until you use an exact integer or decimal library.

Use the exponent of the currency for the decimal placement when you format a value.

Do not use floating-point arithmetic for Money values.

## Values that are not Money

A value with more decimal places than its currency is not a Money value. A number of shares is an example: see [Shares](/topics/shares). The price of one share is a second example: see [NAV](/topics/nav).
