---
title: "Historical weekly margin forecast (OCNMFW2, OCNMF3Y2)"
method: GET
path: "/forecast/margin/weekly/history"
tags: ["Margin Forecast"]
---

# Historical weekly margin forecast (OCNMFW2, OCNMF3Y2)

`GET /forecast/margin/weekly/history`

## Request

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

This endpoint provides the weekly historic  Generating Plant Operating Margin.
This historic API output 2 weeks ahead to 156 weeks ahead in MW values

## Query parameters

- `publishTime` string, date-time, required
- `range` '52W' | '156W'
- `format` 'json' | 'xml' | 'csv'

## Response `200`

OK

- InsightsApiModelsResponsesResponseWithMetadata1InsightsApiModelsResponsesForecastMarginForecastMarginWeekly
  - `data` InsightsApiModelsResponsesForecastMarginForecastMarginWeekly[], nullable
    - `publishTime` string, date-time
    - `margin` integer, nullable
    - `week` integer
    - `year` integer
    - `weekStartDate` 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)
