Reference
Locale-correct money formatting API
Format a numeric amount as a currency string via Intl.NumberFormat given an ISO 4217 currency and BCP-47 locale — correct symbol placement, digit grouping, the right number of minor units (JPY=0, USD=2, BHD=3) and an optional accounting style that parenthesizes negatives. The MORE: locale+currency correctness (symbol position, separators, minor-unit count) that LLMs routinely get wrong. Answers 'format 1234.5 as EUR in de-DE', 'how do you write this amount in JPY', 'accounting format for a negative balance', 'what is the currency symbol for X'.
Price$0.01per request
MethodPOST
Route/v1/ref/money-format
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
refmoneycurrencyformatintllocalei18nnumber-format
API URL
Integration docshttps://x402.hexl.dev/v1/ref/money-formatExample request
{
"amount": 1234.5,
"currency": "EUR",
"locale": "de-DE"
}Example response
{
"formatted": "1.234,50 €",
"amount": 1234.5,
"currency": "EUR",
"locale": "de-DE",
"symbol": "€",
"minorUnits": 2,
"accounting": false,
"negative": false
}Input schema
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "number",
"examples": [
1234.5
]
},
"currency": {
"type": "string",
"examples": [
"EUR"
]
},
"locale": {
"type": "string",
"examples": [
"de-DE"
]
},
"accounting": {
"type": "boolean",
"examples": [
false
]
},
"minimumFractionDigits": {
"type": "number"
},
"maximumFractionDigits": {
"type": "number"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}