# Frankfurter API

> Returns ECB reference exchange rates against a base currency: latest, historical day, time series and currency list.

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

The latest ECB reference rates against a base currency.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `base` | string | no | Base currency code, such as EUR or USD. (default EUR; e.g. USD) |
| `symbols` | string | no | Comma-separated currency codes to return, such as USD,GBP. Omit it for every currency. (e.g. EUR,GBP) |
| `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: `base` (string), `date` (string), `rates` (Rate[]), `rates[].currency` (string), `rates[].rate` (number (double))

```bash
curl "https://api.hoshime.com/v1/frankfurter/latest?base=USD&symbols=EUR%2CGBP" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/frankfurter/historical

The ECB reference rates of one past day against a base currency.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `date` | string | yes | Day in YYYY-MM-DD form, from 1999-01-04. (e.g. 2024-01-02) |
| `base` | string | no | Base currency code, such as EUR or USD. (default EUR; e.g. EUR) |
| `symbols` | string | no | Comma-separated currency codes to return, such as USD,GBP. Omit it for every currency. (e.g. USD,GBP) |
| `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: `base` (string), `date` (string), `rates` (Rate[]), `rates[].currency` (string), `rates[].rate` (number (double))

```bash
curl "https://api.hoshime.com/v1/frankfurter/historical?date=2024-01-02&base=EUR&symbols=USD%2CGBP" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/frankfurter/timeseries

Daily ECB reference rates between two dates against a base currency.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `start` | string | yes | First day in YYYY-MM-DD form. (e.g. 2024-01-01) |
| `end` | string | yes | Last day in YYYY-MM-DD form. (e.g. 2024-01-05) |
| `base` | string | no | Base currency code, such as EUR or USD. (default EUR; e.g. USD) |
| `symbols` | string | no | Comma-separated currency codes to return, such as USD,GBP. Omit it for every currency. (e.g. EUR,GBP) |
| `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: `base` (string), `days` (Day[]), `days[].date` (string), `days[].rates` (Rate[]), `end` (string), `start` (string)

```bash
curl "https://api.hoshime.com/v1/frankfurter/timeseries?start=2024-01-01&end=2024-01-05&base=USD&symbols=EUR%2CGBP" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/frankfurter/currencies

The currencies the ECB publishes reference rates for, with their names.

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), `name` (string)

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

## GET /v1/frankfurter/convert

Convert an amount from one currency to another at the ECB reference rate, latest or on a past day.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `amount` | string | yes | Amount in the source currency, such as 100. (e.g. 100) |
| `from` | string | yes | Source currency code, such as USD. (e.g. USD) |
| `to` | string | yes | Target currency code, such as EUR. (e.g. EUR) |
| `date` | string | no | Day in YYYY-MM-DD form, from 1999-01-04. Omit it for the latest rate. (e.g. 2024-01-02) |
| `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: `amount` (number (double)), `date` (string), `from` (string), `rate` (number (double)), `result` (number (double)), `to` (string)

```bash
curl "https://api.hoshime.com/v1/frankfurter/convert?amount=100&from=USD&to=EUR&date=2024-01-02" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
