Purpose
The risk engine reads order-book state from the gateway database and spot prices from the oracle, then calculates:- mark price
- mark IV
- mark source
- quote age
- spread quality
- delta, gamma, vega, theta, and rho
Default endpoints
| Surface | Default URL |
|---|---|
| WebSocket | ws://127.0.0.1:8082 |
| HTTP | http://127.0.0.1:8086 |
HTTP endpoints
GET /health
Returns:
GET /v1/greeks
Returns Greeks for every tracked instrument.
GET /v1/greeks/{id}
Returns Greeks for a single instrument.
Important fields
| Field | Meaning |
|---|---|
mark_price | Theoretical option price in USD |
mark_iv | IV used to derive the mark |
mark_source | Confidence / derivation source for the IV |
quote_age_ms | Age of the quote snapshot used |
spread_bps | Bid-ask spread in basis points |
greeks.* | Per-unit sensitivities |
Mark source values
| Value | Meaning |
|---|---|
two_sided_mid | IV solved from a live two-sided book |
carry_forward | Last good IV reused within a time window |
surface_fallback | Skew-model fallback used because no better quote existed |
mark_source field is important for downstream trust decisions. The SDK exposes it directly.