This endpoint will return a dictionary containing several arrays of data, for each day, corresponding to the requested series and date or date-range at various updates to the forecast (see Enact's history of forecasts page).


Using the LCPDelta Python Package

Synchronous

from lcp_delta import enact
from datetime import datetime
from datetime import timezone as tz

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_history_of_forecast_for_given_date(
	"Tsdf",
	datetime(2023,6,20, tzinfo=tz.utc),
	"Gb"
)

print(response_dataframe)

response_dictionary = enact_api_helper.get_history_of_forecast_for_date_range(
	"Tsdf",
	datetime(2023,6,21, tzinfo=tz.utc),
	datetime(2023,6,23, tzinfo=tz.utc),
	"Gb"
)

print(response_dictionary)

Asynchronous (package version 1.3.0 and later)

from lcp_delta import enact
from datetime import datetime
from datetime import timezone as tz
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_history_of_forecast_for_given_date_async(
        "Tsdf",
        datetime(2023,6,20, tzinfo=tz.utc),
        "Gb"
    )

    print(response_dataframe)

    response_dictionary = await enact_api_helper.get_history_of_forecast_for_date_range_async(
        "Tsdf",
        datetime(2023,6,21, tzinfo=tz.utc),
        datetime(2023,6,23, tzinfo=tz.utc),
        "Gb"
    )

    print(response_dictionary)

asyncio.run(main())

Using the API Directly

To request data for a date range, populate the from and to fields of the request body. In this case, the response object will hold all data for the requested series across the requested date range. Each response data key will be a requested date, with its value containing data for the associated date. Within this data for a given date, the 'Time' key will contain all the dates we have a forecast iteration for, and the arrays for all other keys will correspond to the data points at each value in the 'Time' key.

To request data for a single day, populate the date fields of the request body. In this case, the response object will hold all data for the requested series at the requested date. The 'Time' key will contain all the dates we have a forecast iteration for, and the arrays for all other keys will correspond to the data points at each value in the 'Time' key.

Language
Authorization
OAuth2
Click Try It! to start a request and see the response here!