# Exchange Rates (ECB) (`fx.rates`)

Daily euro reference exchange rates from the European Central Bank, rebased to any of its ~30 currencies.

- **Route:** `POST /v1/run/fx.rates`
- **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 102 ms · p95 497 ms · p99 497 ms (4 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `base` | string | no | "EUR" |  |
| `symbols` | array | no |  |  |

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

| Field | Meaning |
|---|---|
| `rates` | Rate per 1 unit of base. |
| `date` | Reference date. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/fx.rates \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base":"USD","symbols":["EUR","GBP","JPY"]}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('fx.rates', {'base': 'USD', 'symbols': ['EUR', 'GBP', 'JPY']})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run fx.rates '{"base":"USD","symbols":["EUR","GBP","JPY"]}'
```

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