Client Initialization
The Python SDK provides both synchronous and asynchronous clients.Synchronous Client
Asynchronous Client
Network Data
Fetch network-level time series data for power, energy, emissions, and market value metrics.get_network_data
Market Data
Fetch market-related metrics including price, demand, and curtailment.get_market
Available Market Metrics
Price and Demand:MarketMetric.PRICE- Electricity spot price ($/MWh)MarketMetric.DEMAND- Operational demand (MW)MarketMetric.DEMAND_ENERGY- Operational demand energy (MWh)MarketMetric.DEMAND_GROSS- Gross demand including rooftop solar (MW)MarketMetric.DEMAND_GROSS_ENERGY- Gross demand energy including rooftop solar (MWh)
MarketMetric.GENERATION_RENEWABLE- Renewable generation including battery discharge and pumps, excluding TUMUT3 (MW)MarketMetric.GENERATION_RENEWABLE_ENERGY- Renewable energy (MWh)MarketMetric.GENERATION_RENEWABLE_WITH_STORAGE- Renewable generation including TUMUT3 hybrid hydro+storage (MW)MarketMetric.GENERATION_RENEWABLE_WITH_STORAGE_ENERGY- Renewable energy including TUMUT3 (MWh)MarketMetric.RENEWABLE_PROPORTION- Renewable share of gross demand (%)MarketMetric.RENEWABLE_WITH_STORAGE_PROPORTION- Renewable+storage share of gross demand (%)
MarketMetric.CURTAILMENT- Total curtailment across all renewablesMarketMetric.CURTAILMENT_SOLAR_UTILITY- Utility solar generation curtailedMarketMetric.CURTAILMENT_WIND- Wind generation curtailed
MarketMetric.CURTAILMENT_ENERGY- Total curtailed energyMarketMetric.CURTAILMENT_SOLAR_UTILITY_ENERGY- Utility solar energy curtailedMarketMetric.CURTAILMENT_WIND_ENERGY- Wind energy curtailed
MarketMetric.FLOW_IMPORTS/MarketMetric.FLOW_IMPORTS_ENERGY- Region imports (MW / MWh)MarketMetric.FLOW_EXPORTS/MarketMetric.FLOW_EXPORTS_ENERGY- Region exports (MW / MWh)
Examples
Fetch Real-time Curtailment (5-minute intervals):Facility Data
get_facility_data
Fetch facility-specific time series data.Facility Information
get_facilities
Get information about generation facilities and their units.Data Analysis
Converting to DataFrames
The SDK provides built-in support for converting responses to Pandas and Polars DataFrames.Pandas Integration
Polars Integration
Error Handling
The SDK provides comprehensive error handling with detailed error messages.Best Practices
-
Use environment variables for API credentials:
-
Use context managers to ensure proper resource cleanup:
-
Omit date_end to get the latest available data:
-
Choose appropriate intervals:
- Use
"5m"for real-time power monitoring - Use
"1h"for hourly aggregations - Use
"1d"for daily energy totals - Use energy metrics (MWh) for longer periods
- Use
-
Handle large datasets efficiently:

