List currencies
List the currency codes the chosen rate source can convert, with each rate against its base currency.
Command in the Currency toolkit · id ooa.currency/list_currencies · 5 inputs, 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Source | String | No | ecb | ecb: European Central Bank daily reference rates (base EUR). json: a JSON rates service at 'url'. fixed: the 'rates' Dictionary. |
| Address (URL) | String | No | For json: the address returning the rates. For ecb: leave empty to use the ECB's public file. | |
| Rates path | String | No | For json: where the rates object sits in the answer, e.g. rates, $.data.rates or results[0].rates. Empty = the whole answer. | |
| Base currency | String | No | Currency the rates are quoted against (rate 1). ecb: always EUR. json: taken from the answer's 'base' field when empty. fixed: required. | |
| Rates | Dictionary | No | For fixed: currency code to rate against the base, e.g. {"USD": 1.08, "GBP": 0.85}. |
Outputs
| Output | Type | What it is |
|---|---|---|
| currencies | List | Currency codes, sorted, including the base currency. |
| rates | Dictionary | Code to rate against the base currency. |
| base_currency | String | Currency the rates are quoted against. |
| rate_date | String | Date of the rates when the source gives one, otherwise empty. |