bcrp-exchange-rate 1.3.1 โ 1.3.3
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 +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
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
|
|
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 mid-market rate 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
20
|
|
|
21
21
|
## โก Try it without a key
|
|
22
22
|
|
|
@@ -85,10 +85,10 @@ const pair = await getRate('USD', 'PEN', { apiKey: 'art_live_...' });
|
|
|
85
85
|
{
|
|
86
86
|
bank: 'bcrp',
|
|
87
87
|
name: 'Central Reserve Bank of Peru',
|
|
88
|
-
rate_date: '2026-09-
|
|
88
|
+
rate_date: '2026-09-24', // Central Reserve Bank of Peru's own publication date
|
|
89
89
|
source: 'USD',
|
|
90
90
|
target: 'PEN',
|
|
91
|
-
rate: 3.
|
|
91
|
+
rate: 3.406,
|
|
92
92
|
rate_type: 'sell',
|
|
93
93
|
derived: false,
|
|
94
94
|
method: 'published',
|
|
@@ -113,10 +113,10 @@ console.log(table.rate_date, table.rates.length);
|
|
|
113
113
|
{
|
|
114
114
|
bank: 'bcrp',
|
|
115
115
|
name: 'Central Reserve Bank of Peru',
|
|
116
|
-
rate_date: '2026-09-
|
|
116
|
+
rate_date: '2026-09-24',
|
|
117
117
|
rates: [
|
|
118
|
-
{ "base": "USD", "quote": "PEN", "type": "sell", "value": 3.
|
|
119
|
-
{ "base": "USD", "quote": "PEN", "type": "buy", "value": 3.
|
|
118
|
+
{ "base": "USD", "quote": "PEN", "type": "sell", "value": 3.406 },
|
|
119
|
+
{ "base": "USD", "quote": "PEN", "type": "buy", "value": 3.4 },
|
|
120
120
|
// โฆ the rest of the published table (2 currencies vs PEN)
|
|
121
121
|
],
|
|
122
122
|
disclaimer: 'โฆ'
|
|
@@ -156,7 +156,7 @@ Paid plans. One resolved rate per publication date โ ready for charting, reval
|
|
|
156
156
|
import { getHistory } from 'bcrp-exchange-rate';
|
|
157
157
|
|
|
158
158
|
const series = await getHistory(
|
|
159
|
-
{ source: 'USD', target: 'PEN', from: '2026-01-01', to: '2026-09-
|
|
159
|
+
{ source: 'USD', target: 'PEN', from: '2026-01-01', to: '2026-09-24' },
|
|
160
160
|
{ apiKey: 'art_live_...' }
|
|
161
161
|
);
|
|
162
162
|
```
|
|
@@ -169,11 +169,11 @@ const series = await getHistory(
|
|
|
169
169
|
source: 'USD',
|
|
170
170
|
target: 'PEN',
|
|
171
171
|
from: '2026-01-01',
|
|
172
|
-
to: '2026-09-
|
|
172
|
+
to: '2026-09-24',
|
|
173
173
|
count: 152,
|
|
174
174
|
rates: [
|
|
175
175
|
// one entry per publication date
|
|
176
|
-
{ date: '2026-09-
|
|
176
|
+
{ date: '2026-09-24', rate: 3.406, rate_type: 'sell', derived: false, method: 'published' },
|
|
177
177
|
// โฆ
|
|
178
178
|
],
|
|
179
179
|
disclaimer: 'โฆ'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bcrp-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
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",
|