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 only date_from is provided, the dataset will include all trading days from that date onward.
  • If only date_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]
  ]
}

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