Creating Custom Dashboards: A Developer’s Guide to Visualizing Energy Data with Energy API

Creating Custom Dashboards: A Developer’s Guide to Visualizing Energy Data with Energy API

Introduction

In today's fast-paced energy market, developers and data engineers face the daunting challenge of aggregating and visualizing vast amounts of energy data from disparate sources. The complexity of dealing with multiple APIs, each with its own unique data formats and schedules, can lead to significant delays and increased costs. This is where Energy API comes into play, offering a unified solution that simplifies the process of accessing wholesale energy market data.

By leveraging the capabilities of Energy API, developers can focus on building innovative applications without the headache of scraping government portals or stitching together incompatible formats. This blog post will guide you through creating custom dashboards to visualize energy data, showcasing the powerful features of Energy API that can help you streamline your development process.

Why Energy API

Energy API stands out in the crowded landscape of energy data providers for several compelling reasons:

  • Unified Data Access: With Energy API, you gain access to a single normalized REST interface that aggregates data from multiple trusted sources, including OMIE, ENTSO-E, EIA, and more. This eliminates the need to manage different formats and schedules, allowing you to ship features in hours rather than weeks.
  • Comprehensive Coverage: Energy API offers over 39 symbols across six commodity categories—electricity, natural gas, crude oil, coal, carbon allowances, and grid carbon intensity. This extensive coverage means you can retrieve all the data you need in one place, simplifying your development workflow.
  • Robust Endpoints: With 16 endpoints covering everything from spot prices to historical series and fluctuation analysis, Energy API provides the tools you need to build sophisticated applications. Each endpoint returns data in a consistent JSON schema, making it easy to integrate into your existing systems.
  • Real-Time Data: Energy API provides intraday electricity curves and other real-time data, ensuring that your applications are always up-to-date with the latest market information. This is crucial for applications that require timely decision-making, such as trading platforms and cost estimators.

Quick Start

Getting started with Energy API is straightforward. The base URL for the API is:

https://energy-api.com/api/v1

To make your first request, you will need to include your API key as a query parameter. Here’s an example of how to retrieve the latest prices for Brent Crude and TTF Gas:

curl -G https://energy-api.com/api/v1/latest \
--data-urlencode "symbols=BRENT_CRUDE,TTF_GAS" \
--data-urlencode "api_key=YOUR_API_KEY"

The expected JSON response will look like this:

{
"success": true,
"date": "2026-06-11",
"base": "MIXED",
"rates": {
"BRENT_CRUDE": 74.82,
"TTF_GAS": 38.15
},
"dates": {
"BRENT_CRUDE": "2026-06-11",
"TTF_GAS": "2026-06-11"
},
"currencies": {
"BRENT_CRUDE": "USD",
"TTF_GAS": "EUR"
}
}

In this response, the key fields include:

  • success: Indicates whether the request was successful.
  • date: The date of the data retrieved.
  • base: The base currency for the rates.
  • rates: An object containing the latest prices for the requested symbols.
  • currencies: The currency in which each symbol's price is quoted.

Core Endpoints

Energy API provides a variety of endpoints that cater to different data needs. Here are four core endpoints relevant to visualizing energy data:

1. GET /latest

This endpoint retrieves the most recent price for one or more symbols.

Key Parameters:

  • symbols (required): A comma-separated list of symbols to retrieve prices for.
  • base (optional): A currency filter for the returned prices.

cURL Example:

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 Explanation:

  • rates: Contains the latest prices for the requested symbols.
  • currencies: Indicates the currency for each symbol's price.

2. GET /historical

This endpoint provides prices for all symbols on a specific past date. If the date falls on a non-publishing day, it returns the most recent value before it.

Key Parameters:

  • date (required): The date for which to retrieve historical prices (format: YYYY-MM-DD).
  • symbols (required): A comma-separated list of symbols to retrieve prices for.
  • base (optional): A currency filter for the returned prices.

cURL Example:

curl -G https://energy-api.com/api/v1/historical \
--data-urlencode "date=2025-09-15" \
--data-urlencode "symbols=BRENT_CRUDE,TTF_GAS" \
--data-urlencode "api_key=YOUR_API_KEY"

Sample JSON Response:

{
"success": true,
"date": "2025-09-15",
"base": "MIXED",
"rates": {
"BRENT_CRUDE": 71.45,
"TTF_GAS": 36.20
},
"currencies": {
"BRENT_CRUDE": "USD",
"TTF_GAS": "EUR"
}
}

