Portugal OMIE Day-Ahead (OMIE_PT_DA) Price API

Portugal OMIE Day-Ahead (OMIE_PT_DA) Price API

You're building a finance workflow that needs the Portugal OMIE Day-Ahead power price for valuation, hedging, or risk reporting, but you want a single, dependable API call you can automate and audit. By the end of this guide, you will query Portugal OMIE Day-Ahead (OMIE_PT_DA), validate that the symbol exists in the catalog, read the latest price with curl and Python, and correctly interpret the fields (units, base, dates) you need for production use.

What the Portugal OMIE Day-Ahead symbol represents for finance

Portugal OMIE Day-Ahead reflects the daily day-ahead wholesale electricity auction price published for Portugal. In finance contexts—P&L attribution for energy portfolios, mark-to-market of structured power contracts, or collateral management—this price is typically consumed as a EUR-denominated rate per megawatt-hour.

Key facts you will rely on in code and spreadsheets:

  • Symbol name: Portugal OMIE Day-Ahead
  • Symbol code: OMIE_PT_DA
  • Unit: EUR/MWh
  • Authentication: api_key query parameter (value: YOUR_API_KEY)
  • Base currency: may be MIXED across symbols; read currencies per symbol for certainty
  • Starter plan: $19.99/mo with a 7-day trial and 50 calls (sufficient to prototype)

Endpoint overview you will call

This integration uses two HTTP GET endpoints on energy-api.com:

  • GET /api/v1/symbols — discover symbols and confirm OMIE_PT_DA is listed
  • GET /api/v1/latest — fetch the latest price for one or more symbols

If you intend to fetch other commodities together (for example, adding TTF gas or EUA carbon), do not pass a forced base like base=USD when you also need TTF_GAS or EUA_CO2 in the same call. Mixed bases are supported, and the currencies map lets you read per-symbol currency explicitly.

Validate the symbol exists with GET /api/v1/symbols

Before you wire pricing into a finance pipeline, confirm the catalog includes the exact symbol code you will query: OMIE_PT_DA. Use a simple GET call and scan the returned list for the Energy entry “Portugal OMIE Day-Ahead” with code “OMIE_PT_DA.”

curl -G "https://energy-api.com/api/v1/symbols" --data-urlencode "api_key=YOUR_API_KEY"

This endpoint is for discovery. Once you have confirmed OMIE_PT_DA is present, proceed with the latest price request below.

Fetch the latest Portugal OMIE Day-Ahead price (copy-paste curl)

The following curl comes directly from the catalog facts. It requests the latest price for OMIE_PT_DA and authenticates via the api_key query parameter.

curl -G "https://energy-api.com/api/v1/latest" --data-urlencode "symbols=OMIE_PT_DA" --data-urlencode "api_key=YOUR_API_KEY"

On success, you will get a JSON payload that includes a top-level date, a base currency, and per-symbol maps for rates, dates, and currencies. Read the symbol-specific entries for robust downstream use.

Realistic JSON response and how to read it

This is a real response sample you can expect for OMIE_PT_DA. Use these exact values for testing parsers or unit tests:

{"success":true,"date":"2026-09-30","base":"EUR","rates":{"OMIE_PT_DA":164.9761},"dates":{"OMIE_PT_DA":"2026-09-30"},"currencies":{"OMIE_PT_DA":"EUR"},"base_filter_note":null}

What to use in finance code:

  • rates.OMIE_PT_DA — numeric price for Portugal OMIE Day-Ahead (EUR/MWh)
  • dates.OMIE_PT_DA — the effective date of that symbol’s price
  • currencies.OMIE_PT_DA — confirms the price currency (EUR)
  • base — may be MIXED when requesting multiple symbols; always prioritize the per-symbol currencies map

This structure lets you combine symbols with differing currencies in one call without guessing conversions. For valuation models that require a single currency, convert after reading currencies.OMIE_PT_DA, using your own FX source.

Python example: request and extract the fields you actually need

The snippet below calls the same endpoint as the curl example and reads the fields your valuation or risk code will store: the value, date, and currency for OMIE_PT_DA.

import requests

API_URL = "https://energy-api.com/api/v1/latest"
API_KEY = "YOUR_API_KEY"
SYMBOL = "OMIE_PT_DA"

params = {
"symbols": SYMBOL,
"api_key": API_KEY,
}

resp = requests.get(API_URL, params=params, timeout=15)
resp.raise_for_status()
data = resp.json()

if not data.get("success"):
raise RuntimeError("API did not return success")

