@allratestoday/cbbh-exchange-rate 1.2.0 → 1.2.3
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.
- package/README.md +9 -7
- 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 Bosnia and Herzegovina 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('EUR', 'BAM', { apiKey: 'art_live_...' });
|
|
|
68
70
|
{
|
|
69
71
|
bank: 'cbbh',
|
|
70
72
|
name: 'Central Bank of Bosnia and Herzegovina',
|
|
71
|
-
rate_date: '2026-08-
|
|
73
|
+
rate_date: '2026-08-13', // Central Bank of Bosnia and Herzegovina's own publication date
|
|
72
74
|
source: 'EUR',
|
|
73
75
|
target: 'BAM',
|
|
74
76
|
rate: 1.95583,
|
|
@@ -96,7 +98,7 @@ console.log(table.rate_date, table.rates.length);
|
|
|
96
98
|
{
|
|
97
99
|
bank: 'cbbh',
|
|
98
100
|
name: 'Central Bank of Bosnia and Herzegovina',
|
|
99
|
-
rate_date: '2026-08-
|
|
101
|
+
rate_date: '2026-08-13',
|
|
100
102
|
rates: [
|
|
101
103
|
{ "base": "EUR", "quote": "BAM", "type": "middle", "value": 1.95583 },
|
|
102
104
|
{ "base": "EUR", "quote": "BAM", "type": "sell", "value": 1.95583 },
|
|
@@ -140,7 +142,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
140
142
|
import { getHistory } from '@allratestoday/cbbh-exchange-rate';
|
|
141
143
|
|
|
142
144
|
const series = await getHistory(
|
|
143
|
-
{ source: 'EUR', target: 'BAM', from: '2026-01-01', to: '2026-08-
|
|
145
|
+
{ source: 'EUR', target: 'BAM', from: '2026-01-01', to: '2026-08-13' },
|
|
144
146
|
{ apiKey: 'art_live_...' }
|
|
145
147
|
);
|
|
146
148
|
```
|
|
@@ -153,11 +155,11 @@ const series = await getHistory(
|
|
|
153
155
|
source: 'EUR',
|
|
154
156
|
target: 'BAM',
|
|
155
157
|
from: '2026-01-01',
|
|
156
|
-
to: '2026-08-
|
|
158
|
+
to: '2026-08-13',
|
|
157
159
|
count: 152,
|
|
158
160
|
rates: [
|
|
159
161
|
// one entry per publication date
|
|
160
|
-
{ date: '2026-08-
|
|
162
|
+
{ date: '2026-08-13', rate: 1.95583, rate_type: 'middle', derived: false, method: 'published' },
|
|
161
163
|
// …
|
|
162
164
|
],
|
|
163
165
|
disclaimer: '…'
|
|
@@ -170,9 +172,9 @@ Pass `{ symbol: 'EUR' }` instead of `source`/`target` to get the raw published r
|
|
|
170
172
|
|
|
171
173
|
## 🗺️ Currencies covered
|
|
172
174
|
|
|
173
|
-
Central Bank of Bosnia and Herzegovina currently publishes rates covering **
|
|
175
|
+
Central Bank of Bosnia and Herzegovina currently publishes rates covering **17 currencies** against the BAM (as of the latest table):
|
|
174
176
|
|
|
175
|
-
`AUD` ·
|
|
177
|
+
🇦🇺 `AUD` · 🇨🇦 `CAD` · 🇨🇭 `CHF` · 🇨🇳 `CNY` · 🇨🇿 `CZK` · 🇩🇰 `DKK` · 🇪🇺 `EUR` · 🇬🇧 `GBP` · 🇭🇺 `HUF` · 🇯🇵 `JPY` · 🇳🇴 `NOK` · 🇷🇸 `RSD` · 🇷🇺 `RUB` · 🇸🇪 `SEK` · 🇹🇷 `TRY` · 🇺🇸 `USD` · `XDR`
|
|
176
178
|
|
|
177
179
|
## ⚖️ Published vs derived rates
|
|
178
180
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/cbbh-exchange-rate",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Official Central Bank of Bosnia and Herzegovina (Bosnia and Herzegovina) daily exchange rates — 17 currencies vs BAM, history since 2016. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cbbh",
|