Skip to main content
Money in the Spritz API is always a decimal string, never a number. Fiat amounts are formatted with two decimal places, like "100.00" or "1000.50". Representing money as strings avoids the rounding errors that come with floating-point numbers.

Working with amounts

  • Send and receive amounts as strings: "100.00", not 100 or 100.0.
  • Parse them with a decimal or big-number type, never a native float. Summing or comparing floats can silently lose cents.
  • Every fiat amount comes with a currency alongside it.

Currencies

Fiat amounts use ISO 4217 currency codes. Spritz currently works with USD, CAD, EUR, and GBP. See What we support for the rails and regions behind each.

On-chain amounts

Amounts you send or receive on-chain follow each blockchain’s own conventions, so a token value in transaction parameters may be in the token’s base units rather than a decimal string. Use the values exactly as the API returns them when building the transaction, and check them against the human-readable fiat amounts in the quote. See the off-ramp guide and the API Reference for the fields on each endpoint.