snb-exchange-rate 1.3.14 โ 1.3.16
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 +9 -39
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
> **Official rate, not mid-market:** every value here is a number Swiss National Bank itself published, fixed once printed and carrying the central bank's own `rate_date` โ what filings and audits require. Need the live mid-market rate 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.
|
|
22
22
|
|
|
23
|
+
## ๐ Get your API key
|
|
24
|
+
|
|
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
|
+
|
|
23
27
|
## โก Try it without a key
|
|
24
28
|
|
|
25
29
|
The latest Swiss National Bank table is also served keyless, CORS-open and edge-cached, for evaluation, embeds and AI agents:
|
|
@@ -33,53 +37,18 @@ const r = await fetch('https://allratestoday.com/api/open/central-bank/snb').the
|
|
|
33
37
|
console.log(r.rate_date, r.rates.length); // the central bank's latest published table, no key
|
|
34
38
|
```
|
|
35
39
|
|
|
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
|
|
40
|
+
The open endpoint serves the *latest* table only (JSON by default; add `?format=csv`, `xml` or `xlsx` for a file) and asks for a visible attribution link. The client below uses the keyed API, which adds point-in-time tables and history.
|
|
37
41
|
|
|
38
42
|
## ๐ Latest published table
|
|
39
43
|
|
|
40
44
|
[](https://allratestoday.com/central-bank-rates-api/snb/)
|
|
41
45
|
|
|
42
|
-
The image is rendered live from the keyless endpoint above, so it follows the central bank's publications on npm and on GitHub alike without a new release. The
|
|
46
|
+
The image is rendered live from the keyless endpoint above, 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.
|
|
43
47
|
|
|
44
48
|
<!-- daily-table:start -->
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
| Base | Quote | Type | Rate |
|
|
48
|
-
| --- | --- | --- | ---: |
|
|
49
|
-
| ARS | CHF | monthly_average | 0.00054 |
|
|
50
|
-
| AUD | CHF | monthly_average | 0.58343 |
|
|
51
|
-
| BRL | CHF | monthly_average | 0.1593254 |
|
|
52
|
-
| CAD | CHF | monthly_average | 0.58688 |
|
|
53
|
-
| CNY | CHF | monthly_average | 0.1221011 |
|
|
54
|
-
| CZK | CHF | monthly_average | 0.0388224 |
|
|
55
|
-
| DKK | CHF | monthly_average | 0.1261671 |
|
|
56
|
-
| EUR | CHF | monthly_average | 0.94312 |
|
|
57
|
-
| GBP | CHF | monthly_average | 1.0993 |
|
|
58
|
-
| HKD | CHF | monthly_average | 0.1044552 |
|
|
59
|
-
| HUF | CHF | monthly_average | 0.0025839 |
|
|
60
|
-
| JPY | CHF | monthly_average | 0.0052383 |
|
|
61
|
-
| KRW | CHF | monthly_average | 0.0006029 |
|
|
62
|
-
| MXN | CHF | monthly_average | 0.0475407 |
|
|
63
|
-
| MYR | CHF | monthly_average | 0.2013008 |
|
|
64
|
-
| NOK | CHF | monthly_average | 0.0873072 |
|
|
65
|
-
| NZD | CHF | monthly_average | 0.47256 |
|
|
66
|
-
| PLN | CHF | monthly_average | 0.2170834 |
|
|
67
|
-
| RUB | CHF | monthly_average | 0.00964 |
|
|
68
|
-
| SEK | CHF | monthly_average | 0.0839625 |
|
|
69
|
-
| SGD | CHF | monthly_average | 0.64366 |
|
|
70
|
-
| THB | CHF | monthly_average | 0.0246599 |
|
|
71
|
-
| TRY | CHF | monthly_average | 0.0168369 |
|
|
72
|
-
| USD | CHF | monthly_average | 0.81926 |
|
|
73
|
-
| XDR | CHF | monthly_average | 1.11928 |
|
|
74
|
-
| ZAR | CHF | monthly_average | 0.05052 |
|
|
75
|
-
|
|
76
|
-
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.
|
|
49
|
+
_The table is filled in by the daily workflow._
|
|
77
50
|
<!-- daily-table:end -->
|
|
78
51
|
|
|
79
|
-
## ๐ Get your API key
|
|
80
|
-
|
|
81
|
-
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.
|
|
82
|
-
|
|
83
52
|
## ๐ฆ Installation
|
|
84
53
|
|
|
85
54
|
```bash
|
|
@@ -344,7 +313,8 @@ Need the whole archive rather than an API call? The same published tables are mi
|
|
|
344
313
|
- [All central bank sources](https://allratestoday.com/central-bank-rates-api/)
|
|
345
314
|
- [Package docs on the site](https://allratestoday.com/docs/sdk/snb-exchange-rate/) ยท [ERP integration guides](https://allratestoday.com/docs/integrations/)
|
|
346
315
|
- [API documentation](https://allratestoday.com/docs/#central-bank) ยท [Interactive reference](https://allratestoday.com/api-reference/) ยท [Methodology](https://allratestoday.com/official-rates-methodology/)
|
|
347
|
-
- [Register (
|
|
316
|
+
- [Register (Free)](https://allratestoday.com/register) ยท [Dashboard](https://allratestoday.com/profile) ยท [Pricing](https://allratestoday.com/pricing/)
|
|
317
|
+
- [Status](https://allratestoday.com/status)
|
|
348
318
|
- [GitHub](https://github.com/AllRates-Today/snb-exchange-rate)
|
|
349
319
|
|
|
350
320
|
## ๐ License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snb-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
4
4
|
"description": "Official Swiss National Bank (Switzerland) monthly exchange rates โ 26 currencies vs CHF, history since 1914. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"snb",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"exchange-rates",
|
|
13
13
|
"exchangerate",
|
|
14
14
|
"exchange rate",
|
|
15
|
+
"exchange rates",
|
|
15
16
|
"chf-exchange-rate",
|
|
16
17
|
"currency",
|
|
17
18
|
"forex",
|