@allratestoday/bazg-exchange-rate 1.3.6 โ 1.3.9
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 +85 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
[](https://github.com/AllRates-Today/bazg-exchange-rate/blob/main/LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/@allratestoday/bazg-exchange-rate)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://allratestoday.com/tax-authority-rates-api/bazg/)
|
|
8
|
+
[](https://allratestoday.com/tax-authority-rates-api/bazg/)
|
|
7
9
|
|
|
8
10
|
**Official Swiss Federal Office for Customs and Border Security (Switzerland) daily exchange rates for Node.js and TypeScript. The published tax authority rates behind tax filings, customs valuations, audits, and compliant invoicing โ not market estimates, but the numbers Swiss Federal Office for Customs and Border Security itself prints, every business day.**
|
|
9
11
|
|
|
@@ -33,6 +35,81 @@ console.log(r.rate_date, r.rates.length); // the tax authority's latest publishe
|
|
|
33
35
|
|
|
34
36
|
The open endpoint serves the *latest* table only and asks for a visible attribution link. The client below uses the keyed API, which adds point-in-time tables, history, and CSV/XML/Excel output.
|
|
35
37
|
|
|
38
|
+
## ๐ Latest published table
|
|
39
|
+
|
|
40
|
+
[](https://allratestoday.com/tax-authority-rates-api/bazg/)
|
|
41
|
+
|
|
42
|
+
The image is rendered live from the keyless endpoint above, so it follows the tax authority's publications on npm and on GitHub alike without a new release. The text copy below is there for search and copy-paste: on GitHub [a daily Action](.github/workflows/daily-table.yml) refreshes it whenever the tax authority publishes a new table; on npm it is as of the package's publish date.
|
|
43
|
+
|
|
44
|
+
<!-- daily-table:start -->
|
|
45
|
+
Published **2026-10-13** by Swiss Federal Office for Customs and Border Security โ 144 rates, first 60 shown. Updated 2026-10-12.
|
|
46
|
+
|
|
47
|
+
| Base | Quote | Type | Rate |
|
|
48
|
+
| --- | --- | --- | ---: |
|
|
49
|
+
| AED | CHF | monthly_average | 0.223808 |
|
|
50
|
+
| AED | CHF | reference | 0.228139 |
|
|
51
|
+
| ALL | CHF | monthly_average | 0.010393 |
|
|
52
|
+
| ALL | CHF | reference | 0.0102847 |
|
|
53
|
+
| ARS | CHF | monthly_average | 0.0005 |
|
|
54
|
+
| ARS | CHF | reference | 0.00056 |
|
|
55
|
+
| AUD | CHF | monthly_average | 0.5882 |
|
|
56
|
+
| AUD | CHF | reference | 0.58571 |
|
|
57
|
+
| AZN | CHF | monthly_average | 0.4833 |
|
|
58
|
+
| AZN | CHF | reference | 0.49285 |
|
|
59
|
+
| BAM | CHF | monthly_average | 0.486391 |
|
|
60
|
+
| BAM | CHF | reference | 0.4805523 |
|
|
61
|
+
| BDT | CHF | monthly_average | 0.006724 |
|
|
62
|
+
| BDT | CHF | reference | 0.0068431 |
|
|
63
|
+
| BHD | CHF | monthly_average | 2.1912 |
|
|
64
|
+
| BHD | CHF | reference | 2.2312 |
|
|
65
|
+
| BRL | CHF | monthly_average | 0.160109 |
|
|
66
|
+
| BRL | CHF | reference | 0.1679251 |
|
|
67
|
+
| CAD | CHF | monthly_average | 0.5914 |
|
|
68
|
+
| CAD | CHF | reference | 0.58788 |
|
|
69
|
+
| CLP | CHF | monthly_average | 0.0008762 |
|
|
70
|
+
| CLP | CHF | reference | 0.0008583 |
|
|
71
|
+
| CNY | CHF | monthly_average | 0.122449 |
|
|
72
|
+
| CNY | CHF | reference | 0.1251976 |
|
|
73
|
+
| COP | CHF | monthly_average | 0.00026105 |
|
|
74
|
+
| COP | CHF | reference | 0.000264711 |
|
|
75
|
+
| CRC | CHF | monthly_average | 0.0018244 |
|
|
76
|
+
| CRC | CHF | reference | 0.0018422 |
|
|
77
|
+
| CZK | CHF | monthly_average | 0.039265 |
|
|
78
|
+
| CZK | CHF | reference | 0.0385672 |
|
|
79
|
+
| DKK | CHF | monthly_average | 0.127183 |
|
|
80
|
+
| DKK | CHF | reference | 0.1256985 |
|
|
81
|
+
| DOP | CHF | monthly_average | 0.014178 |
|
|
82
|
+
| DOP | CHF | reference | 0.0138527 |
|
|
83
|
+
| DZD | CHF | monthly_average | 0.00623 |
|
|
84
|
+
| DZD | CHF | reference | 0.0063015 |
|
|
85
|
+
| EGP | CHF | monthly_average | 0.016083 |
|
|
86
|
+
| EGP | CHF | reference | 0.0161357 |
|
|
87
|
+
| ETB | CHF | monthly_average | 0.005063 |
|
|
88
|
+
| ETB | CHF | reference | 0.0051647 |
|
|
89
|
+
| EUR | CHF | monthly_average | 0.9507 |
|
|
90
|
+
| EUR | CHF | reference | 0.93951 |
|
|
91
|
+
| GBP | CHF | monthly_average | 1.1085 |
|
|
92
|
+
| GBP | CHF | reference | 1.11009 |
|
|
93
|
+
| GEL | CHF | monthly_average | 0.319302 |
|
|
94
|
+
| GEL | CHF | reference | 0.3268296 |
|
|
95
|
+
| GTQ | CHF | monthly_average | 0.110533 |
|
|
96
|
+
| GTQ | CHF | reference | 0.1131792 |
|
|
97
|
+
| HKD | CHF | monthly_average | 0.104786 |
|
|
98
|
+
| HKD | CHF | reference | 0.106757 |
|
|
99
|
+
| HNL | CHF | monthly_average | 0.031114 |
|
|
100
|
+
| HNL | CHF | reference | 0.0319732 |
|
|
101
|
+
| HUF | CHF | monthly_average | 0.0026132 |
|
|
102
|
+
| HUF | CHF | reference | 0.0025772 |
|
|
103
|
+
| IDR | CHF | monthly_average | 0.00004646 |
|
|
104
|
+
| IDR | CHF | reference | 0.000046874 |
|
|
105
|
+
| ILS | CHF | monthly_average | 0.2735 |
|
|
106
|
+
| ILS | CHF | reference | 0.27438 |
|
|
107
|
+
| INR | CHF | monthly_average | 0.008621 |
|
|
108
|
+
| INR | CHF | reference | 0.0086576 |
|
|
109
|
+
|
|
110
|
+
[Full table on the Swiss Federal Office for Customs and Border Security rates page](https://allratestoday.com/tax-authority-rates-api/bazg/) ยท Source: [Official rates published by BAZG, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/bazg/). Rates are as printed by the tax authority; AllRatesToday is not affiliated with it.
|
|
111
|
+
<!-- daily-table:end -->
|
|
112
|
+
|
|
36
113
|
## ๐ Get your API key
|
|
37
114
|
|
|
38
115
|
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.
|
|
@@ -85,10 +162,10 @@ const pair = await getRate('EUR', 'CHF', { apiKey: 'art_live_...' });
|
|
|
85
162
|
{
|
|
86
163
|
bank: 'bazg',
|
|
87
164
|
name: 'Swiss Federal Office for Customs and Border Security',
|
|
88
|
-
rate_date: '2026-10-
|
|
165
|
+
rate_date: '2026-10-13', // Swiss Federal Office for Customs and Border Security's own publication date
|
|
89
166
|
source: 'EUR',
|
|
90
167
|
target: 'CHF',
|
|
91
|
-
rate: 0.
|
|
168
|
+
rate: 0.93951,
|
|
92
169
|
rate_type: 'reference',
|
|
93
170
|
derived: false,
|
|
94
171
|
method: 'published',
|
|
@@ -113,9 +190,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
113
190
|
{
|
|
114
191
|
bank: 'bazg',
|
|
115
192
|
name: 'Swiss Federal Office for Customs and Border Security',
|
|
116
|
-
rate_date: '2026-10-
|
|
193
|
+
rate_date: '2026-10-13',
|
|
117
194
|
rates: [
|
|
118
|
-
{ "base": "EUR", "quote": "CHF", "type": "reference", "value": 0.
|
|
195
|
+
{ "base": "EUR", "quote": "CHF", "type": "reference", "value": 0.93951 },
|
|
119
196
|
{ "base": "EUR", "quote": "CHF", "type": "monthly_average", "value": 0.9507 },
|
|
120
197
|
// โฆ the rest of the published table (73 currencies vs CHF)
|
|
121
198
|
],
|
|
@@ -156,7 +233,7 @@ Paid plans. One resolved rate per publication date โ ready for charting, reval
|
|
|
156
233
|
import { getHistory } from '@allratestoday/bazg-exchange-rate';
|
|
157
234
|
|
|
158
235
|
const series = await getHistory(
|
|
159
|
-
{ source: 'EUR', target: 'CHF', from: '2026-01-01', to: '2026-10-
|
|
236
|
+
{ source: 'EUR', target: 'CHF', from: '2026-01-01', to: '2026-10-13' },
|
|
160
237
|
{ apiKey: 'art_live_...' }
|
|
161
238
|
);
|
|
162
239
|
```
|
|
@@ -169,11 +246,11 @@ const series = await getHistory(
|
|
|
169
246
|
source: 'EUR',
|
|
170
247
|
target: 'CHF',
|
|
171
248
|
from: '2026-01-01',
|
|
172
|
-
to: '2026-10-
|
|
249
|
+
to: '2026-10-13',
|
|
173
250
|
count: 152,
|
|
174
251
|
rates: [
|
|
175
252
|
// one entry per publication date
|
|
176
|
-
{ date: '2026-10-
|
|
253
|
+
{ date: '2026-10-13', rate: 0.93951, rate_type: 'reference', derived: false, method: 'published' },
|
|
177
254
|
// โฆ
|
|
178
255
|
],
|
|
179
256
|
disclaimer: 'โฆ'
|
|
@@ -223,6 +300,7 @@ curl "https://allratestoday.com/api/v1/central-bank/bazg/latest?format=xml&api_k
|
|
|
223
300
|
- MCP server: `npx -y @allratestoday/central-bank-mcp` (stdio) or the hosted endpoint `https://allratestoday.com/api/mcp` โ tools for official rates, history, cross-bank comparison and publication calendars
|
|
224
301
|
- Already using the general SDK or MCP server? Since 2026-10-01 [`@allratestoday/sdk`](https://www.npmjs.com/package/@allratestoday/sdk) 1.4+ has `officialRates('bazg')` and [`@allratestoday/mcp-server`](https://www.npmjs.com/package/@allratestoday/mcp-server) 0.6+ has a `get_official_rates` tool โ both return this source's latest table with no key, so you can add it without a second dependency
|
|
225
302
|
- Claude Code plugin (no key): `/plugin marketplace add AllRates-Today/claude-code-plugin` then `/plugin install allratestoday@allratestoday` โ bundles both MCP servers plus an `/official-rate bazg ...` command
|
|
303
|
+
- Need dated tables or history for an evaluation? 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; the MCP servers expose it as `request_trial_key`
|
|
226
304
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
227
305
|
|
|
228
306
|
## โ๏ธ Published vs derived rates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/bazg-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
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",
|