OMIE_ES_DA Price API

OMIE_ES_DA Price API

You need a reliable way to fetch the latest Spain OMIE Day-Ahead power price and wire it into finance workflows like P&L attribution, settlement checks, or risk dashboards. By the end of this guide, you will call a single endpoint to retrieve the current OMIE_ES_DA price, parse the response, understand units and dates, and ship a production-ready integration with caching and error handling.

What you are integrating: Spain OMIE Day-Ahead (OMIE_ES_DA)

The OMIE_ES_DA symbol delivers the Spanish day-ahead electricity price suitable for finance-grade use cases: invoicing support, exposure reporting, and position valuation. The Energy API provides a simple latest-price endpoint with clear units and dates that fit well into pricing and risk systems.

Illustration: OMIE_ES_DA Price API
  • Instrument: Spain OMIE Day-Ahead
  • Symbol code: OMIE_ES_DA
  • Unit: EUR/MWh
  • Intended finance usage: settlement support, mark-to-market (MTM), cost-of-goods-energy allocation, and risk factor updates

Origin catalog facts for OMIE_ES_DA

  • Symbol name: Spain OMIE Day-Ahead
  • Symbol code: OMIE_ES_DA
  • Unit: EUR/MWh
  • Auth: api_key query parameter. Placeholder YOUR_API_KEY only.
  • Do not pass base=USD when you also need TTF_GAS or EUA_CO2.
  • No MCP host. Starter $19.99/mo, trial 7 days / 50 calls.
  • curl: curl -G "https://energy-api.com/api/v1/latest" --data-urlencode "symbols=OMIE_ES_DA" --data-urlencode "api_key=YOUR_API_KEY"
  • Read rates.OMIE_ES_DA, dates.OMIE_ES_DA, currencies.OMIE_ES_DA. base may be MIXED.

Quick start: get the latest OMIE_ES_DA price

Use the latest endpoint to fetch the current price and related metadata. Authentication is via api_key as a query parameter. You can test immediately on the trial (7 days / 50 calls) and then move to the Starter plan at $19.99/mo.

Official cURL (copy-paste):

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

Use YOUR_API_KEY as a literal placeholder during setup. Replace it with your key from your dashboard after you Register.

Endpoint anatomy and request parameters

Endpoint: GET https://energy-api.com/api/v1/latest

  • symbols: required. Comma-separated list of energy symbols; here, use OMIE_ES_DA.
  • api_key: required. Your account key in query string (no Authorization header is needed).

Notes for finance integrations:

  • Base currency field base may be EUR or MIXED depending on symbols; for OMIE_ES_DA alone, expect EUR as shown below.
  • Do not pass base=USD if you also request TTF_GAS or EUA_CO2 in the same call. If your portfolio mixes symbols, handle base=MIXED logic on your side.
  • No pagination for latest; a single response covers all requested symbols.

Official JSON responses you will parse

Use the following official JSON responses for your tests and schema validation. These blocks are the canonical layouts you will see when retrieving OMIE_ES_DA.

Real API response (minified)

{"success":true,"date":"2026-10-28","base":"EUR","rates":{"OMIE_ES_DA":197.4594},"dates":{"OMIE_ES_DA":"2026-10-28"},"currencies":{"OMIE_ES_DA":"EUR"},"base_filter_note":null,"missing_symbols":null}

Fields you will actually use:

  • rates.OMIE_ES_DA: the numeric price for Spain OMIE Day-Ahead.
  • dates.OMIE_ES_DA: the effective date for that price (finance ledgers generally store this as the valuation date).
  • currencies.OMIE_ES_DA: currency unit for the price (EUR for OMIE_ES_DA).
  • base: overall base unit for the response; may be EUR or MIXED across multi-symbol calls.

Official sample (formatted)

{
"success": true,
"date": "2026-10-28",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 197.4594
},
"dates": {
"OMIE_ES_DA": "2026-10-28"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null,
"missing_symbols": null
}

Schema validation example (identical to live)

{
"success": true,
"date": "2026-10-28",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 197.4594
},
"dates": {
"OMIE_ES_DA": "2026-10-28"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null,
"missing_symbols": null
}

