# Exchange Rate History (`fx.history`)

Daily ECB reference rate of a currency pair for up to the last 90 days, with high, low, average and change.

- **Route:** `POST /v1/run/fx.history`
- **Price:** $0.0005 per request ($0.50 per 1,000) · `cost_usd` on every response
- **Source:** European Central Bank reference rates (`ecb`) · failover: no
- **Measured latency:** p50 805 ms · p95 805 ms · p99 805 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `base` | string | no | "EUR" | Base currency |
| `symbol` | string | yes |  | Quote currency |
| `days` | integer | no | 30 | Business days to return |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `series` | date and rate per business day, oldest first. |
| `latest` | Most recent rate. |
| `high` | Highest rate. |
| `low` | Lowest rate. |
| `change_percent` | Change from first to last day. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/fx.history \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base":"USD","symbol":"JPY","days":10}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('fx.history', {'base': 'USD', 'symbol': 'JPY', 'days': 10})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run fx.history '{"base":"USD","symbol":"JPY","days":10}'
```

Quote first (free, validates input): `POST /v1/quote/fx.history` with the same body.
