# People's Bank of China API

> Returns China's Loan Prime Rate fixings, daily yuan central parity rates for currency pairs, and the list of those pairs.

Category: Finance & Crypto. Region: CN. 3 endpoints at `https://api.hoshime.com/v1/pboc/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/pboc
## GET /v1/pboc/lpr

China's Loan Prime Rate, 1-year and 5-year, one item per fixing day, newest first. A window is at most one year.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `from` | string | no | First fixing day, YYYY-MM-DD. Default 364 days before to, the most the site serves at once. |
| `to` | string | no | Last fixing day, YYYY-MM-DD. Default today. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `date` (string), `dateLabel` (string), `rates` (Tenor[]), `rates[].rate` (number (double)), `rates[].tenor` (string)

```bash
curl "https://api.hoshime.com/v1/pboc/lpr" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pboc/centralParity

The daily central parity the PBOC sets for a yuan currency pair, newest first.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `currency` | string | no | Currency pair, such as USD/CNY, EUR/CNY or 100JPY/CNY. Default USD/CNY. The currencies endpoint lists them. (default USD/CNY; e.g. USD/CNY) |
| `from` | string | no | First day, YYYY-MM-DD. Default 30 days ago. |
| `to` | string | no | Last day, YYYY-MM-DD. Default today. |
| `length` | integer | no | Days to return, newest first, from 1 to 100. Default 20. (default 20) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `currency` (string), `items` (ParityRate[]), `items[].date` (string), `items[].rate` (number (double))

```bash
curl "https://api.hoshime.com/v1/pboc/centralParity?currency=USD%2FCNY" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/pboc/currencies

The currency pairs the PBOC publishes a central parity for.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `currency` (string)

```bash
curl "https://api.hoshime.com/v1/pboc/currencies" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
