@allratestoday/bcrd-exchange-rate 1.2.0 → 1.2.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 +13 -12
- 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 Banco Central de la República Dominicana 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,11 +70,11 @@ const pair = await getRate('USD', 'DOP', { apiKey: 'art_live_...' });
|
|
|
68
70
|
{
|
|
69
71
|
bank: 'bcrd',
|
|
70
72
|
name: 'Banco Central de la República Dominicana',
|
|
71
|
-
rate_date: '2026-08-
|
|
73
|
+
rate_date: '2026-08-12', // Banco Central de la República Dominicana's own publication date
|
|
72
74
|
source: 'USD',
|
|
73
75
|
target: 'DOP',
|
|
74
|
-
rate: 58.
|
|
75
|
-
rate_type: '
|
|
76
|
+
rate: 58.7482,
|
|
77
|
+
rate_type: 'sell',
|
|
76
78
|
derived: false,
|
|
77
79
|
method: 'published',
|
|
78
80
|
disclaimer: '…'
|
|
@@ -96,11 +98,10 @@ console.log(table.rate_date, table.rates.length);
|
|
|
96
98
|
{
|
|
97
99
|
bank: 'bcrd',
|
|
98
100
|
name: 'Banco Central de la República Dominicana',
|
|
99
|
-
rate_date: '2026-08-
|
|
101
|
+
rate_date: '2026-08-12',
|
|
100
102
|
rates: [
|
|
101
|
-
{ "base": "USD", "quote": "DOP", "type": "
|
|
102
|
-
{ "base": "USD", "quote": "DOP", "type": "
|
|
103
|
-
{ "base": "USD", "quote": "DOP", "type": "buy", "value": 58.199 },
|
|
103
|
+
{ "base": "USD", "quote": "DOP", "type": "sell", "value": 58.7482 },
|
|
104
|
+
{ "base": "USD", "quote": "DOP", "type": "buy", "value": 58.402 },
|
|
104
105
|
// … the rest of the published table (14 currencies vs DOP)
|
|
105
106
|
],
|
|
106
107
|
disclaimer: '…'
|
|
@@ -140,7 +141,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
140
141
|
import { getHistory } from '@allratestoday/bcrd-exchange-rate';
|
|
141
142
|
|
|
142
143
|
const series = await getHistory(
|
|
143
|
-
{ source: 'USD', target: 'DOP', from: '2026-01-01', to: '2026-08-
|
|
144
|
+
{ source: 'USD', target: 'DOP', from: '2026-01-01', to: '2026-08-12' },
|
|
144
145
|
{ apiKey: 'art_live_...' }
|
|
145
146
|
);
|
|
146
147
|
```
|
|
@@ -153,11 +154,11 @@ const series = await getHistory(
|
|
|
153
154
|
source: 'USD',
|
|
154
155
|
target: 'DOP',
|
|
155
156
|
from: '2026-01-01',
|
|
156
|
-
to: '2026-08-
|
|
157
|
+
to: '2026-08-12',
|
|
157
158
|
count: 152,
|
|
158
159
|
rates: [
|
|
159
160
|
// one entry per publication date
|
|
160
|
-
{ date: '2026-08-
|
|
161
|
+
{ date: '2026-08-12', rate: 58.7482, rate_type: 'sell', derived: false, method: 'published' },
|
|
161
162
|
// …
|
|
162
163
|
],
|
|
163
164
|
disclaimer: '…'
|
|
@@ -170,9 +171,9 @@ Pass `{ symbol: 'USD' }` instead of `source`/`target` to get the raw published r
|
|
|
170
171
|
|
|
171
172
|
## 🗺️ Currencies covered
|
|
172
173
|
|
|
173
|
-
Banco Central de la República Dominicana currently publishes rates covering **
|
|
174
|
+
Banco Central de la República Dominicana currently publishes rates covering **14 currencies** against the DOP (as of the latest table):
|
|
174
175
|
|
|
175
|
-
`AUD` · `BRL` · `CAD` · `CHF` · `CNY` · `DKK` ·
|
|
176
|
+
🇦🇺 `AUD` · 🇧🇷 `BRL` · 🇨🇦 `CAD` · 🇨🇭 `CHF` · 🇨🇳 `CNY` · 🇩🇰 `DKK` · 🇪🇺 `EUR` · 🇬🇧 `GBP` · 🇯🇵 `JPY` · 🇳🇴 `NOK` · 🇸🇪 `SEK` · 🇺🇸 `USD` · 🇻🇪 `VES` · `XDR`
|
|
176
177
|
|
|
177
178
|
## ⚖️ Published vs derived rates
|
|
178
179
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/bcrd-exchange-rate",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Official Banco Central de la República Dominicana (Dominican Republic) daily exchange rates — 14 currencies vs DOP, history since 1991. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bcrd",
|