{
  "openapi": "3.1.0",
  "info": {
    "title": "ALWAYSON board API",
    "version": "1.0.0",
    "description": "Live prices and derived risk figures for tokenized equities trading 24/7 on Robinhood Chain (chainId 4663). The v1 shape is frozen: fields may be added, never repurposed.",
    "license": { "name": "Free to use with attribution" }
  },
  "servers": [{ "url": "https://alwayson.market" }],
  "paths": {
    "/v1/board": {
      "get": {
        "summary": "Every tracked tokenized stock, with derived risk figures",
        "responses": {
          "200": {
            "description": "Board snapshot",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Board" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Board": {
        "type": "object",
        "required": ["schema", "generated_at", "chain", "market", "stocks"],
        "properties": {
          "schema": { "type": "string", "const": "alwayson.board.v1" },
          "generated_at": { "type": "string", "format": "date-time" },
          "chain": {
            "type": "object",
            "properties": {
              "id": { "type": "integer", "const": 4663 },
              "name": { "type": "string" },
              "block": { "type": ["integer", "null"], "description": "Chain block the snapshot was computed at. Null if the node was unreachable." }
            }
          },
          "market": {
            "type": "object",
            "properties": {
              "venue": { "type": "string", "const": "NYSE" },
              "open": { "type": "boolean", "description": "Whether the underlying exchange is in a regular session." },
              "hours_until_open": { "type": "number" }
            }
          },
          "stocks": { "type": "array", "items": { "$ref": "#/components/schemas/Stock" } },
          "disclaimer": { "type": "string" }
        }
      },
      "Stock": {
        "type": "object",
        "properties": {
          "ticker": { "type": "string" },
          "price_usd": { "type": "number", "description": "Last on-chain DEX price. NOT the NYSE tape." },
          "change_24h_pct": { "type": "number" },
          "volume_24h_usd": { "type": "number" },
          "pool_liquidity_usd": { "type": "number", "description": "Total pool reserves. NOT executable depth — a large order fills far worse than this implies." },
          "pool_id": { "type": "string", "description": "Uniswap V4 pool id (32 bytes)." },
          "pool_fee_bps": { "type": "integer", "description": "Hundredths of a bip. 3000 = 0.30%." },
          "no_arb_band": { "type": "number", "description": "Fraction the price may drift from fair value before an arbitrageur could profitably correct it. A bound derived from hedging cost and depth — explicitly NOT a fair-value estimate or a price target." },
          "no_arb_band_driver": { "type": "string", "enum": ["liquidity", "hedge-risk"] }
        }
      }
    }
  }
}
