Money currency format
Exactmoney_currency_formatDeterministic and authoritative — the canonical answer for this input.
Format a numeric amount as a locale-correct currency string. '$1,234.56' for en_US, '1.234,56 €' for de_DE, '¥1,235' for ja_JP. Respects ISO 4217 minor_units (JPY=0, KWD=3, USD=2) for rounding. Unknown locales fall back to en_US. Processing multiple inputs? Use `money_currency_format_batch` to do up to 1000 in one call.
Parameters
amountnumberrequiredcurrency_codestringrequiredISO 4217 code.
localestringoptionalLocale like en_US, de_DE, ja_JP.
Call it
curl -X POST https://api.snipget.ai/v1/money/currency/format \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"amount":1234.56,"currency_code":"USD","locale":"en_US"}'The Batch tab sends up to 1000 inputs in one call via /v1/money/currency/format/batch.
Example response
{
"is_valid": true,
"input_amount": "1234.56",
"currency": "USD",
"locale": "en_US",
"rounded": "1234.56",
"formatted": "$1,234.56",
"symbol": "$",
"minor_units": 2
}FAQ
Why not just glue a dollar sign onto the number?
Because every currency and country formats money differently. This places the symbol, thousands separators, and decimal marks correctly for the locale, so 1234.56 becomes $1,234.56 in US English but 1.234,56 € in German.
Does it round correctly for each currency?
Yes. It uses the official ISO 4217 minor-units rule, so US dollars get 2 decimals, Japanese yen get 0 (¥1,235), and Kuwaiti dinar get 3. You do not have to remember which currency has how many decimal places.
Is the output always the same for the same input?
Yes. This is a deterministic, authoritative formatter. The same amount, currency, and locale always produce the exact same string.
What locales are supported?
Common ones like en_US, en_GB, de_DE, fr_FR, ja_JP, zh_CN, es_ES, pt_BR, and more. An unrecognized locale safely falls back to US English formatting rather than failing.
What happens with a bad currency code or amount?
An unknown currency code or a non-numeric amount returns confidence 0 with a short reason, never an error. currency_code is required; locale is optional and defaults to en_US.