---
title: "Historical daily margin forecast (OCNMFD2)"
method: GET
path: "/forecast/margin/daily/history"
tags: ["Margin Forecast"]
---

# Historical daily margin forecast (OCNMFD2)

`GET /forecast/margin/daily/history`

## Request

- Base URL: `https://data.elexon.co.uk/bmrs/api/v1`
- URL: `https://data.elexon.co.uk/bmrs/api/v1/forecast/margin/daily/history`
- Auth: none declared

This endpoint provides the historic Generating Plant Operating Margin covering 2 days ahead to 14 days ahead in MW values.
The historic API outputs the latest published data for historic daily margin forecast for D+2 to D+14

## Query parameters

- `publishTime` string, date-time, required
- `format` 'json' | 'xml' | 'csv'

## Response `200`

OK

- InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesForecastMarginForecastMarginDaily
  - `data` InsightsApiModelsResponsesForecastMarginForecastMarginDaily[], nullable
    - `publishTime` string, date-time
    - `margin` integer, nullable
    - `forecastDate` string, date
  - `metadata` InsightsApiModelsMetadataApiResponseSourceMetadata
    - `datasets` string[], nullable

---

[API](https://skmtc.dev/elexon/apis/bmrs-insights.md) - [All operations](https://skmtc.dev/elexon/apis/bmrs-insights/llms.txt) - [OpenAPI document](https://skmtc.dev/elexon/apis/bmrs-insights/revisions/d992cbaa9351?raw)
