{
 "openapi": "3.1.0",
 "info": {
  "title": "Weekend Gap Board",
  "version": "0.1.0",
  "description": "Free, keyless JSON snapshot for trading agents: weekend gap of tokenized US stocks vs a Fri 16:00 ET reference (Hyperliquid HIP-3 oracle, or token last-hour avg; per-row reference_source) (consensus across issuers + cross-issuer dispersion), Hyperliquid HIP-3 stock-perp gap vs tokens, and cross-venue funding APR for stock perps. Static file refreshed manually during an early test; thin weekend liquidity; not investment advice."
 },
 "servers": [
  {
   "url": "https://weekend-gap-board.pages.dev"
  }
 ],
 "paths": {
  "/v1/latest.json": {
   "get": {
    "operationId": "getWeekendBoard",
    "summary": "Latest weekend-gap and cross-venue funding snapshot",
    "description": "Static JSON. CORS enabled. Cached up to 300 s. No auth.",
    "responses": {
     "200": {
      "description": "Board snapshot",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Board"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Board": {
    "type": "object",
    "properties": {
     "version": {
      "type": "string"
     },
     "token_prices_asof": {
      "type": "string"
     },
     "perp_snapshot_asof": {
      "type": "string"
     },
     "reference": {
      "type": "string",
      "description": "Reference the gaps are measured against: Fri 16:00 ET reference (Hyperliquid oracle, or token last-hour avg). Not the official exchange close."
     },
     "reference_time_utc": {
      "type": "string"
     },
     "reference_method": {
      "type": "string"
     },
     "reference_sources": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      }
     },
     "units": {
      "type": "object",
      "properties": {
       "gap": {
        "type": "string"
       },
       "funding": {
        "type": "string"
       }
      }
     },
     "coverage": {
      "type": "object",
      "properties": {
       "n_token_series_live": {
        "type": "integer"
       },
       "n_hip3_stock_markets": {
        "type": "integer"
       },
       "n_stock_perp_funding_series": {
        "type": "integer"
       },
       "n_funding_venues": {
        "type": "integer"
       }
      }
     },
     "attribution": {
      "type": "string"
     },
     "disclaimer": {
      "type": "string"
     },
     "paid_api_waitlist": {
      "type": "object",
      "description": "How to get notified when the paid API (higher limits, history, alerts) launches"
     },
     "weekend_gap": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/WeekendGapRow"
      }
     },
     "funding_cross_venue": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/FundingRow"
      }
     }
    }
   },
   "WeekendGapRow": {
    "type": "object",
    "properties": {
     "ticker": {
      "type": "string"
     },
     "reference_source": {
      "type": "string",
      "enum": [
       "hyperliquid_oracle",
       "token_last_hour_avg"
      ],
      "description": "Which Fri 16:00 ET reference this row's gaps use: the Hyperliquid HIP-3 oracle (liquid HIP-3 market) or the median of token issuers' 15:00-16:00 ET VWAPs"
     },
     "ref_market": {
      "type": [
       "string",
       "null"
      ],
      "description": "Hyperliquid market whose oracle is the reference (null for token_last_hour_avg)"
     },
     "token_consensus_gap_bps": {
      "type": "number",
      "description": "Volume-weighted median gap across all live token series, bps vs the Fri 16:00 ET reference"
     },
     "n_series": {
      "type": "integer",
      "description": "Number of live token series used"
     },
     "n_issuers": {
      "type": "integer"
     },
     "issuer_dispersion_bps": {
      "type": [
       "number",
       "null"
      ],
      "description": "Max minus min gap across issuers' most-traded series, bps"
     },
     "hip3_market": {
      "type": [
       "string",
       "null"
      ],
      "description": "Hyperliquid HIP-3 stock-perp market, e.g. xyz:NVDA; null if none"
     },
     "hip3_gap_bps": {
      "type": [
       "number",
       "null"
      ],
      "description": "HIP-3 perp mark gap vs the Fri 16:00 ET reference, bps"
     },
     "hip3_minus_token_bps": {
      "type": [
       "number",
       "null"
      ],
      "description": "hip3_gap_bps minus token_consensus_gap_bps"
     },
     "issuers": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/IssuerGap"
      }
     }
    }
   },
   "FundingRow": {
    "type": "object",
    "properties": {
     "ticker": {
      "type": "string"
     },
     "n_venues_oi50k": {
      "type": "integer",
      "description": "Venues with open interest >= $50k and non-zero funding"
     },
     "max_apr_pct": {
      "type": "number"
     },
     "max_venue": {
      "type": "string"
     },
     "min_apr_pct": {
      "type": "number"
     },
     "min_venue": {
      "type": "string"
     },
     "spread_apr_pct": {
      "type": "number",
      "description": "max_apr_pct - min_apr_pct, APR points"
     },
     "total_oi_usd": {
      "type": "integer"
     },
     "venues": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/VenueFunding"
      }
     }
    }
   },
   "IssuerGap": {
    "type": "object",
    "required": [
     "issuer",
     "venue",
     "gap_bps"
    ],
    "properties": {
     "issuer": {
      "type": "string",
      "description": "Token issuer, e.g. ondo, xstocks, bstocks, remora, robinhood, coinbase"
     },
     "venue": {
      "type": "string",
      "description": "Venue/pool of that issuer's most-traded series"
     },
     "gap_bps": {
      "type": "number",
      "description": "Gap vs the ticker's Fri 16:00 ET reference, bps"
     }
    }
   },
   "VenueFunding": {
    "type": "object",
    "properties": {
     "venue": {
      "type": "string"
     },
     "apr_pct": {
      "type": "number"
     },
     "oi_usd": {
      "type": "integer"
     }
    }
   }
  }
 }
}