Field Explanation:

  • date: The date for which the historical prices are provided.
  • rates: Contains the historical prices for the requested symbols.

3. GET /timeseries

This endpoint retrieves historical series between two dates, making it ideal for charting and trend analysis.

Key Parameters:

  • start (required): The start date for the time series (format: YYYY-MM-DD).
  • end (required): The end date for the time series (format: YYYY-MM-DD).
  • symbols (required): A comma-separated list of symbols to retrieve prices for.
  • base (optional): A currency filter for the returned prices.

cURL Example:

curl -G https://energy-api.com/api/v1/timeseries \
--data-urlencode "start=2025-01-01" \
--data-urlencode "end=2025-03-31" \
--data-urlencode "symbols=BRENT_CRUDE,TTF_GAS" \
--data-urlencode "api_key=YOUR_API_KEY"

Sample JSON Response:

{
"success": true,
"base": "MIXED",
"start_date": "2025-01-01",
"end_date": "2025-03-31",
"rates": {
"BRENT_CRUDE": {
"2025-01-02": 76.30,
"2025-01-03": 75.90
},
"TTF_GAS": {
"2025-01-02": 46.80,
"2025-01-03": 47.10
}
},
"frequencies": {
"BRENT_CRUDE": "daily",
"TTF_GAS": "daily"
},
"currencies": {
"BRENT_CRUDE": "USD",
"TTF_GAS": "EUR"
}
}

Field Explanation:

  • start_date: The start date of the time series.
  • end_date: The end date of the time series.
  • rates: Contains the historical prices for the requested symbols, keyed by date.

4. GET /fluctuation

This endpoint provides start and end values, absolute change, and percentage change over a specified period.

Key Parameters:

  • start (required): The start date for the fluctuation analysis (format: YYYY-MM-DD).
  • end (required): The end date for the fluctuation analysis (format: YYYY-MM-DD).
  • symbols (required): A comma-separated list of symbols to analyze.
  • base (optional): A currency filter for the returned prices.

Sample JSON Response:

{
"success": true,
"fluctuations": {
"BRENT_CRUDE": {
"start_value": 70.00,
"end_value": 74.82,
"change": 4.82,
"change_pct": 6.89
},
"TTF_GAS": {
"start_value": 36.00,
"end_value": 38.15,
"change": 2.15,
"change_pct": 5.97
}
}
}

Field Explanation:

  • fluctuations: Contains the fluctuation data for each requested symbol, including start and end values, absolute change, and percentage change.

Real-World Use Cases

Energy API can be utilized in various applications to provide valuable insights and functionality. Here are three concrete examples:

  • Price Alert System: Developers can build a price alert system that notifies users when energy prices exceed a certain threshold. By using the /latest endpoint, the application can continuously monitor prices and send alerts via email or SMS when conditions are met.
  • ESG Dashboard: An ESG (Environmental, Social, and Governance) dashboard can be created to visualize carbon intensity and emissions data. By leveraging the /carbon-intensity and /emissions/latest endpoints, developers can provide real-time insights into a company's carbon footprint and compliance with sustainability goals.
  • Cost Calculator: A cost calculator can help businesses estimate their monthly energy expenses based on current market prices. By utilizing the /cost-estimate endpoint, developers can create a tool that calculates costs based on user-defined parameters such as monthly kWh usage and selected energy sources.

FAQ

How often does the TTF gas price update?

The TTF gas price updates daily, reflecting the most recent market data available from the EEX. This ensures that users have access to the latest pricing information for their trading and analysis needs.

Can I get historical energy prices going back 5 years?

Yes, Energy API allows you to retrieve historical prices for various symbols. You can use the /historical and /timeseries endpoints to access historical data, with the ability to specify any date within the available range.

Does the API support multiple currencies?

Yes, Energy API supports multiple currencies. You can specify a base currency in your requests, and the API will return prices in the requested currency, making it easy to integrate into applications that operate in different financial contexts.

Conclusion

In conclusion, Energy API provides a powerful and flexible solution for developers looking to visualize and analyze energy market data. By offering a unified interface, comprehensive coverage, and robust endpoints, Energy API simplifies the process of accessing critical data without the complexities of traditional methods.

Whether you're building a price alert system, an ESG dashboard, or a cost calculator, Energy API equips you with the tools you need to succeed. Don't let the challenges of data aggregation hold you back—try Energy API for free today and unlock the potential of energy data for your applications.

Ready to get started?

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

Get API Key

Related posts