# Read the per-symbol fields explicitly
rate = data["rates"].get(SYMBOL)
rate_date = data["dates"].get(SYMBOL)
currency = data["currencies"].get(SYMBOL)

if rate is None or rate_date is None or currency is None:
raise KeyError("Missing expected OMIE_PT_DA fields in response")

print(f"{SYMBOL} {rate} {currency} on {rate_date}")

Persist rate (float), rate_date (string ISO date), and currency (string) together so that backfills and reconciliations are transparent. If you add other energy symbols in the same call, do not rely on the top-level base; always read currencies[code].

Practical implementation notes that save time

Units and currency

The OMIE_PT_DA unit is EUR/MWh. Store this alongside the price in your data model so downstream analytics (PnL explain, VaR shocks, invoice checks) do not misinterpret units. The response’s currencies.OMIE_PT_DA confirms EUR for the symbol; this remains the source of truth if you mix symbols.

Date handling

Use dates.OMIE_PT_DA as the effective date for the rate you ingest. For reporting cutoffs, align your snapshot logic with that field rather than the top-level date if you retrieve baskets of symbols. The example shows 2026-09-30; your production code should treat this as an ISO date string without assuming an intraday timestamp.

Caching and idempotence

  • Cache by (symbol, date) so your finance services can be replayed deterministically.
  • When your job reruns, re-reading the same date and symbol should yield the same value unless you deliberately refresh historical corrections.

Combining symbols

If you later pull additional energy prices in the same request, the base may be MIXED. That is expected. Read each symbol’s currency from currencies[...] and apply conversions in your own stack if your ledger requires a single currency. Do not pass base=USD when you also need TTF_GAS or EUA_CO2.

Auth and environments

  • Authentication is via the api_key query parameter. Use YOUR_API_KEY only in examples and environment variables in production.
  • If you script curl for batch jobs, keep the call identical to the one shown above and substitute only the key and, if needed, a comma-separated symbols list.

Trial and call budgeting

  • Starter $19.99/mo, trial 7 days / 50 calls. Use local caching during the trial to avoid duplicate requests while iterating.
  • Batch symbols in a single request to amortize overhead if you add other energy symbols later.

Quality checks before you wire into valuation

  • Symbol discovery: run GET /api/v1/symbols and confirm OMIE_PT_DA is present in the catalog before scheduling jobs.
  • Schema lock: write a small test that asserts presence and types for rates.OMIE_PT_DA (number), dates.OMIE_PT_DA (string), currencies.OMIE_PT_DA (string).
  • Unit lock: store “EUR/MWh” together with the symbol code so contract valuation code does not mix up MWh vs kWh.
  • Currency lock: never infer currency from top-level base when requesting multiple symbols; always read currencies[code].

Error handling and resilience

  • Connectivity: treat non-2xx as transient unless your monitoring indicates schema changes. Use exponential backoff up to a short ceiling (for example, 3 retries) in batch runs.
  • Partial data: check for nulls and missing keys. Your code should fail fast if rates.OMIE_PT_DA or dates.OMIE_PT_DA is missing.
  • Audit trail: log the exact URL, HTTP status, and the response checksum for traceability in finance governance processes.

Add documentation and registration links to your runbook

Keep the primary links handy for teammates who will maintain or review the integration:

FAQ

How do I confirm the symbol exists before I schedule jobs?
Call GET /api/v1/symbols with your api_key and verify that the catalog includes “Portugal OMIE Day-Ahead” with code OMIE_PT_DA.

Which fields should I persist for finance workflows?
Persist the tuple: symbol code (OMIE_PT_DA), rates.OMIE_PT_DA (float), dates.OMIE_PT_DA (ISO date), currencies.OMIE_PT_DA (string), and the unit EUR/MWh.

How do I handle currency when I mix symbols?
Do not rely on the top-level base when requesting multiple symbols. Use currencies[code] to know each symbol’s currency and convert in your system if required.

Can I prototype without a paid plan?
Yes. The trial is 7 days with 50 calls, which is enough to implement and test a basic ingestion, caching, and reconciliation loop.

Is there anything special about passing base in queries?
If you also need TTF_GAS or EUA_CO2 in the same call, do not pass base=USD. Mixed base responses are supported and expected for multi-symbol requests.

Next step

Register for an API key, confirm OMIE_PT_DA via GET /api/v1/symbols, and ship your first latest-price ingestion using the curl and Python examples above. When you are ready, invite your finance teammates to review the runbook and extend the pipeline to additional energy symbols. Start here: Register.

Ready to get started?

Get your API key and start querying energy commodity prices in minutes.

Get API Key

Related posts