@allratestoday/sbp-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 +58 -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%2Fsbp-exchange-rate.svg)](https://github.com/AllRates-Today/sbp-exchange-rate/blob/main/LICENSE)
5
5
  [![zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](https://www.npmjs.com/package/@allratestoday/sbp-exchange-rate)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
7
+ [![USD/PKR today](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fsbp%3Fsource%3DUSD%26target%3DPKR&query=%24.rate&label=USD%2FPKR%20published%20by%20State%20Bank%20of%20Pakistan&color=0A7E8C&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/sbp/)
8
+ [![rate date](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fallratestoday.com%2Fapi%2Fopen%2Fcentral-bank%2Fsbp%3Fsource%3DUSD%26target%3DPKR&query=%24.rate_date&label=rate%20date&color=555&cacheSeconds=3600)](https://allratestoday.com/central-bank-rates-api/sbp/)
7
9
 
8
10
  **Official State Bank of Pakistan (Pakistan) 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 State Bank of Pakistan itself prints, every business day.**
9
11
 
@@ -33,6 +35,54 @@ 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 State Bank of Pakistan 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 State Bank of Pakistan โ€” 35 rates. Updated 2026-10-08.
44
+
45
+ | Base | Quote | Type | Rate |
46
+ | --- | --- | --- | ---: |
47
+ | AED | PKR | reference | 75.425 |
48
+ | ARS | PKR | reference | 0.1825 |
49
+ | AUD | PKR | reference | 192.6904 |
50
+ | BDT | PKR | reference | 2.2467 |
51
+ | BHD | PKR | reference | 734.4326 |
52
+ | BRL | PKR | reference | 55.199 |
53
+ | CAD | PKR | reference | 194.3339 |
54
+ | CHF | PKR | reference | 332.1104 |
55
+ | CNH | PKR | reference | 41.3274 |
56
+ | CNY | PKR | reference | 41.3342 |
57
+ | DKK | PKR | reference | 41.4641 |
58
+ | EUR | PKR | reference | 309.8948 |
59
+ | GBP | PKR | reference | 365.5606 |
60
+ | HKD | PKR | reference | 35.3005 |
61
+ | IDR | PKR | reference | 0.0155 |
62
+ | INR | PKR | reference | 2.8622 |
63
+ | JPY | PKR | reference | 1.7511 |
64
+ | KRW | PKR | reference | 0.2064 |
65
+ | KWD | PKR | reference | 898.956 |
66
+ | KZT | PKR | reference | 0.6181 |
67
+ | LKR | PKR | reference | 0.8377 |
68
+ | MXN | PKR | reference | 15.3775 |
69
+ | MYR | PKR | reference | 67.7543 |
70
+ | NOK | PKR | reference | 28.9536 |
71
+ | NZD | PKR | reference | 154.9335 |
72
+ | OMR | PKR | reference | 719.5244 |
73
+ | QAR | PKR | reference | 75.994 |
74
+ | RUB | PKR | reference | 3.2339 |
75
+ | SAR | PKR | reference | 73.7876 |
76
+ | SEK | PKR | reference | 27.6903 |
77
+ | SGD | PKR | reference | 216.1886 |
78
+ | THB | PKR | reference | 8.2297 |
79
+ | TRY | PKR | reference | 5.6286 |
80
+ | USD | PKR | reference | 277.0133 |
81
+ | ZAR | PKR | reference | 16.6252 |
82
+
83
+ Source: [Official rates published by SBP, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/sbp/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
84
+ <!-- daily-table:end -->
85
+
36
86
  ## ๐Ÿ”‘ Get your API key
37
87
 
38
88
  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 +135,10 @@ const pair = await getRate('USD', 'PKR', { apiKey: 'art_live_...' });
85
135
  {
86
136
  bank: 'sbp',
87
137
  name: 'State Bank of Pakistan',
88
- rate_date: '2026-10-06', // State Bank of Pakistan's own publication date
138
+ rate_date: '2026-10-08', // State Bank of Pakistan's own publication date
89
139
  source: 'USD',
90
140
  target: 'PKR',
91
- rate: 277.0545,
141
+ rate: 277.0133,
92
142
  rate_type: 'reference',
93
143
  derived: false,
94
144
  method: 'published',
@@ -113,9 +163,9 @@ console.log(table.rate_date, table.rates.length);
113
163
  {
114
164
  bank: 'sbp',
115
165
  name: 'State Bank of Pakistan',
116
- rate_date: '2026-10-06',
166
+ rate_date: '2026-10-08',
117
167
  rates: [
118
- { "base": "USD", "quote": "PKR", "type": "reference", "value": 277.0545 },
168
+ { "base": "USD", "quote": "PKR", "type": "reference", "value": 277.0133 },
119
169
  // โ€ฆ the rest of the published table (35 currencies vs PKR)
120
170
  ],
121
171
  disclaimer: 'โ€ฆ'
@@ -155,7 +205,7 @@ Paid plans. One resolved rate per publication date โ€” ready for charting, reval
155
205
  import { getHistory } from '@allratestoday/sbp-exchange-rate';
156
206
 
157
207
  const series = await getHistory(
158
- { source: 'USD', target: 'PKR', from: '2026-01-01', to: '2026-10-06' },
208
+ { source: 'USD', target: 'PKR', from: '2026-01-01', to: '2026-10-08' },
159
209
  { apiKey: 'art_live_...' }
160
210
  );
161
211
  ```
@@ -168,11 +218,11 @@ const series = await getHistory(
168
218
  source: 'USD',
169
219
  target: 'PKR',
170
220
  from: '2026-01-01',
171
- to: '2026-10-06',
221
+ to: '2026-10-08',
172
222
  count: 152,
173
223
  rates: [
174
224
  // one entry per publication date
175
- { date: '2026-10-06', rate: 277.0545, rate_type: 'reference', derived: false, method: 'published' },
225
+ { date: '2026-10-08', rate: 277.0133, rate_type: 'reference', derived: false, method: 'published' },
176
226
  // โ€ฆ
177
227
  ],
178
228
  disclaimer: 'โ€ฆ'
@@ -221,6 +271,7 @@ curl "https://allratestoday.com/api/v1/central-bank/sbp/latest?format=xml&api_ke
221
271
 
222
272
  - 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
273
  - 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('sbp')` 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
274
+ - 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 sbp ...` command
224
275
  - Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
225
276
 
226
277
  ## โš–๏ธ Published vs derived rates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allratestoday/sbp-exchange-rate",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "Official State Bank of Pakistan (Pakistan) daily exchange rates โ€” 35 currencies vs PKR, history since 2017. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "sbp",