The /live/ endpoint provides current electricity prices for specified tariffs at a given location. This endpoint returns a timeseries of price data covering recent hours and upcoming periods, making it ideal for applications needing current pricing information.
Endpoint Overview
This endpoint returns electricity pricing data for specified tariffs, with options to control the level of detail and time resolution.
Location Specification
The Live endpoint follows the same location specification pattern as other Prezio endpoints:
You must provide either a location_id, a pair of latitude/longitude coordinates, or an address.
The provided location is used to determine which tariffs are applicable in that geographic location.
For improved accuracy and faster response times, prefer using coordinates over address.
Time Range
The Live endpoint can return price data for 3 days:
Yesterday (from midnight yesterday in local time)
Today (returned by default if no date is provided)
Tomorrow
This ensures you have access to recent historical prices and upcoming prices for live energy optimization.
Price Precision
All price fields in the response use 6 decimal places (e.g., "0.123456"), providing high precision for financial calculations and energy cost analysis.
Example Requests
curl -X GET "https://api.prezio.dev/v1/live/?country=DK&tariff_id=tar_123&tariff_id=tar_456&address=Rådhuspladsen 1, Copenhagen&detail=full&interval_minutes=60"
Response Structure
The response contains a timeseries of pricing data with information about tariff components:
Full Detail
Semi Detail
Summarized
{
"count" : 24 ,
"context" : {
"currency" : "DKK" ,
"unit" : "per_kwh" ,
"interval_minutes" : 60 ,
"timezone" : "Europe/Copenhagen" ,
"location" : {
"input_address" : "Rådhuspladsen 1, Copenhagen" ,
"coordinates" : {
"latitude" : 55.6761 ,
"longitude" : 12.5683 ,
"confidence" : 0.9
}
}
},
"tariff_elements" : [
{
"element_id" : "com_123" ,
"element_name" : "Grid Usage Fee" ,
"tariff_id" : "tar_123" ,
"tariff_name" : "Copenhagen DSO Standard" ,
"organization_id" : "org_456" ,
"organization_name" : "Copenhagen Energy Grid" ,
"organization_type" : "DSO"
},
{
"element_id" : "com_789" ,
"element_name" : "Energy Cost" ,
"tariff_id" : "tar_456" ,
"tariff_name" : "Variable Spot Price" ,
"organization_id" : "org_101" ,
"organization_name" : "Nordic Power Retail" ,
"organization_type" : "RET"
}
],
"results" : [
{
"interval_start" : "2023-10-15T14:00:00Z" ,
"elements" : [
{
"id" : "com_123" ,
"price" : "0.052100"
},
{
"id" : "com_789" ,
"price" : "0.104500"
}
],
"interval_price" : "0.156600"
},
{
"interval_start" : "2023-10-15T15:00:00Z" ,
"elements" : [
{
"id" : "com_123" ,
"price" : "0.052100"
},
{
"id" : "com_789" ,
"price" : "0.119500"
}
],
"interval_price" : "0.171600"
}
]
}
{
"count" : 24 ,
"context" : {
"currency" : "DKK" ,
"unit" : "per_kwh" ,
"interval_minutes" : 60 ,
"timezone" : "Europe/Copenhagen" ,
"location" : {
"input_address" : "Rådhuspladsen 1, Copenhagen" ,
"coordinates" : {
"latitude" : 55.6761 ,
"longitude" : 12.5683 ,
"confidence" : 0.9
}
}
},
"tariff_elements" : [
{
"element_id" : "key_DSO" ,
"organization_type" : "DSO"
},
{
"element_id" : "key_RET" ,
"organization_type" : "RET"
}
],
"results" : [
{
"interval_start" : "2023-10-15T14:00:00Z" ,
"elements" : [
{
"id" : "key_DSO" ,
"price" : "0.052100"
},
{
"id" : "key_RET" ,
"price" : "0.104500"
}
],
"interval_price" : "0.156600"
}
]
}
{
"count" : 24 ,
"context" : {
"currency" : "DKK" ,
"unit" : "per_kwh" ,
"interval_minutes" : 60 ,
"timezone" : "Europe/Copenhagen" ,
"location" : {
"input_address" : "Rådhuspladsen 1, Copenhagen" ,
"coordinates" : {
"latitude" : 55.6761 ,
"longitude" : 12.5683 ,
"confidence" : 0.9
}
}
},
"results" : [
{
"interval_start" : "2023-10-15T14:00:00Z" ,
"interval_price" : "0.156600"
},
{
"interval_start" : "2023-10-15T15:00:00Z" ,
"interval_price" : "0.171600"
}
]
}
Detail Levels
Full Detail Returns all price components individually with metadata about each component, ideal for detailed cost analysis.
Semi Detail Aggregates costs by organization type (DSO, Retailer, etc.), providing simplified but still informative breakdown.
Summarized Returns only total price for each time interval, useful when only the bottom line matters.
If you only need total prices, use detail=summarized to minimize response payload size and get a faster response.
VAT Handling
Control how Value Added Tax is represented in the response:
All prices exclude VAT (default behavior).
Each price component includes its applicable VAT.
VAT is shown as separate component(s).
Missing spot market prices
The Live endpoint may return price values of zero when missing spot prices, e.g. when market prices are not yet available. In those cases, the endpoint will return a warning in the metadata warnings field.
Common Use Cases
Real-Time Pricing Display Show current and upcoming electricity prices to help users make informed decisions about energy usage.
Smart Device Control Power automated systems that activate or deactivate devices based on current electricity prices.
Cost Forecasting Provide users with near-term cost projections for planned energy consumption.
Price Alerts Notify users when electricity prices fall below or rise above specified thresholds.