bnb-exchange-rate 1.3.27 โ†’ 1.3.30

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 +61 -23
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,16 +4,16 @@
4
4
  [![license](https://img.shields.io/npm/l/bnb-exchange-rate.svg)](https://github.com/AllRates-Today/bnb-exchange-rate/blob/main/LICENSE)
5
5
  [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/bnb-exchange-rate)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
7
- [![EUR/USD today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fbnb%3Fsource%3DEUR%26target%3DUSD&query=%24.rate&label=EUR%2FUSD%20published%20by%20Bulgarian%20National%20Bank&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/bnb/)
7
+ [![EUR/USD today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fbnb%3Fsource%3DEUR%26target%3DUSD&query=%24.rate&label=EUR%2FUSD%20official%2C%20Bulgarian%20National%20Bank&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/bnb/)
8
8
  [![rate date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fbnb%3Fsource%3DEUR%26target%3DUSD&query=%24.rate_date&label=rate%20date&color=555&cacheSeconds=3600)](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 published rates** โ€” Bulgarian National Bank's own table, with the publisher's own `rate_date` on every response
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
- - ๐Ÿ”€ **Published vs derived, always flagged** โ€” computed inverse/cross pairs carry `derived: true`, never mixed with official prints
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,14 +24,51 @@
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 published table
27
+ ## ๐Ÿ“ˆ Latest official table
28
28
 
29
29
  [![Latest Bulgarian National Bank table](https://allratestoday.com/api/open/central-bank/bnb/table.svg)](https://allratestoday.com/central-bank-rates-api/bnb/)
30
30
 
31
31
  The image is rendered live from the keyless endpoint, so it follows the central bank's publications on npm and on GitHub alike without a new release. The same table as text is folded below for search and copy-paste: on GitHub [a daily Action](.github/workflows/daily-table.yml) refreshes it whenever the central bank publishes a new table; on npm it is as of the package's publish date.
32
32
 
33
33
  <!-- daily-table:start -->
34
- _The table is filled in by the daily workflow._
34
+ <details>
35
+ <summary>Table as text: published 2026-11-10 by Bulgarian National Bank โ€” 29 rates. Updated 2026-11-11.</summary>
36
+
37
+ | Base | Quote | Type | Rate |
38
+ | --- | --- | --- | ---: |
39
+ | EUR | AUD | reference | 1.6244 |
40
+ | EUR | BRL | reference | 6.2257 |
41
+ | EUR | CAD | reference | 1.5852 |
42
+ | EUR | CHF | reference | 0.9203 |
43
+ | EUR | CNY | reference | 7.4801 |
44
+ | EUR | CZK | reference | 24.337 |
45
+ | EUR | DKK | reference | 7.4754 |
46
+ | EUR | GBP | reference | 0.83545 |
47
+ | EUR | HKD | reference | 8.7973 |
48
+ | EUR | HUF | reference | 362.98 |
49
+ | EUR | IDR | reference | 20255.34 |
50
+ | EUR | ILS | reference | 3.5507 |
51
+ | EUR | INR | reference | 105.3315 |
52
+ | EUR | ISK | reference | 137.2 |
53
+ | EUR | JPY | reference | 177.38 |
54
+ | EUR | KRW | reference | 1501.56 |
55
+ | EUR | MXN | reference | 20.8063 |
56
+ | EUR | MYR | reference | 4.5484 |
57
+ | EUR | NOK | reference | 10.6155 |
58
+ | EUR | NZD | reference | 1.9925 |
59
+ | EUR | PHP | reference | 70.54 |
60
+ | EUR | PLN | reference | 4.387 |
61
+ | EUR | RON | reference | 5.3442 |
62
+ | EUR | SEK | reference | 10.991 |
63
+ | EUR | SGD | reference | 1.4335 |
64
+ | EUR | THB | reference | 37.522 |
65
+ | EUR | TRY | reference | 56.3207 |
66
+ | EUR | USD | reference | 1.1214 |
67
+ | EUR | ZAR | reference | 18.3861 |
68
+
69
+ </details>
70
+
71
+ Source: [Official rates published by BNB, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/bnb/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
35
72
  <!-- daily-table:end -->
36
73
 
37
74
  ## ๐Ÿ“ฆ Installation
@@ -61,8 +98,8 @@ console.log(pair.rate, pair.rate_date); // the official Bulgarian National Bank
61
98
 
62
99
  ## ๐Ÿ“š API reference
63
100
 
64
- - [Latest pair rate](#latest-pair-rate) โ€” one pair from the latest published table
65
- - [Full published table](#full-published-table) โ€” everything the central bank printed, in one call
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
66
103
  - [Table for a date](#table-for-a-date) โ€” the official table for an invoice or filing date
67
104
  - [Daily time series](#daily-time-series) โ€” one pair across a date range
68
105
 
@@ -70,7 +107,7 @@ console.log(pair.rate, pair.rate_date); // the official Bulgarian National Bank
70
107
 
71
108
  ### Latest pair rate
72
109
 
73
- Free plan and up. Pairs the central bank does not print directly are resolved from its table and flagged (see *Published vs derived rates* below).
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).
74
111
 
75
112
  ```js
76
113
  const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
@@ -82,10 +119,10 @@ const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
82
119
  {
83
120
  bank: 'bnb',
84
121
  name: 'Bulgarian National Bank',
85
- rate_date: '2026-10-13', // Bulgarian National Bank's own publication date
122
+ rate_date: '2026-11-10', // Bulgarian National Bank's own publication date
86
123
  source: 'EUR',
87
124
  target: 'USD',
88
- rate: 1.1188,
125
+ rate: 1.1214,
89
126
  rate_type: 'reference',
90
127
  derived: false,
91
128
  method: 'published',
@@ -93,7 +130,7 @@ const pair = await getRate('EUR', 'USD', { apiKey: 'art_live_...' });
93
130
  }
94
131
  ```
95
132
 
96
- ### Full published table
133
+ ### Full official table
97
134
 
98
135
  Free plan and up. The complete table for the latest publication date.
99
136
 
@@ -110,10 +147,10 @@ console.log(table.rate_date, table.rates.length);
110
147
  {
111
148
  bank: 'bnb',
112
149
  name: 'Bulgarian National Bank',
113
- rate_date: '2026-10-13',
150
+ rate_date: '2026-11-10',
114
151
  rates: [
115
- { "base": "EUR", "quote": "USD", "type": "reference", "value": 1.1188 },
116
- // โ€ฆ the rest of the published table (29 currencies vs EUR)
152
+ { "base": "EUR", "quote": "USD", "type": "reference", "value": 1.1214 },
153
+ // โ€ฆ the rest of the official table (29 currencies vs EUR)
117
154
  ],
118
155
  disclaimer: 'โ€ฆ'
119
156
  }
@@ -152,7 +189,7 @@ Paid plans. One resolved rate per publication date โ€” ready for charting, reval
152
189
  import { getHistory } from 'bnb-exchange-rate';
153
190
 
154
191
  const series = await getHistory(
155
- { source: 'EUR', target: 'USD', from: '2026-01-01', to: '2026-10-13' },
192
+ { source: 'EUR', target: 'USD', from: '2026-01-01', to: '2026-11-10' },
156
193
  { apiKey: 'art_live_...' }
157
194
  );
158
195
  ```
@@ -165,11 +202,11 @@ const series = await getHistory(
165
202
  source: 'EUR',
166
203
  target: 'USD',
167
204
  from: '2026-01-01',
168
- to: '2026-10-13',
205
+ to: '2026-11-10',
169
206
  count: 152,
170
207
  rates: [
171
208
  // one entry per publication date
172
- { date: '2026-10-13', rate: 1.1188, rate_type: 'reference', derived: false, method: 'published' },
209
+ { date: '2026-11-10', rate: 1.1214, rate_type: 'reference', derived: false, method: 'published' },
173
210
  // โ€ฆ
174
211
  ],
175
212
  disclaimer: 'โ€ฆ'
@@ -223,7 +260,7 @@ curl "https://allratestoday.com/api/v1/central-bank/bnb/latest?format=xml&api_ke
223
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`
224
261
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
225
262
 
226
- ## โš–๏ธ Published vs derived rates
263
+ ## โš–๏ธ Official vs derived rates
227
264
 
228
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:
229
266
 
@@ -273,21 +310,21 @@ getRate('EUR', 'USD', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
273
310
 
274
311
  ## ๐Ÿ’ก Quota tips
275
312
 
276
- - Rates change once per business day โ€” cache the published table locally and a small monthly quota goes a long way.
313
+ - Rates change once per business day โ€” cache the official table locally and a small monthly quota goes a long way.
277
314
  - Every request counts toward your AllRatesToday quota, shared across all AllRatesToday endpoints on your key.
278
315
 
279
316
  ## ๐Ÿ“– Methods reference
280
317
 
281
318
  | Method | Plan | Description |
282
319
  | ------ | ---- | ----------- |
283
- | `getRate(source, target, { apiKey })` | Free | Latest rate for one pair, resolved from the published table |
284
- | `getLatestRates({ apiKey })` | Free | The central bank's full latest published table |
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 |
285
322
  | `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
286
323
  | `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2016 |
287
324
 
288
325
  ## ๐Ÿ“ฅ Bulk data (no key)
289
326
 
290
- Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
327
+ Need the whole archive rather than an API call? The same official tables are mirrored daily as open data:
291
328
 
292
329
  - Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) โ€” one CSV per institution (`rates/bnb.csv`)
293
330
  - Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
@@ -297,7 +334,7 @@ Need the whole archive rather than an API call? The same published tables are mi
297
334
 
298
335
  - **Website:** [allratestoday.com](https://allratestoday.com)
299
336
  - [Bulgarian National Bank rates page](https://allratestoday.com/central-bank-rates-api/bnb/) โ€” live table, publication cadence, FAQ
300
- - [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
301
338
  - [Download central bank rates](https://allratestoday.com/download-central-bank-rates/) โ€” every bank's latest table and history as Excel, CSV or JSON
302
339
  - [Package docs on the site](https://allratestoday.com/docs/sdk/bnb-exchange-rate/) ยท [ERP integration guides](https://allratestoday.com/docs/integrations/)
303
340
  - [API documentation](https://allratestoday.com/docs/#central-bank) ยท [Interactive reference](https://allratestoday.com/api-reference/) ยท [Methodology](https://allratestoday.com/official-rates-methodology/)
@@ -305,6 +342,7 @@ Need the whole archive rather than an API call? The same published tables are mi
305
342
  - [Status](https://allratestoday.com/status)
306
343
  - [Postman collection](https://allratestoday.com/postman/)
307
344
  - [ChatGPT app](https://chatgpt.com/plugins/plugin_asdk_app_6ae1e76098f48191a285ac3f5ab7a83b) โ€” ask ChatGPT for live and official central bank rates
345
+ - [OpenAPI reference on Bump.sh](https://bump.sh/allratestoday/doc/allratestoday-api) โ€” also on [SwaggerHub](https://app.swaggerhub.com/apis-docs/allratestoday/allratestoday-exchange-rate-central-bank-rates-api/2.2.0)
308
346
  - [GitHub](https://github.com/AllRates-Today/bnb-exchange-rate)
309
347
 
310
348
  ## ๐Ÿ“œ License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bnb-exchange-rate",
3
- "version": "1.3.27",
3
+ "version": "1.3.30",
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",