EnergyAPI

European electricity spot price & weather data — v0.1.0

Base URL

https://energy.lavantsystems.com/api/v1

No authentication required. All responses are JSON with Access-Control-Allow-Origin: *.

Markets

GET /api/v1/markets List available markets

Returns all configured energy markets.

Parameters

None

Response 200

{
  "markets": [
    {
      "code": "AT",
      "name": "Austria",
      "timezone": "Europe/Vienna",
      "resolution_minutes": 60,
      "currency": "EUR"
    },
    {
      "code": "DE",
      "name": "Germany",
      "timezone": "Europe/Berlin",
      "resolution_minutes": 60,
      "currency": "EUR"
    },
    {
      "code": "GB",
      "name": "Great Britain",
      "timezone": "Europe/London",
      "resolution_minutes": 30,
      "currency": "GBP"
    }
  ]
}

Prices

GET /api/v1/prices/{market} Historical spot prices

Query spot prices for a market within a date range (max 7 days). Defaults to today (UTC).

Path Parameters

NameTypeDescription
marketstringrequiredMarket code: AT, DE, GB

Query Parameters

NameTypeDescription
startstringoptionalStart date (YYYY-MM-DD or RFC 3339)
endstringoptionalEnd date (YYYY-MM-DD or RFC 3339)
sourcestringoptionalFilter by source: awattar, elexon
typestringoptionalFilter by price type: day_ahead, system

Response 200

{
  "market": "AT",
  "start": "2026-07-09T00:00:00Z",
  "end": "2026-07-10T00:00:00Z",
  "count": 24,
  "prices": [
    {
      "market": "AT",
      "interval_start": "2026-07-09T00:00:00Z",
      "interval_end": "2026-07-09T01:00:00Z",
      "price_mwh": 85.42,
      "source": "awattar",
      "price_type": "day_ahead"
    }
  ]
}
GET /api/v1/prices/{market}/latest Most recent price

Returns the single most recent price record for the given market.

Path Parameters

NameTypeDescription
marketstringrequiredMarket code: AT, DE, GB

Response 200

{
  "market": "AT",
  "interval_start": "2026-07-09T12:00:00Z",
  "interval_end": "2026-07-09T13:00:00Z",
  "price_mwh": 92.15,
  "source": "awattar",
  "price_type": "day_ahead"
}
GET /api/v1/prices/{market}/stats Price statistics

Returns min, max, and average price for a date range. Defaults to today (UTC).

Path Parameters

NameTypeDescription
marketstringrequiredMarket code

Query Parameters

NameTypeDescription
startstringoptionalStart date (YYYY-MM-DD)
endstringoptionalEnd date (YYYY-MM-DD)

Response 200

{
  "market": "AT",
  "min_mwh": 45.20,
  "max_mwh": 132.80,
  "avg_mwh": 88.50,
  "intervals": 24
}

Weather

GET /api/v1/weather/{market} Hourly weather data

Returns hourly weather observations for a market within a date range (max 7 days). Defaults to today (UTC).

Path Parameters

NameTypeDescription
marketstringrequiredMarket code

Query Parameters

NameTypeDescription
startstringoptionalStart date (YYYY-MM-DD or RFC 3339)
endstringoptionalEnd date (YYYY-MM-DD or RFC 3339)

Response 200

{
  "market": "AT",
  "start": "2026-07-09T00:00:00Z",
  "end": "2026-07-10T00:00:00Z",
  "count": 24,
  "weather": [
    {
      "market": "AT",
      "interval_start": "2026-07-09T00:00:00Z",
      "temperature": 18.5,
      "wind_speed": 3.2,
      "solar_radiation": 0.0,
      "cloud_cover": 45.0,
      "precipitation": 0.0,
      "source": "open_meteo"
    }
  ]
}

Combined

GET /api/v1/prices/{market}/combined Prices + weather in one call

Returns both price and weather data for a market and date range in a single response.

Path Parameters

NameTypeDescription
marketstringrequiredMarket code

Query Parameters

NameTypeDescription
startstringoptionalStart date
endstringoptionalEnd date
sourcestringoptionalFilter price source
typestringoptionalFilter price type

Response 200

{
  "market": "AT",
  "start": "2026-07-09T00:00:00Z",
  "end": "2026-07-10T00:00:00Z",
  "price_count": 24,
  "weather_count": 24,
  "prices": [ ... ],
  "weather": [ ... ]
}

Health

GET /api/v1/health System health check

Returns API and database status, plus last successful ingest run.

Parameters

None

Response 200

{
  "status": "ok",
  "db": true,
  "last_ingest": "2026-07-09T12:05:00Z",
  "last_source": "awattar"
}

Schemas

Price

FieldTypeDescription
marketstringMarket code (AT, DE, GB)
interval_startRFC 3339Start of pricing interval
interval_endRFC 3339End of pricing interval
price_mwhfloatPrice in local currency per MWh
sourcestringData source (awattar, elexon)
price_typestringPrice type (day_ahead, system)

Weather

FieldTypeDescription
marketstringMarket code
interval_startRFC 3339Observation hour
temperaturefloat?Temperature in °C
wind_speedfloat?Wind speed in m/s
solar_radiationfloat?Solar radiation in W/m²
cloud_coverfloat?Cloud cover in %
precipitationfloat?Precipitation in mm
sourcestringData source

PriceStats

FieldTypeDescription
marketstringMarket code
min_mwhfloatMinimum price per MWh
max_mwhfloatMaximum price per MWh
avg_mwhfloatAverage price per MWh
intervalsintNumber of price intervals

Error

FieldTypeDescription
errorstringError message

EnergyAPI v0.1.0 — Lavant Systems, Wolfsberg, Austria