Skip to main content

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

SurfaceDefault URL
WebSocketws://127.0.0.1:8082
HTTPhttp://127.0.0.1:8086

HTTP endpoints

GET /health

Returns:
{ "status": "ok" }

GET /v1/greeks

Returns Greeks for every tracked instrument.

GET /v1/greeks/{id}

Returns Greeks for a single instrument.

Important fields

FieldMeaning
mark_priceTheoretical option price in USD
mark_ivIV used to derive the mark
mark_sourceConfidence / derivation source for the IV
quote_age_msAge of the quote snapshot used
spread_bpsBid-ask spread in basis points
greeks.*Per-unit sensitivities

Mark source values

ValueMeaning
two_sided_midIV solved from a live two-sided book
carry_forwardLast good IV reused within a time window
surface_fallbackSkew-model fallback used because no better quote existed
The mark_source field is important for downstream trust decisions. The SDK exposes it directly.