Commodity Contract Evolution

Contract Evolution Endpoint

This endpoint returns the contract evolution for a specified commodity contract. For each trading day, it provides the closing Bid, Offer, and Mid prices.

If requesting via our python package, the response is returned as a DataFrame with:

  • Bid, Offer, and Mid as columns
  • One row per trading day
  • The trading day as the index

For example:

DayBidOfferMid
2025-01-02T00:00:0092.492.692.5
2025-01-03T00:00:0091.591.891.6


Required Parameters

To retrieve data, you must specify both:

  • The instrument (commodity type)
  • The contract (delivery product)

Supported Instruments

The following instruments are currently available:

  • "Nbp"
  • "NbpPoundPerMwh"
  • "Eua"
  • "UkaFutures"
  • "UkPeak"
  • "UkBaseload"

Each instrument supports a subset of the available contract types.


Supported Contracts

A full list of contract types across all instruments:

"Spot", "WithinDay", "DayAhead", "BalanceOfWeek", "Weekend", "WorkingDaysNextWeek",
"Week", "BalanceOfMonth", "Month", "Quarter", "Season", "Annuals", "CalendarYear"

⚠️

Note: Some instruments do not support all contract types. See the table below for a breakdown.


Instrument vs. Supported Contracts

InstrumentSupported Contracts
Nbp or NbpPoundPerMwhWithinDay, DayAhead, BalanceOfWeek, Weekend, WorkingDaysNextWeek, BalanceOfMonth, Month, Quarter, Season, Annuals, CalendarYear
EuaSpot, CalendarYear
UkaFuturesCalendarYear
UkBaseloadWeek, Month, Quarter, Season, Annuals
UkPeakWeek, Month, Quarter, Season, Annuals

Contract Periods

For contracts of type "Month", "Quarter", "Season", "Annuals", and "CalendarYear", you must specify a contract_period. This indicates the specific delivery period (e.g., which month or quarter) the contract refers to.

The table below outlines the required format for each contract_period type.

Note:
For contracts like "Spot", "DayAhead", "WithinDay", "Weekend", "Week", and "BalanceOfWeek", a specific contract_period is not required. Although there are technically multiple such contracts, only one is traded per day, making it unambiguous for the API.


contract_period Format by Contract Type

Contract TypeExample contract_periodDescription
MonthSep-251-month contract for September 2025
QuarterQ323Q3 of 2023
SeasonS-26Seasonal contract for Summer 2026
AnnualsOct Annual 25Annual contract starting October 2025
Apr Annual 25Annual contract starting April 2025
CalendarYear2026Full calendar year 2026

Note: The formatting must exactly match the expected pattern (e.g., "Sep-25" not "September 2025").

📅 Date Range

There are two optional parameters: date_from and date_to.

  • If neither is provided, the full dataset will be returned showing closing prices for all trading days on which the contract was traded.
  • If onlydate_from is provided, the dataset will include all trading days from that date onward.
  • If onlydate_to is provided, the dataset will include all trading days up to and including that date.
  • If both are provided, the dataset will include all trading days within the specified range.

Using the LCPDelta Python Package

Synchronous

from lcp_delta import enact

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_contract_evolution(
    "UkBaseload",
    "Quarter",
    "Q225"
)

print(response_dataframe)

Asynchronous

from lcp_delta import enact
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 = enact_api_helper.get_contract_evolution_async(
      "UkBaseload",
      "Quarter",
      "Q225"
		)

    print(response_dataframe)

asyncio.run(main())

Using the API Directly

Response

The response from this endpoint will be a JSON object with the following structure:

  • messages: An array of system messages (typically empty if the request is successful).
  • data: A 2D array where:
    • The first row contains column headers: Day, Bid, Offer, and Mid.
    • Each subsequent row contains the corresponding values for each trading day.
{
  "messages": [],
  "data": [
    ["Day", "Bid", "Offer", "Mid"],
    ["2024-07-01T00:00:00", 83.25, 83.45, 83.35],
    ["2024-07-02T00:00:00", 84.0, 84.2, 84.1]
  ]
}

 
Body Params
string
required

The commodity instrument, "Nbp", "Eua", "UkaFutures", "UkPeak" or "UkBaseload".

string
required

The contract type, "Spot", "WithinDay", "DayAhead", "BalanceOfWeek", "Weekend", "WorkingDaysNextWeek", "Week", "BalanceOfMonth", "Month", "Quarter", "Season", "Annuals" or "CalenderYear". Different instruments have different contracts available, see below for the full list.

string
Defaults to None

The contract period. Certain contracts can have multiple periods traded on a single day, for example the NBP monthly contract may trade the next 3 following months given the day of trade. In this instance the specific contract period must be specified. Contracts of Month or lower granularity (e.g Quarter or Season) require this contract_period. See our docs to see the format required of the contract_period for the different contracts.

date
Defaults to None

A start date to filter the returned data, if not given all data up to the date_to (also optional) will be returned.

string
Defaults to None

An end date to filter the returned data, if not given all data from the date_from (also optional) will be returned.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json