@allratestoday/sarb-exchange-rate 1.3.5 โ†’ 1.3.7

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 +46 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![license](https://img.shields.io/npm/l/@allratestoday%2Fsarb-exchange-rate.svg)](https://github.com/AllRates-Today/sarb-exchange-rate/blob/main/LICENSE)
5
5
  [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/sarb-exchange-rate)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
7
+ [![USD/ZAR today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fsarb%3Fsource%3DUSD%26target%3DZAR&query=%24.rate&label=USD%2FZAR%20published%20by%20South%20African%20Reserve%20Bank&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/sarb/)
8
+ [![rate date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fsarb%3Fsource%3DUSD%26target%3DZAR&query=%24.rate_date&label=rate%20date&color=555&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/sarb/)
7
9
 
8
10
  **Official South African Reserve Bank (South Africa) 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 South African Reserve Bank itself prints, every business day.**
9
11
 
@@ -33,6 +35,42 @@ console.log(r.rate_date, r.rates.length); // the central bank's latest published
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
+ Today's full South African Reserve Bank table, straight from the central bank's latest publication. On GitHub it is refreshed by [a daily Action](.github/workflows/daily-table.yml) that reads the keyless endpoint above and commits only when the central bank publishes a new table; the copy on npm is as of the package's publish date.
41
+
42
+ <!-- daily-table:start -->
43
+ Published **2026-10-08** by South African Reserve Bank โ€” 23 rates. Updated 2026-10-08.
44
+
45
+ | Base | Quote | Type | Rate |
46
+ | --- | --- | --- | ---: |
47
+ | EUR | ZAR | reference | 18.6341 |
48
+ | GBP | ZAR | reference | 21.9828 |
49
+ | USD | ZAR | reference | 16.6391 |
50
+ | ZAR | AUD | reference | 0.0863 |
51
+ | ZAR | BRL | reference | 0.3016 |
52
+ | ZAR | BWP | reference | 0.8272 |
53
+ | ZAR | CAD | reference | 0.0856 |
54
+ | ZAR | CHF | reference | 0.0501 |
55
+ | ZAR | CNY | reference | 0.4028 |
56
+ | ZAR | DKK | reference | 0.4011 |
57
+ | ZAR | HKD | reference | 0.4716 |
58
+ | ZAR | ILS | reference | 0.1845 |
59
+ | ZAR | INR | reference | 5.8161 |
60
+ | ZAR | JPY | reference | 9.5062 |
61
+ | ZAR | KES | reference | 7.8009 |
62
+ | ZAR | KRW | reference | 80.5353 |
63
+ | ZAR | MWK | reference | 104.213 |
64
+ | ZAR | NOK | reference | 0.5745 |
65
+ | ZAR | NZD | reference | 0.1073 |
66
+ | ZAR | SEK | reference | 0.6006 |
67
+ | ZAR | THB | reference | 2.0214 |
68
+ | ZAR | TWD | reference | 1.9186 |
69
+ | ZAR | ZMW | reference | 1.1975 |
70
+
71
+ Source: [Official rates published by SARB, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/sarb/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
72
+ <!-- daily-table:end -->
73
+
36
74
  ## ๐Ÿ”‘ Get your API key
37
75
 
38
76
  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 +123,10 @@ const pair = await getRate('USD', 'ZAR', { apiKey: 'art_live_...' });
85
123
  {
86
124
  bank: 'sarb',
87
125
  name: 'South African Reserve Bank',
88
- rate_date: '2026-10-06', // South African Reserve Bank's own publication date
126
+ rate_date: '2026-10-08', // South African Reserve Bank's own publication date
89
127
  source: 'USD',
90
128
  target: 'ZAR',
91
- rate: 16.5753,
129
+ rate: 16.6391,
92
130
  rate_type: 'reference',
93
131
  derived: false,
94
132
  method: 'published',
@@ -113,9 +151,9 @@ console.log(table.rate_date, table.rates.length);
113
151
  {
114
152
  bank: 'sarb',
115
153
  name: 'South African Reserve Bank',
116
- rate_date: '2026-10-06',
154
+ rate_date: '2026-10-08',
117
155
  rates: [
118
- { "base": "USD", "quote": "ZAR", "type": "reference", "value": 16.5753 },
156
+ { "base": "USD", "quote": "ZAR", "type": "reference", "value": 16.6391 },
119
157
  // โ€ฆ the rest of the published table (23 currencies vs ZAR)
120
158
  ],
121
159
  disclaimer: 'โ€ฆ'
@@ -155,7 +193,7 @@ Paid plans. One resolved rate per publication date โ€” ready for charting, reval
155
193
  import { getHistory } from '@allratestoday/sarb-exchange-rate';
156
194
 
157
195
  const series = await getHistory(
158
- { source: 'USD', target: 'ZAR', from: '2026-01-01', to: '2026-10-06' },
196
+ { source: 'USD', target: 'ZAR', from: '2026-01-01', to: '2026-10-08' },
159
197
  { apiKey: 'art_live_...' }
160
198
  );
161
199
  ```
@@ -168,11 +206,11 @@ const series = await getHistory(
168
206
  source: 'USD',
169
207
  target: 'ZAR',
170
208
  from: '2026-01-01',
171
- to: '2026-10-06',
209
+ to: '2026-10-08',
172
210
  count: 152,
173
211
  rates: [
174
212
  // one entry per publication date
175
- { date: '2026-10-06', rate: 16.5753, rate_type: 'reference', derived: false, method: 'published' },
213
+ { date: '2026-10-08', rate: 16.6391, rate_type: 'reference', derived: false, method: 'published' },
176
214
  // โ€ฆ
177
215
  ],
178
216
  disclaimer: 'โ€ฆ'
@@ -221,6 +259,7 @@ curl "https://allratestoday.com/api/v1/central-bank/sarb/latest?format=xml&api_k
221
259
 
222
260
  - 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
223
261
  - 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('sarb')` 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
262
+ - 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 sarb ...` command
224
263
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
225
264
 
226
265
  ## โš–๏ธ Published vs derived rates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allratestoday/sarb-exchange-rate",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "Official South African Reserve Bank (South Africa) daily exchange rates โ€” 23 currencies vs ZAR, history since 2000. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "sarb",