> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexenergie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /forecasts/intraday/{session} — Intraday Forecast

> Retrieve hourly intraday price forecasts for OMIE sessions 1, 2, or 3. Returns remaining-day hourly EUR/MWh forecasts with confidence bounds.

The `GET /forecasts/intraday/{session}` endpoint returns Nexenergie's hourly price forecasts for a specific OMIE intraday session on the given date. Because intraday sessions cover only the hours that remain open for trading at the time of each session's gate closure, the `forecasts` array will contain a subset of the day's 24 hours rather than the full set — giving you a focused, session-accurate view of near-term price expectations.

## Endpoint

|                    |                                                                       |
| ------------------ | --------------------------------------------------------------------- |
| **Method**         | `GET`                                                                 |
| **Path**           | `/forecasts/intraday/{session}`                                       |
| **Base URL**       | `https://app.nexenergie.ai/api/v1`                                    |
| **Authentication** | Required — Bearer token or API key in `Authorization: Bearer <token>` |

## Path Parameters

<ParamField path="session" type="integer" required>
  The OMIE intraday session number. Must be an integer between `1` and `3` inclusive. Each session corresponds to a distinct gate-closure window and covers a different set of remaining delivery hours.
</ParamField>

## Query Parameters

<ParamField query="date" type="string" required>
  The target calendar date for the forecast, in `YYYY-MM-DD` format (e.g. `2025-07-15`). This is the delivery date — the date whose hours are being forecast, not the date the session opens.
</ParamField>

<ParamField query="hour" type="integer">
  Filter the response to a single delivery hour within the session window. Must be an integer between `0` and `23`. When omitted, all hours available for the requested session are returned. Supplying an hour that falls outside the session's coverage window returns a `404`.
</ParamField>

## Request Example

The examples below request forecasts for **intraday session 2** on 15 July 2025.

