wattprice
v0.1.0Fetch PVPC electricity prices from Spain's ESIOS API by date range and area.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
fetch_prices
Fetch PVPC prices for a given date range and geographical area.
| Parameter | Type | Description |
|---|---|---|
endDate | string | End of the date range, ISO 8601. Defaults to the end of today. |
geographicalAggregation | string | How to aggregate indicator values when grouping by geographical ID. Accepted values: sum, average. Defaults to sum. |
geographicalIds | array | Geographical IDs to filter by. Accepted values: 3 (España), 8741 (Península), 8742 (Canarias), 8743 (Baleares), 8744 (Ceuta), 8745 (Melilla). Defaults to 8741, 8742, 8743, 8744, 8745. |
geographicalTruncation | string | How to group data at geographical level when the geographical aggregation is informed. Accepted values: country, electric_system. |
locale | string | Translations for sources. Accepted values: es, en. Defaults to es. |
startDate | string | Beginning of the date range, ISO 8601 (e.g. 2025-06-29T00:00:00.000+02:00). Defaults to the start of today. |
timeAggregation | string | How to aggregate indicator values when grouping by time. Accepted values: sum, average. Defaults to sum. |
timeTruncation | string | How to truncate data time series. Accepted values: hour, day, month, year. |