bnb-exchange-rate 1.3.29 โ 1.3.31
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 +53 -52
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
[](https://github.com/AllRates-Today/bnb-exchange-rate/blob/main/LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/bnb-exchange-rate)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
-
[](https://allratestoday.com/central-bank-rates-api/bnb/)
|
|
8
8
|
[](https://allratestoday.com/central-bank-rates-api/bnb/)
|
|
9
9
|
|
|
10
10
|
**Official Bulgarian National Bank (Bulgaria) daily exchange rates for Node.js and TypeScript. The published central bank rates behind tax filings, customs valuations, audits, and compliant invoicing โ not market estimates, but the numbers Bulgarian National Bank itself prints, every business day.**
|
|
11
11
|
|
|
12
12
|
## ๐ Why this client?
|
|
13
13
|
|
|
14
|
-
- ๐๏ธ **Official
|
|
14
|
+
- ๐๏ธ **Official rates** โ Bulgarian National Bank's own table, with the publisher's own `rate_date` on every response
|
|
15
15
|
- ๐
**History back to 2016** โ point-in-time tables and daily series for any past date
|
|
16
|
-
- ๐ **
|
|
16
|
+
- ๐ **Official vs derived, always flagged** โ computed inverse/cross pairs carry `derived: true`, never mixed with official prints
|
|
17
17
|
- โก **Zero dependencies** โ pure ESM + CJS over global `fetch`; Node 18+, Bun, Deno, and edge runtimes
|
|
18
18
|
- ๐ท **Type-safe** โ full TypeScript definitions shipped with the package
|
|
19
19
|
- ๐งพ **Compliance-grade metadata** โ `rate_type`, publication date, and source disclaimer on every response
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
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.
|
|
26
26
|
|
|
27
|
-
## ๐ Latest
|
|
27
|
+
## ๐ Latest official table
|
|
28
28
|
|
|
29
29
|
[](https://allratestoday.com/central-bank-rates-api/bnb/)
|
|
30
30
|
|
|
@@ -32,39 +32,39 @@ The image is rendered live from the keyless endpoint, so it follows the central
|
|
|
32
32
|
|
|
33
33
|
<!-- daily-table:start -->
|
|
34
34
|
<details>
|
|
35
|
-
<summary>Table as text: published 2026-11-
|
|
35
|
+
<summary>Table as text: published 2026-11-13 by Bulgarian National Bank โ 29 rates. Updated 2026-11-15.</summary>
|
|
36
36
|
|
|
37
37
|
| Base | Quote | Type | Rate |
|
|
38
38
|
| --- | --- | --- | ---: |
|
|
39
|
-
| EUR | AUD | reference | 1.
|
|
40
|
-
| EUR | BRL | reference | 6.
|
|
41
|
-
| EUR | CAD | reference | 1.
|
|
42
|
-
| EUR | CHF | reference | 0.
|
|
43
|
-
| EUR | CNY | reference | 7.
|
|
44
|
-
| EUR | CZK | reference | 24.
|
|
45
|
-
| EUR | DKK | reference | 7.
|
|
46
|
-
| EUR | GBP | reference | 0.
|
|
47
|
-
| EUR | HKD | reference | 8.
|
|
48
|
-
| EUR | HUF | reference |
|
|
49
|
-
| EUR | IDR | reference |
|
|
50
|
-
| EUR | ILS | reference | 3.
|
|
51
|
-
| EUR | INR | reference | 104.
|
|
52
|
-
| EUR | ISK | reference | 136.
|
|
53
|
-
| EUR | JPY | reference | 176.
|
|
54
|
-
| EUR | KRW | reference |
|
|
55
|
-
| EUR | MXN | reference | 20.
|
|
56
|
-
| EUR | MYR | reference | 4.
|
|
57
|
-
| EUR | NOK | reference | 10.
|
|
58
|
-
| EUR | NZD | reference |
|
|
59
|
-
| EUR | PHP | reference | 70.
|
|
60
|
-
| EUR | PLN | reference | 4.
|
|
61
|
-
| EUR | RON | reference | 5.
|
|
62
|
-
| EUR | SEK | reference | 11.
|
|
63
|
-
| EUR | SGD | reference | 1.
|
|
64
|
-
| EUR | THB | reference | 37.
|
|
65
|
-
| EUR | TRY | reference | 55.
|
|
66
|
-
| EUR | USD | reference | 1.
|
|
67
|
-
| EUR | ZAR | reference | 18.
|
|
39
|
+
| EUR | AUD | reference | 1.6288 |
|
|
40
|
+
| EUR | BRL | reference | 6.2595 |
|
|
41
|
+
| EUR | CAD | reference | 1.5758 |
|
|
42
|
+
| EUR | CHF | reference | 0.9266 |
|
|
43
|
+
| EUR | CNY | reference | 7.3738 |
|
|
44
|
+
| EUR | CZK | reference | 24.424 |
|
|
45
|
+
| EUR | DKK | reference | 7.4756 |
|
|
46
|
+
| EUR | GBP | reference | 0.83559 |
|
|
47
|
+
| EUR | HKD | reference | 8.6714 |
|
|
48
|
+
| EUR | HUF | reference | 365.6 |
|
|
49
|
+
| EUR | IDR | reference | 20163.71 |
|
|
50
|
+
| EUR | ILS | reference | 3.5485 |
|
|
51
|
+
| EUR | INR | reference | 104.1575 |
|
|
52
|
+
| EUR | ISK | reference | 136.6 |
|
|
53
|
+
| EUR | JPY | reference | 176.83 |
|
|
54
|
+
| EUR | KRW | reference | 1477.8 |
|
|
55
|
+
| EUR | MXN | reference | 20.5491 |
|
|
56
|
+
| EUR | MYR | reference | 4.5175 |
|
|
57
|
+
| EUR | NOK | reference | 10.5695 |
|
|
58
|
+
| EUR | NZD | reference | 1.9978 |
|
|
59
|
+
| EUR | PHP | reference | 70.526 |
|
|
60
|
+
| EUR | PLN | reference | 4.4113 |
|
|
61
|
+
| EUR | RON | reference | 5.3494 |
|
|
62
|
+
| EUR | SEK | reference | 11.1075 |
|
|
63
|
+
| EUR | SGD | reference | 1.4236 |
|
|
64
|
+
| EUR | THB | reference | 37.483 |
|
|
65
|
+
| EUR | TRY | reference | 55.6667 |
|
|
66
|
+
| EUR | USD | reference | 1.1052 |
|
|
67
|
+
| EUR | ZAR | reference | 18.7481 |
|
|
68
68
|
|
|
69
69
|
</details>
|
|
70
70
|
|
|
@@ -98,8 +98,8 @@ console.log(pair.rate, pair.rate_date); // the official Bulgarian National Bank
|
|
|
98
98
|
|
|
99
99
|
## ๐ API reference
|
|
100
100
|
|
|
101
|
-
- [Latest pair rate](#latest-pair-rate) โ one pair from the latest
|
|
102
|
-
- [Full
|
|
101
|
+
- [Latest pair rate](#latest-pair-rate) โ one pair from the latest official table
|
|
102
|
+
- [Full official table](#full-official-table) โ everything the central bank printed, in one call
|
|
103
103
|
- [Table for a date](#table-for-a-date) โ the official table for an invoice or filing date
|
|
104
104
|
- [Daily time series](#daily-time-series) โ one pair across a date range
|
|
105
105
|
|
|
@@ -107,7 +107,7 @@ console.log(pair.rate, pair.rate_date); // the official Bulgarian National Bank
|
|
|
107
107
|
|
|
108
108
|
### Latest pair rate
|
|
109
109
|
|
|
110
|
-
Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *
|
|
110
|
+
Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *Official vs derived rates* below).
|
|
111
111
|
|
|
112
112
|
```js
|
|
113
113
|
const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
|
|
@@ -119,10 +119,10 @@ const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
|
|
|
119
119
|
{
|
|
120
120
|
bank: 'bnb',
|
|
121
121
|
name: 'Bulgarian National Bank',
|
|
122
|
-
rate_date: '2026-10
|
|
122
|
+
rate_date: '2026-11-10', // Bulgarian National Bank's own publication date
|
|
123
123
|
source: 'EUR',
|
|
124
124
|
target: 'USD',
|
|
125
|
-
rate: 1.
|
|
125
|
+
rate: 1.1214,
|
|
126
126
|
rate_type: 'reference',
|
|
127
127
|
derived: false,
|
|
128
128
|
method: 'published',
|
|
@@ -130,7 +130,7 @@ const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
|
|
|
130
130
|
}
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
### Full
|
|
133
|
+
### Full official table
|
|
134
134
|
|
|
135
135
|
Free plan and up. The complete table for the latest publication date.
|
|
136
136
|
|
|
@@ -147,10 +147,10 @@ console.log(table.rate_date, table.rates.length);
|
|
|
147
147
|
{
|
|
148
148
|
bank: 'bnb',
|
|
149
149
|
name: 'Bulgarian National Bank',
|
|
150
|
-
rate_date: '2026-10
|
|
150
|
+
rate_date: '2026-11-10',
|
|
151
151
|
rates: [
|
|
152
|
-
{ "base": "EUR", "quote": "USD", "type": "reference", "value": 1.
|
|
153
|
-
// โฆ the rest of the
|
|
152
|
+
{ "base": "EUR", "quote": "USD", "type": "reference", "value": 1.1214 },
|
|
153
|
+
// โฆ the rest of the official table (29 currencies vs EUR)
|
|
154
154
|
],
|
|
155
155
|
disclaimer: 'โฆ'
|
|
156
156
|
}
|
|
@@ -189,7 +189,7 @@ Paid plans. One resolved rate per publication date โ ready for charting, reval
|
|
|
189
189
|
import { getHistory } from 'bnb-exchange-rate';
|
|
190
190
|
|
|
191
191
|
const series = await getHistory(
|
|
192
|
-
{ source: 'EUR', target: 'USD', from: '2026-01-01', to: '2026-10
|
|
192
|
+
{ source: 'EUR', target: 'USD', from: '2026-01-01', to: '2026-11-10' },
|
|
193
193
|
{ apiKey: 'art_live_...' }
|
|
194
194
|
);
|
|
195
195
|
```
|
|
@@ -202,11 +202,11 @@ const series = await getHistory(
|
|
|
202
202
|
source: 'EUR',
|
|
203
203
|
target: 'USD',
|
|
204
204
|
from: '2026-01-01',
|
|
205
|
-
to: '2026-10
|
|
205
|
+
to: '2026-11-10',
|
|
206
206
|
count: 152,
|
|
207
207
|
rates: [
|
|
208
208
|
// one entry per publication date
|
|
209
|
-
{ date: '2026-10
|
|
209
|
+
{ date: '2026-11-10', rate: 1.1214, rate_type: 'reference', derived: false, method: 'published' },
|
|
210
210
|
// โฆ
|
|
211
211
|
],
|
|
212
212
|
disclaimer: 'โฆ'
|
|
@@ -260,7 +260,7 @@ curl "https://allratestoday.com/api/v1/central-bank/bnb/latest?format=xml&api_ke
|
|
|
260
260
|
- Evaluating? Agents can self-issue a trial key with no signup: `POST https://allratestoday.com/api/agent/keys` (send `Content-Type: application/json`) returns a 100-call key valid 7 days that covers the free-plan methods (latest table, pairs); dated tables and history need a [paid plan](https://allratestoday.com/pricing/). The MCP servers expose it as `request_trial_key`
|
|
261
261
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
262
262
|
|
|
263
|
-
## โ๏ธ
|
|
263
|
+
## โ๏ธ Official vs derived rates
|
|
264
264
|
|
|
265
265
|
If Bulgarian National Bank does not print a pair directly, the API resolves it from the central bank's own table and says so โ official and computed values are never confused:
|
|
266
266
|
|
|
@@ -310,21 +310,21 @@ getRate('EUR', 'USD', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
310
310
|
|
|
311
311
|
## ๐ก Quota tips
|
|
312
312
|
|
|
313
|
-
- Rates change once per business day โ cache the
|
|
313
|
+
- Rates change once per business day โ cache the official table locally and a small monthly quota goes a long way.
|
|
314
314
|
- Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.
|
|
315
315
|
|
|
316
316
|
## ๐ Methods reference
|
|
317
317
|
|
|
318
318
|
| Method | Plan | Description |
|
|
319
319
|
| ------ | ---- | ----------- |
|
|
320
|
-
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the
|
|
321
|
-
| `getLatestRates({ apiKey })` | Free | The central bank's full latest
|
|
320
|
+
| `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the official table |
|
|
321
|
+
| `getLatestRates({ apiKey })` | Free | The central bank's full latest official table |
|
|
322
322
|
| `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
|
|
323
323
|
| `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2016 |
|
|
324
324
|
|
|
325
325
|
## ๐ฅ Bulk data (no key)
|
|
326
326
|
|
|
327
|
-
Need the whole archive rather than an API call? The same
|
|
327
|
+
Need the whole archive rather than an API call? The same official tables are mirrored daily as open data:
|
|
328
328
|
|
|
329
329
|
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) โ one CSV per institution (`rates/bnb.csv`)
|
|
330
330
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
@@ -334,8 +334,9 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
334
334
|
|
|
335
335
|
- **Website:** [allratestoday.com](https://allratestoday.com)
|
|
336
336
|
- [Bulgarian National Bank rates page](https://allratestoday.com/central-bank-rates-api/bnb/) โ live table, publication cadence, FAQ
|
|
337
|
-
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/)
|
|
337
|
+
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/) ยท [Full list of 130+ central banks and tax authorities](https://allratestoday.com/central-bank-rates-api/institutions/) โ one API, the same response shape for every source
|
|
338
338
|
- [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) โ every bank's latest table and history as Excel, CSV or JSON
|
|
339
|
+
- [Bank Exchange Rate API](https://allratestoday.com/bank-exchange-rate-api/) โ live buy and sell rates from 1,200+ commercial banks in 120+ countries ยท [npm](https://www.npmjs.com/package/bank-exchange-rates) ยท [GitHub](https://github.com/AllRates-Today/bank-exchange-rates)
|
|
339
340
|
- [Package docs on the site](https://allratestoday.com/docs/sdk/bnb-exchange-rate/) ยท [ERP integration guides](https://allratestoday.com/docs/integrations/)
|
|
340
341
|
- [API documentation](https://allratestoday.com/docs/#central-bank) ยท [Interactive reference](https://allratestoday.com/api-reference/) ยท [Methodology](https://allratestoday.com/official-rates-methodology/)
|
|
341
342
|
- [Register (Free)](https://allratestoday.com/register) ยท [Dashboard](https://allratestoday.com/profile) ยท [Pricing](https://allratestoday.com/pricing/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bnb-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.31",
|
|
4
4
|
"description": "Official Bulgarian National Bank (Bulgaria) daily exchange rates โ 29 currencies vs EUR, history since 2016. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bnb",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"bank",
|
|
11
11
|
"exchange-rate",
|
|
12
12
|
"exchange-rates",
|
|
13
|
+
"exchange-rate-api",
|
|
13
14
|
"exchangerate",
|
|
14
15
|
"exchange rate",
|
|
15
16
|
"exchange rates",
|