@allratestoday/sbp-exchange-rate 1.3.9 → 1.3.14
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 +46 -46
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -42,45 +42,45 @@ The open endpoint serves the *latest* table only and asks for a visible attribut
|
|
|
42
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 text copy below is there 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
43
|
|
|
44
44
|
<!-- daily-table:start -->
|
|
45
|
-
Published **2026-10-
|
|
45
|
+
Published **2026-10-16** by State Bank of Pakistan — 35 rates. Updated 2026-10-16.
|
|
46
46
|
|
|
47
47
|
| Base | Quote | Type | Rate |
|
|
48
48
|
| --- | --- | --- | ---: |
|
|
49
|
-
| AED | PKR | reference | 75.
|
|
50
|
-
| ARS | PKR | reference | 0.
|
|
51
|
-
| AUD | PKR | reference |
|
|
52
|
-
| BDT | PKR | reference | 2.
|
|
53
|
-
| BHD | PKR | reference | 733.
|
|
54
|
-
| BRL | PKR | reference |
|
|
55
|
-
| CAD | PKR | reference |
|
|
56
|
-
| CHF | PKR | reference |
|
|
57
|
-
| CNH | PKR | reference | 41.
|
|
58
|
-
| CNY | PKR | reference | 41.
|
|
59
|
-
| DKK | PKR | reference | 41.
|
|
60
|
-
| EUR | PKR | reference |
|
|
61
|
-
| GBP | PKR | reference |
|
|
62
|
-
| HKD | PKR | reference | 35.
|
|
63
|
-
| IDR | PKR | reference | 0.
|
|
64
|
-
| INR | PKR | reference | 2.
|
|
65
|
-
| JPY | PKR | reference | 1.
|
|
66
|
-
| KRW | PKR | reference | 0.
|
|
67
|
-
| KWD | PKR | reference | 898.
|
|
68
|
-
| KZT | PKR | reference | 0.
|
|
69
|
-
| LKR | PKR | reference | 0.
|
|
70
|
-
| MXN | PKR | reference | 15.
|
|
71
|
-
| MYR | PKR | reference | 67.
|
|
72
|
-
| NOK | PKR | reference |
|
|
73
|
-
| NZD | PKR | reference |
|
|
74
|
-
| OMR | PKR | reference | 719.
|
|
75
|
-
| QAR | PKR | reference | 75.
|
|
76
|
-
| RUB | PKR | reference | 3.
|
|
77
|
-
| SAR | PKR | reference | 73.
|
|
78
|
-
| SEK | PKR | reference | 27.
|
|
79
|
-
| SGD | PKR | reference | 216.
|
|
80
|
-
| THB | PKR | reference | 8.
|
|
81
|
-
| TRY | PKR | reference | 5.
|
|
82
|
-
| USD | PKR | reference | 276.
|
|
83
|
-
| ZAR | PKR | reference | 16.
|
|
49
|
+
| AED | PKR | reference | 75.3993 |
|
|
50
|
+
| ARS | PKR | reference | 0.183 |
|
|
51
|
+
| AUD | PKR | reference | 192.7027 |
|
|
52
|
+
| BDT | PKR | reference | 2.2514 |
|
|
53
|
+
| BHD | PKR | reference | 733.055 |
|
|
54
|
+
| BRL | PKR | reference | 54.3129 |
|
|
55
|
+
| CAD | PKR | reference | 195.49 |
|
|
56
|
+
| CHF | PKR | reference | 335.7724 |
|
|
57
|
+
| CNH | PKR | reference | 41.4123 |
|
|
58
|
+
| CNY | PKR | reference | 41.4114 |
|
|
59
|
+
| DKK | PKR | reference | 41.6487 |
|
|
60
|
+
| EUR | PKR | reference | 311.3316 |
|
|
61
|
+
| GBP | PKR | reference | 368.8461 |
|
|
62
|
+
| HKD | PKR | reference | 35.2855 |
|
|
63
|
+
| IDR | PKR | reference | 0.0154 |
|
|
64
|
+
| INR | PKR | reference | 2.9162 |
|
|
65
|
+
| JPY | PKR | reference | 1.7522 |
|
|
66
|
+
| KRW | PKR | reference | 0.2079 |
|
|
67
|
+
| KWD | PKR | reference | 898.6257 |
|
|
68
|
+
| KZT | PKR | reference | 0.6117 |
|
|
69
|
+
| LKR | PKR | reference | 0.8364 |
|
|
70
|
+
| MXN | PKR | reference | 15.054 |
|
|
71
|
+
| MYR | PKR | reference | 67.8372 |
|
|
72
|
+
| NOK | PKR | reference | 29.301 |
|
|
73
|
+
| NZD | PKR | reference | 156.9811 |
|
|
74
|
+
| OMR | PKR | reference | 719.2413 |
|
|
75
|
+
| QAR | PKR | reference | 75.9661 |
|
|
76
|
+
| RUB | PKR | reference | 3.3075 |
|
|
77
|
+
| SAR | PKR | reference | 73.7899 |
|
|
78
|
+
| SEK | PKR | reference | 27.971 |
|
|
79
|
+
| SGD | PKR | reference | 216.3625 |
|
|
80
|
+
| THB | PKR | reference | 8.287 |
|
|
81
|
+
| TRY | PKR | reference | 5.5914 |
|
|
82
|
+
| USD | PKR | reference | 276.9115 |
|
|
83
|
+
| ZAR | PKR | reference | 16.8541 |
|
|
84
84
|
|
|
85
85
|
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.
|
|
86
86
|
<!-- daily-table:end -->
|
|
@@ -137,10 +137,10 @@ const pair = await getRate('USD', 'PKR', { apiKey: 'art_live_...' });
|
|
|
137
137
|
{
|
|
138
138
|
bank: 'sbp',
|
|
139
139
|
name: 'State Bank of Pakistan',
|
|
140
|
-
rate_date: '2026-10-
|
|
140
|
+
rate_date: '2026-10-13', // State Bank of Pakistan's own publication date
|
|
141
141
|
source: 'USD',
|
|
142
142
|
target: 'PKR',
|
|
143
|
-
rate:
|
|
143
|
+
rate: 276.9618,
|
|
144
144
|
rate_type: 'reference',
|
|
145
145
|
derived: false,
|
|
146
146
|
method: 'published',
|
|
@@ -165,9 +165,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
165
165
|
{
|
|
166
166
|
bank: 'sbp',
|
|
167
167
|
name: 'State Bank of Pakistan',
|
|
168
|
-
rate_date: '2026-10-
|
|
168
|
+
rate_date: '2026-10-13',
|
|
169
169
|
rates: [
|
|
170
|
-
{ "base": "USD", "quote": "PKR", "type": "reference", "value":
|
|
170
|
+
{ "base": "USD", "quote": "PKR", "type": "reference", "value": 276.9618 },
|
|
171
171
|
// … the rest of the published table (35 currencies vs PKR)
|
|
172
172
|
],
|
|
173
173
|
disclaimer: '…'
|
|
@@ -207,7 +207,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
207
207
|
import { getHistory } from '@allratestoday/sbp-exchange-rate';
|
|
208
208
|
|
|
209
209
|
const series = await getHistory(
|
|
210
|
-
{ source: 'USD', target: 'PKR', from: '2026-01-01', to: '2026-10-
|
|
210
|
+
{ source: 'USD', target: 'PKR', from: '2026-01-01', to: '2026-10-13' },
|
|
211
211
|
{ apiKey: 'art_live_...' }
|
|
212
212
|
);
|
|
213
213
|
```
|
|
@@ -220,11 +220,11 @@ const series = await getHistory(
|
|
|
220
220
|
source: 'USD',
|
|
221
221
|
target: 'PKR',
|
|
222
222
|
from: '2026-01-01',
|
|
223
|
-
to: '2026-10-
|
|
223
|
+
to: '2026-10-13',
|
|
224
224
|
count: 152,
|
|
225
225
|
rates: [
|
|
226
226
|
// one entry per publication date
|
|
227
|
-
{ date: '2026-10-
|
|
227
|
+
{ date: '2026-10-13', rate: 276.9618, rate_type: 'reference', derived: false, method: 'published' },
|
|
228
228
|
// …
|
|
229
229
|
],
|
|
230
230
|
disclaimer: '…'
|
|
@@ -274,7 +274,7 @@ curl "https://allratestoday.com/api/v1/central-bank/sbp/latest?format=xml&api_ke
|
|
|
274
274
|
- 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
|
|
275
275
|
- 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
|
|
276
276
|
- 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
|
|
277
|
-
-
|
|
277
|
+
- Evaluating? 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 that covers the free-plan methods (latest table, pairs); dated tables and history need a [paid plan](https://allratestoday.com/pricing/). The MCP servers expose it as `request_trial_key`
|
|
278
278
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
279
279
|
|
|
280
280
|
## ⚖️ Published vs derived rates
|
|
@@ -343,9 +343,9 @@ getRate('USD', 'PKR', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
343
343
|
|
|
344
344
|
Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
|
|
345
345
|
|
|
346
|
-
- Hugging Face: [
|
|
346
|
+
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/sbp.csv`)
|
|
347
347
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
348
|
-
-
|
|
348
|
+
- Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/sbp/latest.json`
|
|
349
349
|
|
|
350
350
|
## 🔗 Links
|
|
351
351
|
|
package/package.json
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/sbp-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
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",
|
|
7
|
+
"state-bank-of-pakistan",
|
|
7
8
|
"state",
|
|
8
9
|
"bank",
|
|
9
|
-
"of",
|
|
10
10
|
"pakistan",
|
|
11
11
|
"exchange-rate",
|
|
12
12
|
"exchange-rates",
|
|
13
|
+
"exchangerate",
|
|
14
|
+
"exchange rate",
|
|
15
|
+
"pkr-exchange-rate",
|
|
13
16
|
"currency",
|
|
14
17
|
"forex",
|
|
15
18
|
"fx",
|
|
16
19
|
"pkr",
|
|
20
|
+
"currency-api",
|
|
21
|
+
"currency-exchange-rates",
|
|
22
|
+
"forex-api",
|
|
23
|
+
"currency-conversion",
|
|
24
|
+
"currency-exchange",
|
|
25
|
+
"currency-rates",
|
|
17
26
|
"central-bank",
|
|
18
27
|
"official-rates",
|
|
19
|
-
"pakistan",
|
|
20
28
|
"api",
|
|
21
29
|
"typescript"
|
|
22
30
|
],
|