@allratestoday/bcb-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 +12 -10
- 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 do Brasil 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', 'BRL', { apiKey: 'art_live_...' });
|
|
|
68
70
|
{
|
|
69
71
|
bank: 'bcb',
|
|
70
72
|
name: 'Banco Central do Brasil',
|
|
71
|
-
rate_date: '2026-08-
|
|
73
|
+
rate_date: '2026-08-13', // Banco Central do Brasil's own publication date
|
|
72
74
|
source: 'USD',
|
|
73
75
|
target: 'BRL',
|
|
74
|
-
rate: 5.
|
|
76
|
+
rate: 5.1859,
|
|
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: 'bcb',
|
|
98
100
|
name: 'Banco Central do Brasil',
|
|
99
|
-
rate_date: '2026-08-
|
|
101
|
+
rate_date: '2026-08-13',
|
|
100
102
|
rates: [
|
|
101
|
-
{ "base": "USD", "quote": "BRL", "type": "sell", "value": 5.
|
|
102
|
-
{ "base": "USD", "quote": "BRL", "type": "buy", "value": 5.
|
|
103
|
+
{ "base": "USD", "quote": "BRL", "type": "sell", "value": 5.1859 },
|
|
104
|
+
{ "base": "USD", "quote": "BRL", "type": "buy", "value": 5.1853 },
|
|
103
105
|
// … the rest of the published table (156 currencies vs BRL)
|
|
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 '@allratestoday/bcb-exchange-rate';
|
|
140
142
|
|
|
141
143
|
const series = await getHistory(
|
|
142
|
-
{ source: 'USD', target: 'BRL', from: '2026-01-01', to: '2026-08-
|
|
144
|
+
{ source: 'USD', target: 'BRL', from: '2026-01-01', to: '2026-08-13' },
|
|
143
145
|
{ apiKey: 'art_live_...' }
|
|
144
146
|
);
|
|
145
147
|
```
|
|
@@ -152,11 +154,11 @@ const series = await getHistory(
|
|
|
152
154
|
source: 'USD',
|
|
153
155
|
target: 'BRL',
|
|
154
156
|
from: '2026-01-01',
|
|
155
|
-
to: '2026-08-
|
|
157
|
+
to: '2026-08-13',
|
|
156
158
|
count: 152,
|
|
157
159
|
rates: [
|
|
158
160
|
// one entry per publication date
|
|
159
|
-
{ date: '2026-08-
|
|
161
|
+
{ date: '2026-08-13', rate: 5.1859, 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
|
-
Banco Central do Brasil currently publishes rates covering **
|
|
174
|
+
Banco Central do Brasil currently publishes rates covering **156 currencies** against the BRL (as of the latest table):
|
|
173
175
|
|
|
174
|
-
`AED` · `AFN` · `ALL` · `AMD` · `AOA` · `ARS` · `AUD` · `AWG` · `AZN` · `BBD` · `BDT` · `BHD` · `BIF` · `BMD` · `BND` · `BOB` ·
|
|
176
|
+
🇦🇪 `AED` · 🇦🇫 `AFN` · 🇦🇱 `ALL` · 🇦🇲 `AMD` · 🇦🇴 `AOA` · 🇦🇷 `ARS` · 🇦🇺 `AUD` · 🇦🇼 `AWG` · 🇦🇿 `AZN` · 🇧🇧 `BBD` · 🇧🇩 `BDT` · 🇧🇭 `BHD` · 🇧🇮 `BIF` · 🇧🇲 `BMD` · 🇧🇳 `BND` · 🇧🇴 `BOB` · 🇧🇸 `BSD` · 🇧🇹 `BTN` · 🇧🇼 `BWP` · 🇧🇾 `BYN` · 🇧🇿 `BZD` · 🇨🇦 `CAD` · 🇨🇩 `CDF` · 🇨🇭 `CHF` · 🇨🇱 `CLF` · 🇨🇱 `CLP` · 🇨🇳 `CNH` · 🇨🇳 `CNY` · 🇨🇴 `COP` · 🇨🇴 `COU` · 🇨🇷 `CRC` · 🇨🇺 `CUP` · 🇨🇻 `CVE` · 🇨🇿 `CZK` · 🇩🇯 `DJF` · 🇩🇰 `DKK` · 🇩🇴 `DOP` · 🇩🇿 `DZD` · 🇪🇬 `EGP` · 🇪🇷 `ERN` · 🇪🇹 `ETB` · 🇪🇺 `EUR` · 🇫🇯 `FJD` · 🇫🇰 `FKP` · 🇬🇧 `GBP` · 🇬🇪 `GEL` · 🇬🇭 `GHS` · 🇬🇮 `GIP` · 🇬🇲 `GMD` · 🇬🇳 `GNF` · 🇬🇹 `GTQ` · 🇬🇾 `GYD` · 🇭🇰 `HKD` · 🇭🇳 `HNL` · 🇭🇹 `HTG` · 🇭🇺 `HUF` · 🇮🇩 `IDR` · 🇮🇱 `ILS` · 🇮🇳 `INR` · 🇮🇶 `IQD` · 🇮🇷 `IRR` · 🇮🇸 `ISK` · 🇯🇲 `JMD` · 🇯🇴 `JOD` · 🇯🇵 `JPY` · 🇰🇪 `KES` · 🇰🇬 `KGS` · 🇰🇭 `KHR` · 🇰🇲 `KMF` · 🇰🇷 `KRW` · 🇰🇼 `KWD` · 🇰🇾 `KYD` · 🇰🇿 `KZT` · 🇱🇦 `LAK` · 🇱🇧 `LBP` · 🇱🇰 `LKR` · 🇱🇷 `LRD` · 🇱🇸 `LSL` · 🇱🇾 `LYD` · 🇲🇦 `MAD` · 🇲🇩 `MDL` · 🇲🇬 `MGA` · 🇲🇰 `MKD` · 🇲🇲 `MMK` · 🇲🇳 `MNT` · 🇲🇴 `MOP` · 🇲🇷 `MRO` · 🇲🇷 `MRU` · 🇲🇺 `MUR` · 🇲🇻 `MVR` · 🇲🇼 `MWK` · 🇲🇽 `MXN` · 🇲🇾 `MYR` · 🇲🇿 `MZN` · 🇳🇦 `NAD` · 🇳🇬 `NGN` · 🇳🇮 `NIO` · 🇳🇴 `NOK` · 🇳🇵 `NPR` · 🇳🇿 `NZD` · 🇴🇲 `OMR` · 🇵🇦 `PAB` · 🇵🇪 `PEN` · 🇵🇬 `PGK` · 🇵🇭 `PHP` · 🇵🇰 `PKR` · 🇵🇱 `PLN` · 🇵🇾 `PYG` · 🇶🇦 `QAR` · 🇷🇴 `RON` · 🇷🇸 `RSD` · 🇷🇺 `RUB` · 🇷🇼 `RWF` · 🇸🇦 `SAR` · 🇸🇧 `SBD` · 🇸🇨 `SCR` · 🇸🇩 `SDG` · `SDR` · 🇸🇪 `SEK` · 🇸🇬 `SGD` · 🇸🇭 `SHP` · 🇸🇱 `SLL` · 🇸🇴 `SOS` · 🇸🇷 `SRD` · 🇸🇸 `SSP` · 🇸🇹 `STN` · 🇸🇻 `SVC` · 🇸🇾 `SYP` · 🇸🇿 `SZL` · 🇹🇭 `THB` · 🇹🇯 `TJS` · 🇹🇲 `TMT` · 🇹🇳 `TND` · 🇹🇴 `TOP` · 🇹🇷 `TRY` · 🇹🇹 `TTD` · 🇹🇼 `TWD` · 🇹🇿 `TZS` · 🇺🇦 `UAH` · 🇺🇬 `UGX` · 🇺🇸 `USD` · 🇺🇾 `UYU` · 🇺🇿 `UZS` · 🇻🇪 `VES` · 🇻🇳 `VND` · 🇻🇺 `VUV` · 🇼🇸 `WST` · `XAF` · `XAU` · `XCD` · `XCG` · `XOF` · `XPF` · 🇾🇪 `YER` · 🇿🇦 `ZAR` · 🇿🇲 `ZMW`
|
|
175
177
|
|
|
176
178
|
## ⚖️ Published vs derived rates
|
|
177
179
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/bcb-exchange-rate",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Official Banco Central do Brasil (Brazil) daily exchange rates — 156 currencies vs BRL, history since 2016. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bcb",
|