<CodeGroup>
  ```bash curl theme={null}
  curl --request GET \
    --url "https://app.nexenergie.ai/api/v1/forecasts/intraday/2?date=2025-07-15" \
    --header "Authorization: Bearer YOUR_API_TOKEN"
  ```

  ```python Python theme={null}
  import requests

  session = 2
  url = f"https://app.nexenergie.ai/api/v1/forecasts/intraday/{session}"
  headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
  params = {"date": "2025-07-15"}

  response = requests.get(url, headers=headers, params=params)
  response.raise_for_status()
  data = response.json()

  print(f"Session {data['session']} — {len(data['forecasts'])} hours forecast")
  for entry in data["forecasts"]:
      print(f"  Hour {entry['hour']:02d}:00 — {entry['forecast_price']} EUR/MWh")
  ```

  ```javascript JavaScript theme={null}
  const session = 2;
  const response = await fetch(
    `https://app.nexenergie.ai/api/v1/forecasts/intraday/${session}?date=2025-07-15`,
    {
      method: "GET",
      headers: {
        Authorization: "Bearer YOUR_API_TOKEN",
      },
    }
  );

  const data = await response.json();
  console.log(`Session ${data.session} — ${data.forecasts.length} hours forecast`);
  data.forecasts.forEach(({ hour, forecast_price }) => {
    console.log(`  Hour ${String(hour).padStart(2, "0")}:00 — ${forecast_price} EUR/MWh`);
  });
  ```
</CodeGroup>

## Response

A successful request returns HTTP `200 OK` with a JSON body structured as follows.

<ResponseField name="market" type="string">
  The market segment of this forecast. Always `"intraday"` for this endpoint.
</ResponseField>

<ResponseField name="session" type="integer">
  The intraday session number that was requested (`1`, `2`, or `3`).
</ResponseField>

<ResponseField name="date" type="string">
  The delivery date for which the forecast was generated, in `YYYY-MM-DD` format.
</ResponseField>

<ResponseField name="model_version" type="string">
  The identifier of the ML model version used to produce this forecast (e.g. `"v2.4.1"`). Use this field to track model changes when comparing forecast runs across sessions.
</ResponseField>

<ResponseField name="data_as_of" type="string">
  ISO 8601 timestamp of the most recent input data that was incorporated into this forecast (e.g. `"2025-07-15T13:00:00Z"`).
</ResponseField>

<ResponseField name="forecasts" type="array">
  Array of hourly forecast objects covering only the delivery hours that remain open for trading in the requested session. The number of items varies by session and by the time of day the forecast is generated.

  <Expandable title="forecasts items">
    <ResponseField name="hour" type="integer">
      Hour of the day in 24-hour notation (`0`–`23`), representing the delivery period starting at that hour (e.g. `14` = 14:00–15:00 CET).
    </ResponseField>

    <ResponseField name="forecast_price" type="number">
      Nexenergie's point-estimate price forecast for this hour, in EUR/MWh.
    </ResponseField>

    <ResponseField name="lower_bound" type="number">
      Lower confidence bound of the forecast interval, in EUR/MWh. Represents the 10th percentile of the model's predictive distribution.
    </ResponseField>

    <ResponseField name="upper_bound" type="number">
      Upper confidence bound of the forecast interval, in EUR/MWh. Represents the 90th percentile of the model's predictive distribution.
    </ResponseField>

    <ResponseField name="unit" type="string">
      Unit of all price fields in this object. Always `"EUR/MWh"`.
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

The example below shows a session 2 response for 15 July 2025, with delivery hours 14–18 (remaining session hours abbreviated for clarity).

```json theme={null}
{
  "market": "intraday",
  "session": 2,
  "date": "2025-07-15",
  "model_version": "v2.4.1",
  "data_as_of": "2025-07-15T13:00:00Z",
  "forecasts": [
    {
      "hour": 14,
      "forecast_price": 72.45,
      "lower_bound": 64.10,
      "upper_bound": 80.80,
      "unit": "EUR/MWh"
    },
    {
      "hour": 15,
      "forecast_price": 69.88,
      "lower_bound": 61.55,
      "upper_bound": 78.21,
      "unit": "EUR/MWh"
    },
    {
      "hour": 16,
      "forecast_price": 65.30,
      "lower_bound": 57.00,
      "upper_bound": 73.60,
      "unit": "EUR/MWh"
    },
    {
      "hour": 17,
      "forecast_price": 62.10,
      "lower_bound": 54.50,
      "upper_bound": 69.70,
      "unit": "EUR/MWh"
    },
    {
      "hour": 18,
      "forecast_price": 68.75,
      "lower_bound": 60.20,
      "upper_bound": 77.30,
      "unit": "EUR/MWh"
    }
  ]
}
```

## Error Responses

| HTTP Status        | Code                    | Description                                                                                                                                                                                                                           |
| ------------------ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400 Bad Request`  | `INVALID_SESSION`       | The `session` path parameter is not `1`, `2`, or `3`.                                                                                                                                                                                 |
| `400 Bad Request`  | `INVALID_DATE_FORMAT`   | The `date` query parameter is missing or does not match the `YYYY-MM-DD` format.                                                                                                                                                      |
| `401 Unauthorized` | `UNAUTHORIZED`          | The `Authorization` header is absent, malformed, or the token/API key is invalid or expired.                                                                                                                                          |
| `404 Not Found`    | `SESSION_NOT_AVAILABLE` | No forecast has been generated for the requested session and date combination. This occurs when the session has not yet opened, when the model pipeline has not yet run, or when all hours in the session window have already passed. |

<Note>
  Not all 24 hours of a day are forecast for every session. The `forecasts` array only includes the delivery hours that **remain open for trading** at the time of the session's gate closure. Hours that have already been dispatched or that fall before the session window are excluded. Always check the length of the `forecasts` array rather than assuming a fixed number of entries.
</Note>

<Tip>
  Use **session 3** for the most accurate near-term hour forecasts available on a given day. Session 3 runs closest to real-time, meaning the model benefits from the most up-to-date weather observations, generation dispatch data, and ENTSO-E imbalance signals — resulting in tighter confidence bounds compared to sessions 1 and 2.
</Tip>
