California NP15 Day-Ahead Price API
You need a reliable way to pull the latest California NP15 Day-Ahead power price for finance and trading workflows, with code you can ship. By the end of this guide you’ll query the Energy API for CAISO NP15 Day-Ahead, parse the JSON fields that matter for valuation and risk, and wire it into a caching loop suitable for back-office or intraday dashboards.
What you’ll build: latest CAISO NP15 Day-Ahead in USD/MWh
This walkthrough targets a single symbol: California NP15 Day-Ahead (code: CAISO_NP15_DA). You’ll call the latest endpoint, read the day’s print in USD/MWh, and handle the base currency and per-symbol date semantics correctly. Everything here is platform-agnostic and focused on finance use cases (marking positions, pricing power strips, and sanity-checking cleared DA levels).
Endpoint and authentication
The Energy API provides a latest-price endpoint for power and energy instruments:
- Method: GET
- URL: https://energy-api.com/api/v1/latest
- Parameters:
- symbols: CAISO_NP15_DA
- api_key: YOUR_API_KEY
- Auth is via api_key query parameter. Use the placeholder YOUR_API_KEY only in examples.
Do not add base=USD when you also need TTF_GAS or EUA_CO2 in the same call, because those can return base=MIXED. For a single CAISO_NP15_DA quote, you can simply consume the currency from currencies.CAISO_NP15_DA (USD here).
Official curl quickstart
Copy-paste and run this curl to fetch the latest CAISO NP15 Day-Ahead price:
curl -G "https://energy-api.com/api/v1/latest" --data-urlencode "symbols=CAISO_NP15_DA" --data-urlencode "api_key=YOUR_API_KEY"
Starter is $19.99/mo with a 7-day trial covering 50 calls. There is no MCP host involved. If you need keys or want to inspect more fields, create an account via Register and review the Documentation.
Catalog facts you must wire correctly
- Symbol name: California NP15 Day-Ahead
- Symbol code: CAISO_NP15_DA
- Unit: USD/MWh
- Auth: api_key query parameter (YOUR_API_KEY placeholder only)
- Starter $19.99/mo; trial 7 days / 50 calls
- Read these fields: rates.CAISO_NP15_DA, dates.CAISO_NP15_DA, currencies.CAISO_NP15_DA. base may be MIXED when you include TTF_GAS or EUA_CO2.
Response format: official live sample (structure reference)
This block shows the field layout you will parse. It is a live-format sample and may reference a different EU market; use it to understand field names and nesting:
{
"success": true,
"date": "2026-10-04",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 171.8477
},
"dates": {
"OMIE_ES_DA": "2026-10-04"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}
Key points:
- success: boolean for status.
- date: API batch date the payload was produced.
- base: base currency of the response; when symbols span multiple currencies, base can be MIXED.
- rates: map from symbol to numeric price.
- dates: map from symbol to the price’s date (ISO-8601, usually local market day).
- currencies: map from symbol to its currency (e.g., USD).
Real CAISO NP15 Day-Ahead response (use these exact values for your parser test)
Use the following as a canonical test fixture for CAISO_NP15_DA. These are the exact values you should use when validating your field extraction code:
{"success":true,"date":"2026-10-03","base":"USD","rates":{"CAISO_NP15_DA":56.5089},"dates":{"CAISO_NP15_DA":"2026-10-03"},"currencies":{"CAISO_NP15_DA":"USD"},"base_filter_note":null}
What to read for finance workflows:
- rates.CAISO_NP15_DA → 56.5089 (USD/MWh)
- dates.CAISO_NP15_DA → 2026-10-03 (trading day for the DA price)
- currencies.CAISO_NP15_DA → USD (unit consistency for valuation)
Python example: fetch and normalize CAISO NP15 Day-Ahead
This script calls the same endpoint, extracts the NP15 DA price, validates currency and date, and prints a structured record that you can feed to pricing or PnL code.
import os
import sys
import json
import time
import urllib.parse
import urllib.request
API_URL = "https://energy-api.com/api/v1/latest"
API_KEY = os.environ.get("ENERGY_API_KEY", "YOUR_API_KEY")
SYMBOL = "CAISO_NP15_DA"
def fetch_latest(symbol):
qs = urllib.parse.urlencode({
"symbols": symbol,
"api_key": API_KEY,
})
url = f"{API_URL}?{qs}"
with urllib.request.urlopen(url, timeout=15) as resp:
body = resp.read().decode("utf-8")
return json.loads(body)
def parse_np15(payload):
# Validate basic structure
if not payload.get("success", False):
raise RuntimeError("API returned success=false")
base = payload.get("base")
rates = payload.get("rates", {})
dates = payload.get("dates", {})
currencies = payload.get("currencies", {})
if SYMBOL not in rates or SYMBOL not in dates or SYMBOL not in currencies:
raise KeyError("Missing expected symbol fields in response")
price = float(rates[SYMBOL])
price_date = dates[SYMBOL]
ccy = currencies[SYMBOL]
# For CAISO NP15 DA we expect USD/MWh; do not force base=USD in the request
# when mixing symbols like TTF_GAS or EUA_CO2 in the same call.
if ccy != "USD":
raise ValueError(f"Unexpected currency for {SYMBOL}: {ccy}")
return {
"symbol": SYMBOL,
"price": price,
"unit": "USD/MWh",
"price_date": price_date,
"api_batch_date": payload.get("date"),
"base": base,
"base_filter_note": payload.get("base_filter_note"),
}
def main():
payload = fetch_latest(SYMBOL)
record = parse_np15(payload)
print(json.dumps(record, indent=2, sort_keys=True))
if __name__ == "__main__":
try:
main()
except Exception as e:
print(f"error: {e}", file=sys.stderr)
sys.exit(1)
Notes:
- Do not pass base=USD if you later extend symbols to include TTF_GAS or EUA_CO2. Read currencies.[symbol] for the authoritative unit per symbol.
- dates.CAISO_NP15_DA is the date of the price itself. The top-level date is the API batch date.
- Cache the resulting tuple (price, price_date, currency) and re-use it until the next daily update to avoid burning trial calls.
Field-by-field mapping to finance use cases
- rates.CAISO_NP15_DA → Plug directly into forward stack alignment if you map DA index to balance-of-day settlement references. For spot PnL marking, this is your daily mark in USD/MWh.
- dates.CAISO_NP15_DA → Use as the valuation date for the mark. Align it with your ledger posting date to avoid off-by-one on weekends/holidays.
- currencies.CAISO_NP15_DA → Ensures unit consistency when aggregating across hubs. If you consolidate with EUR-based data elsewhere, use your in-house FX stack upstream of your report, not via base= filters here.
- base → If your call includes symbols with mixed currencies, base may be MIXED. For a single NP15 symbol, base "USD" is fine; always prefer currencies.[symbol] when writing unit tests.
- base_filter_note → Diagnostic field you can log for troubleshooting filters. It may be null for standard calls.
Caching, scheduling, and non-trading days
Day-ahead power indices are typically published once daily. Treat this endpoint as a daily refresh, not a tick feed. A robust integration should:
- Run a fetch job after the expected publication window and backoff-retry for an hour if success=false.
- Cache the last good response keyed by dates.CAISO_NP15_DA to avoid re-marking with stale or intraday updates.
- On weekends or holidays, expect the most recent date to persist. Do not assume a new value every calendar day.
- Log both the top-level date and dates.CAISO_NP15_DA so you can trace batch timing vs. price date during audits.
Error handling and validation checklist
- Transport: Guard for non-200 responses and timeouts. Retry with exponential backoff.
- Schema: Assert success is true; then assert presence of rates, dates, currencies keys for CAISO_NP15_DA.
- Units: Assert currencies.CAISO_NP15_DA == "USD" and store unit as USD/MWh in downstream records.
- Outliers: If today’s mark deviates beyond a configured threshold from your prior cached mark, flag for review before auto-posting to PnL.
- Idempotence: Only post to accounting systems once per price_date; de-duplicate by (symbol, price_date).
Additional complete JSON examples
Use these blocks as additional fixtures for testing your parser and caching logic. They mirror the official structure and the real CAISO payload.
Real CAISO NP15 Day-Ahead (duplicate for cache snapshot testing)
{"success":true,"date":"2026-10-03","base":"USD","rates":{"CAISO_NP15_DA":56.5089},"dates":{"CAISO_NP15_DA":"2026-10-03"},"currencies":{"CAISO_NP15_DA":"USD"},"base_filter_note":null}
Format-only reference (official live sample)
{
"success": true,
"date": "2026-10-04",
"base": "EUR",
"rates": {
"OMIE_ES_DA": 171.8477
},
"dates": {
"OMIE_ES_DA": "2026-10-04"
},
"currencies": {
"OMIE_ES_DA": "EUR"
},
"base_filter_note": null
}
How to combine symbols without breaking currency logic
If you later add more symbols to the same call, pass them comma-separated in symbols. When mixing USD and non-USD series (e.g., TTF_GAS or EUA_CO2), do not force base=USD. Instead read currencies.[symbol] and apply your own FX normalization in your finance stack. For CAISO_NP15_DA alone, simply consume currencies.CAISO_NP15_DA and the numeric rate as-is.
Operational notes for finance teams
- Cutover time: Align your batch to when CAISO DA prices are final for the next day. Use dates.CAISO_NP15_DA to drive posting dates.
- PnL and VaR: Store a daily time series of rates.CAISO_NP15_DA keyed by price_date. If you need prior values, call your own datastore; this guide covers only the latest endpoint.
- Reconciliation: Persist the entire JSON payload for each fetch to support audit trails. During disputes, reproducing the exact base/currency fields helps.
- SLAs: On Starter/trial, stay within 50 calls during the 7-day trial. Use caching to avoid avoidable requests.
Frequently asked questions
Q1: What unit is the NP15 Day-Ahead price?
USD per MWh. Confirm via currencies.CAISO_NP15_DA == "USD" and treat the numeric rate as USD/MWh.
Q2: How do I handle weekends or holidays?
Expect the latest date to hold steady. Use dates.CAISO_NP15_DA to drive your posting date and only update your mark when that date advances.
Q3: Should I pass base=USD?
Not when your call includes TTF_GAS or EUA_CO2 (base may be MIXED). For a single NP15 quote, rely on currencies.CAISO_NP15_DA for unit and store USD/MWh explicitly.
Q4: Can I get multiple symbols in one request?
Yes, provide a comma-separated list in symbols. This guide focuses on CAISO_NP15_DA; always parse rates, dates, and currencies per symbol.
Q5: Is there pagination?
The latest endpoint returns a single payload for the requested symbols; pagination is not applicable. For broader patterns, consult the Documentation.
Register and ship it
Create an API key and run the curl now. Starter is $19.99/month with a 7-day trial and 50 calls—enough to build and test your finance integration. Get access via Register and keep the Documentation open while wiring rates.CAISO_NP15_DA, dates.CAISO_NP15_DA, and currencies.CAISO_NP15_DA into your pricing and PnL pipeline.
Ready to get started?
Get your API key and start querying energy commodity prices in minutes.
Get API KeyRelated posts
Discover how to leverage Energy API for backtesting renewable hedging strategies. Simulate volatility and opti...
Read more →
Discover how to design a reproducible backtesting framework for power trading strategies using Energy API time...
Read more →
Discover how Energy API can automate regulatory compliance reporting for utilities, streamlining FERC and EU R...
Read more →
Discover how Energy API streams can automate compliance reporting for utilities, transforming raw data into cr...
Read more →
Discover how to enhance power price forecasts with the Energy API by integrating SHAP for transparent trading...
Read more →