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

NameRequiredDefaultWhat it does
X-API-Key (header)Yes (Community+)Unlocks Decision
timezone (query)NoEurope/ViennaTimestamps in response

Important response fields

FieldWhat it means
decision_statusok = use data; placeholder = too few prices; not_available = tier too low
decision_engineLogic version (currently quartile_v1)
forecast_statusHealth of the underlying price data
decision[].signalcharge, discharge, or hold
decision[].strength0.0–1.0 — how far into that band
decision[].flex_action_consumeGood/bad/neutral for consuming (EV, heat pump)
decision[].flex_action_exportGood/bad/neutral for exporting to grid
decision[].rank_in_windowPrice rank (1 = cheapest)
decision[].dump_risk_pct / dump_scenario_ct_kwhFrom Forecast hour: pct 0…100; scenario = dump when pct > 0, else point price (always usable). Additive only — signal/strength always use the model price
messageExplanation when status is not ok

Common mistakes

  • Calling without a Community key and wondering why decision[] is empty — check decision_status.
  • Treating placeholder as an error — it means fewer than four priced hours; wait for more data.
  • Ignoring forecast_status — if underlying prices are missing, decisions may be weak.

Next steps

Start with SpotpriceAPI

Register for Community or code samples with your personal key.

Live API status