# Bank of Japan API

> Returns Bank of Japan monetary base, policy and money-market rates, and pre-built time-series tables.

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

Japan's monetary base and its components, monthly, newest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `from` | string | no | Earliest period, YYYY-MM. |
| `to` | string | no | Latest period, YYYY-MM. |
| `length` | integer | no | Observations per series, newest first. Default 60, max 20000. (default 60) |
| `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: `frequency` (string), `name` (string), `series` (Series[]), `series[].code` (string), `series[].name` (string), `series[].observations` (Observation[]), `series[].unit` (string), `table` (string)

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

## GET /v1/boj/table

The series of one Bank of Japan database at one frequency, selected by layer.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `table` | string | yes | Database name from the tables endpoint, such as IR01 or FM02. (one of IR01, IR02, IR03, IR04, FM01, FM02, FM03, FM04, FM05, FM06, FM07, FM08, FM09, PS01, PS02, MD01, MD02, MD03, MD04, MD05, MD06, MD07, MD08, MD09, MD10, MD11, MD12, MD13, MD14, LA01, LA02, LA03, LA04, LA05, BS01, BS02, FF, OB01, OB02, CO, PR01, PR02, PR03, PR04, PF01, PF02, BP01, BIS, DER, OT; e.g. IR01) |
| `frequency` | string | no | CY calendar year, FY fiscal year, CH calendar half-year, FH fiscal half-year, Q quarterly, M monthly, W weekly, D daily. Default M. (one of CY, FY, CH, FH, Q, M, W, D; default M) |
| `layer` | string | no | Layer information that selects series within the database: up to five levels separated by commas, each a number or *, such as 1,2. A database of more than 1,250 series, such as PR01, CO, FF or BP01, needs a narrower layer than the default *. (default *) |
| `from` | string | no | Earliest period, YYYY, YYYY-MM or YYYY-MM-DD to match the frequency. |
| `to` | string | no | Latest period, YYYY, YYYY-MM or YYYY-MM-DD to match the frequency. |
| `length` | integer | no | Observations per series, newest first. Default 120, max 20000. (default 120) |
| `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: `frequency` (string), `name` (string), `series` (Series[]), `series[].code` (string), `series[].name` (string), `series[].observations` (Observation[]), `series[].unit` (string), `table` (string)

```bash
curl "https://api.hoshime.com/v1/boj/table?table=IR01" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/boj/rates

The Bank of Japan's policy and money-market rates: the basic loan rate and the call rate.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `frequency` | string | no | daily reads the basic loan rate and the average uncollateralized overnight call rate, monthly reads the basic loan rate and that call rate at month end and on average. Default daily. (one of daily, monthly; default daily; e.g. monthly) |
| `from` | string | no | Earliest period, YYYY-MM-DD for daily or YYYY-MM for monthly. |
| `to` | string | no | Latest period, YYYY-MM-DD for daily or YYYY-MM for monthly. |
| `length` | integer | no | Observations per series, newest first. Default 60, max 20000. (default 60) |
| `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: `frequency` (string), `name` (string), `series` (Series[]), `series[].code` (string), `series[].name` (string), `series[].observations` (Observation[]), `series[].unit` (string), `table` (string)

```bash
curl "https://api.hoshime.com/v1/boj/rates?frequency=monthly" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/boj/tables

The Bank of Japan's statistical databases with their category.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Case-insensitive filter over the database name, title and category. |
| `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: `category` (string), `name` (string), `table` (string)

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