# Central Bank of Russia API

> Returns official Central Bank of Russia currency rates, archived and historical rates by currency, and precious metal prices in roubles per gram.

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

The official Central Bank of Russia rates of the latest day, optionally for one currency.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `code` | string | no | Three-letter currency code to keep, such as USD. Omit it for every currency. |
| `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), `items` (Rate[]), `items[].code` (string), `items[].name` (string), `items[].nominal` (integer (int64)), `items[].numCode` (string), `items[].previous` (string), `items[].value` (string), `previousDate` (string)

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

## GET /v1/cbr/archive

The official Central Bank of Russia rates of one past day. The archive has no rates for some days.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date` | string | yes | Day in YYYY-MM-DD form. (e.g. 2023-06-15) |
| `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), `items` (Rate[]), `items[].code` (string), `items[].name` (string), `items[].nominal` (integer (int64)), `items[].numCode` (string), `items[].previous` (string), `items[].value` (string), `previousDate` (string)

```bash
curl "https://api.hoshime.com/v1/cbr/archive?date=2023-06-15" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/cbr/dynamic

The official Central Bank of Russia rate of one currency between two days, oldest first. The range is at most 366 days.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | CBR currency identifier such as R01235 for USD or R01239 for EUR. (e.g. R01235) |
| `start` | string | yes | First day in YYYY-MM-DD form. (e.g. 2024-01-10) |
| `end` | string | yes | Last day in YYYY-MM-DD form. (e.g. 2024-01-31) |
| `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: `id` (string), `items` (DynamicRate[]), `items[].date` (string), `items[].nominal` (integer (int64)), `items[].value` (string)

```bash
curl "https://api.hoshime.com/v1/cbr/dynamic?id=R01235&start=2024-01-10&end=2024-01-31" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/cbr/metals

The Central Bank of Russia buy and sell prices of gold, silver, platinum and palladium between two days, in roubles per gram. The range is at most 366 days.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `start` | string | yes | First day in YYYY-MM-DD form. (e.g. 2024-01-10) |
| `end` | string | yes | Last day in YYYY-MM-DD form. (e.g. 2024-01-31) |
| `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: `buy` (string), `date` (string), `metal` (string), `sell` (string)

```bash
curl "https://api.hoshime.com/v1/cbr/metals?start=2024-01-10&end=2024-01-31" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/cbr/currencies

The currencies the Central Bank of Russia publishes rates for, with the R-prefixed id that dynamic takes, the ISO code and the English name.

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: `code` (string), `id` (string), `name` (string), `nominal` (integer (int64)), `numCode` (string)

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