@allratestoday/bazg-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.
Files changed (2) hide show
  1. package/README.md +11 -9
  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 Swiss Federal Office for Customs and Border Security itself published, fixed once printed and carrying the tax authority'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,10 +70,10 @@ const pair = await getRate('EUR', 'CHF', { apiKey: 'art_live_...' });
68
70
  {
69
71
  bank: 'bazg',
70
72
  name: 'Swiss Federal Office for Customs and Border Security',
71
- rate_date: '2026-08-12', // Swiss Federal Office for Customs and Border Security's own publication date
73
+ rate_date: '2026-08-14', // Swiss Federal Office for Customs and Border Security's own publication date
72
74
  source: 'EUR',
73
75
  target: 'CHF',
74
- rate: 0.94441,
76
+ rate: 0.94711,
75
77
  rate_type: 'reference',
76
78
  derived: false,
77
79
  method: 'published',
@@ -96,9 +98,9 @@ console.log(table.rate_date, table.rates.length);
96
98
  {
97
99
  bank: 'bazg',
98
100
  name: 'Swiss Federal Office for Customs and Border Security',
99
- rate_date: '2026-08-12',
101
+ rate_date: '2026-08-14',
100
102
  rates: [
101
- { "base": "EUR", "quote": "CHF", "type": "reference", "value": 0.94441 },
103
+ { "base": "EUR", "quote": "CHF", "type": "reference", "value": 0.94711 },
102
104
  // … the rest of the published table (73 currencies vs CHF)
103
105
  ],
104
106
  disclaimer: '…'
@@ -138,7 +140,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
138
140
  import { getHistory } from '@allratestoday/bazg-exchange-rate';
139
141
 
140
142
  const series = await getHistory(
141
- { source: 'EUR', target: 'CHF', from: '2026-01-01', to: '2026-08-12' },
143
+ { source: 'EUR', target: 'CHF', from: '2026-01-01', to: '2026-08-14' },
142
144
  { apiKey: 'art_live_...' }
143
145
  );
144
146
  ```
@@ -151,11 +153,11 @@ const series = await getHistory(
151
153
  source: 'EUR',
152
154
  target: 'CHF',
153
155
  from: '2026-01-01',
154
- to: '2026-08-12',
156
+ to: '2026-08-14',
155
157
  count: 152,
156
158
  rates: [
157
159
  // one entry per publication date
158
- { date: '2026-08-12', rate: 0.94441, rate_type: 'reference', derived: false, method: 'published' },
160
+ { date: '2026-08-14', rate: 0.94711, rate_type: 'reference', derived: false, method: 'published' },
159
161
  // …
160
162
  ],
161
163
  disclaimer: '…'
@@ -168,9 +170,9 @@ Pass `{ symbol: 'EUR' }` instead of `source`/`target` to get the raw published r
168
170
 
169
171
  ## 🗺️ Currencies covered
170
172
 
171
- Swiss Federal Office for Customs and Border Security currently publishes rates covering **74 currencies** (as of the latest table):
173
+ Swiss Federal Office for Customs and Border Security currently publishes rates covering **73 currencies** against the CHF (as of the latest table):
172
174
 
173
- `AED` · `ALL` · `ARS` · `AUD` · `AZN` · `BAM` · `BDT` · `BGN` · `BHD` · `BRL` · `CAD` · `CHF` · `CLP` · `CNY` · `COP` · `CRC` · `CZK` · `DKK` · `DOP` · `DZD` · `EGP` · `ETB` · `EUR` · `GBP` · `GEL` · `GTQ` · `HKD` · `HNL` · `HUF` · `IDR` · `ILS` · `INR` · `ISK` · `JPY` · `KES` · `KHR` · `KRW` · `KWD` · `KYD` · `KZT` · `LBP` · `LKR` · `LYD` · `MAD` · `MUR` · `MXN` · `MYR` · `NGN` · `NOK` · `NZD` · `OMR` · `PAB` · `PEN` · `PHP` · `PKR` · `PLN` · `QAR` · `RON` · `RSD` · `RUB` · `SAR` · `SEK` · `SGD` · `THB` · `TND` · `TRY` · `TWD` · `TZS` · `UAH` · `USD` · `UYU` · `VES` · `VND` · `ZAR`
175
+ 🇦🇪 `AED` · 🇦🇱 `ALL` · 🇦🇷 `ARS` · 🇦🇺 `AUD` · 🇦🇿 `AZN` · 🇧🇦 `BAM` · 🇧🇩 `BDT` · 🇧🇬 `BGN` · 🇧🇭 `BHD` · 🇧🇷 `BRL` · 🇨🇦 `CAD` · 🇨🇱 `CLP` · 🇨🇳 `CNY` · 🇨🇴 `COP` · 🇨🇷 `CRC` · 🇨🇿 `CZK` · 🇩🇰 `DKK` · 🇩🇴 `DOP` · 🇩🇿 `DZD` · 🇪🇬 `EGP` · 🇪🇹 `ETB` · 🇪🇺 `EUR` · 🇬🇧 `GBP` · 🇬🇪 `GEL` · 🇬🇹 `GTQ` · 🇭🇰 `HKD` · 🇭🇳 `HNL` · 🇭🇺 `HUF` · 🇮🇩 `IDR` · 🇮🇱 `ILS` · 🇮🇳 `INR` · 🇮🇸 `ISK` · 🇯🇵 `JPY` · 🇰🇪 `KES` · 🇰🇭 `KHR` · 🇰🇷 `KRW` · 🇰🇼 `KWD` · 🇰🇾 `KYD` · 🇰🇿 `KZT` · 🇱🇧 `LBP` · 🇱🇰 `LKR` · 🇱🇾 `LYD` · 🇲🇦 `MAD` · 🇲🇺 `MUR` · 🇲🇽 `MXN` · 🇲🇾 `MYR` · 🇳🇬 `NGN` · 🇳🇴 `NOK` · 🇳🇿 `NZD` · 🇴🇲 `OMR` · 🇵🇦 `PAB` · 🇵🇪 `PEN` · 🇵🇭 `PHP` · 🇵🇰 `PKR` · 🇵🇱 `PLN` · 🇶🇦 `QAR` · 🇷🇴 `RON` · 🇷🇸 `RSD` · 🇷🇺 `RUB` · 🇸🇦 `SAR` · 🇸🇪 `SEK` · 🇸🇬 `SGD` · 🇹🇭 `THB` · 🇹🇳 `TND` · 🇹🇷 `TRY` · 🇹🇼 `TWD` · 🇹🇿 `TZS` · 🇺🇦 `UAH` · 🇺🇸 `USD` · 🇺🇾 `UYU` · 🇻🇪 `VES` · 🇻🇳 `VND` · 🇿🇦 `ZAR`
174
176
 
175
177
  ## ⚖️ Published vs derived rates
176
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allratestoday/bazg-exchange-rate",
3
- "version": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "description": "Official Swiss Federal Office for Customs and Border Security (Switzerland) daily exchange rates — 73 currencies vs CHF, history since 2000. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "bazg",