Series Data (Legacy)

This endpoint returns an array of data, matching the requested series and date range. You can visualise various Enact series on Enact's dashboard page.


Using the LCPDelta Python Package

Synchronous

from lcp_delta import enact
from datetime import date

enact_api_helper = enact.APIHelper(username, public_api_key)

# see 'BODY PARAMS' section below for details on corresponding parameter values
response_dataframe = enact_api_helper.get_series_data(
    "OutturnFuel",
    date(2023,6,21),
    date(2023,6,23),
    "Gb",
    option_id=["Coal"],
    time_zone_id="UTC",
    parse_datetimes=True # optionally parse dates to datetimes and index by them (ascending)
)

print(response_dataframe)

Asynchronous (package version 1.3.0 and later)

from lcp_delta import enact
from datetime import date
import asyncio

async def main():
    enact_api_helper = enact.APIHelper(username, public_api_key)

    # see 'BODY PARAMS' section below for details on corresponding parameter values
    response_dataframe = await enact_api_helper.get_series_data_async(
      "OutturnFuel",
      date(2023,6,21),
      date(2023,6,23),
      "Gb",
      option_id=["Coal"],
      time_zone_id="UTC",
      parse_datetimes=True # optionally parse dates to datetimes and index by them (ascending)
    )
    
    print(response_dataframe)

asyncio.run(main())

Using the API Directly

To request data for a single day, set the from and to fields in the request body equal to each other.

The response object holds all data for the requested series. If the optionId field is unspecified then the header will be of the form 'CountryId&SeriesId', otherwise 'CountryId&SeriesId&OptionId'.

If the return data has additional data points, the header will be appended with '- additional', '- additional 2', etc. If the series is an EPEX OHLC chart, the header will be appended with '- Open', '- High', '- Low', '- Close'.

Body Params
string
required
Defaults to OutturnFuel

The Enact ID for the requested series.

optionId
array of strings
Defaults to Coal

The options that specify the requested series, required if applicable. Note: this is an array to allow for separate options, not multiple values of the same option (for example, a zone and summary statistic if required, not two values for zone).

optionId
string
required
Defaults to Gb

The Enact ID for the country of the requested series.

string
required
Defaults to 2023-06-21

The start of the date range being requested for.

string
required
Defaults to 2023-06-23

The end of the date range being requested for (inclusive).

boolean
Defaults to false

The returned series will be averaged into half-hourly blocks if this is set to true.

boolean
Defaults to false

Data is only returned for the specified times as well as dates if this is set to true.

string

The time zone ID of the data to be returned (UTC by default).

string

The time zone ID of the requested time range.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here!