> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joyride.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# Risk Engine

> Greeks, mark pricing, and mark-source metadata for the Joyride exchange.

## Purpose

The risk engine calculates mark and Greeks data used across Joyride market responses:

* mark price
* mark IV
* mark source
* quote age
* spread quality
* delta, gamma, vega, theta, and rho

## HTTP endpoints

Risk outputs are exposed through the public exchange API (`https://joyride.exchange/api`).

### `GET /v1/market/greeks`

Returns Greeks for every tracked instrument.

### `GET /v1/market/greeks/{id}`

Returns Greeks for a single instrument.

### `GET /health`

Service health check:

```json theme={null}
{ "status": "ok" }
```

## 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 |

The `mark_source` field is important for downstream trust decisions. The SDK exposes it directly.
