Decision API
GET /v1/decision — per-hour charge / hold / discharge (secondary to Hours). Loxone with battery: usually Hours Demand. Community 120 requests/day.
The Decision API turns the full price forecast into a simple signal for each hour: charge (cheap), discharge (expensive), or hold (in between).
Everyday example
A heat pump checks the API every hour. When signal is charge, it runs harder. When discharge, it backs off. When hold, it keeps normal comfort. One field per hour — no spreadsheet.
When to use / when not
Use when:
- You want a traffic light per hour, not raw prices
- You use
strength(0–1) to dim a display or set priority
Do not use when:
- You need exactly N contiguous cheap hours → Decision Windows
- You have battery SOC and want the API to count hours for you → Hours Demand
- You only want to show prices → Forecast
What you need
- Community tier or higher (free account after email confirm)
- Header:
X-API-Key: sf_live_YOUR_KEY - Basic/anonymous keys get
decision_status: not_available(still HTTP 200)
Step by step
1. Register and confirm email — Community is free. 2. Call GET /v1/decision with your key header. 3. Check decision_status — use decision[] only when it is ok. 4. For each hour, read signal: charge, discharge, or hold. 5. Optional: use flex_action_consume (favor / avoid / neutral) for loads. 6. Optional: use rank_in_window — 1 = cheapest hour in the horizon.
Minimal request and response
curl https://api.spotpriceapi.com/v1/decision \
-H "X-API-Key: sf_live_YOUR_KEY"
{
"decision_status": "ok",
"decision_engine": "quartile_v1",
"access": { "tier": "community", "full_version_available": true },
"forecast_status": "ok",
"decision": [
{
"target_start": "2026-08-01T03:00:00+02:00",
"signal": "charge",
"strength": 0.87,
"flex_action_consume": "favor",
"flex_action_export": "avoid",
"rank_in_window": 2
}
]
}
In plain words: At 3 a.m., prices are in the cheap quarter — good time to charge. strength: 0.87 means “quite cheap,” not borderline.
Endpoint
GET https://api.spotpriceapi.com/v1/decision
Parameters
| Name | Required | Default | What it does |
|---|---|---|---|
X-API-Key (header) | Yes (Community+) | — | Unlocks Decision |
timezone (query) | No | Europe/Vienna | Timestamps in response |
Important response fields
| Field | What it means |
|---|---|
decision_status | ok = use data; placeholder = too few prices; not_available = tier too low |
decision_engine | Logic version (currently quartile_v1) |
forecast_status | Health of the underlying price data |
decision[].signal | charge, discharge, or hold |
decision[].strength | 0.0–1.0 — how far into that band |
decision[].flex_action_consume | Good/bad/neutral for consuming (EV, heat pump) |
decision[].flex_action_export | Good/bad/neutral for exporting to grid |
decision[].rank_in_window | Price rank (1 = cheapest) |
decision[].dump_risk_pct / dump_scenario_ct_kwh | From Forecast hour: pct 0…100; scenario = dump when pct > 0, else point price (always usable). Additive only — signal/strength always use the model price |
message | Explanation when status is not ok |
Common mistakes
- Calling without a Community key and wondering why
decision[]is empty — checkdecision_status. - Treating
placeholderas an error — it means fewer than four priced hours; wait for more data. - Ignoring
forecast_status— if underlying prices aremissing, decisions may be weak.
Next steps
- Decision Windows — pick N hours with spacing rules
- Hours Demand — SOC-based hour count
- Forecast — underlying prices
- Rate limits — daily fair use on Community
Register for Community or code samples with your personal key.