Skip to content

# Grid and Energy Data API

GET/v1/griddata/power/prices/{market}/{region}/history

Settled prices per interval for the last 7 days, newest last, optionally averaged to 30m or 60m buckets. Refreshes every 5 minutes.

Price

$0.02/ call

Edge cache

1800s

Uptime 24h

96.36%

p95

268ms

MCP tool

griddata_power-prices-market-region-history

The Grid and energy data API provides wholesale electricity prices per market region, including AEMO NEM, Elexon GB, ENTSO-E EU zones, and EIA US balancing authorities. It also offers grid demand and generation by fuel, NESO carbon intensity, and cheapest-window signals for charging and demand response. The API has a unified schema across four market structures, using UTC timestamps, integer micro units, and region codes in one list. The price history endpoint returns settled prices per interval for the last 7 days, refreshed every 5 minutes.

Parameters

NameInTypeDescription
market* path string
region* path string
from query string ISO UTC start, default 7 days ago
to query string ISO UTC end, default now
interval query string = native native, 30m or 60m

Code

curl
# 1. No key, no payment: the gateway answers 402 with the price
curl -i "https://api.realtimeapi.ai/v1/griddata/power/prices/nem/NSW1/history"

# 2. Pay: retry with a signed x402 payment (any x402 client builds this header)
curl "https://api.realtimeapi.ai/v1/griddata/power/prices/nem/NSW1/history" -H "PAYMENT-SIGNATURE: $X402_PAYMENT"
TypeScript · @x402/fetch
// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = x402Client.fromConfig({ schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(PRIVATE_KEY)) }] });
const pay = wrapFetchWithPayment(fetch, client);
const data = await (await pay("https://api.realtimeapi.ai/v1/griddata/power/prices/nem/NSW1/history")).json();
console.log(data);
Python · x402
# pip install "x402[requests,evm]==2.27.0" eth-account
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact import register_exact_evm_client

client = x402ClientSync()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
session = x402_requests(client)
print(session.get("https://api.realtimeapi.ai/v1/griddata/power/prices/nem/NSW1/history").json())
With an API key
curl "https://api.realtimeapi.ai/v1/griddata/power/prices/nem/NSW1/history" -H "X-API-Key: $RTAPI_KEY"

Frequently asked questions

What markets are covered?

AEMO NEM, Elexon GB, ENTSO-E EU zones, EIA US balancing authorities

What is the price history interval?

7 days, with optional 30m or 60m buckets

How often is the data refreshed?

Every 5 minutes

What is the cost per request?

$0.020

Get a free key

1,000 calls a month across every feed. Who is setting it up?

No key needed at all: agents can pay per call in USDC with x402.