@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.
Files changed (2) hide show
  1. package/README.md +46 -46
  2. 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-12** by State Bank of Pakistan — 35 rates. Updated 2026-10-12.
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.407 |
50
- | ARS | PKR | reference | 0.1826 |
51
- | AUD | PKR | reference | 193.0783 |
52
- | BDT | PKR | reference | 2.25 |
53
- | BHD | PKR | reference | 733.3166 |
54
- | BRL | PKR | reference | 55.4802 |
55
- | CAD | PKR | reference | 194.1835 |
56
- | CHF | PKR | reference | 332.781 |
57
- | CNH | PKR | reference | 41.3767 |
58
- | CNY | PKR | reference | 41.3841 |
59
- | DKK | PKR | reference | 41.4755 |
60
- | EUR | PKR | reference | 310.0166 |
61
- | GBP | PKR | reference | 366.6439 |
62
- | HKD | PKR | reference | 35.2936 |
63
- | IDR | PKR | reference | 0.0155 |
64
- | INR | PKR | reference | 2.8937 |
65
- | JPY | PKR | reference | 1.7481 |
66
- | KRW | PKR | reference | 0.2081 |
67
- | KWD | PKR | reference | 898.8274 |
68
- | KZT | PKR | reference | 0.6128 |
69
- | LKR | PKR | reference | 0.837 |
70
- | MXN | PKR | reference | 15.0488 |
71
- | MYR | PKR | reference | 67.84 |
72
- | NOK | PKR | reference | 28.9129 |
73
- | NZD | PKR | reference | 155.1191 |
74
- | OMR | PKR | reference | 719.3654 |
75
- | QAR | PKR | reference | 75.9831 |
76
- | RUB | PKR | reference | 3.2982 |
77
- | SAR | PKR | reference | 73.7475 |
78
- | SEK | PKR | reference | 27.6581 |
79
- | SGD | PKR | reference | 216.3603 |
80
- | THB | PKR | reference | 8.2433 |
81
- | TRY | PKR | reference | 5.6139 |
82
- | USD | PKR | reference | 276.9736 |
83
- | ZAR | PKR | reference | 16.7283 |
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-09', // State Bank of Pakistan's own publication date
140
+ rate_date: '2026-10-13', // State Bank of Pakistan's own publication date
141
141
  source: 'USD',
142
142
  target: 'PKR',
143
- rate: 277.004,
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-09',
168
+ rate_date: '2026-10-13',
169
169
  rates: [
170
- { "base": "USD", "quote": "PKR", "type": "reference", "value": 277.004 },
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-09' },
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-09',
223
+ to: '2026-10-13',
224
224
  count: 152,
225
225
  rates: [
226
226
  // one entry per publication date
227
- { date: '2026-10-09', rate: 277.004, rate_type: 'reference', derived: false, method: 'published' },
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
- - Need dated tables or history for an evaluation? 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; the MCP servers expose it as `request_trial_key`
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: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) — one CSV per institution (`rates/sbp.csv`)
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
- - CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/sbp/latest.json`
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.9",
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
  ],