📊 Intelligence & Forecasting — app5.2
Developer CourseModule 5: Intelligence & Forecastingapp5.2
Reading10 min

grid.forecast() — Price, Carbon, Load, and Solar

📊 Module 5: Intelligence & Forecasting

grid.forecast() — Price, Carbon, Load, and Solar

The forecast primitive predicts four things for any grid region:

1. Price Forecast

# Get grid prices for a region
curl -H "Authorization: $EAT_KEY" \
  "https://app.energyatit.com/api/v1/grid/prices?region=UAE"
# Get grid prices for a region
curl.exe -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/grid/prices?region=UAE"

2. Carbon Intensity Forecast

# Get carbon attestation for a site
curl -H "Authorization: $EAT_KEY" \
  https://app.energyatit.com/api/v1/carbon/attestation/1
# Get carbon attestation for a site
curl.exe -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/carbon/attestation/1"

3. Grid Capacity

# Get current grid capacity for a region
curl -H "Authorization: $EAT_KEY" \
  "https://app.energyatit.com/api/v1/intel/grid/capacity?region=PJM"
# Get current grid capacity for a region
curl.exe -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/intel/grid/capacity?region=PJM"

4. Grid Trends

# Get capacity trends over time
curl -H "Authorization: $EAT_KEY" \
  "https://app.energyatit.com/api/v1/intel/grid/trends?region=ERCOT"
# Get capacity trends over time
curl.exe -H "Authorization: $env:EAT_KEY" "https://app.energyatit.com/api/v1/intel/grid/trends?region=ERCOT"

Building a Price-Aware App

client = EnergyAtItClient(api_key=os.environ["EAT_KEY"])

# Get prices for 6 US ISOs
for region in ["PJM", "ERCOT", "CAISO", "MISO", "SPP", "NYISO"]:
    prices = client.grid.get_prices(region=region)
    print(f"{region}: ${prices['current_price_mwh']}/MWh")

When prices are low → charge batteries. When prices are high → discharge. That is the entire business model of energy arbitrage.

Log in to track your progress and earn certifications.