Skip to content

Listing Challenges for Market Sessions

After retrieving the open market sessions, you may want to list the challenges associated with a specific market session and target resource. Challenges are opportunities published by the Market Maker (Elia) that Forecasters can submit forecasts for.

Important

One challenge per resource

  • The challenge for wind forecasting will have as target a resource identified as 'offshore_wind_opendata_elia'
  • The challenge for solar forecasting will have as target a resource identified as 'belgium_solar_opendata_elia'

API Endpoints:

To interact with the Predicto API and retrieve information about challenges published in open market sessions, you can use the following endpoints:

Prerequisites

  • Access Token: Ensure you have a valid access token. Refer to the Authentication section if needed.
  • Open Market Session ID: You should have the ID of the open market session you're interested in. See Listing Open Sessions to retrieve it.
  • Resource Name or UUID: You can filter the queried challenges by the target resource UUID or name ('offshore_wind_opendata_elia' or 'belgium_solar_opendata_elia').

Check this out

Check our Useful Links section for additional resources (Jupyter Notebook, API Specifications) to help you get started with the Predico platform.

Retrieving Challenges for an Open Market Session

Here's how you can retrieve the list of registered challenges for a specific open market session using Python:

Tip: How to preview previous challenges

  • To preview every challenge registered in this platform, simply change the open_only query parameter to false in the request URL.

Tip: You can filter challenges by target resource name or use case

  • To filter the challenges by target resource name, you can use the resource_name query parameter.
  • To filter the challenges by use case, you can use the use_case query parameter.
  • See more filtering options on our REST API OpenAPI Specification.
list_challenges_for_open_session.py
import requests

access_token = "your_access_token"
open_market_session_id = "your_open_market_session_id"

headers = {
    'Authorization': f'Bearer {access_token}',
    'Accept': 'application/json'
}

params = {
    'market_session': open_market_session_id
}

# Note that this request will list ALL the challenges for this specific session
# you can filter these challenges by use case, resource name, etc. with the
# query parameters. Check our API documentation for more information.
response = requests.get(
    url='https://predico-elia.inesctec.pt/api/v1/market/challenge',
    params=params,
    headers=headers
)

# Check if the request was successful
if response.status_code == 200:
    challenges = response.json()
    print("Challenges for Open Market Session:")
    print(challenges)
else:
    print("Failed to retrieve challenges.")
    print(f"Status code: {response.status_code}")

Download Full Example

JSON Example Response

After running the example script, you will receive a response containing a list of market challenges. It's important to verify whether the response contains any data, as there may be not challenges created yet, by the Market Maker.

If the response is empty, you may need to try again later.

Click to view Example Response
{
  "code": 200,
  "data": [
    {
      "id": "ef3a473f-0fcf-4880-8b42-93f6bf732e3a",
      "use_case": "wind_power",
      "start_datetime": "2024-06-24T22:00:00Z",
      "end_datetime": "2024-06-25T21:45:00Z",
      "target_day": "2024-06-25",
      "registered_at": "2024-06-24T09:19:33.990638Z",
      "updated_at": "2024-06-24T09:19:33.990638Z",
      "user": "3ca74375-2ac0-46f4-b4bf-7cf013d0c28f",
      "resource": "b92c96d1-f5ee-4f96-a4cc-216a92acb10b",
      "market_session": 1,
      "resource_name": "wind_farm_x"
    },
    {
      "id": "x53e433a-3ocd-5340-2b31-95a7af782e3a",
      "use_case": "solar_power",
      "start_datetime": "2024-06-24T22:00:00Z",
      "end_datetime": "2024-06-25T21:45:00Z",
      "target_day": "2024-06-25",
      "registered_at": "2024-06-24T09:19:33.990638Z",
      "updated_at": "2024-06-24T09:19:33.990638Z",
      "user": "3ca74375-2ac0-46f4-b4bf-7cf013d0c28f",
      "resource": "a92s06d4-f5cc-6e56-e4ac-317a32abb30b",
      "market_session": 1,
      "resource_name": "solar_farm_x"
    }
  ]
}

What's next?

Learn how to download measurements data information (published by Market Makers) on the Predico platform in the Downloading Raw Data section.