Developer & integration API
Everything is REST + JSON. Machine access uses an API key sent as X-EuroRing-Key: <key> or Authorization: Bearer <key>. Create trading keys under API; an operator mints EuroRingControl keys in the Admin console. Machine-readable spec: /openapi/v1.json. Every response carries an X-Correlation-ID; POSTs accept an Idempotency-Key.
No auth — the Rulebook's transparency duty.
GET /api/v1/market/snapshotGET /api/v1/market/pricesGET /api/v1/market/tradesGET /api/v1/market/orderbookGET /api/v1/market/capacityGET /api/v1/market/history?page=&size=— settled tape (paged)GET /api/v1/market/history/cursor?cursor=&limit=— keyset pagingGET /api/v1/transparency— fees, capacity, sanctions ladderWS /ws/market— topology + per-tick frames (same-origin)
Scope trade.
POST /api/v1/trade/orders
{ side, guarantee, price, mw, hub? }POST /api/v1/trade/cancel-allGET /api/v1/trade/account
credit line, exposure, available, settledGET /api/v1/trade/trades
Scope control. The control suite publishes capacity and reads the flow schedule.
POST /api/v1/capacity— publish firm ceiling per linkGET /api/v1/schedule?deliveryTick=— what power to moveGET /api/v1/flows— live carriage read-backPOST /api/v1/metering— metered deliveryGET /api/v1/metering/trueup?dayKey=— contracted vs deliveredPOST /api/v1/events— trip/health eventsGET /api/v1/healthGET /metrics— Prometheus exposition
Auth & scopes
X-EuroRing-KeyorBearer- Scopes:
market:read,trade,control - Keys expire (90 days) and can be rotated
- Wrong scope →
403; no key →401
Safety & limits
- Rate limit per key: 300 / 10 s (per-IP 120 / 10 s)
429carries aRetry-AfterheaderIdempotency-Keyon POSTs — a retry replays the original response (Idempotency-Replayed: true)- Snapshot supports
If-None-Match→304
Errors (RFC-7807)
ProblemDetails+code+correlationId- Order codes:
invalid_quantity,trading_halted,price_band,order_too_large,too_many_open_orders,credit_exceeded
EuroRing never dispatches — the market's matched trades are the flow schedule. Each delivery period: EuroRingControl POST /api/v1/capacity publishes the Available-Capacity ceiling (which the market can only ever tighten — it can never oversell capacity the physics does not have); the market matches within it; EuroRingControl GET /api/v1/schedule reads the cleared flows and physically carries them, reporting /metering and /events back.
curl -X POST https://localhost:7211/api/v1/capacity \
-H "X-EuroRing-Key: erk_..." -H "Content-Type: application/json" \
-d '{"deliveryTick":143,"links":[{"index":0,"firmTradableMw":2500}]}'