cbar-exchange-rate 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,8 @@
16
16
  - 🔷 **Type-safe** — full TypeScript definitions shipped with the package
17
17
  - 🧾 **Compliance-grade metadata** — `rate_type`, publication date, and source disclaimer on every response
18
18
 
19
+ > **Official rate, not mid-market:** every value here is a number Central Bank of Azerbaijan itself published, fixed once printed and carrying the central bank's own `rate_date` — what filings and audits require. Need the live interbank midpoint for pricing or display instead? Use the [mid-market API](https://allratestoday.com/docs/) or [`@allratestoday/sdk`](https://www.npmjs.com/package/@allratestoday/sdk). The two can diverge by several percent.
20
+
19
21
  ## 🔑 Get your API key
20
22
 
21
23
  Get a free API key at [allratestoday.com/register](https://allratestoday.com/register) — no credit card required. Latest rates are on every plan, including free.
@@ -68,7 +70,7 @@ const pair = await getRate('USD', 'AZN', { apiKey: 'art_live_...' });
68
70
  {
69
71
  bank: 'cbar',
70
72
  name: 'Central Bank of Azerbaijan',
71
- rate_date: '2026-08-11', // Central Bank of Azerbaijan's own publication date
73
+ rate_date: '2026-09-09', // Central Bank of Azerbaijan's own publication date
72
74
  source: 'USD',
73
75
  target: 'AZN',
74
76
  rate: 1.7,
@@ -96,7 +98,7 @@ console.log(table.rate_date, table.rates.length);
96
98
  {
97
99
  bank: 'cbar',
98
100
  name: 'Central Bank of Azerbaijan',
99
- rate_date: '2026-08-11',
101
+ rate_date: '2026-09-09',
100
102
  rates: [
101
103
  { "base": "USD", "quote": "AZN", "type": "reference", "value": 1.7 },
102
104
  // … the rest of the published table (38 currencies vs AZN)
@@ -138,7 +140,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
138
140
  import { getHistory } from 'cbar-exchange-rate';
139
141
 
140
142
  const series = await getHistory(
141
- { source: 'USD', target: 'AZN', from: '2026-01-01', to: '2026-08-11' },
143
+ { source: 'USD', target: 'AZN', from: '2026-01-01', to: '2026-09-09' },
142
144
  { apiKey: 'art_live_...' }
143
145
  );
144
146
  ```
@@ -151,11 +153,11 @@ const series = await getHistory(
151
153
  source: 'USD',
152
154
  target: 'AZN',
153
155
  from: '2026-01-01',
154
- to: '2026-08-11',
156
+ to: '2026-09-09',
155
157
  count: 152,
156
158
  rates: [
157
159
  // one entry per publication date
158
- { date: '2026-08-11', rate: 1.7, rate_type: 'reference', derived: false, method: 'published' },
160
+ { date: '2026-09-09', rate: 1.7, rate_type: 'reference', derived: false, method: 'published' },
159
161
  // …
160
162
  ],
161
163
  disclaimer: '…'
@@ -168,9 +170,9 @@ Pass `{ symbol: 'USD' }` instead of `source`/`target` to get the raw published r
168
170
 
169
171
  ## 🗺️ Currencies covered
170
172
 
171
- Central Bank of Azerbaijan currently publishes rates covering **39 currencies** (as of the latest table):
173
+ Central Bank of Azerbaijan currently publishes rates covering **38 currencies** against the AZN (as of the latest table):
172
174
 
173
- `AED` · `AUD` · `AZN` · `BYN` · `CAD` · `CHF` · `CNY` · `CZK` · `DKK` · `EUR` · `GBP` · `GEL` · `HKD` · `HUF` · `ILS` · `INR` · `JPY` · `KGS` · `KRW` · `KWD` · `KZT` · `MDL` · `NOK` · `NZD` · `PKR` · `PLN` · `QAR` · `RON` · `RSD` · `RUB` · `SAR` · `SDR` · `SEK` · `SGD` · `TMT` · `TRY` · `UAH` · `USD` · `UZS`
175
+ 🇦🇪 `AED` · 🇦🇺 `AUD` · 🇧🇾 `BYN` · 🇨🇦 `CAD` · 🇨🇭 `CHF` · 🇨🇳 `CNY` · 🇨🇿 `CZK` · 🇩🇰 `DKK` · 🇪🇺 `EUR` · 🇬🇧 `GBP` · 🇬🇪 `GEL` · 🇭🇰 `HKD` · 🇭🇺 `HUF` · 🇮🇱 `ILS` · 🇮🇳 `INR` · 🇯🇵 `JPY` · 🇰🇬 `KGS` · 🇰🇷 `KRW` · 🇰🇼 `KWD` · 🇰🇿 `KZT` · 🇲🇩 `MDL` · 🇳🇴 `NOK` · 🇳🇿 `NZD` · 🇵🇰 `PKR` · 🇵🇱 `PLN` · 🇶🇦 `QAR` · 🇷🇴 `RON` · 🇷🇸 `RSD` · 🇷🇺 `RUB` · 🇸🇦 `SAR` · `SDR` · 🇸🇪 `SEK` · 🇸🇬 `SGD` · 🇹🇲 `TMT` · 🇹🇷 `TRY` · 🇺🇦 `UAH` · 🇺🇸 `USD` · 🇺🇿 `UZS`
174
176
 
175
177
  ## ⚖️ Published vs derived rates
176
178
 
@@ -234,6 +236,14 @@ getRate('USD', 'AZN', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
234
236
  | `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
235
237
  | `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2016 |
236
238
 
239
+ ## 📥 Bulk data (no key)
240
+
241
+ Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
242
+
243
+ - Hugging Face: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) — one CSV per institution (`rates/cbar.csv`)
244
+ - Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
245
+ - CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/cbar/latest.json`
246
+
237
247
  ## 🔗 Links
238
248
 
239
249
  - [Central Bank of Azerbaijan rates page](https://allratestoday.com/central-bank-rates-api/cbar/) — live table, publication cadence, FAQ
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cbar-exchange-rate",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Official Central Bank of Azerbaijan (Azerbaijan) daily exchange rates — 38 currencies vs AZN, history since 2016. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "cbar",