Amounts, currencies and precision
For engineers moving money through the Quant Flow Platform API. How amounts are written, how currency precision is enforced, how token decimals relate to currency units, and how balances are reported.
Who this is for
Integration engineers mapping amounts between a core banking system and the platform, and reviewers checking that no value is rounded or corrupted in transit.
Amounts are decimal strings in currency units
Every money amount on the token operation, account and balance endpoints is a decimal string in currency units. "10.50" is ten pounds fifty. It is never a floating-point number, and never an integer count of minor units.
On POST /api/transactions, amount:
- must be greater than zero;
- has at most 60 digits before the decimal point;
- matches the pattern
^[0-9]{1,60}(\.[0-9]{1,18})?$, so no sign, no exponent, no thousands separator; - must be no finer than the currency's minor unit.
Send the amount as a JSON string. A JSON number is accepted but is not the supported form. A client whose JSON library holds numbers as doubles can corrupt the value before it is sent. Keep amounts as strings or a decimal type end to end, from your ledger to the request body.
Currency precision
The platform enforces the currency's own minor unit, taken from ISO 4217:
| Currency | Minor unit | Accepted | Rejected |
|---|---|---|---|
GBP | 2 decimal places | "10.50", "10.5", "10" | "10.505" |
JPY | 0 decimal places | "1200" | "1200.5" |
BHD | 3 decimal places | "10.505" | "10.5055" |
Amounts finer than the minor unit are rejected. The platform does not round. "10.505" in sterling returns 400 with the message Amount '10.505' has 3 decimal places, while GBP allows only 2. Round in your own system, under your own rounding policy, before you submit.
Assets and currency codes
assetId names the asset an operation is denominated in.
- On
POST /api/transactions, anassetIdthat is not a recognised ISO 4217 currency code is a400. assetIdis case-insensitive and at most 16 characters.- The asset must have an
ACTIVEtoken contract registered withPOST /api/contracts.
Use only assets with an active contract and custody configuration in your organisation. Read the registered contracts before provisioning; a currency used in an example does not establish support in your deployment.
Token decimals
Every token deployed by POST /api/contracts has 18 decimals, recorded by the platform. The deployment request does not take a decimals field. This precision converts a currency-unit amount to token base units; it does not change the permitted ISO 4217 precision of that amount.
For example, submit "10.50" for GBP, not base units. The currency accepts two decimal places even though its token has 18. See Instruments and tokenised deposits for the deployment body and the signing-address prerequisites.
Amounts in responses
| Where | Format |
|---|---|
amount on an operation | Decimal string in currency units, written to the currency's own number of decimal places. An older amount may carry more places, and is returned exactly as stored. |
total, available, locked on a balance | Decimal strings in currency units, reported exactly as the token contract holds them. Not rounded. They can carry more decimal places than the currency allows. |
params values on an operation | Every value is returned as a string. |
Handle more decimal places than the currency allows when reading balances. Do not assume a balance fits the currency's minor unit.
Balance arithmetic
Within one balance response, available is exactly total less locked, and not below zero. The three figures come from one read of the token contract and are consistent with one another. asOf is the moment of that read.
total includes only settled operations. An accepted operation that has not yet confirmed does not change any balance. See Balances.
Other numeric fields
paramson an operation. Values must be scalar: a string, a boolean or a whole number. A fractional number is rejected. Send large integers as strings.- Reserve attestation.
GET /api/reserves/attestationreturnsreserveandoutstandingas JSON numbers in major currency units, andratioas a percentage to four decimal places. The figures are currently static. See Limitations.
Reserve attestation currently uses JSON numbers. Treat that response separately from the decimal-string amounts on transaction and balance endpoints; do not assume a future format change.
Worked example
Mint ten pounds fifty.
POST /api/transactions HTTP/1.1
Host: api.qfp.quantnetwork.net
Authorization: Bearer eyJraWQiOiJ...
API-Version: 1.0.0
Content-Type: application/json
Idempotency-Key: 7f1c2d9e-4b3a-4c8e-9f10-2a6b5d8c3e41
{
"txType": "MINT",
"assetId": "GBP",
"accountRef": "ACC-0001",
"amount": "10.50"
}HTTP/1.1 202 Accepted
Content-Type: application/json
{
"transactionId": "3f7c1a90-5d2e-4b08-9a41-6c2b8e5d7f13",
"txType": "MINT",
"assetId": "GBP",
"accountRef": "ACC-0001",
"customerRef": "CUST-0001",
"counterpartyRef": null,
"amount": "10.50",
"params": {},
"state": "POLICY_PENDING",
"createdAt": "2026-08-06T09:29:10.285Z",
"updatedAt": "2026-08-06T09:29:10.285Z"
}The balance does not change until the operation reaches CONFIRMED. A later balance read returns, for example:
GET /api/accounts/ACC-0001/balances HTTP/1.1
Host: api.qfp.quantnetwork.net
Authorization: Bearer eyJraWQiOiJ...
API-Version: 1.0.0HTTP/1.1 200 OK
Content-Type: application/json
{
"accountRef": "ACC-0001",
"customerRef": "CUST-0001",
"assetId": "GBP",
"total": "1250.00",
"available": "1210.00",
"locked": "40.00",
"asOf": "2026-08-13T11:58:04.114Z"
}View in API Reference
- Submit a token operation ·
POST- Get an account's balances ·
GET
Errors and edge cases
| Situation | Response |
|---|---|
amount finer than the currency's minor unit | 400. Not rounded. |
amount zero, negative or not a decimal string | 400. |
assetId not a recognised ISO 4217 code | 400. |
Asset with no ACTIVE contract | 400 on POST /api/transactions; 404 on POST /api/accounts. |
| Amount above the account's balance | Accepted with 202. The operation fails during settlement. Balances are not checked at submission. |
amount on a RELEASE or CANCEL | 400. A lock is always completed in full, for the amount it holds. |
Supplying decimals on deployment | Not a deployment input. Platform-deployed tokens use the fixed value 18. |
API Reference
Open an endpoint for request fields, response examples and the interactive API console.
Related pages
Updated 5 days ago