Caching snapshot example (identical payload)

{
"success": true,
"date": "2026-10-28",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 197.4594
},
"dates": {
"OMIE_ES_DA": "2026-10-28"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null,
"missing_symbols": null
}

Field-by-field mapping for finance systems

Map the fields below into your data model so the OMIE_ES_DA price can be used in valuation and reporting pipelines.

  • Instrument: OMIE_ES_DA (string; keep this as the primary key in your price table).
  • Price: rates.OMIE_ES_DA (decimal; store as EUR/MWh without further conversion to avoid silent FX drift).
  • Valuation date: dates.OMIE_ES_DA (ISO date; align with your end-of-day cutover rules).
  • Currency: currencies.OMIE_ES_DA (always EUR for OMIE_ES_DA).
  • Global base: base (string; should be EUR for single-symbol OMIE_ES_DA calls).

Common finance considerations:

  • Precision: keep at least 4 decimal places to minimize rounding error in multi-site allocations.
  • Unit checks: Store and enforce “EUR/MWh” at the instrument level, not just at the price record level.
  • Valuation timing: Align your ledger’s “effective date” with dates.OMIE_ES_DA rather than server time.

Production code examples

The following examples fetch OMIE_ES_DA and read the price, valuation date, and currency fields you need for finance pipelines.

JavaScript (Node.js) example

import https from 'https';
import { URL } from 'url';

function fetchOmieEsDaLatest(apiKey) {
const endpoint = new URL('https://energy-api.com/api/v1/latest');
endpoint.searchParams.set('symbols', 'OMIE_ES_DA');
endpoint.searchParams.set('api_key', apiKey);

return new Promise((resolve, reject) => {
https.get(endpoint.toString(), (res) => {
let data = '';
res.on('data', (chunk) => (data += chunk));
res.on('end', () => {
try {
const json = JSON.parse(data);

if (!json.success) {
return reject(new Error('API returned success=false'));
}

const price = json.rates?.OMIE_ES_DA;
const valDate = json.dates?.OMIE_ES_DA;
const ccy = json.currencies?.OMIE_ES_DA;
const base = json.base;

if (typeof price !== 'number' || !valDate || !ccy) {
return reject(new Error('Missing expected OMIE_ES_DA fields'));
}

resolve({ price, valDate, ccy, base });
} catch (e) {
reject(e);
}
});
}).on('error', reject);
});
}

// Example usage:
(async () => {
try {
const { price, valDate, ccy, base } = await fetchOmieEsDaLatest('YOUR_API_KEY');
console.log('OMIE_ES_DA price:', price, ccy + '/MWh');
console.log('Valuation date:', valDate);
console.log('Base field:', base);
// Persist to your price table or valuation engine here
} catch (err) {
console.error('Fetch failed:', err.message);
}
})();

Python example

import json
import urllib.parse
import urllib.request

def fetch_omie_es_da_latest(api_key: str):
base_url = "https://energy-api.com/api/v1/latest"
query = {
"symbols": "OMIE_ES_DA",
"api_key": api_key,
}
url = f"{base_url}?{urllib.parse.urlencode(query)}"
with urllib.request.urlopen(url) as resp:
payload = resp.read().decode("utf-8")
data = json.loads(payload)

if not data.get("success", False):
raise RuntimeError("API returned success=false")

price = data.get("rates", {}).get("OMIE_ES_DA")
val_date = data.get("dates", {}).get("OMIE_ES_DA")
ccy = data.get("currencies", {}).get("OMIE_ES_DA")
base_field = data.get("base")

if price is None or val_date is None or ccy is None:
raise KeyError("Missing expected OMIE_ES_DA fields in response")

return {
"symbol": "OMIE_ES_DA",
"price": price, # EUR/MWh
"valuation_date": val_date,
"currency": ccy,
"base": base_field
}

if __name__ == "__main__":
record = fetch_omie_es_da_latest("YOUR_API_KEY")
print(record)

Units, dates, and time handling

Units: OMIE_ES_DA is quoted in EUR/MWh. Do not normalize to EUR/kWh unless your downstream models expect it; that would require conversion (divide by 1000) and careful rounding.

Dates: Read dates.OMIE_ES_DA as the effective date of the day-ahead price. For finance reporting, use this field as your valuation date. The top-level date mirrors the request’s snapshot date.

Timezone and non-trading days: Day-ahead power markets can publish prices on weekends and holidays; your finance logic should not assume weekday-only updates. Do not skip persisting data on weekends unless your reporting calendar explicitly excludes them.

Base field: For single-symbol OMIE_ES_DA calls, base is EUR in the official sample. In multi-symbol calls that include instruments with different currencies or commodity conventions, base may be MIXED, with per-instrument currency always found in currencies.<SYMBOL>.

Error handling, retries, and caching for finance pipelines

When building settlement and P&L tasks, treat data quality and availability as first-class concerns:

  • Transport reliability: Implement idempotent retries with exponential backoff for transient network errors (HTTP 5xx, timeouts).
  • Validation: Verify json.success == true and the presence of rates.OMIE_ES_DA, dates.OMIE_ES_DA, and currencies.OMIE_ES_DA.
  • Caching: For deterministic finance runs, cache the entire JSON response per valuation date (for auditability). Store a hash of the payload to detect drift.
  • Cutover: If your end-of-day process runs at a fixed UTC time, pin to dates.OMIE_ES_DA to avoid mismatches between market day and job runtime.
  • Backfills: For any late-arriving data or reruns, pull the latest again and reconcile by valuation date rather than job timestamp.

Integration patterns in finance systems

Price master: Insert or upsert a record keyed by (symbol=OMIE_ES_DA, valuation_date). Keep fields for price, currency, and a JSON blob of the full response to pass audits.

Risk and MTM: Read price as a scalar factor in EUR/MWh. If your positions are in MWh or derivatives thereof, multiply accordingly and ensure unit consistency across nodes in your valuation DAG.

Reporting and reconciliation: Use currencies.OMIE_ES_DA for display and downstream FX logic. If your ledger is multi-currency, run FX conversion at report time using your approved FX source; do not assume base globally changes instrument currencies.

Verification against the official response

To ensure your schema matches exactly, validate test runs using the same canonical payload shown above. Below is an additional official-form payload you can keep in tests:

{
"success": true,
"date": "2026-10-28",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 197.4594
},
"dates": {
"OMIE_ES_DA": "2026-10-28"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null,
"missing_symbols": null
}

Operational notes and limits

  • Authentication: api_key is required as a query parameter.
  • Plan: Starter is $19.99/mo. Trial is 7 days and limited to 50 calls; this is adequate to prototype overnight finance jobs.
  • Throughput: For latest-price tasks, batch multiple symbols with a comma-delimited symbols list to reduce calls; however, keep OMIE_ES_DA isolated if you want guaranteed base=EUR at the top level.
  • No MCP host: Integrate directly via the documented endpoint.
  • Observability: Log success, instrument, price, valuation date, and response hash for traceability.

FAQs

Q1: What unit should I store for OMIE_ES_DA in my finance database?
Store the raw rate as EUR/MWh. The currencies.OMIE_ES_DA field confirms EUR, and the instrument unit is MWh; avoid implicit conversions.

Q2: Which date should I use for valuation and reporting?
Use dates.OMIE_ES_DA. This is the effective date of the day-ahead price and is the correct anchor for P&L and ledger postings.

Q3: Can I request multiple instruments together with OMIE_ES_DA?
Yes, pass a comma-separated symbols list. If you include instruments with different currency conventions, the base field can be MIXED. Read each instrument’s currency from currencies.<SYMBOL> without applying a global base conversion.

Q4: How do I authenticate?
Use the api_key query parameter. Example: api_key=YOUR_API_KEY as shown in the cURL sample.

Q5: What are the trial and starter plan details?
The trial lasts 7 days with 50 calls. The Starter plan is $19.99/mo. This is sufficient for daily or hourly latest-price pulls in finance jobs.

Ready to wire OMIE_ES_DA into your finance stack? Create your key and start pulling latest prices with a single GET. Register here: Register. For full parameter details and more examples, see the Documentation.

Ready to get started?

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

Get API Key

Related posts