@allratestoday/pboc-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.
- package/README.md +35 -35
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -42,35 +42,35 @@ 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-
|
|
45
|
+
Published **2026-10-16** by People's Bank of China — 25 rates. Updated 2026-10-16.
|
|
46
46
|
|
|
47
47
|
| Base | Quote | Type | Rate |
|
|
48
48
|
| --- | --- | --- | ---: |
|
|
49
|
-
| AUD | CNY | reference | 4.
|
|
50
|
-
| CAD | CNY | reference | 4.
|
|
51
|
-
| CHF | CNY | reference | 8.
|
|
52
|
-
| CNY | AED | reference | 0.
|
|
53
|
-
| CNY | DKK | reference | 0.
|
|
54
|
-
| CNY | HUF | reference | 48.
|
|
55
|
-
| CNY | KRW | reference |
|
|
56
|
-
| CNY | MOP | reference | 1.
|
|
57
|
-
| CNY | MXN | reference | 2.
|
|
58
|
-
| CNY | MYR | reference | 0.
|
|
59
|
-
| CNY | NOK | reference | 1.
|
|
60
|
-
| CNY | PLN | reference | 0.
|
|
61
|
-
| CNY | RUB | reference | 12.
|
|
49
|
+
| AUD | CNY | reference | 4.6416 |
|
|
50
|
+
| CAD | CNY | reference | 4.7261 |
|
|
51
|
+
| CHF | CNY | reference | 8.1099 |
|
|
52
|
+
| CNY | AED | reference | 0.54761 |
|
|
53
|
+
| CNY | DKK | reference | 0.9937 |
|
|
54
|
+
| CNY | HUF | reference | 48.3053 |
|
|
55
|
+
| CNY | KRW | reference | 200.28 |
|
|
56
|
+
| CNY | MOP | reference | 1.203 |
|
|
57
|
+
| CNY | MXN | reference | 2.7458 |
|
|
58
|
+
| CNY | MYR | reference | 0.60792 |
|
|
59
|
+
| CNY | NOK | reference | 1.4131 |
|
|
60
|
+
| CNY | PLN | reference | 0.57998 |
|
|
61
|
+
| CNY | RUB | reference | 12.5152 |
|
|
62
62
|
| CNY | SAR | reference | 0.55949 |
|
|
63
|
-
| CNY | SEK | reference | 1.
|
|
64
|
-
| CNY | THB | reference | 5.
|
|
65
|
-
| CNY | TRY | reference | 7.
|
|
66
|
-
| CNY | ZAR | reference | 2.
|
|
67
|
-
| EUR | CNY | reference | 7.
|
|
68
|
-
| GBP | CNY | reference | 8.
|
|
69
|
-
| HKD | CNY | reference | 0.
|
|
70
|
-
| JPY | CNY | reference | 0.
|
|
71
|
-
| NZD | CNY | reference | 3.
|
|
72
|
-
| SGD | CNY | reference | 5.
|
|
73
|
-
| USD | CNY | reference | 6.
|
|
63
|
+
| CNY | SEK | reference | 1.4837 |
|
|
64
|
+
| CNY | THB | reference | 5.0017 |
|
|
65
|
+
| CNY | TRY | reference | 7.3787 |
|
|
66
|
+
| CNY | ZAR | reference | 2.4606 |
|
|
67
|
+
| EUR | CNY | reference | 7.5228 |
|
|
68
|
+
| GBP | CNY | reference | 8.9037 |
|
|
69
|
+
| HKD | CNY | reference | 0.85658 |
|
|
70
|
+
| JPY | CNY | reference | 0.042439 |
|
|
71
|
+
| NZD | CNY | reference | 3.771 |
|
|
72
|
+
| SGD | CNY | reference | 5.2335 |
|
|
73
|
+
| USD | CNY | reference | 6.722 |
|
|
74
74
|
|
|
75
75
|
Source: [Official rates published by PBOC, served by AllRatesToday](https://allratestoday.com/central-bank-rates-api/pboc/). Rates are as printed by the central bank; AllRatesToday is not affiliated with it.
|
|
76
76
|
<!-- daily-table:end -->
|
|
@@ -127,10 +127,10 @@ const pair = await getRate('USD', 'CNY', { apiKey: 'art_live_...' });
|
|
|
127
127
|
{
|
|
128
128
|
bank: 'pboc',
|
|
129
129
|
name: 'People\'s Bank of China',
|
|
130
|
-
rate_date: '2026-10-
|
|
130
|
+
rate_date: '2026-10-14', // People's Bank of China's own publication date
|
|
131
131
|
source: 'USD',
|
|
132
132
|
target: 'CNY',
|
|
133
|
-
rate: 6.
|
|
133
|
+
rate: 6.7249,
|
|
134
134
|
rate_type: 'reference',
|
|
135
135
|
derived: false,
|
|
136
136
|
method: 'published',
|
|
@@ -155,9 +155,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
155
155
|
{
|
|
156
156
|
bank: 'pboc',
|
|
157
157
|
name: 'People\'s Bank of China',
|
|
158
|
-
rate_date: '2026-10-
|
|
158
|
+
rate_date: '2026-10-14',
|
|
159
159
|
rates: [
|
|
160
|
-
{ "base": "USD", "quote": "CNY", "type": "reference", "value": 6.
|
|
160
|
+
{ "base": "USD", "quote": "CNY", "type": "reference", "value": 6.7249 },
|
|
161
161
|
// … the rest of the published table (25 currencies vs CNY)
|
|
162
162
|
],
|
|
163
163
|
disclaimer: '…'
|
|
@@ -197,7 +197,7 @@ Paid plans. One resolved rate per publication date — ready for charting, reval
|
|
|
197
197
|
import { getHistory } from '@allratestoday/pboc-exchange-rate';
|
|
198
198
|
|
|
199
199
|
const series = await getHistory(
|
|
200
|
-
{ source: 'USD', target: 'CNY', from: '2026-01-01', to: '2026-10-
|
|
200
|
+
{ source: 'USD', target: 'CNY', from: '2026-01-01', to: '2026-10-14' },
|
|
201
201
|
{ apiKey: 'art_live_...' }
|
|
202
202
|
);
|
|
203
203
|
```
|
|
@@ -210,11 +210,11 @@ const series = await getHistory(
|
|
|
210
210
|
source: 'USD',
|
|
211
211
|
target: 'CNY',
|
|
212
212
|
from: '2026-01-01',
|
|
213
|
-
to: '2026-10-
|
|
213
|
+
to: '2026-10-14',
|
|
214
214
|
count: 152,
|
|
215
215
|
rates: [
|
|
216
216
|
// one entry per publication date
|
|
217
|
-
{ date: '2026-10-
|
|
217
|
+
{ date: '2026-10-14', rate: 6.7249, rate_type: 'reference', derived: false, method: 'published' },
|
|
218
218
|
// …
|
|
219
219
|
],
|
|
220
220
|
disclaimer: '…'
|
|
@@ -264,7 +264,7 @@ curl "https://allratestoday.com/api/v1/central-bank/pboc/latest?format=xml&api_k
|
|
|
264
264
|
- 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
|
|
265
265
|
- 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('pboc')` 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
|
|
266
266
|
- 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 pboc ...` command
|
|
267
|
-
-
|
|
267
|
+
- 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`
|
|
268
268
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) · [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
269
269
|
|
|
270
270
|
## ⚖️ Published vs derived rates
|
|
@@ -333,9 +333,9 @@ getRate('USD', 'CNY', { apiKey: 'art_live_...' }).then((pair) => console.log(pai
|
|
|
333
333
|
|
|
334
334
|
Need the whole archive rather than an API call? The same published tables are mirrored daily as open data:
|
|
335
335
|
|
|
336
|
-
- Hugging Face: [
|
|
336
|
+
- Hugging Face: [AllRatesToday/central-bank-exchange-rates](https://huggingface.co/datasets/AllRatesToday/central-bank-exchange-rates) — one CSV per institution (`rates/pboc.csv`)
|
|
337
337
|
- Kaggle: [allratestoday/central-bank-exchange-rates](https://www.kaggle.com/datasets/allratestoday/central-bank-exchange-rates)
|
|
338
|
-
-
|
|
338
|
+
- Raw JSON on GitHub: `https://raw.githubusercontent.com/AllRates-Today/central-bank-exchange-rates/main/data/pboc/latest.json`
|
|
339
339
|
|
|
340
340
|
## 🔗 Links
|
|
341
341
|
|
package/package.json
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/pboc-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"description": "Official People's Bank of China (China) daily exchange rates — 25 currencies vs CNY, history since 2026. Zero-dependency Node.js/TypeScript client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pboc",
|
|
7
|
-
"
|
|
7
|
+
"peoples-bank-of-china",
|
|
8
|
+
"peoples",
|
|
8
9
|
"bank",
|
|
9
|
-
"of",
|
|
10
10
|
"china",
|
|
11
11
|
"exchange-rate",
|
|
12
12
|
"exchange-rates",
|
|
13
|
+
"exchangerate",
|
|
14
|
+
"exchange rate",
|
|
15
|
+
"cny-exchange-rate",
|
|
13
16
|
"currency",
|
|
14
17
|
"forex",
|
|
15
18
|
"fx",
|
|
16
19
|
"cny",
|
|
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
|
-
"china",
|
|
20
28
|
"api",
|
|
21
29
|
"typescript"
|
|
22
30
|
],
|