# Locale and Formatting Tools – Format Currency

> Locale and Formatting Tools – Format Currency is a paid API for AI agents from locale-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Formats a numeric amount as a localized currency string for a given ISO 4217 currency code and BCP47 locale, returning the formatted value, minor-unit digit count, and decomposed parts.

## Facts

- Endpoint: GET https://locale-tools.x402tookit.com/format-currency?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/locale-and-formatting-tools-format-currency-e5c7bf68
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yLkrfH_YDYG5XOwm1MkLT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability locale-and-formatting-tools-format-currency-e5c7bf68
```

Example prompt: Format 1250.75 as Japanese yen (JPY) using the ja-JP locale and show me the symbol display — I also want to know how many minor-unit digits JPY uses.

## When to prefer this

Choose this endpoint when you need locale-aware, ICU-backed currency formatting rather than simple symbol prepending — especially when you need correct minor-unit digit counts (e.g. JPY has 0, KWD has 3), decomposed formatting parts for custom rendering, or support for dozens of locales and display styles. Prefer this over general number formatting endpoints when currency-specific rules (grouping, decimal, symbol placement) are required.

## Known failure modes

- Unknown or unsupported ISO 4217 currency code returns an error — only codes recognized by ICU are accepted
- Malformed BCP47 locale tag may be rejected or silently resolved to a fallback locale
- Amount exceeding 1e15 in absolute value is rejected
- Missing required 'amount' or 'currency' query parameters returns a 4xx error
- Invalid 'display' enum value outside symbol/narrowSymbol/code/name may be rejected

## How this service works

Format an amount as money for an ISO 4217 currency code in a locale; reports minor-unit digits; unknown codes rejected.

## Output

Returns a JSON object with the formatted currency string (e.g. '$1,234.56'), the resolved locale, the currency name, the number of minor-unit digits for that currency, the equivalent amount in minor units, an array of decomposed parts (integer, decimal, fraction, symbol, etc.), ICU/CLDR/Unicode version info, and a degraded flag if formatting fell back to a less-specific locale.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "amount",
      "currency"
     ],
     "properties": {
      "amount": {
       "type": "number",
       "description": "Amount in major units, absolute value up to 1e15"
      },
      "locale": {
       "type": "string",
       "description": "BCP47 tag such as en-US, de-DE, ja-JP (default en-US, up to 60 characters)"
      },
      "display": {
       "type": "string",
       "description": "symbol (default), narrowSymbol, code or name"
      },
      "currency": {
       "type": "string",
       "description": "Three-letter ISO 4217 code such as USD, JPY or KWD; must be known to ICU"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "parts": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "type": {
          "type": [
           "null",
           "string"
          ]
         },
         "value": {
          "type": [
           "null",
           "string"
          ]
         }
        }
       }
      },
      "locale": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "currency": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "formatted": {
       "type": [
        "null",
        "string"
       ]
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/locale-and-formatting-tools-format-currency-e5c7bf68/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from locale-tools.x402tookit.com](https://www.zero.xyz/host/locale-tools.x402tookit.com/llms.txt)
