How to Build an API-First EV Fleet Charging Optimizer: Dynamic Tariff Selection, Vehicle Scheduling, and Energy API Integration
Electric vehicle fleets are only as smart as the data that drives their charging decisions. If you operate delivery vans, ride-share EVs, or municipal buses, your margin is crushed every time you overpay for electricity due to poor tariff selection or uncoordinated charging. Worse, without visibility into wholesale market patterns, your scheduler can push load into high-carbon or high-price hours that conflict with sustainability targets and cost KPIs. This post shows how to build an API-first EV fleet charging optimizer that blends dynamic tariff selection, vehicle scheduling, and market-aware controls — powered by unified, normalized energy market data.
The challenge is not just “getting some prices.” Wholesale electricity, gas, and carbon data are published on different schedules by different organizations in different formats. Some sources post hourly curves, others daily aggregates; naming conventions vary; weekend behavior and holidays change; and retail reference series like Spain’s PVPC behave differently than day-ahead auction prices. Stitching all that together and keeping it production-ready distracts your team from the core job: charge scheduling that minimizes cost and emissions, while meeting operational constraints like state-of-charge (SoC) targets, route windows, and depot transformer limits.
In this article, you will learn how to use Energy API — a single REST API that aggregates and normalizes electricity, gas, oil, coal, carbon, and grid carbon intensity from official sources — to feed your optimizer with the right signals. We’ll walk through fetching day-ahead curves, evaluating intraday volatility, building price- and carbon-aware charging plans, and wiring the whole loop into a scheduler that can make decisions in minutes instead of weeks of ETL. You’ll leave with concrete cURL, JavaScript, and Python examples, realistic JSON payloads, and implementation details you can productionize.
Why Energy API
Energy-aware applications fail or thrive on data ergonomics. Building your own scrapers and parsers for OMIE, ENTSO-E, EIA/FRED, ESIOS, and others is brittle, and each provider has its own timeline, units, and quirks. Energy API solves this by presenting a single, normalized JSON surface across electricity, gas, oil, coal, carbon allowances, and carbon intensity. Here are the practical developer benefits that matter to a fleet charging optimizer:
- One normalized schema for many commodities. Query Spanish OMIE day-ahead electricity prices and EU ETS carbon allowances in the same call and get consistent keys, currencies, and dates. Your optimizer can fuse price and carbon signals without special-casing each provider.
- Intraday curves where sources publish them. Hourly and 15-minute electricity curves let your scheduler slot charging into the cheapest hours while meeting SoC deadlines and depot power limits.
- Deterministic day-ahead access. The forecast endpoint returns already-published auction results for symbols that are auction-sourced, enabling next-day planning without scraping portals minutes before markets publish.
- Breadth beyond electricity. Pull TTF gas, Brent/WTI oil, coal benchmarks, and EU ETS (EUA) allowances to analyze cross-commodity drivers or hedge scenarios. Even if you only dispatch EVs today, understanding gas and carbon helps inform budget and long-term strategy.
For developers, the biggest payoff is speed to value: one REST design, one set of fields, one interface to test and monitor — instead of gluing together hand-rolled data pipelines and custom transformations that drain cycles from your scheduling logic.
Quick Start
Base URL: https://energy-api.com/api/v1
Authentication is passed via a query parameter. The calls below demonstrate how to fetch multiple commodities in a single request — a key advantage when you want to enrich an EV charging plan with both electricity and carbon signals.
Example: fetch latest values for Brent crude, TTF gas, and EU ETS allowances to establish macro context (useful for dashboards, alerts, or budget estimations that complement EV charging operations).
curl -G https://energy-api.com/api/v1/latest \
--data-urlencode "symbols=BRENT_CRUDE,TTF_GAS,EUA_CO2" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response:
{
"success": true,
"date": "2026-06-11",
"base": "MIXED",
"rates": {
"BRENT_CRUDE": 74.82,
"TTF_GAS": 38.15,
"EUA_CO2": 67.40
},
"dates": {
"BRENT_CRUDE": "2026-06-11",
"TTF_GAS": "2026-06-11",
"EUA_CO2": "2026-06-11"
},
"currencies": {
"BRENT_CRUDE": "USD",
"TTF_GAS": "EUR",
"EUA_CO2": "EUR"
}
}
Field highlights:
- success: API call status; check this first.
- date: the common response date for the symbols returned (may differ per symbol in dates field).
- rates: latest numeric value per symbol.
- dates: the specific publishing date for each symbol’s rate.
- currencies: currency for each symbol’s rate. Use this to avoid mixing units in your optimizer.
With a single call, your application now knows current context: energy complex sentiment (oil), gas benchmarks influencing power prices, and the cost of carbon. Even if your immediate task is EV charging, these are the signals your finance team and sustainability stakeholders will ask you to incorporate.
Core Endpoints for an EV Fleet Charging Optimizer
Below we focus on endpoints that directly power dynamic tariff selection, vehicle scheduling, and operational monitoring. We will combine electricity intraday curves, deterministic day-ahead results, multi-commodity snapshots, and carbon intensity to achieve cost- and carbon-aware charging schedules.
1) Electricity Intraday Curve: GET /electricity/hourly
Purpose: Retrieve the full hourly or 15-minute intraday curve for a specific electricity symbol on a given date. This is your basis for time-of-use optimization — aligning charging windows with the cheapest hours while respecting SoC targets and depot constraints.
Key params:
- symbol (required): e.g., OMIE_ES_DA (Spain), EPEX_DE_DA (Germany), AEMO_NSW1 (Australia).
- date (required): YYYY-MM-DD of interest.
cURL:
curl -G https://energy-api.com/api/v1/electricity/hourly \
--data-urlencode "symbol=OMIE_ES_DA" \
--data-urlencode "date=2026-06-12" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response (truncated curve for illustration):
{
"success": true,
"symbol": "OMIE_ES_DA",
"date": "2026-06-12",
"currency_code": "EUR",
"frequency": "hourly",
"curve": [
{ "start": "2026-06-12T00:00:00+02:00", "end": "2026-06-12T01:00:00+02:00", "price": 68.12 },
{ "start": "2026-06-12T01:00:00+02:00", "end": "2026-06-12T02:00:00+02:00", "price": 64.47 },
{ "start": "2026-06-12T02:00:00+02:00", "end": "2026-06-12T03:00:00+02:00", "price": 60.29 },
{ "start": "2026-06-12T03:00:00+02:00", "end": "2026-06-12T04:00:00+02:00", "price": 58.91 },
{ "start": "2026-06-12T04:00:00+02:00", "end": "2026-06-12T05:00:00+02:00", "price": 59.73 },
{ "start": "2026-06-12T05:00:00+02:00", "end": "2026-06-12T06:00:00+02:00", "price": 63.15 },
{ "start": "2026-06-12T06:00:00+02:00", "end": "2026-06-12T07:00:00+02:00", "price": 71.02 },
{ "start": "2026-06-12T07:00:00+02:00", "end": "2026-06-12T08:00:00+02:00", "price": 82.66 },
{ "start": "2026-06-12T08:00:00+02:00", "end": "2026-06-12T09:00:00+02:00", "price": 95.11 }
],
"provider": "omie",
"notes": "Spain day-ahead auction schedule; timezone Europe/Madrid"
}
Field highlights:
- curve: ordered intervals with start, end, price. Use these as objective coefficients in your linear or mixed-integer programming model to minimize cost subject to SoC and charger constraints.
- currency_code: price units you must align with your cost calculations and reporting.
- frequency: “hourly” or “15min” depending on the market. Your scheduler must adapt power allocations accordingly.
- notes/timezone: ensure your depot schedule and the curve timestamps are aligned to avoid charging in the wrong windows.
Implementation tip: compute marginal charging opportunities by sorting the curve by price and mapping them to vehicles’ available dwell windows; then cap by charger power and feeder limits to avoid overloads.
2) Day-Ahead Deterministic Lookup: GET /forecast
Purpose: Retrieve the next published day-ahead price for auction-sourced symbols. This enables you to plan for tomorrow as soon as markets publish — without scraping or reverse-engineering provider pages.
Key params:
- symbol (required): e.g., OMIE_ES_DA, EPEX_DE_DA.
cURL:
curl -G https://energy-api.com/api/v1/forecast \
--data-urlencode "symbol=EPEX_DE_DA" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response:
{
"success": true,
"symbol": "EPEX_DE_DA",
"for_date": "2026-06-13",
"currency_code": "EUR",
"frequency": "hourly",
"curve": [
{ "hour": "2026-06-13T00:00:00+02:00", "price": 61.40 },
{ "hour": "2026-06-13T01:00:00+02:00", "price": 58.22 },
{ "hour": "2026-06-13T02:00:00+02:00", "price": 55.76 },
{ "hour": "2026-06-13T03:00:00+02:00", "price": 53.10 },
{ "hour": "2026-06-13T04:00:00+02:00", "price": 54.05 },
{ "hour": "2026-06-13T05:00:00+02:00", "price": 59.33 }
],
"provider": "entso-e",
"status": "published"
}
Field highlights:
- for_date: the operational date of the published auction results your planner should schedule against.
- curve: one price per hour. This is the deterministic input you need to book tomorrow’s charging slots with confidence.
- status: “published” confirms results are final for that day-ahead market run.
Implementation tip: run your “tomorrow plan” job as soon as you detect the new auction day via this endpoint. Store schedules and compare with real-time intraday curves, if applicable, to adjust in case of operational changes.
3) Latest Multi-Commodity Snapshot: GET /latest
Purpose: Fetch the most recent prices for multiple symbols across categories. This is valuable for contextual dashboards and backtesting cost-to-charge correlations with macro energy drivers like gas prices or EUA carbon.
Key params:
- symbols (required, comma-separated): e.g., OMIE_ES_DA,EUA_CO2,TTF_GAS.
- base (optional): filter or normalize currency handling, when supported.
cURL:
curl -G https://energy-api.com/api/v1/latest \
--data-urlencode "symbols=OMIE_ES_DA,EUA_CO2,TTF_GAS" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response:
{
"success": true,
"date": "2026-06-11",
"base": "MIXED",
"rates": {
"OMIE_ES_DA": 72.15,
"EUA_CO2": 67.40,
"TTF_GAS": 38.15
},
"dates": {
"OMIE_ES_DA": "2026-06-11",
"EUA_CO2": "2026-06-11",
"TTF_GAS": "2026-06-11"
},
"currencies": {
"OMIE_ES_DA": "EUR",
"EUA_CO2": "EUR",
"TTF_GAS": "EUR"
}
}
Use this to compute:
- Daily “cost to charge” baseline: price multiplied by expected kWh to charge, adjusted by charger efficiency and losses.
- Carbon-aware surcharge or KPI: combine OMIE_ES_DA with CARBON_INT_ES or CARBON_INT_EU to estimate grams CO2 per kWh for schedule scoring.
- Risk alerts: trigger notifications if EUA_CO2 rises sharply, indicating potential policy-driven cost trends that may affect future tariffs.
4) Carbon Intensity by Country: GET /carbon-intensity
Purpose: Fetch grid carbon intensity (gCO2eq/kWh) to assign a carbon score to each possible charging hour. This lets you optimize on a multi-objective function (cost and emissions) or enforce emissions caps for sustainability commitments.
Key params:
- country (ISO-2): e.g., DE, ES, FR.
cURL:
curl -G https://energy-api.com/api/v1/carbon-intensity \
--data-urlencode "country=DE" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response:
{
"success": true,
"country": "DE",
"currency_code": "N/A",
"unit": "gCO2eq/kWh",
"frequency": "hourly",
"series": [
{ "time": "2026-06-11T00:00:00+02:00", "value": 289 },
{ "time": "2026-06-11T01:00:00+02:00", "value": 275 },
{ "time": "2026-06-11T02:00:00+02:00", "value": 260 },
{ "time": "2026-06-11T03:00:00+02:00", "value": 255 }
],
"provider": "ember"
}
Field highlights:
- series: hourly carbon intensity values; align timestamps with your electricity curve. Use as penalties or constraints in your optimizer (e.g., cap weighted-average emissions per charging session).
- unit: confirms gCO2eq/kWh. If you score by emissions cost, multiply value by a shadow price of carbon to fold into the cost function.
5) Historical Series for Backtesting: GET /timeseries
Purpose: Pull historical prices for one or more symbols to backtest scheduling heuristics and train forecasting or reinforcement-learning policies. Consistent JSON across symbols makes it straightforward to merge electricity price history with carbon or fuel benchmarks.
Key params:
- start, end (required): YYYY-MM-DD.
- symbols (required): e.g., OMIE_ES_DA,CARBON_INT_EU or BRENT_CRUDE,TTF_GAS.
cURL:
curl -G https://energy-api.com/api/v1/timeseries \
--data-urlencode "start=2026-04-01" \
--data-urlencode "end=2026-06-10" \
--data-urlencode "symbols=OMIE_ES_DA,EUA_CO2" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response:
{
"success": true,
"base": "MIXED",
"start_date": "2026-04-01",
"end_date": "2026-06-10",
"rates": {
"OMIE_ES_DA": {
"2026-04-01": 66.21,
"2026-04-02": 64.18,
"2026-04-03": 61.77
},
"EUA_CO2": {
"2026-04-01": 64.85,
"2026-04-02": 65.10,
"2026-04-03": 66.02
}
},
"frequencies": {
"OMIE_ES_DA": "daily",
"EUA_CO2": "daily"
},
"currencies": {
"OMIE_ES_DA": "EUR",
"EUA_CO2": "EUR"
}
}
Field highlights:
- rates: keyed by symbol, then date; ideal for time-aligned joins. Use to compute average price bands or train a model that predicts which hours are systematically cheaper.
- frequencies: daily frequency confirms aggregation level; for intraday optimization, pair with /electricity/hourly curves on representative days.
6) Wholesale Cost Estimation: POST /cost-estimate
Purpose: Estimate monthly wholesale electricity cost for a simple what-if: latest price × kWh/month. This helps financial planning for fleet growth or charger additions. Note that this does not include taxes, network charges, or hourly usage profiles.
Key params:
- symbol OR country (one required): e.g., OMIE_ES_DA or ES.
- kwh_per_month (required): numeric estimate.
cURL:
curl -X POST https://energy-api.com/api/v1/cost-estimate \
-H "Content-Type: application/json" \
-d '{
"symbol": "OMIE_ES_DA",
"kwh_per_month": 150000,
"api_key": "YOUR_API_KEY"
}'
Sample JSON response:
{
"success": true,
"symbol": "OMIE_ES_DA",
"currency_code": "EUR",
"latest_price": 72.15,
"kwh_per_month": 150000,
"estimated_monthly_cost": 10822500.00,
"notes": "Wholesale price x kWh; excludes taxes/network/retail markups"
}
Field highlights:
- estimated_monthly_cost: quick scenario planning for budget approvals or RFPs. Use as a sanity check before deeper intraday scheduling analysis.
7) Provider Health: GET /status
Purpose: View last fetch status of providers. If you need to run daily planning jobs right after auction publication, monitor this endpoint to know data freshness and trigger retries or fallbacks.
cURL:
curl -G https://energy-api.com/api/v1/status \
--data-urlencode "api_key=YOUR_API_KEY"
Example JSON response:
{
"success": true,
"providers": [
{ "name": "omie", "last_success": "2026-06-11T12:35:10Z", "status": "ok" },
{ "name": "entso-e", "last_success": "2026-06-11T12:32:07Z", "status": "ok" },
{ "name": "fred", "last_success": "2026-06-11T09:01:55Z", "status": "ok" },
{ "name": "esios", "last_success": "2026-06-11T11:45:21Z", "status": "ok" }
]
}
Use provider health to:
- Drive readiness gates for your scheduling batch. If OMIE is still publishing, pause planning until status is ok.
- Populate observability dashboards and alerting for data pipeline operations.
Designing the Charging Optimizer: From Data to Decisions
With the right endpoints in hand, your optimizer needs to translate EV fleet constraints and business objectives into an executable plan. The core loop looks like this:
- Collect signals: pull tomorrow’s electricity curve (GET /forecast), intraday curves for today as needed (GET /electricity/hourly), and carbon intensity by country or region (GET /carbon-intensity).
- Assemble constraints: vehicles’ required SoC by departure time, current SoC, max charging power per connector, depot transformer and feeder limits, and operating hours.
- Build an objective: minimize cost subject to constraints; optionally add emissions penalty term to produce low-carbon schedules when financially sensible.
- Solve: use a MILP solver or a greedy heuristic. Allocate energy to the cheapest and/or cleanest hours first while honoring all limits.
- Monitor and adjust: if vehicles return late, or occupancy changes, fetch updated intraday data and revise the plan.
Data alignment details matter:
- Timezone alignment: Energy curves include timezone information; ensure your depot scheduler normalizes to a single time basis.
- Currency handling: Use currencies field to avoid mixing EUR and USD. If you present cross-market dashboards, convert with your own FX pipeline or maintain separate aggregates.
- Missing data: If a date falls on a non-publishing day, GET /historical returns the latest prior value. Account for that in backtesting.
- Error handling: 404 when symbols lack data for the date, 422 for validation errors; implement retries for transient network issues and exponential backoff for 429 responses.
End-to-End Example: Spain Depot, 40 Vans, Overnight Window
Scenario: A depot in Madrid has 20 dual-port 11 kW AC chargers (40 connectors total). Vans return between 18:00 and 22:00 and must depart at 06:00 with 80% SoC. Average deficit per van is 25 kWh. Total energy required is about 1,000 kWh (40 × 25). The transformer limit is 200 kW. Objective: minimize charging cost subject to constraints; secondary objective: minimize carbon intensity.
Data acquisition:
- Fetch OMIE_ES_DA for tomorrow via GET /forecast. You’ll get hourly prices for the entire night (00:00–06:00) and evening hours (18:00–24:00).
- Fetch carbon intensity for ES via GET /carbon-intensity and align with hours.
Strategy:
- Sort hours by price ascending; tie-break with carbon intensity ascending.
- Fill capacity up to 200 kW per hour. Each van can draw up to 11 kW; if a van needs 25 kWh, allocate roughly 2.3 hours at full power (consider charger tapering if applicable).
- Respect arrival/departure windows: vehicles aren’t available before they return; once charged, free the connector for others.
By blending prices and carbon intensity, you’ll likely place most charging between 02:00–05:00 when prices and emissions tend to dip. If 02:00–03:00 is cheap but emissions are high, your tie-break rules can push some load into 03:00–04:00 for a better carbon score with minimal cost increase.
Developer Implementation: Pull, Plan, and Orchestrate
Below are concise client examples in JavaScript and Python that you can adapt into your services. These illustrate fetching day-ahead curves and carbon intensity, then producing an hour-scored plan. Incorporate your fleet’s constraints into the scoring and solver layers.
JavaScript (Node.js) example
// Install: use native fetch (Node 18+) or node-fetch polyfill
const API = "https://energy-api.com/api/v1";
const KEY = "YOUR_API_KEY";
async function getDayAhead(symbol) {
const url = new URL(`${API}/forecast`);
url.searchParams.set("symbol", symbol);
url.searchParams.set("api_key", KEY);
const res = await fetch(url);
if (!res.ok) throw new Error(`forecast failed: ${res.status}`);
return res.json();
}
async function getCarbonIntensity(country) {
const url = new URL(`${API}/carbon-intensity`);
url.searchParams.set("country", country);
url.searchParams.set("api_key", KEY);
const res = await fetch(url);
if (!res.ok) throw new Error(`carbon-intensity failed: ${res.status}`);
return res.json();
}
function buildHourIndex(entries, key = "hour") {
const map = new Map();
for (const e of entries) {
const t = e[key] || e.time;
map.set(new Date(t).toISOString(), e);
}
return map;
}
async function planCharging() {
const symbol = "OMIE_ES_DA";
const country = "ES";
const [forecast, carbon] = await Promise.all([
getDayAhead(symbol),
getCarbonIntensity(country)
]);
const priceMap = buildHourIndex(forecast.curve, "hour");
const carbonMap = buildHourIndex(carbon.series, "time");
// Score hours: cost first, then carbon
const hours = [];
for (const [isoTime, p] of priceMap.entries()) {
const c = carbonMap.get(isoTime);
if (!c) continue; // ensure alignment
hours.push({
time: isoTime,
price: p.price,
carbon: c.value,
score: p.price * 1.0 + (c.value / 1000.0) // simple blend
});
}
hours.sort((a, b) => a.score - b.score);
// Example allocation: 1000 kWh total, 200 kW max per hour => min 5 hours
let remaining = 1000;
const maxKW = 200;
const schedule = [];
for (const h of hours) {
if (remaining <= 0) break;
const kWhThisHour = Math.min(maxKW, remaining);
schedule.push({ time: h.time, kWh: kWhThisHour, price: h.price, carbon: h.carbon });
remaining -= kWhThisHour;
}
return schedule;
}
planCharging().then(s => {
console.log("Proposed schedule:");
console.table(s);
}).catch(err => {
console.error(err);
});
Python example
import requests
from datetime import datetime, timezone
API = "https://energy-api.com/api/v1"
KEY = "YOUR_API_KEY"
def get_forecast(symbol: str):
r = requests.get(f"{API}/forecast", params={"symbol": symbol, "api_key": KEY}, timeout=30)
r.raise_for_status()
return r.json()
def get_carbon_intensity(country: str):
r = requests.get(f"{API}/carbon-intensity", params={"country": country, "api_key": KEY}, timeout=30)
r.raise_for_status()
return r.json()
def to_iso(t: str) -> str:
# Normalize to UTC ISO for consistent joins
dt = datetime.fromisoformat(t.replace("Z", "+00:00"))
return dt.astimezone(timezone.utc).isoformat()
def plan():
symbol = "OMIE_ES_DA"
country = "ES"
f = get_forecast(symbol)
ci = get_carbon_intensity(country)
price_map = { to_iso(e["hour"]): e["price"] for e in f["curve"] }
carbon_map = { to_iso(e["time"]): e["value"] for e in ci["series"] }
hours = []
for iso_t, price in price_map.items():
if iso_t in carbon_map:
carbon = carbon_map[iso_t]
score = price + carbon / 1000.0
hours.append((iso_t, price, carbon, score))
hours.sort(key=lambda x: x[3])
remaining_kwh = 1000
cap_kw = 200
schedule = []
for iso_t, price, carbon, score in hours:
if remaining_kwh <= 0:
break
kwh = min(cap_kw, remaining_kwh)
schedule.append({"time": iso_t, "kWh": kwh, "price": price, "carbon": carbon})
remaining_kwh -= kwh
return schedule
if __name__ == "__main__":
result = plan()
for row in result:
print(row)
These examples deliberately keep the solver simple. In production, integrate your vehicle telematics for SoC, add per-connector limits, introduce binary variables for connector assignment, and maintain fairness constraints so no vehicle starves. The Energy API endpoints give you reliable and aligned signals to feed that solver.
Operational Best Practices and Observability
To keep your optimizer robust:
- Use GET /status before daily jobs to confirm providers are current. If data is mid-update, delay the plan generation by a few minutes.
-
Handle error codes:
- 401: missing/invalid parameter; validate API calls before deploy.
- 404: no data for symbol/date; detect and switch to previous business day or a fallback symbol.
- 422: input validation; sanitize your params and dates.
- 429: backoff and retry with jitter.
- Cache the intraday curve for a planning horizon to avoid repeated calls, but re-check once near execution time if you support intraday adjustments.
- Version your symbol sets through GET /symbols so you can safely add EPEX_DE_DA, PVPC_ES_2TD, or AEMO_NSW1 as your coverage expands.
Example: Discover electricity symbols for Germany or Spain with GET /symbols:
curl -G https://energy-api.com/api/v1/symbols \
--data-urlencode "category=electricity" \
--data-urlencode "api_key=YOUR_API_KEY"
Sample JSON response:
{
"success": true,
"count": 4,
"symbols": [
{
"symbol": "OMIE_ES_DA",
"name": "OMIE Day-Ahead Spain",
"category": "electricity",
"country_code": "ES",
"currency_code": "EUR",
"frequency": "hourly",
"description": "OMIE day-ahead hourly prices for Spain"
},
{
"symbol": "EPEX_DE_DA",
"name": "EPEX Day-Ahead Germany",
"category": "electricity",
"country_code": "DE",
"currency_code": "EUR",
"frequency": "hourly",
"description": "EPEX day-ahead hourly prices for Germany"
},
{
"symbol": "PVPC_ES_2TD",
"name": "PVPC Spain 2TD Retail Reference",
"category": "electricity",
"country_code": "ES",
"currency_code": "EUR",
"frequency": "hourly",
"description": "Spanish PVPC reference series"
},
{
"symbol": "AEMO_NSW1",
"name": "AEMO New South Wales",
"category": "electricity",
"country_code": "AU",
"currency_code": "AUD",
"frequency": "5min",
"description": "AEMO region pricing where available"
}
]
}
Leverage metadata like frequency and country_code to configure depot-level planners and UI filters. When you spin up a new region, your code can discover the right symbols automatically.
Real-World Use Cases
Below are three concrete projects teams are building with the same endpoints we’ve covered.
1) Dynamic Tariff-Aware Charging Scheduler
Build a nightly job that calls GET /forecast for your depot’s day-ahead symbol and GET /carbon-intensity for the same country. Feed both into a solver that minimizes cost subject to SoC and power constraints, with carbon as a secondary objective. Persist the selected hours and vehicle/connector assignments, and generate operator work orders. Reconcile next morning using GET /electricity/hourly if you support intraday adjustments due to delays or unplanned returns.
2) ESG Charging Dashboard with Cost and Emissions KPIs
For sustainability and finance stakeholders, assemble a dashboard using GET /latest for OMIE_ES_DA, EUA_CO2, and TTF_GAS to contextualize daily market shifts. Add GET /timeseries for OMIE_ES_DA and CARBON_INT_EU to show trends and track rolling 30-day grams CO2 per kWh for your charging mix. Surface alerts when EUA_CO2 or carbon intensity exceeds thresholds, so the scheduler tightens emissions constraints on the next plan.
3) Budgeting and RFP Scenarios for New Depots
Use POST /cost-estimate with a target symbol or country and your projected kWh/month to build wholesale-only scenarios for new sites. Then complement with GET /electricity/hourly from historical representative dates via GET /historical + derived intraday curves (or local archives) to stress-test peak-hour exposure. This speeds internal approval cycles and vendor negotiations by grounding discussions in verifiable market data.
FAQ
How often does the TTF gas price update?
TTF_GAS is provided as a daily series reflecting the latest available publication. Use GET /latest for current value and GET /timeseries to review historical daily movements. If your fleet strategy correlates charging cost forecasts with gas benchmarks, these endpoints give you quick, normalized access.
Can I get historical energy prices going back several years?
Yes. Use GET /timeseries with your desired start and end dates for symbols like OMIE_ES_DA, EPEX_DE_DA, EUA_CO2, BRENT_CRUDE, and TTF_GAS. The response is standardized across symbols, simplifying backtests and trend analyses that inform charging policy design and risk controls.
Does the API support multiple commodities in one call?
Yes. GET /latest accepts a comma-separated list of symbols across electricity, gas, oil, coal, carbon, and carbon intensity. This is ideal for dashboards and multi-signal optimizers that combine price, carbon, and macro market context without juggling multiple provider-specific interfaces.
How do I get hourly curves for day-ahead markets?
Use GET /electricity/hourly for a specific symbol and date to fetch the full intraday curve. For planning the next day, use GET /forecast to retrieve already-published auction results. Align timestamps and confirm timezone from the response metadata before feeding your scheduler.
What if a symbol has no data on a given date?
GET /historical returns the most recent value before a non-publishing date. For intraday optimization needs, pair that with GET /electricity/hourly where available. Always check for “success”: false responses and handle 404/422 with clear fallbacks or operator alerts.
Conclusion + CTA
Coordinated EV fleet charging is a data problem first and an optimization problem second. If your market signals are late, messy, or inconsistent, your schedules won’t survive real-world constraints. With Energy API, you get one normalized REST surface for electricity curves, day-ahead auctions, gas, carbon allowances, and grid carbon intensity — all the inputs you need to build a market-aware, carbon-conscious charging optimizer.
Adopting a single, unified JSON interface eliminates weeks of ETL and scraping chores, freeing your team to focus on scheduling logic, solver tuning, and operational ergonomics. Whether you run a handful of chargers or orchestrate thousands across multiple depots and countries, the same endpoints scale with you — from quick cost estimates to fully automated nightly plans reinforced by carbon-intensity scoring.
Start shipping features in hours, not weeks. Explore the symbols, test the endpoints, and wire your scheduler to data you can trust. Try Energy API for free and make your EV charging smarter, cheaper, and cleaner.
Ready to get started?
Get your API key and start querying energy commodity prices in minutes.
Get API KeyRelated posts
Discover how Energy API streamlines meter-to-bill reconciliation for utilities, automating netting, tariff rul...
Read more →
Discover how Energy API is transforming electric vehicle charging networks, offering developers and utilities...
Read more →
Discover how to leverage Energy API for optimizing electric vehicle charging networks. Enhance efficiency and...
Read more →
Discover how Energy API is revolutionizing electric vehicle charging infrastructure, enabling seamless integra...
Read more →
Discover how to optimize electric vehicle charging infrastructure using Energy API. Learn strategies for utili...
Read more →