Convert a value between currencies
getConvertConverts a value from the base currency into all (or a filtered set of) currencies, for today or for a given historical date. Requires a plan that includes the convert endpoint. Optional: shape=compact, precision and format=csv.
Send values instead of value to convert up to 100 amounts in one request: data is then a list with one {value, currencies} entry per amount, in the order sent, and meta.values replaces meta.value. datetime converts at a moment within your plan's intraday history, like /v1/rate (the minute, quarter hour or hour it falls in: minutes for the last 7 days, hours for the last 3 months); it needs a plan with intraday updates.
For shop prices, round_step or price_ending (with round_mode) add rounded to every converted value, and locale adds formatted, the amount as text for that locale (e.g. "€ 1.233,99" for de_AT). value itself always stays exact. Rounding and locale are not available with shape=compact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Optional date to convert against historical rates (format `YYYY-MM-DD`). Must be at least one day in the past. Omit for the latest rates. Not together with `datetime`. | |
| type | No | Filter the returned currencies by type. | |
| shape | No | `default`: every rate as `{"code": "EUR", "value": 0.918456}`. `compact`: plain values, `"EUR": 0.918456`. | |
| value | No | The value to convert. Must be greater than 0 and at most 10^18. Required unless `values` is sent; not together with `values`. | |
| format | No | `json` (default), `csv` or `xlsx`. CSV has a header line and one row per currency (and point in time), values without exponent notation. `xlsx` is the same table as an Excel workbook (one sheet, bold frozen header row, numbers as numbers), sent as a download named after the endpoint, e.g. `latest.xlsx`. | |
| locale | No | Adds `formatted`: every converted value as text in this ICU locale (e.g. `de_AT`, `en-US`), with the currency's symbol and decimal places (at most 8; none with a whole-number `round_step`). With rounding, the rounded price is formatted. An unknown locale returns a `422`. Not with `shape=compact`. | |
| values | No | Up to 100 values to convert (each greater than 0 and at most 10^18), comma-separated or as `values[]=`. `data` becomes a list with one entry per value, in the order sent. The request costs one request. | |
| datetime | No | Convert at this moment within your plan's intraday history (ISO 8601): the rate of the minute, quarter hour or hour it falls in, as `/v1/rate` finds it. `meta.last_updated_at` is that point. Needs a plan with intraday updates (`403` on daily plans); moments beyond the plan's history return a `422`. | |
| precision | No | Round every value to this many decimals (0 to 10). By default values carry up to 10 decimals (10 significant digits below 0.1). | |
| currencies | No | Comma-separated list of currency codes to include (e.g. `EUR,USD,CAD`). The array form `currencies[]=EUR¤cies[]=USD` is also accepted. By default all supported currencies are returned. | |
| round_mode | No | How `round_step` and `price_ending` round: to the `nearest` candidate (default), always `up` or always `down`. | |
| round_step | No | Adds `rounded`: every converted value rounded to a multiple of this step (greater than 0, at most 10^18), e.g. `0.05`, `1` or `10`. Not together with `price_ending`; not with `shape=compact`. | |
| price_ending | No | Adds `rounded`: every converted value rounded to a price with this ending (at least 0, below 1), e.g. `0.99` turns 10.97 into 10.99. Not together with `round_step`; not with `shape=compact`. | |
| base_currency | No | The base currency that all returned values are relative to. Defaults to `USD`. |