Skip to main content

Assets

An asset is a currency or token that can be held, traded, and paid out. Each asset has a code (uppercase identifier) and a scale (number of decimal places).
CodeTypeScaleExample amount
USDFiat2"10.50"
EURFiat2"100.00"
USDCStablecoin6"10.500000"
USDTStablecoin6"99.970000"
Asset codes appear throughout the API — in quote requests (fromAsset, toAsset), payout bodies (asset), and balance responses.

Amounts

All monetary amounts are strings in major units — the human-readable form of the currency. Ten US dollars is "10.50", not 1000 or 10.5.
{
  "amount": "10.50",
  "asset": "USD"
}
Amounts are always returned at the asset’s native precision. A USD amount always has 2 decimal places; a USDC amount always has 6. This makes responses predictable — you never need to guess how many decimals to expect.

Why strings?

JSON has no decimal type. A JSON number like 10.50 may lose its trailing zero when parsed, and large values can exceed the precision of IEEE 754 floating-point numbers. Strings preserve the exact representation.
Parse amounts as arbitrary-precision decimals (e.g., BigDecimal in Java, Decimal in Python, big.js in JavaScript). Floating-point arithmetic introduces rounding errors that accumulate in financial calculations.

Internal representation

The platform stores all amounts as integer subunits internally — for example, 1050 for $10.50, or 10500000 for 10.5 USDC. This eliminates floating-point arithmetic entirely within the system. Conversion to major-unit strings happens at the API boundary, so what you see in responses is always the canonical representation.

Precision rules

When sending amounts to the API (e.g., in quote requests or payout bodies), provide them in major units as strings. The API validates that:
  1. The value is a valid decimal string
  2. The number of decimal places does not exceed the asset’s scale
Amounts with too many decimal places are rejected with a validation_error.