Overview
Monetary amounts in the Trace Finance API are represented as decimal strings in the asset’s canonical scale, paired with an ISO 4217 currency code or stablecoin ticker. This single shape works uniformly for fiat (2 decimals) and stablecoins (6 decimals).
Always parse amounts with a decimal-precision library (BigDecimal, decimal.Decimal, Decimal.js). Never use JavaScript Number or any 64-bit float — values like 0.1 + 0.2 lose precision, and high-decimal tokens overflow the safe-integer range.
How it works
Amount object
Every amount in a response uses the same structure:
In request bodies
Quote and operation requests take amounts as a decimal-string scalar paired with a separate asset field — not the full object:
The number of fractional digits must not exceed the asset’s precision (table below). Exceeding it returns INVALID_AMOUNT_PRECISION.
Decimal precision per asset
Examples
A deposit of R$ 1.250,00:
A withdrawal of 500 USDT: