Energy Symbols Catalog Price API
You need a reliable way to request and parse the latest price for an Energy symbol and ship it into your app with clear rules for authentication, units, base handling, and real-time validation. By the end of this guide, you will call the Energy API to confirm the symbol in the live catalog and structure a latest-price request for Energy Symbols Catalog with code you can paste into your stack.
Scope and end result
This tutorial centers on the Energy Symbols Catalog as the integration surface and uses the symbol code BRENT_CRUDE from the live catalog. You will verify that BRENT_CRUDE is present via the symbols listing endpoint and prepare a latest-price call for that symbol. Along the way, you will see how to handle the api_key, base rules for mixed-unit symbols, and how to reason about timestamp and currency fields returned by the API.
The outcome: you will be able to programmatically confirm the symbol from the live catalog, trigger a latest-price lookup for BRENT_CRUDE, and parse rates, dates, and currency fields you need to display or store.
Access, authentication, and plan limits
Authentication uses the api_key query parameter. Pass your key in the query string as api_key=YOUR_API_KEY. Use the literal placeholder YOUR_API_KEY only in examples; replace it with your key in production.
- Starter plan: $19.99/mo
- Trial: 7 days / 50 calls
- No MCP host
If you do not yet have access, create your account here: Register. Full parameter and response details live at: Documentation.
Confirm the symbol from the live catalog
You should always confirm the exact symbol code from the live list before wiring a price request. This ensures you use a code that currently resolves and helps you avoid inventing codes that do not exist.
Official cURL to fetch the live symbol list:
curl -G "https://energy-api.com/api/v1/symbols" --data-urlencode "api_key=YOUR_API_KEY"
Official JSON response (copy-paste, use as-is in your local tests):
{
"success": true,
"date": "2026-10-11",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 141.491
},
"dates": {
"OMIE_ES_DA": "2026-10-11"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}
What you will use from this document in your integration:
- success: sanity check your transport pipeline.
- date: the server-side date for this listing retrieval.
- rates: map of symbol codes to their current numeric values exposed by this endpoint.
- dates: per-symbol date to pair with the numeric values.
- currencies: per-symbol currency code; critical when displaying or converting values.
- base_filter_note: informational note when a base filter is applied (null in the sample).
Important: Do not invent a symbol code. For Brent, the symbol code exposed in the Energy Symbols Catalog is BRENT_CRUDE. Confirm it via the live list above before proceeding to price retrieval.
Build the latest-price request for BRENT_CRUDE
To retrieve the latest price, use the latest endpoint and pass your target symbol code in the symbols query parameter. It accepts one or more comma-delimited codes. For this guide, request a single symbol: BRENT_CRUDE.
HTTP method: GET
Endpoint: https://energy-api.com/api/v1/latest?symbols=BRENT_CRUDE&api_key=YOUR_API_KEY
Base handling rule: do not pass base=USD when your symbol set includes TTF_GAS or EUA_CO2 because their base is mixed. For BRENT_CRUDE alone, you typically do not need a base override; rely on the currency field returned per symbol. Unit for BRENT_CRUDE is mixed.
Batching: you can batch multiple symbols in symbols= if needed. If any batch includes TTF_GAS or EUA_CO2, do not set base=USD in that same request because you would be mixing a fixed base with MIXED. Keep requests separated in that case.
Code: list and verify the catalog before pricing
The following example calls the symbols endpoint, validates transport, and reads fields you will use for symbol confirmation and display logic. It uses the same endpoint and fields as the official cURL above.
Python: confirm and read fields from the live catalog
import os
import sys
import urllib.parse
import urllib.request
import json
API_BASE = "https://energy-api.com/api/v1"
API_KEY = os.environ.get("ENERGY_API_KEY", "YOUR_API_KEY")
def get_symbols():
url = f"{API_BASE}/symbols"
params = {"api_key": API_KEY}
full_url = url + "?" + urllib.parse.urlencode(params)
with urllib.request.urlopen(full_url) as resp:
content = resp.read().decode("utf-8")
data = json.loads(content)
return data
def ensure_symbol_present(data, symbol_code):
if not data.get("success", False):
raise RuntimeError("API transport not successful")
# Defensive checks for required sections
rates = data.get("rates", {})
currencies = data.get("currencies", {})
dates = data.get("dates", {})
# Confirm presence
if symbol_code not in rates:
# You might fetch again or alert; here we exit with context
print(f"Symbol {symbol_code} not present in current listing.")
sys.exit(2)
# Derive a display record
return {
"symbol": symbol_code,
"value": rates[symbol_code],
"currency": currencies.get(symbol_code),
"as_of_date": dates.get(symbol_code),
"listing_date": data.get("date"),
"base": data.get("base"),
"base_filter_note": data.get("base_filter_note"),
}
if __name__ == "__main__":
catalog = get_symbols()
record = ensure_symbol_present(catalog, "BRENT_CRUDE")
print(json.dumps(record, indent=2))
This script intentionally validates the success flag, extracts per-symbol currency and date fields, and captures base and base_filter_note for logging. Keep this validation around your pricing jobs to catch misconfigurations quickly.
Calling the latest endpoint for price retrieval
With BRENT_CRUDE confirmed, you can request the latest price with a GET to the latest endpoint. While this guide does not include an official JSON example for the latest endpoint, your code should:
- Use the api_key query parameter, identical to the symbols list call.
- Pass symbols=BRENT_CRUDE (single symbol) or a comma-delimited list for batching.
- Not include base=USD in any call that also includes TTF_GAS or EUA_CO2 in symbols=, because their base is MIXED.
- Parse success, date, and per-symbol maps (e.g., rates, dates, currencies) consistently with the structure you validated from the catalog response.
JavaScript (Node.js): retrieve latest for BRENT_CRUDE
This example shows how to call the latest endpoint with a defensive parse. Replace YOUR_API_KEY in production code.
import https from "https";
import { URL } from "url";
const API_KEY = process.env.ENERGY_API_KEY || "YOUR_API_KEY";
const API_BASE = "https://energy-api.com/api/v1";
function getLatest(symbols) {
const url = new URL(`${API_BASE}/latest`);
url.searchParams.set("symbols", symbols.join(","));
url.searchParams.set("api_key", API_KEY);
return new Promise((resolve, reject) => {
https.get(url, (res) => {
let raw = "";
res.on("data", (chunk) => (raw += chunk));
res.on("end", () => {
try {
const data = JSON.parse(raw);
if (!data || data.success !== true) {
return reject(new Error("Latest call did not return success=true"));
}
// Defensive extraction following the documented shape used in the catalog example
const result = {
call_date: data.date,
base: data.base,
base_filter_note: data.base_filter_note ?? null,
// For each requested symbol, surface the price, symbol currency, and as-of date
entries: symbols.map((s) => ({
symbol: s,
value: data.rates ? data.rates[s] : undefined,
currency: data.currencies ? data.currencies[s] : undefined,
as_of_date: data.dates ? data.dates[s] : undefined,
})),
};
resolve(result);
} catch (e) {
reject(e);
}
});
}).on("error", reject);
});
}
(async () => {
try {
// Only BRENT_CRUDE here; do not mix TTF_GAS or EUA_CO2 with base=USD in any request
const symbols = ["BRENT_CRUDE"];
const latest = await getLatest(symbols);
console.log(JSON.stringify(latest, null, 2));
} catch (err) {
console.error(err);
process.exit(1);
}
})();
This code mirrors the field access pattern you observed in the catalog example. It avoids making assumptions beyond the fields provided and focuses on extracting the rate, currency, and as-of date for each requested symbol.
Field-by-field walkthrough using the official sample
The following official JSON is provided to ground your parser. Keep these field names stable in your code to reduce integration friction.
{
"success": true,
"date": "2026-10-11",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 141.491
},
"dates": {
"OMIE_ES_DA": "2026-10-11"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}
- success: Transport and request status gate.
- date: Top-level date for the returned snapshot.
- base: The reference base currency of the response; do not override this for mixed-base symbols.
- rates: Symbol to value.
- dates: Symbol-level date for the rate.
- currencies: Symbol-level currency code.
- base_filter_note: A nullable note exposed when base filters are applied.
Production notes that save time
- Units and base: BRENT_CRUDE has unit=mixed. Always display the currency specific to the symbol from currencies. If you aggregate multiple symbols, do not enforce a single base across mixed instruments unless you explicitly convert values yourself downstream.
- Mixed symbols: If you request TTF_GAS or EUA_CO2 alongside other instruments in a single call, do not pass base=USD. Keep calls separate when you need a fixed base for non-mixed symbols.
- Timestamps and timezone: Use date (top-level) and dates[symbol] to label UI outputs and for cache keys. Treat dates as ISO-8601 date strings; if you require a specific timezone representation, convert downstream after parsing.
- Caching: Cache successful responses keyed by symbols and date. In workflows that can tolerate brief staleness, a short TTL can prevent re-fetching data that has not changed.
- Batching: Group related symbols into a single symbols= call to reduce overhead. Keep mixed-base constraints in mind as above.
- Error handling: Always check success. When false or missing, log the HTTP status and the raw body to aid incident triage.
- Trial safeguards: With a 7-day / 50-call trial, run your integration in a local cache-first mode and use recorded fixtures during development to avoid using up calls.
- Secrets: Pass api_key in query as required. Do not hard-code keys in source; pull from environment variables or a config vault.
Validation patterns with the official response
Use the official JSON structure below to build deterministic tests for your parser and contract checks before you ship.
{
"success": true,
"date": "2026-10-11",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 141.491
},
"dates": {
"OMIE_ES_DA": "2026-10-11"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}
Recommended tests:
- Assert success strictly equals true.
- Assert base equals a known currency code when present.
- Assert rates, dates, and currencies contain the requested symbol key (e.g., BRENT_CRUDE in your production run).
- Assert type checks: numeric value in rates, string dates, string currencies, nullable base_filter_note.
Putting it together for Energy Symbols Catalog (BRENT_CRUDE)
Process outline for your production job:
- Call the live catalog endpoint to confirm BRENT_CRUDE is present and to verify field structure.
- Issue a GET to /api/v1/latest with symbols=BRENT_CRUDE and your api_key.
- Parse success, date, base, and per-symbol maps (rates, dates, currencies) from the latest response.
- Display or store the value paired with currencies[BRENT_CRUDE] and dates[BRENT_CRUDE].
- For mixed symbols, do not force base=USD; if you need normalized currency outputs, convert after retrieval using your own FX logic.
Keep the mixed-base restriction in mind when expanding to other energy instruments such as TTF_GAS or EUA_CO2. If you include them in any batch, omit base=USD in that batch request.
FAQ
How do I authenticate?
Pass your key as a query parameter: api_key=YOUR_API_KEY. Do not use headers; the Energy API expects the api_key query parameter.
Can I request multiple symbols at once?
Yes, provide a comma-delimited list in symbols=. If any included symbol is TTF_GAS or EUA_CO2, do not add base=USD because their base is MIXED.
What fields should I persist for a price record?
Persist the symbol code, value from rates[symbol], currencies[symbol], dates[symbol], plus the top-level date and base for reproducibility and auditing.
How do I confirm BRENT_CRUDE is valid before going live?
Call the live catalog with the official cURL and verify the symbol exists in the response. Avoid hard-coding assumptions without validating against the current list.
What are the starter plan and trial limits?
Starter is $19.99/mo; trial provides 7 days / 50 calls. Use caching and fixtures to conserve calls during development.
Next steps
Create an account to get your api_key and run the cURL above within minutes: Register. When you are ready to add batching, symbol discovery workflows, or environment-specific configuration, consult the parameter and response references here: Documentation.
Ready to get started?
Get your API key and start querying energy commodity prices in minutes.
Get API KeyRelated posts
Discover how Energy API empowers communities to engage in localized energy trading, enhancing sustainability a...
Read more →
Discover how to implement OAuth2 consent flows and enhance customer data privacy with Energy API for secure me...
Read more →
Discover how to build a geo-fenced distributed energy resource orchestrator using Energy API and MQTT for low-...
Read more →
Discover how Energy API empowers communities to launch localized renewable projects by providing reliable ener...
Read more →
Discover how to build offline-first mobile apps for field technicians using Energy API. Enhance decision-makin...
Read more →