Guides
Money and dates
Amounts as decimal strings in each asset's precision, balances, reports and UTC dates in ISO 8601.
Amounts
Amounts are decimal strings in the asset's scale, never floating-point numbers. In responses, every amount uses the same object:
{ "value": "1250.00", "asset": "BRL", "decimals": 2 }| Field | Description |
|---|---|
value | Decimal amount as a string, always with all of the asset's decimal places |
asset | BRL, USDT or USDC |
decimals | The asset's decimal places |
In requests, quotes take the amount as a bare string next to the asset; transfers take {value, asset}:
{ "sourceAsset": "BRL", "sourceAmount": "500.00" }{ "amount": { "value": "50.00", "asset": "BRL" } }Precision per asset
asset | decimals | Example |
|---|---|---|
BRL | 2 | "5000.00" |
USDT | 6 | "100.000000" |
USDC | 6 | "1.500000" |
More decimal places than the asset allows answers:
{
"code": "INVALID_DATA",
"message": "Object contains invalid data",
"details": {
"errors": [
{
"code": "INVALID_AMOUNT_PRECISION",
"message": "BRL allows at most 2 decimal places, got 4",
"field": "body:sourceAmount",
"params": { "asset": "BRL", "allowed": 2, "received": 4 }
}
]
}
}Zero answers AMOUNT_MUST_BE_POSITIVE.
Parse amounts with a decimal library (BigDecimal, decimal.Decimal, Decimal.js) or as integer minor units. Never use JavaScript Number or a 64-bit float. Mimicr stores everything as integer minor units.
Balances
curl --url https://trace.mimicr.dev/v1/accounts/<account-id>/balances \ --header 'Authorization: Bearer <token>'
{
"accountId": "4383a293-dbff-4585-bd8c-ee73ab1a14e3",
"fiat": [{ "amount": { "value": "500.00", "asset": "BRL", "decimals": 2 }, "synced": true }],
"crypto": [
{ "amount": { "value": "0.000000", "asset": "USDT", "decimals": 6 }, "synced": true },
{ "amount": { "value": "50.000000", "asset": "USDC", "decimals": 6 }, "synced": true }
]
}In Mimicr the balance is derived from the operations, and nothing else moves money:
- In: deposits from
COMPLETEDon (and afterwards, inREFUNDINGandREFUNDED), the target side of swaps and transfers. - Out: withdrawals, the source side of swaps and transfers from
PROCESSINGon, as long as they are notFAILED, andREFUNDEDrefunds.
So a withdrawal in progress already reduces the balance, and a failed withdrawal releases the reserve. synced is always true in Mimicr. Reference: Get account balance.
Report
curl --get --url https://trace.mimicr.dev/v1/reports \ --data-urlencode 'periodStart=2026-11-01T00:00:00Z' \ --data-urlencode 'periodEnd=2026-12-01T00:00:00Z' \ --header 'Authorization: Bearer <token>'
{
"period": { "start": "2026-11-01T00:00:00Z", "end": "2026-12-01T00:00:00Z" },
"totals": [
{
"asset": "BRL",
"inflows": { "sum": { "value": "580.00", "asset": "BRL", "decimals": 2 }, "count": 3 },
"outflows": { "sum": { "value": "300.00", "asset": "BRL", "decimals": 2 }, "count": 5 }
}
]
}The report adds up CONFIRMED transactions in [periodStart, periodEnd), per asset: inflows are CREDIT and outflows are DEBIT. Aggregates with no transactions are omitted. A missing date answers 422 INVALID_DATA with REQUIRED; periodEnd before periodStart gives INVALID_RANGE. Reference: Get a report.
Dates
Dates and times are UTC in ISO 8601, with no other time zone:
yyyy-MM-ddTHH:mm:ssZ
Example: 2026-11-05T20:10:30Z. Milliseconds are optional (2026-11-05T20:10:30.000Z). Date-only fields, such as birthDate and incorporateDate, use yyyy-MM-dd.
To filter by period:
and(createdAt[gte]=2026-11-01T00:00:00Z,createdAt[lt]=2026-12-01T00:00:00Z)
In Mimicr, every date follows the sandbox clock. If you move the clock forward, createdAt, expiresAt and atTime follow it.