bcrp-exchange-rate 1.2.0 β†’ 1.3.0

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 +20 -10
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,8 @@
16
16
  - πŸ”· **Type-safe** β€” full TypeScript definitions shipped with the package
17
17
  - 🧾 **Compliance-grade metadata** β€” `rate_type`, publication date, and source disclaimer on every response
18
18
 
19
+ > **Official rate, not mid-market:** every value here is a number Central Reserve Bank of Peru itself published, fixed once printed and carrying the central bank's own `rate_date` β€” what filings and audits require. Need the live interbank midpoint 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.
20
+
19
21
  ## πŸ”‘ Get your API key
20
22
 
21
23
  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.
@@ -68,10 +70,10 @@ const pair = await getRate('USD', 'PEN', { apiKey: 'art_live_...' });
68
70
  {
69
71
  bank: 'bcrp',
70
72
  name: 'Central Reserve Bank of Peru',
71
- rate_date: '2026-08-07', // Central Reserve Bank of Peru's own publication date
73
+ rate_date: '2026-09-07', // Central Reserve Bank of Peru's own publication date
72
74
  source: 'USD',
73
75
  target: 'PEN',
74
- rate: 3.391,
76
+ rate: 3.372,
75
77
  rate_type: 'sell',
76
78
  derived: false,
77
79
  method: 'published',
@@ -96,10 +98,10 @@ console.log(table.rate_date, table.rates.length);
96
98
  {
97
99
  bank: 'bcrp',
98
100
  name: 'Central Reserve Bank of Peru',
99
- rate_date: '2026-08-07',
101
+ rate_date: '2026-09-07',
100
102
  rates: [
101
- { "base": "USD", "quote": "PEN", "type": "sell", "value": 3.391 },
102
- { "base": "USD", "quote": "PEN", "type": "buy", "value": 3.374 },
103
+ { "base": "USD", "quote": "PEN", "type": "sell", "value": 3.372 },
104
+ { "base": "USD", "quote": "PEN", "type": "buy", "value": 3.351 },
103
105
  // … the rest of the published table (2 currencies vs PEN)
104
106
  ],
105
107
  disclaimer: '…'
@@ -139,7 +141,7 @@ Paid plans. One resolved rate per publication date β€” ready for charting, reval
139
141
  import { getHistory } from 'bcrp-exchange-rate';
140
142
 
141
143
  const series = await getHistory(
142
- { source: 'USD', target: 'PEN', from: '2026-01-01', to: '2026-08-07' },
144
+ { source: 'USD', target: 'PEN', from: '2026-01-01', to: '2026-09-07' },
143
145
  { apiKey: 'art_live_...' }
144
146
  );
145
147
  ```
@@ -152,11 +154,11 @@ const series = await getHistory(
152
154
  source: 'USD',
153
155
  target: 'PEN',
154
156
  from: '2026-01-01',
155
- to: '2026-08-07',
157
+ to: '2026-09-07',
156
158
  count: 152,
157
159
  rates: [
158
160
  // one entry per publication date
159
- { date: '2026-08-07', rate: 3.391, rate_type: 'sell', derived: false, method: 'published' },
161
+ { date: '2026-09-07', rate: 3.372, rate_type: 'sell', derived: false, method: 'published' },
160
162
  // …
161
163
  ],
162
164
  disclaimer: '…'
@@ -169,9 +171,9 @@ Pass `{ symbol: 'USD' }` instead of `source`/`target` to get the raw published r
169
171
 
170
172
  ## πŸ—ΊοΈ Currencies covered
171
173
 
172
- Central Reserve Bank of Peru currently publishes rates covering **3 currencies** (as of the latest table):
174
+ Central Reserve Bank of Peru currently publishes rates covering **2 currencies** against the PEN (as of the latest table):
173
175
 
174
- `EUR` Β· `PEN` Β· `USD`
176
+ πŸ‡ͺπŸ‡Ί `EUR` Β· πŸ‡ΊπŸ‡Έ `USD`
175
177
 
176
178
  ## βš–οΈ Published vs derived rates
177
179
 
@@ -235,6 +237,14 @@ getRate('USD', 'PEN', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
235
237
  | `getRatesForDate(date, { apiKey, source?, target? })` | Paid | The official table (or one pair) for a YYYY-MM-DD date |
236
238
  | `getHistory({ symbol \| source+target, from?, to? }, { apiKey })` | Paid | Daily series since 2016 |
237
239
 
240
+ ## πŸ“₯ Bulk data (no key)
241
+
242
+ Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
243
+
244
+ - Hugging Face: [AllRates/central-bank-exchange-rates](https://huggingface.co/datasets/AllRates/central-bank-exchange-rates) β€” one CSV per institution (`rates/bcrp.csv`)
245
+ - Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
246
+ - CDN JSON: `https://cdn.jsdelivr.net/gh/AllRates-Today/central-bank-exchange-rates@main/data/bcrp/latest.json`
247
+
238
248
  ## πŸ”— Links
239
249
 
240
250
  - [Central Reserve Bank of Peru rates page](https://allratestoday.com/central-bank-rates-api/bcrp/) β€” live table, publication cadence, FAQ
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bcrp-exchange-rate",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Official Central Reserve Bank of Peru (Peru) daily exchange rates β€” 2 currencies vs PEN, history since 2016. Zero-dependency Node.js/TypeScript client.",
5
5
  "keywords": [
6
6
  "bcrp",