@allratestoday/pboc-exchange-rate 1.3.6 โ 1.3.9
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 +50 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
[](https://github.com/AllRates-Today/pboc-exchange-rate/blob/main/LICENSE)
|
|
5
5
|
[](https://www.npmjs.com/package/@allratestoday/pboc-exchange-rate)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://allratestoday.com/central-bank-rates-api/pboc/)
|
|
8
|
+
[](https://allratestoday.com/central-bank-rates-api/pboc/)
|
|
7
9
|
|
|
8
10
|
**Official People's Bank of China (China) daily exchange rates for Node.js and TypeScript. The published central bank rates behind tax filings, customs valuations, audits, and compliant invoicing โ not market estimates, but the numbers People's Bank of China itself prints, every business day.**
|
|
9
11
|
|
|
@@ -33,6 +35,46 @@ console.log(r.rate_date, r.rates.length); // the central bank's latest published
|
|
|
33
35
|
|
|
34
36
|
The open endpoint serves the *latest* table only and asks for a visible attribution link. The client below uses the keyed API, which adds point-in-time tables, history, and CSV/XML/Excel output.
|
|
35
37
|
|
|
38
|
+
## ๐ Latest published table
|
|
39
|
+
|
|
40
|
+
[](https://allratestoday.com/central-bank-rates-api/pboc/)
|
|
41
|
+
|
|
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
|
+
|
|
44
|
+
<!-- daily-table:start -->
|
|
45
|
+
Published **2026-10-12** by People's Bank of China โ 25 rates. Updated 2026-10-12.
|
|
46
|
+
|
|
47
|
+
| Base | Quote | Type | Rate |
|
|
48
|
+
| --- | --- | --- | ---: |
|
|
49
|
+
| AUD | CNY | reference | 4.6912 |
|
|
50
|
+
| CAD | CNY | reference | 4.7077 |
|
|
51
|
+
| CHF | CNY | reference | 8.0939 |
|
|
52
|
+
| CNY | AED | reference | 0.54716 |
|
|
53
|
+
| CNY | DKK | reference | 0.9933 |
|
|
54
|
+
| CNY | HUF | reference | 48.4487 |
|
|
55
|
+
| CNY | KRW | reference | 199.73 |
|
|
56
|
+
| CNY | MOP | reference | 1.2015 |
|
|
57
|
+
| CNY | MXN | reference | 2.7392 |
|
|
58
|
+
| CNY | MYR | reference | 0.6078 |
|
|
59
|
+
| CNY | NOK | reference | 1.4236 |
|
|
60
|
+
| CNY | PLN | reference | 0.58205 |
|
|
61
|
+
| CNY | RUB | reference | 12.6958 |
|
|
62
|
+
| CNY | SAR | reference | 0.55949 |
|
|
63
|
+
| CNY | SEK | reference | 1.4894 |
|
|
64
|
+
| CNY | THB | reference | 5.0005 |
|
|
65
|
+
| CNY | TRY | reference | 7.34596 |
|
|
66
|
+
| CNY | ZAR | reference | 2.4574 |
|
|
67
|
+
| EUR | CNY | reference | 7.5258 |
|
|
68
|
+
| GBP | CNY | reference | 8.8913 |
|
|
69
|
+
| HKD | CNY | reference | 0.85768 |
|
|
70
|
+
| JPY | CNY | reference | 0.042506 |
|
|
71
|
+
| NZD | CNY | reference | 3.7696 |
|
|
72
|
+
| SGD | CNY | reference | 5.2455 |
|
|
73
|
+
| USD | CNY | reference | 6.7313 |
|
|
74
|
+
|
|
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
|
+
<!-- daily-table:end -->
|
|
77
|
+
|
|
36
78
|
## ๐ Get your API key
|
|
37
79
|
|
|
38
80
|
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.
|
|
@@ -85,10 +127,10 @@ const pair = await getRate('USD', 'CNY', { apiKey: 'art_live_...' });
|
|
|
85
127
|
{
|
|
86
128
|
bank: 'pboc',
|
|
87
129
|
name: 'People\'s Bank of China',
|
|
88
|
-
rate_date: '2026-10-
|
|
130
|
+
rate_date: '2026-10-12', // People's Bank of China's own publication date
|
|
89
131
|
source: 'USD',
|
|
90
132
|
target: 'CNY',
|
|
91
|
-
rate: 6.
|
|
133
|
+
rate: 6.7313,
|
|
92
134
|
rate_type: 'reference',
|
|
93
135
|
derived: false,
|
|
94
136
|
method: 'published',
|
|
@@ -113,9 +155,9 @@ console.log(table.rate_date, table.rates.length);
|
|
|
113
155
|
{
|
|
114
156
|
bank: 'pboc',
|
|
115
157
|
name: 'People\'s Bank of China',
|
|
116
|
-
rate_date: '2026-10-
|
|
158
|
+
rate_date: '2026-10-12',
|
|
117
159
|
rates: [
|
|
118
|
-
{ "base": "USD", "quote": "CNY", "type": "reference", "value": 6.
|
|
160
|
+
{ "base": "USD", "quote": "CNY", "type": "reference", "value": 6.7313 },
|
|
119
161
|
// โฆ the rest of the published table (25 currencies vs CNY)
|
|
120
162
|
],
|
|
121
163
|
disclaimer: 'โฆ'
|
|
@@ -155,7 +197,7 @@ Paid plans. One resolved rate per publication date โ ready for charting, reval
|
|
|
155
197
|
import { getHistory } from '@allratestoday/pboc-exchange-rate';
|
|
156
198
|
|
|
157
199
|
const series = await getHistory(
|
|
158
|
-
{ source: 'USD', target: 'CNY', from: '2026-01-01', to: '2026-10-
|
|
200
|
+
{ source: 'USD', target: 'CNY', from: '2026-01-01', to: '2026-10-12' },
|
|
159
201
|
{ apiKey: 'art_live_...' }
|
|
160
202
|
);
|
|
161
203
|
```
|
|
@@ -168,11 +210,11 @@ const series = await getHistory(
|
|
|
168
210
|
source: 'USD',
|
|
169
211
|
target: 'CNY',
|
|
170
212
|
from: '2026-01-01',
|
|
171
|
-
to: '2026-10-
|
|
213
|
+
to: '2026-10-12',
|
|
172
214
|
count: 152,
|
|
173
215
|
rates: [
|
|
174
216
|
// one entry per publication date
|
|
175
|
-
{ date: '2026-10-
|
|
217
|
+
{ date: '2026-10-12', rate: 6.7313, rate_type: 'reference', derived: false, method: 'published' },
|
|
176
218
|
// โฆ
|
|
177
219
|
],
|
|
178
220
|
disclaimer: 'โฆ'
|
|
@@ -222,6 +264,7 @@ curl "https://allratestoday.com/api/v1/central-bank/pboc/latest?format=xml&api_k
|
|
|
222
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
|
|
223
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
|
|
224
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
|
+
- Need dated tables or history for an evaluation? 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; the MCP servers expose it as `request_trial_key`
|
|
225
268
|
- Machine-readable site guide: [llms.txt](https://allratestoday.com/llms.txt) ยท [for-ai-agents](https://allratestoday.com/for-ai-agents/)
|
|
226
269
|
|
|
227
270
|
## โ๏ธ Published vs derived rates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allratestoday/pboc-exchange-rate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
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",
|