Submit with the API
Send tomorrow's prices from your script in one request. You need an API key; everything else is in the example below. Every endpoint and competition is listed in the API reference.
Get your API key
Accept the provider terms, then create a key on the API keys page. It's shown once, so copy it somewhere safe, and never put it in browser code.
Create an API key →Send your prices
Copy this, put in your key and model code, and replace the prices with yours: one per hour from 00:00 market time, in order. The delivery day is already the next one still open.
curl -X POST https://ingest.forecastscore.eu/v1/forecasts \ -H "X-API-Key: YOUR_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "forecasts": [{ "model_code": "ib-fr-da", "market": "FR", "resolution": "PT60M", "delivery_date": "YYYY-MM-DD", "prices": [78.20, 72.40, 68.10, 65.30, 66.00, 71.80, 84.50, 98.20, 92.10, 80.40, 71.20, 64.80, 60.10, 58.90, 61.50, 70.30, 85.60, 104.20, 118.70, 112.40, 98.10, 90.30, 86.20, 84.10] }] }'Highlighted parts are yours to replace.
Idempotency-Keyis any new random text per request: it makes retries safe. Create the model first: sending never creates one. The same API key can create it here, up to 10 creates an hour:curl -X POST https://ingest.forecastscore.eu/v1/me/models \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "ib-fr-da"}'The name is 3–32 letters and digits joined by single hyphens or underscores. That name, as written, is the API code and it never changes. You can also create it on the website (Submit, then New model). Find the code under Profile → Models: open the model and press the ⓘ button next to its name. The Submit page shows it too, with a Copy button, once you pick the model. The Python example needs
pip install requests.
Your model's page, with ⓘ open: the name can change, the API code never does. Check the answer
- 201 Created
- Done. Your forecast is saved as version 1 and will be scored when prices publish. It shows on your profile straight away.
- 4xx
- Nothing was saved. The answer says what's wrong in plain words, for example
forecasts[0]: expected 24 prices for FR on 2026-10-10, got 23. See Errors below.
The full 201 answer
One entry per forecast, in request order:
{ "forecasts": [ { "id": "…", "market": "FR", "product": "DAY_AHEAD", "delivery_date": "<delivery day>", "resolution": "PT60M", "model_code": "ib-fr-da", "version": 1, "status": "PENDING", "periods": <23, 24 or 25 for hourly curves>, "submitted_at": "<arrival time, UTC>", "submission_deadline": "<12:00 Europe/Brussels the day before, UTC>", "cancelled_at": null, "pmd_participation": null } ] }
Set it up with an AI agent
Already working with an assistant like Claude, ChatGPT or Cursor? Paste this prompt into it, on the computer where the daily job should run. It writes the script, schedules it for every morning, retries before the cutoff and keeps a log.
- The computer must stay on. The job only runs while the machine is awake and online. A laptop that sleeps at 10:00 misses the cutoff, and a missed day cannot be sent late. Use an always-on machine, a server, or a scheduled cloud runner.
- Keep your key out of the chat. The agent reads it from an environment variable. If it ever leaks, revoke it on the API keys page and create a new one.
- The prices must come from your model. The prompt does not produce any. Forecast Score scores exactly what you send, so check the first few runs yourself.
- Do the account steps first. Accept the provider terms and create an API key on the website. An agent cannot do either. It can create a model with
POST https://ingest.forecastscore.eu/v1/me/modelsand the same key; a forecast submission still never creates one.
You are setting up a recurring job that submits my day-ahead electricity price forecasts to Forecast Score.
Read https://forecastscore.eu/docs/submit first, then follow these rules exactly.
Step 0: interview me before you build anything
Do not write code or schedule anything until I have answered these questions. Ask them in short groups, wait for my answers, and
do not guess. Where I don't know, say so and propose a default for me to confirm.
1. Where do my prices come from? A file (path, format), a database (type, table or query), a command or script that prints them,
the output of my own forecasting model, or an API of my own. Which computer holds it?
2. What is the format? For a file: the CSV or Excel layout, the column names, the separator, the decimal sign, and the units. Are the
timestamps in UTC or market-local time? Is there a timezone column? Do the values say EUR/MWh?
3. Which markets (ES, FR, DE-LU, or an Italian zone such as IT-NORD), which resolution (hourly PT60M or quarter-hour PT15M), and which model code for each?
4. When is the file or data ready each day? It must be ready before the 12:00 Europe/Brussels cutoff with time to spare. What happens
if it is late or missing: should the job alert me, retry, or skip the day?
5. How do you want the job to send the data: directly from a script with the API (recommended), or do you only want the file
prepared for you to upload by hand on the website?
6. What must I never do? For example, never send a day with fewer periods than expected, or never overwrite a day I already sent.
After I answer, summarise the plan back to me in five lines or fewer and wait for my yes before building.
API facts
- POST https://ingest.forecastscore.eu/v1/forecasts with the header X-API-Key: <my key>.
- Every POST needs an Idempotency-Key header with a new random UUID for each new submission. Reuse the same key only to retry the
same request body.
- Body: {"forecasts": [{"market": "ES" | "FR" | "DE-LU" | "IT-NORD" | "IT-CNOR" | "IT-CSUD" | "IT-SUD" | "IT-CALA" | "IT-SICI" | "IT-SARD",
"product": "DAY_AHEAD", "delivery_date": "YYYY-MM-DD" (market-local day),
"resolution": "PT60M" or "PT15M", "model_code": "<my model code>", "prices": [numbers]}]}
- "prices" holds one value in EUR/MWh per period, in delivery order from 00:00 market-local time. Hourly days have 24 periods, or 23 on
the spring clock change and 25 on the autumn one. Quarter-hour days have 96, 92 or 100. Values range from -1000 to 4000 with at most
2 decimals. Never round them. As an alternative, "values" can be a list of {"period_start": "<UTC ISO 8601 instant>", "value": n}.
- Check the period count before sending: GET https://ingest.forecastscore.eu/v1/markets/<MARKET>/delivery-periods?date=<YYYY-MM-DD>
&resolution=<PT60M or PT15M> with the same X-API-Key header. Use its period_count and periods list.
- The cutoff is 12:00 Europe/Brussels on the day before delivery, for every market. Only the next delivery day that is still open is
valid. A 409 means the cutoff has passed.
- 201 means saved. Any 4xx means nothing was saved: read the message and fix the cause; do not retry blindly. Stop and tell me on
401 or 403. On 5xx or a timeout, retry the same body with the same Idempotency-Key, with backoff, a few times at most.
- Sending the same market, model code, delivery day and resolution again creates a new version, and only the latest is scored.
What to build
1. A script (Python 3.9+ standard library unless my machine already has something else) that:
- works out the next open delivery day, using the 12:00 Europe/Brussels cutoff;
- reads my prices from the source and in the format I described in Step 0. If that source is missing or incomplete, stop without sending;
- checks the period count against the delivery-periods endpoint;
- POSTs the forecast with a new Idempotency-Key, and appends the status and body of each answer to a log file;
- supports --dry-run, which prints the request and sends nothing;
- exits non-zero on any failure.
2. The API key is read from the environment variable FORECAST_SCORE_API_KEY. Never write it into a file under version control, a log,
a URL or a message to me.
3. Schedule it every day at 10:00 Europe/Brussels, so there is time to retry before the cutoff. Set the time zone explicitly in the
scheduler (cron: CRON_TZ=Europe/Brussels, or a systemd timer with OnCalendar=*-*-* 10:00 Europe/Brussels). Retry failed runs every
15 minutes until 11:45 Europe/Brussels.
Limits you must respect
- POST https://ingest.forecastscore.eu/v1/me/models with the same X-API-Key creates a model. Body: {"name": "<3-32 letters, digits and
single hyphens or underscores>"}. The API code is that name exactly as written and never changes. At most 10 creates an hour per key.
Sending a forecast never creates a model. An unknown model_code is 404 model_not_found.
- The API cannot create keys or accept provider terms. I do those on the website. Do not guess a model code: use the name I gave you,
or the code on my model's page under Profile > Models.
- Ask me before creating any account or key, installing software on my machine, or making the first real submission.
- Prices must come from my own model. Do not invent, fill in or copy prices from anywhere else.
When you finish, give me:
- The scheduled job and the command that runs it.
- The output of a --dry-run, showing the market, the delivery day, the period count and the first two periods. No key.
- Where the log is, how to read it, and how to disable the schedule.
- Which computer or server runs the job, and a reminder that it must be switched on and online at the scheduled times.Errors
Idempotency-Key header is missing or not valid.Add a new random key, like a UUID, to the request.X-API-Key header, or create a new key.provider_terms_required), its provider access is suspended or revoked (provider_access_inactive), or the key is missing forecasts:write (forecasts_write_required) on model creation. Every key issued here has that scope.Accept the provider terms on the API keys page. If your access is suspended, contact us.model_code (model_not_found: the answer lists your models), an unknown market or product, a forecast that isn’t yours, or a path this host doesn’t serve.Send one of your API codes, or create the model with POST https://ingest.forecastscore.eu/v1/me/models (or on the website: Submit, then New model). Sending a forecast never creates one. Check the market (ES, FR, DE-LU or an Italian zone such as IT-NORD) and the URL.forecast_value_out_of_range) or with more than 2 decimals (forecast_value_precision), a bad field, the same forecast twice in one request, or an Idempotency-Key reused for a different request.The answer names the field and the period. Fix it and send again; values are never rounded.Good to know
How many prices do I send?
24 on a normal day, 23 in March and 25 in October, when the clocks change. Every 15 minutes: 96, 92 and 100. Always in delivery order from 00:00 market time. On the October day 02:00 comes twice, so send both.
Not sure? Ask the same host, with the same X-API-Key. The answer lists every period, its UTC period_start, its market-local local_time and an occurrence that is 2 only for the repeated autumn hour, plus the day's submission_deadline and state (open, closed or frozen). GET https://ingest.forecastscore.eu/v1/markets and GET https://ingest.forecastscore.eu/v1/products list the markets and products.
curl -H "X-API-Key: YOUR_API_KEY" \ "https://ingest.forecastscore.eu/v1/markets/ES/delivery-periods?date=2026-10-25&resolution=PT60M"
{
"market": "ES",
"product": "DAY_AHEAD",
"delivery_date": "<requested day>",
"resolution": "PT60M",
"timezone": "Europe/Madrid",
"submission_deadline": "2026-10-24T10:00:00Z",
"state": "open",
"period_count": 25,
"periods": [
{ "period_start": "2026-10-24T22:00:00Z", "local_time": "00:00", "occurrence": 1 },
{ "period_start": "2026-10-24T23:00:00Z", "local_time": "01:00", "occurrence": 1 },
{ "period_start": "2026-10-25T00:00:00Z", "local_time": "02:00", "occurrence": 1 },
{ "period_start": "2026-10-25T01:00:00Z", "local_time": "02:00", "occurrence": 2 },
"…"
]
}Sending again, or cancelling
Send the same market, resolution, delivery day and model code again before the cutoff and it becomes a new version (v2, v3…). Only the latest version is scored; older ones stay in your history.
To cancel a pending forecast before the cutoff, delete it by the id from the 201 answer. It stays in your history as cancelled. Success is 204 No Content:
curl -X DELETE https://ingest.forecastscore.eu/v1/forecasts/FORECAST_ID \ -H "X-API-Key: YOUR_API_KEY" \ -H "Idempotency-Key: $(uuidgen)"
Several models or days in one request
Add more items to "forecasts", up to 100 (other markets, models or days). They are saved together, or none is saved if one is wrong, and the error names it, for example forecasts[3]: ….
Retries and the Idempotency-Key
Every submission and cancellation needs an Idempotency-Key header: any unique value up to 255 printable characters, such as a UUID. If a request times out, send it again with the same key: within 24 hours you get the first answer back (marked Idempotent-Replayed: true) instead of a second version. Use a new key for each new change. Reusing a key for a different body is rejected, and a request that failed does not use up its key.
Prefer timestamps?
Instead of "prices" you can send "values": one {"period_start": "2026-10-24T22:00:00Z", "value": 78.20} per period, in any order. period_start is an ISO 8601 instant with an offset; the two 02:00 hours in October are two different UTC instants. Use one or the other, not both.
This Python 3.9+ script (standard library only) writes forecast.json for the next delivery day that is still open, with one period per market-local interval, clock-change days included. Replace the price with your model's values. On Windows, run pip install tzdata first: Python there has no built-in time-zone data.
"""Build forecast.json: a complete curve for the next delivery day still open."""
import json
from datetime import datetime, time, timedelta, timezone
from zoneinfo import ZoneInfo
MODEL_CODE = "ib-es-da" # your model code
MARKET = "ES" # ES, FR, DE-LU or an Italian zone (IT-NORD, ...)
MARKET_TZ = ZoneInfo("Europe/Madrid") # FR: Europe/Paris, DE-LU: Europe/Berlin, IT-*: Europe/Rome
RESOLUTION, MINUTES = "PT60M", 60 # or "PT15M", 15
CUTOFF_TZ = ZoneInfo("Europe/Brussels")
def next_open_delivery_day(now: datetime):
"""Earliest delivery day whose 12:00 Europe/Brussels cutoff (day before) is ahead."""
day = now.astimezone(CUTOFF_TZ).date() + timedelta(days=1)
while datetime.combine(day - timedelta(days=1), time(12, 0), CUTOFF_TZ) <= now:
day += timedelta(days=1)
return day
def period_starts(day):
"""UTC start of every period in the market-local day (23/24/25 or 92/96/100)."""
start = datetime.combine(day, time(0), MARKET_TZ).astimezone(timezone.utc)
end = datetime.combine(day + timedelta(days=1), time(0), MARKET_TZ).astimezone(timezone.utc)
while start < end:
yield start
start += timedelta(minutes=MINUTES)
day = next_open_delivery_day(datetime.now(timezone.utc))
forecast = {
"market": MARKET,
"product": "DAY_AHEAD",
"delivery_date": day.isoformat(),
"resolution": RESOLUTION,
"model_code": MODEL_CODE,
"values": [
{"period_start": start.strftime("%Y-%m-%dT%H:%M:%SZ"), "value": 72.5} # your price
for start in period_starts(day)
],
}
with open("forecast.json", "w") as file:
json.dump({"forecasts": [forecast]}, file)
print(f"{MODEL_CODE} {MARKET} {day} {RESOLUTION}: {len(forecast['values'])} periods -> forecast.json")Send it with your own key in place of YOUR_API_KEY:
KEY=$(uuidgen) # one key per change; reuse it only to retry this same request curl -X POST https://ingest.forecastscore.eu/v1/forecasts \ -H "X-API-Key: YOUR_API_KEY" \ -H "Idempotency-Key: $KEY" \ -H "Content-Type: application/json" \ --data @forecast.json
All the fields
marketES, FR, DE-LU or an Italian bidding zone: IT-NORD, IT-CNOR, IT-CSUD, IT-SUD, IT-CALA, IT-SICI or IT-SARD. Upper or lower case.resolutionPT60M for hourly, PT15M for every 15 minutes.delivery_dateThe market-local delivery day, YYYY-MM-DD.model_codeOne of your models: its API code (Profile → Models → the model → ⓘ), or its current name, matched ignoring case. The code is fixed when the model is created and never changes; renaming changes the name only, so send the code from your scripts. The forecast is always saved under the code.pricesNumbers in €/MWh, one per period in delivery order from 00:00 market time: −1,000 to 4,000, up to 2 decimals.valuesInstead of prices: one {"period_start", "value"} per period, in any order.productOptional: DAY_AHEAD is the only one today.The cutoff is 12:00 Europe/Brussels (CET/CEST) on the day before delivery, for every market; the time your complete request arrives counts. Bodies are up to 1 MiB. Current limits: Deadlines, versions and clock changes.