Book
Between plan and market: pre-trade checks, the release with its digest on the journal, the kill switch, positions after the auction and the Fahrplan. Paper only.
The plan says what would be good to do. The book is where a person decides it: the checks, the release, the kill switch — and after the auction, what was bought and sold. Nothing goes to a market yet; the release is the record a market connection will send.
In the desk🔗

Buch (g b):
- Pre-trade checks for the plan chosen in Plan (model and risk): largest order, largest purchase of the day, limits within the market's price limits, orders on the day's market time units, gate still open, trading not halted. Each with its number and limit.
- Release — one button, enabled only when every check passes. The release names who, when, the plan, the energy and the worst-case purchase, and a SHA-256 digest of the exact order set. Nachrechnen recomputes it from the journal record alone (Begründung).
- The kill switch — Handel anhalten, always in reach, with a reason. A red banner appears on every view; released orders whose gate is still open are withdrawn; no release is possible until someone resumes, again with a reason. Withdrawn orders stay withdrawn.
- After the auction — per pool MWh bought and sold, the paper result and how many orders filled, the Fahrplan as CSV and the nomination as JSON, and per pool where its Fahrplan goes. Without a release: Nicht freigegeben — es wurde nichts gehandelt.
Every release, withdrawal, halt and resume is a line on the journal — chained, verified at start, and listed under Handel in the Übergabe.
Limits🔗
| Setting | Default | Meaning |
|---|---|---|
book.max_order_mw | 0 | Largest order in MW; 0 means the pool's rated power. Also a hard power limit of the plan, so the plan never proposes what the book would refuse. |
book.max_day_buy_eur | 0 | Largest worst-case purchase of a day: Σ buy MW × limit price × hours, €. 0 means none. |
Out-of-range values stop the daemon at start. Checks run on the server in the same critical section that records the release — the desk's preview is a courtesy, not the control.
API🔗
| Method | Path | Answer |
|---|---|---|
GET | /api/v1/book/day-ahead?day=&model=&risk= | Halt state, checks for that plan, the release, positions after publication |
POST | /api/v1/book/day-ahead/release | {day, model, risk} → released, or 409 conflict naming the halt, the gate or the failing check |
GET | /api/v1/book/halt | {halted, since, by, reason} |
POST | /api/v1/book/halt · /api/v1/book/resume | {reason} (1–500 characters) |
GET | /api/v1/book/day-ahead/delivery?day= | Fahrplan against measured delivery per pool and quarter (Delivery) |
GET | /api/v1/book/day-ahead/schedule.csv?day= | The Fahrplan: pool,start_utc,end_utc,mw per quarter hour, sell positive; 425 before publication |
GET | /api/v1/book/day-ahead/nomination?day= | The nomination for mako: per pool the route and whole kW per quarter and direction |
curl -s -XPOST localhost:8080/api/v1/book/halt -H 'content-type: application/json' \
-d '{"reason":"venue outage"}'The Fahrplan🔗
The CSV has one row per pool and quarter hour of the Berlin day (92, 96 or 100) with the filled MW — sold positive, bought negative — from the released orders executed against the published prices; an hourly product fills its four quarters. Text cells are quoted and a leading =, +, -, @ is neutralised, so the file is safe to open in a spreadsheet.
The nomination is what mako turns into the ENTSO-E schedule (ESS) and sends to the TSO over AS4; flexpool sends nothing itself. It carries the release digest — a new digest is a revision — and per pool its route and two series of whole kW, never negative:
| Series | Out party | In party |
|---|---|---|
sell_kw | balance_group (the pool) | counterparty |
buy_kw | counterparty | balance_group |
The ESS sender is balance_group, the receiver tso, the area control_area, the AS4 recipient tso_mp_id. Both files come from the same quarters, so sell_kw − buy_kw is the CSV's MW in kW. A pool with "route": null cannot be nominated.
Delivery🔗
During the delivery day Buch shows the Fahrplan against the batteries' measured power, the deviation and its value — see Delivery.