Prerequisites
You’ll need an API key from the Open Electricity Platform. See SDK configuration for how to set it up as an environment variable.Install the SDK
OPENELECTRICITY_API_KEY environment variable automatically — no need to pass credentials in code.
The client handles authentication, request retries and response parsing. See the SDK overview for more detail.
Using yesterday ensures you always get a full day of settled data. Today’s data may still be arriving.
network_code="NEM" — the National Electricity Market covering eastern Australiametrics=[DataMetric.POWER] — instantaneous generation in MW. See the power guideinterval="1h" — hourly aggregationsecondary_grouping="fueltech_group" — break results down by fuel technology group (solar, wind, coal, etc.)power)MW)
