Control link lost — trading auto-halted (fail-safe). Awaiting EuroRingControl; the market will resume automatically when the link recovers.

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.

Public market data

No auth — the Rulebook's transparency duty.

  • GET /api/v1/market/snapshot
  • GET /api/v1/market/prices
  • GET /api/v1/market/trades
  • GET /api/v1/market/orderbook
  • GET /api/v1/market/capacity
  • GET /api/v1/market/history?page=&size= — settled tape (paged)
  • GET /api/v1/market/history/cursor?cursor=&limit= — keyset paging
  • GET /api/v1/transparency — fees, capacity, sanctions ladder
  • WS /ws/market — topology + per-tick frames (same-origin)
Participant trading

Scope trade.

  • POST /api/v1/trade/orders
    { side, guarantee, price, mw, hub? }
  • POST /api/v1/trade/cancel-all
  • GET /api/v1/trade/account
    credit line, exposure, available, settled
  • GET /api/v1/trade/trades
EuroRingControl

Scope control. The control suite publishes capacity and reads the flow schedule.

  • POST /api/v1/capacity — publish firm ceiling per link
  • GET /api/v1/schedule?deliveryTick= — what power to move
  • GET /api/v1/flows — live carriage read-back
  • POST /api/v1/metering — metered delivery
  • GET /api/v1/metering/trueup?dayKey= — contracted vs delivered
  • POST /api/v1/events — trip/health events
  • GET /api/v1/health
  • GET /metrics — Prometheus exposition
API conventions

Auth & scopes

  • X-EuroRing-Key or Bearer
  • 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)
  • 429 carries a Retry-After header
  • Idempotency-Key on POSTs — a retry replays the original response (Idempotency-Replayed: true)
  • Snapshot supports If-None-Match304

Errors (RFC-7807)

  • ProblemDetails + code + correlationId
  • Order codes: invalid_quantity, trading_halted, price_band, order_too_large, too_many_open_orders, credit_exceeded
The control coupling

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}]}'