snb-exchange-rate 1.3.20 → 1.3.24
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 +41 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,29 +24,52 @@
|
|
|
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
|
-
## ⚡ Try it without a key
|
|
28
|
-
|
|
29
|
-
The latest Swiss National Bank table is also served keyless, CORS-open and edge-cached, for evaluation, embeds and AI agents:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
curl "https://allratestoday.com/api/open/central-bank/snb?source=EUR&target=CHF"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
const r = await fetch('https://allratestoday.com/api/open/central-bank/snb').then((x) => x.json());
|
|
37
|
-
console.log(r.rate_date, r.rates.length); // the central bank's latest published table, no key
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
The open endpoint serves the *latest* table only (JSON by default; add `?format=csv`, `xml` or `xlsx` for a file) and is free to use with a visible, followable link where the rates are shown: `<a href="https://allratestoday.com">Exchange rates by AllRatesToday</a>` (terms: <https://allratestoday.com/terms/#attribution>). The client below uses the keyed API, which adds point-in-time tables and history; with a key the link is appreciated, not required.
|
|
41
|
-
|
|
42
27
|
## 📈 Latest published table
|
|
43
28
|
|
|
44
29
|
[](https://allratestoday.com/central-bank-rates-api/snb/)
|
|
45
30
|
|
|
46
|
-
The image is rendered live from the keyless endpoint
|
|
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.
|
|
47
32
|
|
|
48
33
|
<!-- daily-table:start -->
|
|
49
|
-
|
|
34
|
+
<details>
|
|
35
|
+
<summary>Table as text: published 2026-10-29 by Swiss National Bank — 30 rates. Updated 2026-10-30.</summary>
|
|
36
|
+
|
|
37
|
+
| Base | Quote | Type | Rate |
|
|
38
|
+
| --- | --- | --- | ---: |
|
|
39
|
+
| ARS | CHF | monthly_average | 0.00054 |
|
|
40
|
+
| AUD | CHF | monthly_average | 0.58343 |
|
|
41
|
+
| BRL | CHF | monthly_average | 0.1593254 |
|
|
42
|
+
| CAD | CHF | monthly_average | 0.58688 |
|
|
43
|
+
| CNY | CHF | monthly_average | 0.1221011 |
|
|
44
|
+
| CZK | CHF | monthly_average | 0.0388224 |
|
|
45
|
+
| DKK | CHF | monthly_average | 0.1261671 |
|
|
46
|
+
| EUR | CHF | monthly_average | 0.94312 |
|
|
47
|
+
| EUR | CHF | reference | 0.9227 |
|
|
48
|
+
| GBP | CHF | monthly_average | 1.0993 |
|
|
49
|
+
| GBP | CHF | reference | 1.1031 |
|
|
50
|
+
| HKD | CHF | monthly_average | 0.1044552 |
|
|
51
|
+
| HUF | CHF | monthly_average | 0.0025839 |
|
|
52
|
+
| JPY | CHF | monthly_average | 0.0052383 |
|
|
53
|
+
| JPY | CHF | reference | 0.005247 |
|
|
54
|
+
| KRW | CHF | monthly_average | 0.0006029 |
|
|
55
|
+
| MXN | CHF | monthly_average | 0.0475407 |
|
|
56
|
+
| MYR | CHF | monthly_average | 0.2013008 |
|
|
57
|
+
| NOK | CHF | monthly_average | 0.0873072 |
|
|
58
|
+
| NZD | CHF | monthly_average | 0.47256 |
|
|
59
|
+
| PLN | CHF | monthly_average | 0.2170834 |
|
|
60
|
+
| RUB | CHF | monthly_average | 0.00964 |
|
|
61
|
+
| SEK | CHF | monthly_average | 0.0839625 |
|
|
62
|
+
| SGD | CHF | monthly_average | 0.64366 |
|
|
63
|
+
| THB | CHF | monthly_average | 0.0246599 |
|
|
64
|
+
| TRY | CHF | monthly_average | 0.0168369 |
|
|
65
|
+
| USD | CHF | monthly_average | 0.81926 |
|
|
66
|
+
| USD | CHF | reference | 0.8287 |
|
|
67
|
+
| XDR | CHF | monthly_average | 1.11928 |
|
|
68
|
+
| ZAR | CHF | monthly_average | 0.05052 |
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
Source: [Official rates published by SNB, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/snb/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
|
|
50
73
|
<!-- daily-table:end -->
|
|
51
74
|
|
|
52
75
|
## 📦 Installation
|
|
@@ -209,6 +232,7 @@ The Swiss National Bank publishes 11am franc exchange rates every business day f
|
|
|
209
232
|
|
|
210
233
|
- Publisher's own page: [Current interest rates and exchange rates](https://www.snb.ch/en/the-snb/mandates-goals/statistics/statistics-pub/current_interest_exchange_rates) · [www.snb.ch](https://www.snb.ch)
|
|
211
234
|
- Publication: every business day; the exact schedule, freshness status and any current delay are on the [Swiss National Bank rates page](https://allratestoday.com/central-bank-rates-api/snb/)
|
|
235
|
+
- In the API: usually by **12:20 UTC** (measured over the last 10 publications). Schedule a sync at or after that time and retry hourly until `rate_date` moves; every response carries the same figure as `available_by_utc` — see [when to poll](https://allratestoday.com/docs/#when-to-poll)
|
|
212
236
|
- Values are stored unmodified, with the publisher's own `rate_date` on every row — see the [methodology](https://allratestoday.com/official-rates-methodology/)
|
|
213
237
|
|
|
214
238
|
## 🧭 Reading the numbers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snb-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.24",
|
|
4
4
|
"description": "Official Swiss National Bank (Switzerland) daily exchange rates — 26 currencies vs CHF, history since 1914. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"snb",
|