cbar
v0.1.0Official Central Bank of Azerbaijan exchange rates: rate tables and AZN conversion.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_rates Get Rates
Official CBAR exchange rates against the Azerbaijani manat (AZN). Returns 38 currencies and 4 precious metals. `value` is AZN for `nominal` units (seven currencies are quoted per 100); `per_unit` is AZN for one unit. On weekends and public holidays CBAR publishes no new sheet, so `sheet_date` and `note` say which one was used.
| Parameter | Type | Description |
|---|---|---|
codes | Only these codes, for example ["USD", "EUR"]. Default: all. | |
date | YYYY-MM-DD. Defaults to today (Baku time). |
convert Convert
Convert an amount between two currencies through AZN using official CBAR rates.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Amount in from_currency (metals: troy ounces). |
from_currency * | string | Currency code such as USD, EUR, RUB or AZN. |
to_currency * | string | Currency code such as USD, EUR, RUB or AZN. |
date | YYYY-MM-DD. Defaults to today (Baku time). |