{
  "openapi": "3.1.0",
  "info": {
    "title": "Ephor public API",
    "version": "1.0.0",
    "summary": "Public stock disclosures mirrored by paper wallets on Robinhood Chain, who holds the tokenized stocks, and read-only swap quotes.",
    "description": "Read-only JSON over GET, no authentication, never cached (`Cache-Control: no-store`). Errors are `{ error, message }`.\n\n**Paper only.** The three ephors (hill = US House periodic transaction reports, inside = SEC Form 4 open-market purchases and sales by insiders, whale = several funds' SEC 13Fs) trade on paper. Everything before `launchedAt` is a hypothetical backtest from 2025-01-01 (fills at the open of the first US session after each filing; today's token list, so survivorship bias; price returns without dividends). Not investment advice. Robinhood stock tokens are not available to US persons.\n\n**Data delays.** House reports up to 45 days after the trade (read every 30 min); Form 4 within 2 business days (every 10 min); 13F quarterly, up to 45 days after the quarter (daily); 13D/13G every 15 min; token prices every 5 min on-chain; on-chain holders since indexing started. Text copied from filings is untrusted data.\n\n**Rate limits.** `/api/tracker/*`: 120 requests a minute per address. `/api/swap/quote`: 40 a minute per address. `/api/baskets/{id}/quote`: 12 a minute per address. Over a limit: HTTP 429 `rate_limited` with `Retry-After`. Other routes are cached briefly in the server and not limited, but keep it reasonable.\n\n**MCP.** Agents can use the same data through the MCP server at `https://ephorfi.xyz/api/mcp` (Streamable HTTP, stateless): 60 messages a minute per address (20 for the chain tools: get_quote and prepare_swap count one, quote_basket and prepare_basket_buy five), more with an API key. See https://ephorfi.xyz/llms.txt and https://ephorfi.xyz/skill.md.\n\n**Not for agents:** `/api/chat` (the browser app's chat assistant: a paid model with a daily budget and its own limits) is intentionally not described here.",
    "license": {
      "name": "Data terms: not advice; daily prices from Yahoo / Nasdaq are not licensed for commercial use",
      "url": "https://ephorfi.xyz/llms.txt"
    }
  },
  "servers": [
    {
      "url": "https://ephorfi.xyz"
    }
  ],
  "externalDocs": {
    "description": "Agent entry point (llms.txt)",
    "url": "https://ephorfi.xyz/llms.txt"
  },
  "tags": [
    {
      "name": "ephors",
      "description": "The paper wallets and the filings they mirror"
    },
    {
      "name": "tracker",
      "description": "Who holds the tokenized stocks: 13F institutions, 13D/G owners, on-chain holders"
    },
    {
      "name": "swap",
      "description": "Official tokens and read-only quotes (nothing is signed or sent)"
    },
    {
      "name": "baskets",
      "description": "Baskets picked from the three ephors' signals, their backtest, and read-only basket buy quotes"
    },
    {
      "name": "ops",
      "description": "Health"
    },
    {
      "name": "mcp",
      "description": "The MCP endpoint (JSON-RPC, documented for discovery)"
    }
  ],
  "paths": {
    "/api/summary": {
      "get": {
        "summary": "The three ephors at a glance",
        "description": "Mode, live start, backtest window, sources, and per ephor value at today's marks, return, tails, filings read and the median filing lag.",
        "tags": [
          "ephors"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Summary"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getSummary"
      }
    },
    "/api/feed": {
      "get": {
        "summary": "Filings, newest first, with their tails",
        "description": "Filings by filed date, newest first; a page always ends on a whole day (if `limit` would cut a day, the rest of it is included). Each filing carries its tails: backtest or live, fill price, source and today's mark.",
        "tags": [
          "ephors"
        ],
        "parameters": [
          {
            "name": "ephor",
            "in": "query",
            "required": false,
            "description": "hill = US House members, inside = SEC Form 4 insiders, whale = the followed funds' 13Fs",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "hill",
                "inside",
                "whale"
              ],
              "default": "all"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Filings per page (more when the last day is completed)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Only filings filed before this date (YYYY-MM-DD): the next page",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeedItem"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getFeed"
      }
    },
    "/api/positions": {
      "get": {
        "summary": "Paper positions",
        "description": "What each wallet holds at today's marks, with cost basis under average cost and unrealised P&L.",
        "tags": [
          "ephors"
        ],
        "parameters": [
          {
            "name": "ephor",
            "in": "query",
            "required": false,
            "description": "hill = US House members, inside = SEC Form 4 insiders, whale = the followed funds' 13Fs",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "hill",
                "inside",
                "whale"
              ],
              "default": "all"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Position"
                  }
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getPositions"
      }
    },
    "/api/equity": {
      "get": {
        "summary": "Wallet value over time",
        "description": "Daily backtest readings, then live readings, per ephor; plus the SPY buy-and-hold benchmark.",
        "tags": [
          "ephors"
        ],
        "parameters": [
          {
            "name": "ephor",
            "in": "query",
            "required": false,
            "description": "hill = US House members, inside = SEC Form 4 insiders, whale = the followed funds' 13Fs",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "hill",
                "inside",
                "whale"
              ],
              "default": "all"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Equity"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getEquity"
      }
    },
    "/api/performance": {
      "get": {
        "summary": "Performance against SPY",
        "description": "Value, return, vs SPY in percentage points, CAGR (365+ day windows only), max drawdown, P&L, win rates, best and worst buys, per ephor and in total. Cached 30 s.",
        "tags": [
          "ephors"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Performance"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getPerformance"
      }
    },
    "/api/trades": {
      "get": {
        "summary": "The paper trade log",
        "description": "Every paper fill under average cost: realised P&L on sells, running position and average cost.",
        "tags": [
          "ephors"
        ],
        "parameters": [
          {
            "name": "ephor",
            "in": "query",
            "required": false,
            "description": "hill = US House members, inside = SEC Form 4 insiders, whale = the followed funds' 13Fs",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "hill",
                "inside",
                "whale"
              ],
              "default": "all"
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": false,
            "description": "Only buys or sells",
            "schema": {
              "type": "string",
              "enum": [
                "buy",
                "sell"
              ]
            }
          },
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "description": "Only this ticker",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9.\\-]{0,9}$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort column",
            "schema": {
              "type": "string",
              "enum": [
                "at",
                "ticker",
                "qty",
                "price",
                "value",
                "fee",
                "realized"
              ],
              "default": "at"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "required": false,
            "description": "Sort direction",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page (clamped to the last one)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100000,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Fills per page",
            "schema": {
              "type": "integer",
              "minimum": 5,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Trades"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getTrades"
      }
    },
    "/api/position": {
      "get": {
        "summary": "One wallet's history in one token",
        "description": "Daily closes x the token's multiplier from three weeks before the first fill, then today's mark; every fill; cost basis and P&L.",
        "tags": [
          "ephors"
        ],
        "parameters": [
          {
            "name": "ephor",
            "in": "query",
            "required": true,
            "description": "hill, inside or whale",
            "schema": {
              "type": "string",
              "enum": [
                "hill",
                "inside",
                "whale"
              ]
            }
          },
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "description": "Stock ticker",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9.\\-]{0,9}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionDetail"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getPosition"
      }
    },
    "/api/holdings": {
      "get": {
        "summary": "What the whale's funds reported",
        "description": "Each followed fund's latest stored 13F against the official token list, with the fund's slice of the whale wallet. Cached 60 s.",
        "tags": [
          "ephors"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Holdings"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getHoldings"
      }
    },
    "/api/tracker/ticker/{ticker}": {
      "get": {
        "summary": "Who holds a stock",
        "description": "13F institutional holders for a quarter (default the latest complete one) with changes, holder types (estimates), 13D/G filings, and the on-chain holders, whales and moves of its token. Tickers and names only; no CUSIP. Cached 30 s.",
        "tags": [
          "tracker"
        ],
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "description": "Stock ticker, e.g. NVDA",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9.\\-]{0,9}$"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "13F quarter end",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(03-31|06-30|09-30|12-31)$"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Holders order",
            "schema": {
              "type": "string",
              "enum": [
                "value",
                "shares",
                "pct",
                "change",
                "name"
              ],
              "default": "value"
            }
          },
          {
            "name": "dir",
            "in": "query",
            "required": false,
            "description": "Default desc (asc for name)",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only one estimated filer type",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "hedge_fund",
                "fund_sponsor",
                "wealth_manager",
                "pe_vc",
                "adviser",
                "bank",
                "insurer",
                "pension",
                "sovereign",
                "foreign",
                "unclassified"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Holders page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "description": "Holders per page",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickerView"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found: not an official stock token and in no stored filing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 120 tracker requests a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "tracker_unavailable: the tracker database has not been created on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "120 requests a minute per address",
        "operationId": "getTrackerTickerByTicker"
      }
    },
    "/api/tracker/institution/{cik}": {
      "get": {
        "summary": "One 13F filer",
        "description": "Type estimate and its basis, quarters, holdings in tokenized names with changes, filings, its 13D/G filings, and overlap with the ephors' paper positions. Cached 60 s.",
        "tags": [
          "tracker"
        ],
        "parameters": [
          {
            "name": "cik",
            "in": "path",
            "required": true,
            "description": "SEC CIK",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,10}$"
            }
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "description": "13F quarter end (default its latest)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-(03-31|06-30|09-30|12-31)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstitutionView"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no 13F filer with that CIK is stored",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 120 tracker requests a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "tracker_unavailable: the tracker database has not been created on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "120 requests a minute per address",
        "operationId": "getTrackerInstitutionByCik"
      }
    },
    "/api/tracker/search": {
      "get": {
        "summary": "Search tokens and 13F filers",
        "description": "Official tokens by ticker or name and 13F filers by name words or CIK. Cached 30 s.",
        "tags": [
          "tracker"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Search text",
            "schema": {
              "type": "string",
              "maxLength": 80
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackerSearch"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 120 tracker requests a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "tracker_unavailable: the tracker database has not been created on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "120 requests a minute per address",
        "operationId": "getTrackerSearch"
      }
    },
    "/api/tracker/movers": {
      "get": {
        "summary": "This quarter's movers",
        "description": "The latest complete quarter's 10 largest institutional buys and sells in tokenized names (at constant price), net flow by ticker, newest 13D/G filings, the largest on-chain moves of the last 24 hours (7 days if none). Cached 60 s.",
        "tags": [
          "tracker"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Movers"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 120 tracker requests a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "tracker_unavailable: the tracker database has not been created on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "120 requests a minute per address",
        "operationId": "getTrackerMovers"
      }
    },
    "/api/tracker/whales": {
      "get": {
        "summary": "On-chain holder whales",
        "description": "Non-protocol holders with at least max($100,000, 0.5% of on-chain supply), for one token or across all. Addresses only. Cached 60 s.",
        "tags": [
          "tracker"
        ],
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": false,
            "description": "One token (default all)",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9.\\-]{0,9}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Whales"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 120 tracker requests a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "tracker_unavailable: the tracker database has not been created on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "120 requests a minute per address",
        "operationId": "getTrackerWhales"
      }
    },
    "/api/swap/tokens": {
      "get": {
        "summary": "Official stock tokens",
        "description": "Every official Robinhood stock token with its stored reference price; a price counts only when it is for that token's address; `fresh` = no older than maxPriceAgeSeconds.",
        "tags": [
          "swap"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwapTokens"
                }
              }
            }
          },
          "400": {
            "description": "bad_request: a parameter is malformed (the message says which)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getSwapTokens"
      }
    },
    "/api/swap/quote": {
      "get": {
        "summary": "Read-only swap quote",
        "description": "Best Uniswap v3 route (direct USDG pools, or USDG-WETH-token) through pools that pass the price job's depth rule, compared with the stored reference price, with the swap guard (warn above 1%, refuse above 5% or when the reference is older than an hour). QuoterV2 via eth_call: nothing is signed or sent. Never cached.",
        "tags": [
          "swap"
        ],
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "required": true,
            "description": "Official stock token ticker",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9.]{0,9}$"
            }
          },
          {
            "name": "side",
            "in": "query",
            "required": true,
            "description": "buy: spend USDG; sell: sell the token",
            "schema": {
              "type": "string",
              "enum": [
                "buy",
                "sell"
              ]
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "description": "USDG to spend (buy) or tokens to sell (sell), plain decimal, at most 1,000,000",
            "schema": {
              "type": "string",
              "pattern": "^\\d+(\\.\\d+)?$",
              "maxLength": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwapQuote"
                }
              }
            }
          },
          "400": {
            "description": "bad_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "unknown_token: not an official Robinhood stock token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "no_price | token_paused | no_route | amount_too_large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 40 quotes a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "502": {
            "description": "rpc_error: Robinhood Chain could not be read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "no_token_list: the official token list is not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "40 requests a minute per address",
        "operationId": "getSwapQuote"
      }
    },
    "/api/baskets": {
      "get": {
        "summary": "Today's baskets",
        "description": "Five baskets of official stock tokens picked from what the three ephors watch (rules: llms-full.txt): Consensus, The Hill, The Inside, The Whale, Ephor 10. Members with weights, each ephor's signal, entry and gap, the on-chain price; the monthly backtest's stats next to SPY; the month the baskets are held for (rebalance) and what the next rebalance would change if it were today (nextRebalance); a watch list of strong names the rules keep out. Held monthly like the backtest; prices and signals refreshed every 3 hours. Cached 60 s.",
        "tags": [
          "baskets"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Baskets"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "baskets_not_ready: not built yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getBaskets"
      }
    },
    "/api/baskets/changes": {
      "get": {
        "summary": "Daily basket changes",
        "description": "What changed in the baskets from one session to the next, newest first: names in (with weight), names out, weights that moved two points or more, a basket going to cash (fewer than three names) or back. `since` is the first session in the log. The same log as Atom: /api/baskets/feed. Cached 60 s.",
        "tags": [
          "baskets"
        ],
        "parameters": [
          {
            "name": "basket",
            "in": "query",
            "required": false,
            "description": "Only this basket",
            "schema": {
              "$ref": "#/components/schemas/BasketId"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Changes listed, 1 to 60",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60,
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketChanges"
                }
              }
            }
          },
          "400": {
            "description": "bad_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such basket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getBasketsChanges"
      }
    },
    "/api/baskets/{id}": {
      "get": {
        "summary": "One basket in detail",
        "description": "The basket with its members, its daily backtest value next to SPY bought with the same cash on its first day, and every monthly rebalance (newest first). Cached 60 s.",
        "tags": [
          "baskets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Basket id",
            "schema": {
              "$ref": "#/components/schemas/BasketId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketDetail"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such basket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "database_error: the database could not be read just now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "503": {
            "description": "baskets_not_ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "operationId": "getBasketsById"
      }
    },
    "/api/baskets/{id}/quote": {
      "get": {
        "summary": "Read-only quote for buying a whole basket",
        "description": "The USDG split by the basket's weights, every name quoted like /api/swap/quote (same guard), refused names skipped and their share spread over the rest (refused when more than 40% cannot be bought). The buy dialog builds one SwapRouter02 multicall from the answer: every name with its own minimum, all or nothing. Nothing is signed or sent. Never cached.",
        "tags": [
          "baskets"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Basket id",
            "schema": {
              "$ref": "#/components/schemas/BasketId"
            }
          },
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "description": "USDG to spend on the whole basket, 5 to 250,000",
            "schema": {
              "type": "string",
              "pattern": "^\\d+(\\.\\d+)?$",
              "maxLength": 30
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "description": "Slippage in percent, 0.01 to 5",
            "schema": {
              "type": "string",
              "pattern": "^\\d+(\\.\\d{1,2})?$",
              "default": "0.5"
            }
          },
          {
            "name": "split",
            "in": "query",
            "required": false,
            "description": "Divide the amount as asked instead of by weight: TICKER:share pairs, like TSM:0.6,MSFT:0.4 (basket names only; scaled to sum to 1). The app sends a top-up toward the weights from what the wallet already holds",
            "schema": {
              "type": "string",
              "maxLength": 400
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketQuote"
                }
              }
            }
          },
          "400": {
            "description": "bad_request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "not_found: no such basket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "not_offered | too_much_skipped | unstable_quotes (too_much_skipped also lists `skipped`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: more than 12 basket quotes a minute from one address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "baskets_not_ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-rate-limit": "12 requests a minute per address",
        "operationId": "getBasketsByIdQuote"
      }
    },
    "/api/health": {
      "get": {
        "summary": "Status and job freshness",
        "description": "ok, degraded (still serving) or down (database unreadable or under 1 GB free); job names and timestamps only. Cached 10 s.",
        "tags": [
          "ops"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthReport"
                }
              }
            }
          },
          "503": {
            "description": "down",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthReport"
                }
              }
            }
          }
        },
        "operationId": "getHealth"
      }
    },
    "/api/mcp": {
      "post": {
        "summary": "MCP endpoint (JSON-RPC 2.0)",
        "description": "The Model Context Protocol server (Streamable HTTP, stateless, JSON responses). Send JSON-RPC requests (initialize, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get) with `Accept: application/json, text/event-stream` and `Content-Type: application/json`. No key needed; `Authorization: Bearer <key>` (keys from the operator) raises the limit from 60 to 600 messages a minute. Bodies up to 64 KB, batches up to 10 messages. GET and DELETE answer 405. Use an MCP client rather than this description: tools and their schemas come from tools/list.",
        "tags": [
          "mcp"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": [
                  "object",
                  "array"
                ],
                "description": "A JSON-RPC 2.0 request or notification (or a batch of up to 10)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "object",
                    "array"
                  ],
                  "description": "JSON-RPC 2.0 response(s)"
                }
              }
            }
          },
          "202": {
            "description": "Accepted (notifications only)"
          },
          "400": {
            "description": "JSON-RPC parse or request error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "The Authorization header holds a key that is not valid here",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "406": {
            "description": "Accept must list application/json and text/event-stream",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "413": {
            "description": "Body over 64 KB",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC error code -32029 with data.retryAfterSeconds"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until a request would be allowed",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "operationId": "postMcp"
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Machine-readable code, e.g. bad_request, not_found, rate_limited, database_error, tracker_unavailable"
          },
          "message": {
            "type": "string",
            "description": "One sentence for a person"
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "EphorId": {
        "type": "string",
        "enum": [
          "hill",
          "inside",
          "whale"
        ]
      },
      "MarkInfo": {
        "type": "object",
        "properties": {
          "priceUsd": {
            "type": "number"
          },
          "source": {
            "type": "string",
            "enum": [
              "onchain",
              "close",
              "stale"
            ],
            "description": "onchain: today's token price (read in the last hour); close: the underlying's latest daily close x uiMultiplier; stale: an older on-chain price"
          },
          "at": {
            "type": "string",
            "description": "When that price was true, ISO 8601"
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "priceUsd",
          "source",
          "at",
          "detail"
        ],
        "description": "Today's mark of a token, per raw token as traded on-chain"
      },
      "BacktestInfo": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "description": "Window start, ISO (midnight New York on `start`)"
          },
          "start": {
            "type": "string",
            "description": "BACKTEST_START, YYYY-MM-DD"
          },
          "until": {
            "type": "string",
            "description": "Launch: everything before it is backtest"
          },
          "fills": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "Backtest fills by price source: chainlink | stock-open"
          }
        },
        "required": [
          "at",
          "from",
          "start",
          "until",
          "fills"
        ],
        "description": "The hypothetical backtest's window and fills"
      },
      "EphorSummary": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/EphorId"
          },
          "valueUsd": {
            "type": [
              "number",
              "null"
            ],
            "description": "Cash plus positions at today's marks; null until the wallet exists"
          },
          "startUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "cashUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "returnPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "launchedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "tails": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "filings": {
            "type": "integer",
            "description": "Filings read and stored, history included"
          },
          "medianLagDays": {
            "type": [
              "number",
              "null"
            ],
            "description": "Median days between the trade and its filing"
          },
          "unpricedPositions": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "valueUsd",
          "startUsd",
          "cashUsd",
          "returnPct",
          "launchedAt",
          "tails",
          "skipped",
          "failed",
          "filings",
          "medianLagDays",
          "unpricedPositions"
        ]
      },
      "SummaryTotal": {
        "type": "object",
        "properties": {
          "valueUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "startUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "cashUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "returnPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "tails": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "filings": {
            "type": "integer"
          },
          "medianLagDays": {
            "type": [
              "number",
              "null"
            ]
          },
          "unpricedPositions": {
            "type": "integer"
          }
        },
        "required": [
          "valueUsd",
          "startUsd",
          "cashUsd",
          "returnPct",
          "tails",
          "skipped",
          "failed",
          "filings",
          "medianLagDays",
          "unpricedPositions"
        ]
      },
      "Sources": {
        "type": "object",
        "properties": {
          "hill": {
            "type": "object",
            "properties": {
              "read": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "notRead": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "read",
              "notRead"
            ]
          },
          "inside": {
            "type": "object",
            "properties": {
              "minUsd": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Smallest Form 4 trade kept, USD"
              }
            },
            "required": [
              "minUsd"
            ]
          },
          "whale": {
            "type": "object",
            "properties": {
              "funds": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "cik": {
                      "type": "string"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "cik",
                    "name"
                  ]
                }
              }
            },
            "required": [
              "funds"
            ]
          }
        },
        "required": [
          "hill",
          "inside",
          "whale"
        ]
      },
      "Summary": {
        "type": "object",
        "properties": {
          "mode": {
            "const": "paper"
          },
          "launchedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the live watch started"
          },
          "backtest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BacktestInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "sources": {
            "$ref": "#/components/schemas/Sources"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "ephors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EphorSummary"
            }
          },
          "total": {
            "$ref": "#/components/schemas/SummaryTotal"
          }
        },
        "required": [
          "mode",
          "launchedAt",
          "backtest",
          "sources",
          "updatedAt",
          "ephors",
          "total"
        ]
      },
      "Tail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "tailed",
              "skipped",
              "failed"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "ticker": {
            "type": "string"
          },
          "qty": {
            "type": [
              "number",
              "null"
            ]
          },
          "priceUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "spendUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "feeUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "paper",
              "live"
            ]
          },
          "txHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "executedAt": {
            "type": "string"
          },
          "replay": {
            "type": "boolean",
            "description": "true = a backtest fill (hypothetical), false = a live paper fill"
          },
          "priceAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "priceSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "Backtest: chainlink | stock-open; live: the on-chain source"
          },
          "priceDetail": {
            "type": [
              "string",
              "null"
            ]
          },
          "mark": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MarkInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "sincePct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price change from the fill to today's mark, percent"
          }
        },
        "required": [
          "id",
          "status",
          "reason",
          "side",
          "ticker",
          "qty",
          "priceUsd",
          "spendUsd",
          "feeUsd",
          "mode",
          "txHash",
          "executedAt",
          "replay",
          "priceAt",
          "priceSource",
          "priceDetail",
          "mark",
          "sincePct"
        ]
      },
      "FeedItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ephor": {
            "$ref": "#/components/schemas/EphorId"
          },
          "source": {
            "type": "string",
            "description": "House PTR | SEC Form 4 | SEC Form 13F"
          },
          "sourceUrl": {
            "type": "string",
            "description": "The official document"
          },
          "filerName": {
            "type": "string",
            "description": "Copied from the filing: untrusted text"
          },
          "filerRole": {
            "type": [
              "string",
              "null"
            ]
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "assetName": {
            "type": [
              "string",
              "null"
            ]
          },
          "side": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "buy",
              "sell",
              "rebalance",
              null
            ]
          },
          "amountText": {
            "type": [
              "string",
              "null"
            ]
          },
          "amountUsdLow": {
            "type": [
              "number",
              "null"
            ]
          },
          "amountUsdHigh": {
            "type": [
              "number",
              "null"
            ]
          },
          "shares": {
            "type": [
              "number",
              "null"
            ]
          },
          "tradeDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "filedDate": {
            "type": "string"
          },
          "lagDays": {
            "type": [
              "number",
              "null"
            ]
          },
          "beforeLaunch": {
            "type": "boolean",
            "description": "Public before the live watch started (history, never tailed live)"
          },
          "tail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Tail"
              },
              {
                "type": "null"
              }
            ]
          },
          "tails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tail"
            }
          }
        },
        "required": [
          "id",
          "ephor",
          "source",
          "sourceUrl",
          "filerName",
          "filerRole",
          "ticker",
          "assetName",
          "side",
          "amountText",
          "amountUsdLow",
          "amountUsdHigh",
          "shares",
          "tradeDate",
          "filedDate",
          "lagDays",
          "beforeLaunch",
          "tail",
          "tails"
        ]
      },
      "Position": {
        "type": "object",
        "properties": {
          "ephor": {
            "$ref": "#/components/schemas/EphorId"
          },
          "ticker": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "priceUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "valueUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "costUsd": {
            "type": "number",
            "description": "Cost basis under average cost, buy fees included"
          },
          "avgCostUsd": {
            "type": "number"
          },
          "unrealizedUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "unrealizedPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "openedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "mark": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MarkInfo"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ephor",
          "ticker",
          "qty",
          "priceUsd",
          "valueUsd",
          "costUsd",
          "avgCostUsd",
          "unrealizedUsd",
          "unrealizedPct",
          "openedAt",
          "mark"
        ]
      },
      "EquityPoint": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string"
          },
          "valueUsd": {
            "type": "number"
          },
          "replay": {
            "type": "boolean",
            "description": "true = a daily backtest reading"
          },
          "cashUsd": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "at",
          "valueUsd",
          "replay"
        ]
      },
      "Equity": {
        "type": "object",
        "properties": {
          "hill": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EquityPoint"
            }
          },
          "inside": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EquityPoint"
            }
          },
          "whale": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EquityPoint"
            }
          },
          "benchmark": {
            "type": "object",
            "properties": {
              "ticker": {
                "type": "string"
              },
              "startUsd": {
                "type": "number"
              },
              "points": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EquityPoint"
                }
              }
            },
            "required": [
              "ticker",
              "startUsd",
              "points"
            ],
            "description": "SPY bought at the backtest start with one ephor's start cash and held"
          }
        }
      },
      "Drawdown": {
        "type": "object",
        "properties": {
          "pct": {
            "type": "number"
          },
          "peakAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "troughAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "recoveredAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "pct",
          "peakAt",
          "troughAt",
          "recoveredAt"
        ]
      },
      "TailPerf": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "filingId": {
            "type": "string"
          },
          "ephor": {
            "$ref": "#/components/schemas/EphorId"
          },
          "ticker": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "at": {
            "type": "string"
          },
          "priceUsd": {
            "type": "number"
          },
          "valueUsd": {
            "type": "number"
          },
          "priceSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "backtest": {
            "type": "boolean"
          },
          "filer": {
            "type": [
              "string",
              "null"
            ]
          },
          "mark": {
            "$ref": "#/components/schemas/MarkInfo"
          },
          "sincePct": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "filingId",
          "ephor",
          "ticker",
          "side",
          "at",
          "priceUsd",
          "valueUsd",
          "priceSource",
          "backtest",
          "filer",
          "mark",
          "sincePct"
        ]
      },
      "PerfStats": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "hill",
              "inside",
              "whale",
              "all"
            ]
          },
          "startUsd": {
            "type": "number"
          },
          "valueUsd": {
            "type": "number"
          },
          "cashUsd": {
            "type": "number"
          },
          "investedUsd": {
            "type": "number"
          },
          "returnPct": {
            "type": "number"
          },
          "benchmarkReturnPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "vsBenchmarkPp": {
            "type": [
              "number",
              "null"
            ],
            "description": "returnPct minus the benchmark's return, percentage points"
          },
          "cagrPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Only when the window is at least 365 days"
          },
          "days": {
            "type": "number"
          },
          "maxDrawdown": {
            "$ref": "#/components/schemas/Drawdown"
          },
          "realizedUsd": {
            "type": "number"
          },
          "unrealizedUsd": {
            "type": "number"
          },
          "feesUsd": {
            "type": "number"
          },
          "fills": {
            "type": "integer"
          },
          "buys": {
            "type": "integer"
          },
          "sells": {
            "type": "integer"
          },
          "closed": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              },
              "wins": {
                "type": "integer"
              },
              "winRatePct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "avgWinUsd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "avgWinPct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "avgLossUsd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "avgLossPct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "avgHoldingDays": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "count",
              "wins",
              "winRatePct",
              "avgWinUsd",
              "avgWinPct",
              "avgLossUsd",
              "avgLossPct",
              "avgHoldingDays"
            ]
          },
          "open": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              },
              "up": {
                "type": "integer"
              },
              "upRatePct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "avgHoldingDays": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "count",
              "up",
              "upRatePct",
              "avgHoldingDays"
            ]
          },
          "turnoverPerYear": {
            "type": [
              "number",
              "null"
            ]
          },
          "best": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TailPerf"
            }
          },
          "worst": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TailPerf"
            }
          },
          "byTicker": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "realizedUsd": {
                  "type": "number"
                },
                "unrealizedUsd": {
                  "type": "number"
                },
                "totalUsd": {
                  "type": "number"
                }
              },
              "required": [
                "ticker",
                "realizedUsd",
                "unrealizedUsd",
                "totalUsd"
              ]
            }
          }
        },
        "required": [
          "id",
          "startUsd",
          "valueUsd",
          "cashUsd",
          "investedUsd",
          "returnPct",
          "benchmarkReturnPct",
          "vsBenchmarkPp",
          "cagrPct",
          "days",
          "maxDrawdown",
          "realizedUsd",
          "unrealizedUsd",
          "feesUsd",
          "fills",
          "buys",
          "sells",
          "closed",
          "open",
          "turnoverPerYear",
          "best",
          "worst",
          "byTicker"
        ]
      },
      "Performance": {
        "type": "object",
        "properties": {
          "asOf": {
            "type": "string"
          },
          "start": {
            "type": [
              "string",
              "null"
            ]
          },
          "startAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "launchedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "backtest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BacktestInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "benchmark": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "ticker": {
                    "type": "string"
                  },
                  "startUsd": {
                    "type": "number"
                  },
                  "valueUsd": {
                    "type": "number"
                  },
                  "returnPct": {
                    "type": "number"
                  },
                  "boughtAt": {
                    "type": "string"
                  },
                  "priceUsd": {
                    "type": "number"
                  },
                  "priceSource": {
                    "type": "string"
                  },
                  "mark": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/MarkInfo"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxDrawdown": {
                    "$ref": "#/components/schemas/Drawdown"
                  }
                },
                "required": [
                  "ticker",
                  "startUsd",
                  "valueUsd",
                  "returnPct",
                  "boughtAt",
                  "priceUsd",
                  "priceSource",
                  "mark",
                  "maxDrawdown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "ephors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PerfStats"
            }
          },
          "total": {
            "$ref": "#/components/schemas/PerfStats"
          },
          "marks": {
            "type": "object",
            "properties": {
              "onchain": {
                "type": "integer"
              },
              "close": {
                "type": "integer"
              },
              "stale": {
                "type": "integer"
              },
              "none": {
                "type": "integer"
              }
            },
            "required": [
              "onchain",
              "close",
              "stale",
              "none"
            ]
          }
        },
        "required": [
          "asOf",
          "start",
          "startAt",
          "launchedAt",
          "backtest",
          "benchmark",
          "ephors",
          "total",
          "marks"
        ]
      },
      "TradeRow": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "filingId": {
            "type": "string"
          },
          "ephor": {
            "$ref": "#/components/schemas/EphorId"
          },
          "ticker": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "at": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "priceUsd": {
            "type": "number"
          },
          "valueUsd": {
            "type": "number"
          },
          "feeUsd": {
            "type": "number"
          },
          "priceSource": {
            "type": [
              "string",
              "null"
            ]
          },
          "priceDetail": {
            "type": [
              "string",
              "null"
            ]
          },
          "backtest": {
            "type": "boolean"
          },
          "realizedUsd": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sells: realised P&L under average cost"
          },
          "positionQty": {
            "type": "number"
          },
          "avgCostUsd": {
            "type": "number"
          },
          "filer": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "filingId",
          "ephor",
          "ticker",
          "side",
          "at",
          "qty",
          "priceUsd",
          "valueUsd",
          "feeUsd",
          "priceSource",
          "priceDetail",
          "backtest",
          "realizedUsd",
          "positionQty",
          "avgCostUsd",
          "filer"
        ]
      },
      "Trades": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeRow"
            }
          },
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "total",
          "page",
          "pageSize",
          "rows",
          "tickers"
        ]
      },
      "PositionDetail": {
        "type": "object",
        "properties": {
          "ephor": {
            "$ref": "#/components/schemas/EphorId"
          },
          "ticker": {
            "type": "string"
          },
          "prices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "at": {
                  "type": "string"
                },
                "priceUsd": {
                  "type": "number"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "close",
                    "mark"
                  ]
                }
              },
              "required": [
                "at",
                "priceUsd",
                "kind"
              ]
            }
          },
          "mark": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MarkInfo"
              },
              {
                "type": "null"
              }
            ]
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeRow"
            }
          },
          "qty": {
            "type": "number"
          },
          "avgCostUsd": {
            "type": "number"
          },
          "costBasisUsd": {
            "type": "number"
          },
          "realizedUsd": {
            "type": "number"
          },
          "unrealizedUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "priceSeries": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "detail": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "source",
                  "symbol",
                  "detail"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "ephor",
          "ticker",
          "prices",
          "mark",
          "fills",
          "qty",
          "avgCostUsd",
          "costBasisUsd",
          "realizedUsd",
          "unrealizedUsd",
          "priceSeries"
        ]
      },
      "ReportedHolding": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "reportedUsd": {
            "type": "number"
          },
          "weightPct": {
            "type": "number"
          },
          "shares": {
            "type": "number"
          },
          "onchain": {
            "type": "string",
            "enum": [
              "held",
              "available",
              "no_price",
              "no_token",
              "no_ticker"
            ]
          },
          "token": {
            "type": "string"
          },
          "priceUsd": {
            "type": "number"
          },
          "ephorQty": {
            "type": "number"
          },
          "ephorValueUsd": {
            "type": "number"
          },
          "ephorWeightPct": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "ticker",
          "reportedUsd",
          "weightPct",
          "onchain"
        ]
      },
      "FundReport": {
        "type": "object",
        "properties": {
          "cik": {
            "type": "string"
          },
          "filing": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "sourceUrl": {
                    "type": "string"
                  },
                  "filerName": {
                    "type": "string"
                  },
                  "filedDate": {
                    "type": "string"
                  },
                  "periodOfReport": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "sourceUrl",
                  "filerName",
                  "filedDate"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "totalReportedUsd": {
            "type": "number"
          },
          "holdings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportedHolding"
            }
          },
          "slice": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "valueUsd": {
                    "type": "number"
                  },
                  "cashUsd": {
                    "type": "number"
                  }
                },
                "required": [
                  "valueUsd",
                  "cashUsd"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "cik",
          "filing",
          "totalReportedUsd",
          "holdings",
          "slice"
        ]
      },
      "Holdings": {
        "type": "object",
        "properties": {
          "funds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FundReport"
            }
          },
          "combined": {
            "type": "object",
            "properties": {
              "onchainPct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "walletUsd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "investedUsd": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "onchainPct",
              "walletUsd",
              "investedUsd"
            ]
          },
          "lastRun": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "ok": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "detail": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "at",
                  "ok",
                  "detail"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "funds",
          "combined",
          "lastRun"
        ]
      },
      "SwapTokens": {
        "type": "object",
        "properties": {
          "chainId": {
            "type": "integer"
          },
          "maxPriceAgeSeconds": {
            "type": "number"
          },
          "tokens": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "address": {
                  "type": "string"
                },
                "priceUsd": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "updatedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "fresh": {
                  "type": "boolean",
                  "description": "No older than maxPriceAgeSeconds"
                }
              },
              "required": [
                "address",
                "priceUsd",
                "updatedAt",
                "fresh"
              ]
            }
          }
        },
        "required": [
          "chainId",
          "maxPriceAgeSeconds",
          "tokens"
        ]
      },
      "SwapAmount": {
        "type": "object",
        "properties": {
          "raw": {
            "type": "string",
            "description": "Raw token units as a decimal string"
          },
          "formatted": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "decimals": {
            "type": "integer"
          },
          "address": {
            "type": "string"
          }
        },
        "required": [
          "raw",
          "formatted",
          "symbol",
          "decimals",
          "address"
        ]
      },
      "SwapHop": {
        "type": "object",
        "properties": {
          "pool": {
            "type": "string"
          },
          "fee": {
            "type": "integer",
            "description": "Uniswap v3 fee tier in hundredths of a basis point: 500 = 0.05%"
          },
          "tokenIn": {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string"
              },
              "address": {
                "type": "string"
              }
            },
            "required": [
              "symbol",
              "address"
            ]
          },
          "tokenOut": {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string"
              },
              "address": {
                "type": "string"
              }
            },
            "required": [
              "symbol",
              "address"
            ]
          },
          "depthUsd": {
            "type": "number"
          }
        },
        "required": [
          "pool",
          "fee",
          "tokenIn",
          "tokenOut",
          "depthUsd"
        ]
      },
      "SwapQuote": {
        "type": "object",
        "properties": {
          "chainId": {
            "type": "integer"
          },
          "ticker": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell"
            ]
          },
          "token": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "symbol": {
                "type": "string"
              },
              "decimals": {
                "type": "integer"
              },
              "uiMultiplier": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "address",
              "name",
              "symbol",
              "decimals",
              "uiMultiplier"
            ]
          },
          "amountIn": {
            "$ref": "#/components/schemas/SwapAmount"
          },
          "amountOut": {
            "$ref": "#/components/schemas/SwapAmount"
          },
          "route": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "direct",
                  "via-weth"
                ]
              },
              "hops": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SwapHop"
                }
              },
              "path": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "hops",
              "path"
            ]
          },
          "routesQuoted": {
            "type": "integer"
          },
          "executionPriceUsd": {
            "type": "number"
          },
          "reference": {
            "type": "object",
            "properties": {
              "priceUsd": {
                "type": "number"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "detail": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "asOf": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updatedAt": {
                "type": "string"
              },
              "ageSeconds": {
                "type": "number"
              },
              "maxAgeSeconds": {
                "type": "number"
              },
              "fresh": {
                "type": "boolean"
              }
            },
            "required": [
              "priceUsd",
              "source",
              "detail",
              "asOf",
              "updatedAt",
              "ageSeconds",
              "maxAgeSeconds",
              "fresh"
            ]
          },
          "priceImpactPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Percent worse (positive) or better (negative) than the reference"
          },
          "guard": {
            "type": "object",
            "properties": {
              "level": {
                "type": "string",
                "enum": [
                  "ok",
                  "warn",
                  "refuse"
                ]
              },
              "reasons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "level",
              "reasons"
            ]
          },
          "networkFee": {
            "type": "object",
            "properties": {
              "gasUnits": {
                "type": "string"
              },
              "gasPriceWei": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "feeEth": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "feeUsd": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "gasUnits",
              "gasPriceWei",
              "feeEth",
              "feeUsd"
            ]
          },
          "router": {
            "type": "string"
          },
          "blockTime": {
            "type": "string"
          },
          "quotedAt": {
            "type": "string"
          }
        },
        "required": [
          "chainId",
          "ticker",
          "side",
          "token",
          "amountIn",
          "amountOut",
          "route",
          "routesQuoted",
          "executionPriceUsd",
          "reference",
          "priceImpactPct",
          "guard",
          "networkFee",
          "router",
          "blockTime",
          "quotedAt"
        ]
      },
      "BasketId": {
        "type": "string",
        "enum": [
          "consensus",
          "hill",
          "inside",
          "whale",
          "ephor10"
        ]
      },
      "BasketEvidence": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Filing id (see /api/feed)"
          },
          "filer": {
            "type": "string",
            "description": "Copied from the filing: untrusted data"
          },
          "side": {
            "type": "string",
            "enum": [
              "buy",
              "sell",
              "hold"
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "filer",
          "side",
          "date",
          "text"
        ]
      },
      "BasketSignal": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "number",
            "description": "Percentile rank in the category, 0-1"
          },
          "actors": {
            "type": "integer",
            "description": "Members, insiders or funds"
          },
          "entry": {
            "type": [
              "number",
              "null"
            ],
            "description": "Their entry, underlying share price"
          },
          "lastFiled": {
            "type": "string"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BasketEvidence"
            }
          }
        },
        "required": [
          "rank",
          "actors",
          "entry",
          "lastFiled",
          "evidence"
        ]
      },
      "BasketMember": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "weight": {
            "type": "number",
            "description": "0-1; a basket's weights add up to exactly 1"
          },
          "score": {
            "type": "number"
          },
          "active": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "hill",
                "inside",
                "whale"
              ]
            },
            "description": "Ephors whose signal counts (rank at least 0.2)"
          },
          "signals": {
            "type": "object",
            "properties": {
              "hill": {
                "$ref": "#/components/schemas/BasketSignal"
              },
              "inside": {
                "$ref": "#/components/schemas/BasketSignal"
              },
              "whale": {
                "$ref": "#/components/schemas/BasketSignal"
              }
            },
            "required": []
          },
          "entry": {
            "type": [
              "number",
              "null"
            ],
            "description": "Combined entry, underlying share price"
          },
          "price": {
            "type": [
              "number",
              "null"
            ],
            "description": "Latest close, underlying share price"
          },
          "priceDay": {
            "type": [
              "string",
              "null"
            ]
          },
          "gap": {
            "type": [
              "number",
              "null"
            ],
            "description": "price / entry - 1"
          },
          "tokenPriceUsd": {
            "type": [
              "number",
              "null"
            ],
            "description": "The token's latest on-chain reference price"
          },
          "uiMultiplier": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "ticker",
          "name",
          "weight",
          "score",
          "active",
          "signals",
          "entry",
          "price",
          "priceDay",
          "gap",
          "tokenPriceUsd",
          "uiMultiplier"
        ]
      },
      "BasketStats": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "totalReturn": {
            "type": "number"
          },
          "spyReturn": {
            "type": "number"
          },
          "annualReturn": {
            "type": "number"
          },
          "spyAnnualReturn": {
            "type": "number"
          },
          "maxDrawdown": {
            "type": "number"
          },
          "spyMaxDrawdown": {
            "type": "number"
          },
          "volatility": {
            "type": "number"
          },
          "monthsBeat": {
            "type": "integer"
          },
          "months": {
            "type": "integer"
          },
          "avgNames": {
            "type": "number"
          },
          "avgTurnover": {
            "type": "number"
          },
          "costUsd": {
            "type": "number"
          }
        },
        "required": [
          "from",
          "to",
          "totalReturn",
          "spyReturn",
          "annualReturn",
          "spyAnnualReturn",
          "maxDrawdown",
          "spyMaxDrawdown",
          "volatility",
          "monthsBeat",
          "months",
          "avgNames",
          "avgTurnover",
          "costUsd"
        ]
      },
      "BasketItem": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/BasketId"
          },
          "name": {
            "type": "string"
          },
          "blurb": {
            "type": "string"
          },
          "offered": {
            "type": "boolean",
            "description": "False when fewer than three names pass the rules"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BasketMember"
            }
          },
          "backtest": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "asOf": {
                    "type": "string"
                  },
                  "investedFrom": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "stats": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/BasketStats"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "startUsd": {
                    "type": "number"
                  },
                  "costRate": {
                    "type": "number"
                  }
                },
                "required": [
                  "asOf",
                  "investedFrom",
                  "stats",
                  "startUsd",
                  "costRate"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "rebalancedOn": {
            "type": [
              "string",
              "null"
            ],
            "description": "The backtest's latest monthly rebalance"
          },
          "sinceRebalance": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "added": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "removed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "added",
                  "removed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "backtestMatch": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "matches": {
                    "type": "boolean"
                  },
                  "added": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "removed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "matches",
                  "added",
                  "removed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the held basket is the backtest's rebalance of the same month (null until the backtest has it)"
          },
          "nextRebalance": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "offered": {
                    "type": "boolean"
                  },
                  "added": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "removed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "offered",
                  "added",
                  "removed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "What the next monthly rebalance would change if it were today; null when today's picks are the held basket"
          }
        },
        "required": [
          "id",
          "name",
          "blurb",
          "offered",
          "members",
          "backtest",
          "rebalancedOn",
          "sinceRebalance",
          "backtestMatch",
          "nextRebalance"
        ]
      },
      "Baskets": {
        "type": "object",
        "properties": {
          "asOf": {
            "type": "string",
            "description": "The New York session whose close the baskets use"
          },
          "rebalance": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "asOf": {
                    "type": "string"
                  },
                  "month": {
                    "type": "string"
                  }
                },
                "required": [
                  "asOf",
                  "month"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "The monthly rebalance the baskets are held from: the month and the as-of date its picks were made from"
          },
          "builtAt": {
            "type": "string"
          },
          "rulesVersion": {
            "type": "string"
          },
          "universe": {
            "type": "object",
            "properties": {
              "signals": {
                "type": "integer"
              },
              "pickable": {
                "type": "integer"
              },
              "onchain": {
                "type": "integer"
              },
              "out": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer"
                }
              }
            },
            "required": [
              "signals",
              "pickable",
              "onchain",
              "out"
            ]
          },
          "baskets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BasketItem"
            }
          },
          "watch": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "active": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "hill",
                      "inside",
                      "whale"
                    ]
                  }
                },
                "gap": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "price": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "entry": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "ticker",
                "name",
                "reason",
                "active",
                "gap",
                "price",
                "entry"
              ]
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "asOf",
          "rebalance",
          "builtAt",
          "rulesVersion",
          "universe",
          "baskets",
          "watch",
          "notes"
        ]
      },
      "BasketDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BasketItem"
          },
          {
            "type": "object",
            "properties": {
              "asOf": {
                "type": "string"
              },
              "builtAt": {
                "type": "string"
              },
              "rulesVersion": {
                "type": "string"
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "points": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string"
                    },
                    "value": {
                      "type": "number"
                    },
                    "spy": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "day",
                    "value",
                    "spy"
                  ]
                }
              },
              "rebalances": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string"
                    },
                    "offered": {
                      "type": "boolean"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ticker": {
                            "type": "string"
                          },
                          "weight": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "ticker",
                          "weight"
                        ]
                      }
                    },
                    "turnover": {
                      "type": "number"
                    },
                    "costUsd": {
                      "type": "number"
                    },
                    "valueUsd": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "day",
                    "offered",
                    "members",
                    "turnover",
                    "costUsd",
                    "valueUsd"
                  ]
                }
              },
              "changes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BasketChange"
                }
              },
              "changesSince": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "asOf",
              "builtAt",
              "rulesVersion",
              "notes",
              "points",
              "rebalances",
              "changes",
              "changesSince"
            ]
          }
        ]
      },
      "BasketChange": {
        "type": "object",
        "properties": {
          "basket": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "day": {
            "type": "string"
          },
          "added": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                }
              },
              "required": [
                "ticker",
                "weight"
              ]
            }
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                }
              },
              "required": [
                "ticker",
                "weight"
              ]
            }
          },
          "reweighted": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "from": {
                  "type": "number"
                },
                "to": {
                  "type": "number"
                }
              },
              "required": [
                "ticker",
                "from",
                "to"
              ]
            }
          },
          "offered": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "from": {
                "type": "boolean"
              },
              "to": {
                "type": "boolean"
              }
            }
          },
          "rulesChanged": {
            "type": "boolean"
          }
        },
        "required": [
          "basket",
          "name",
          "from",
          "day",
          "added",
          "removed",
          "reweighted",
          "offered",
          "rulesChanged"
        ]
      },
      "BasketChanges": {
        "type": "object",
        "properties": {
          "since": {
            "type": [
              "string",
              "null"
            ]
          },
          "changes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BasketChange"
            }
          }
        },
        "required": [
          "since",
          "changes"
        ]
      },
      "BasketQuote": {
        "type": "object",
        "properties": {
          "basket": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "asOf": {
            "type": "string"
          },
          "spend": {
            "type": "string",
            "enum": [
              "weights",
              "split"
            ]
          },
          "amountIn": {
            "$ref": "#/components/schemas/SwapAmount"
          },
          "slippageBps": {
            "type": "integer"
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "boughtWeight": {
                  "type": "number"
                },
                "amountIn": {
                  "$ref": "#/components/schemas/SwapAmount"
                },
                "quote": {
                  "$ref": "#/components/schemas/SwapQuote"
                },
                "minimumOut": {
                  "$ref": "#/components/schemas/SwapAmount"
                }
              },
              "required": [
                "ticker",
                "name",
                "weight",
                "boughtWeight",
                "amountIn",
                "quote",
                "minimumOut"
              ]
            }
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "weight": {
                  "type": "number"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "ticker",
                "weight",
                "reason"
              ]
            }
          },
          "priceImpactPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "guard": {
            "type": "object",
            "properties": {
              "level": {
                "type": "string",
                "enum": [
                  "ok",
                  "warn"
                ]
              },
              "reasons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "level",
              "reasons"
            ]
          },
          "gasUnits": {
            "type": "string"
          },
          "networkFeeUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "quotedAt": {
            "type": "string"
          }
        },
        "required": [
          "basket",
          "name",
          "asOf",
          "spend",
          "amountIn",
          "slippageBps",
          "legs",
          "skipped",
          "priceImpactPct",
          "guard",
          "gasUnits",
          "networkFeeUsd",
          "quotedAt"
        ]
      },
      "HealthReport": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded",
              "down"
            ]
          },
          "ok": {
            "type": "boolean"
          },
          "now": {
            "type": "string"
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "deployedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "db": {
            "type": "object",
            "properties": {
              "reachable": {
                "type": "boolean"
              },
              "ephor": {
                "type": "boolean"
              },
              "tracker": {
                "type": "string",
                "enum": [
                  "ok",
                  "missing",
                  "error",
                  "off"
                ]
              },
              "ops": {
                "type": "boolean"
              }
            },
            "required": [
              "reachable",
              "ephor",
              "tracker",
              "ops"
            ]
          },
          "worker": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": [
                  "ok",
                  "stale",
                  "never"
                ]
              },
              "heartbeatAt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startedAt": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "state",
              "heartbeatAt",
              "startedAt"
            ]
          },
          "jobs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "job": {
                  "type": "string"
                },
                "lane": {
                  "type": "string",
                  "enum": [
                    "main",
                    "sec",
                    "chain"
                  ]
                },
                "everyMinutes": {
                  "type": "number"
                },
                "staleAfterMinutes": {
                  "type": "number"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "stale",
                    "never",
                    "pending",
                    "off"
                  ]
                },
                "lastOkAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "startedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "finishedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "ok": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "running": {
                  "type": "boolean"
                }
              },
              "required": [
                "job",
                "lane",
                "everyMinutes",
                "staleAfterMinutes",
                "state",
                "lastOkAt",
                "startedAt",
                "finishedAt",
                "ok",
                "running"
              ]
            }
          },
          "lanes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "lane": {
                  "type": "string",
                  "enum": [
                    "main",
                    "sec",
                    "chain"
                  ]
                },
                "lastStartedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "staleAfterMinutes": {
                  "type": "number"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "stale",
                    "never",
                    "off"
                  ]
                }
              },
              "required": [
                "lane",
                "lastStartedAt",
                "staleAfterMinutes",
                "state"
              ]
            }
          },
          "disk": {
            "type": "object",
            "properties": {
              "freeGb": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "ok",
                  "low",
                  "critical",
                  "unknown"
                ]
              },
              "warnBelowGb": {
                "type": "number"
              }
            },
            "required": [
              "freeGb",
              "state",
              "warnBelowGb"
            ]
          },
          "backup": {
            "type": "object",
            "properties": {
              "lastAt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "ageHours": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "ok",
                  "old",
                  "missing"
                ]
              },
              "maxAgeHours": {
                "type": "number"
              },
              "remote": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "lastAt",
              "ageHours",
              "state",
              "maxAgeHours",
              "remote"
            ]
          }
        },
        "required": [
          "status",
          "ok",
          "now",
          "version",
          "deployedAt",
          "reasons",
          "db",
          "worker",
          "jobs",
          "lanes",
          "disk",
          "backup"
        ]
      },
      "TrackerSource": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "asOf": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "label",
          "asOf",
          "note"
        ]
      },
      "PeriodInfo": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "partial"
            ]
          },
          "deadline": {
            "type": "string"
          },
          "filings": {
            "type": "integer"
          },
          "filers": {
            "type": "integer"
          },
          "tokenFilers": {
            "type": "integer"
          },
          "tokenUsd": {
            "type": "number"
          },
          "lastFiled": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "period",
          "status",
          "deadline",
          "filings",
          "filers",
          "tokenFilers",
          "tokenUsd",
          "lastFiled"
        ]
      },
      "PositionChange": {
        "type": "string",
        "enum": [
          "new",
          "added",
          "trimmed",
          "exited",
          "unchanged",
          "first"
        ]
      },
      "FilerType": {
        "type": "string",
        "enum": [
          "hedge_fund",
          "fund_sponsor",
          "wealth_manager",
          "pe_vc",
          "adviser",
          "bank",
          "insurer",
          "pension",
          "sovereign",
          "foreign",
          "unclassified"
        ],
        "description": "An estimate (Form ADV and name rules); SEC records no type"
      },
      "InstHolder": {
        "type": "object",
        "properties": {
          "cik": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/FilerType"
          },
          "typeLabel": {
            "type": "string"
          },
          "valueUsd": {
            "type": "number"
          },
          "shares": {
            "type": "number"
          },
          "pctOfInst": {
            "type": [
              "number",
              "null"
            ]
          },
          "portfolioPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "change": {
            "$ref": "#/components/schemas/PositionChange"
          },
          "deltaShares": {
            "type": [
              "number",
              "null"
            ]
          },
          "deltaUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "prevShares": {
            "type": [
              "number",
              "null"
            ]
          },
          "optionsUsd": {
            "type": "number"
          }
        },
        "required": [
          "cik",
          "name",
          "type",
          "typeLabel",
          "valueUsd",
          "shares",
          "pctOfInst",
          "portfolioPct",
          "change",
          "deltaShares",
          "deltaUsd",
          "prevShares",
          "optionsUsd"
        ]
      },
      "BoFiling": {
        "type": "object",
        "properties": {
          "accession": {
            "type": "string"
          },
          "form": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "13D",
              "13G"
            ]
          },
          "amendment": {
            "type": "boolean"
          },
          "filedDate": {
            "type": "string"
          },
          "eventDate": {
            "type": [
              "string",
              "null"
            ]
          },
          "ticker": {
            "type": "string"
          },
          "filer": {
            "type": "string"
          },
          "filerCik": {
            "type": [
              "string",
              "null"
            ]
          },
          "pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "shares": {
            "type": [
              "number",
              "null"
            ]
          },
          "persons": {
            "type": "integer"
          },
          "rule": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "accession",
          "form",
          "kind",
          "amendment",
          "filedDate",
          "eventDate",
          "ticker",
          "filer",
          "filerCik",
          "pct",
          "shares",
          "persons",
          "rule",
          "url"
        ]
      },
      "ChainHolder": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "short": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "protocol": {
            "type": "boolean"
          },
          "balance": {
            "type": "number"
          },
          "usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "supplyPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "exact": {
            "type": "boolean"
          },
          "whale": {
            "type": "boolean"
          },
          "ticker": {
            "type": "string"
          }
        },
        "required": [
          "address",
          "short",
          "label",
          "kind",
          "protocol",
          "balance",
          "usd",
          "supplyPct",
          "exact",
          "whale"
        ]
      },
      "ChainMove": {
        "type": "object",
        "properties": {
          "tx": {
            "type": "string"
          },
          "txUrl": {
            "type": "string"
          },
          "ticker": {
            "type": "string"
          },
          "at": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "buy",
              "sell",
              "transfer",
              "mint",
              "burn"
            ]
          },
          "amount": {
            "type": "number"
          },
          "usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "priceBasis": {
            "type": [
              "string",
              "null"
            ]
          },
          "trader": {
            "type": [
              "string",
              "null"
            ]
          },
          "traderShort": {
            "type": [
              "string",
              "null"
            ]
          },
          "traderLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "counterpartyLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "venue": {
            "type": [
              "string",
              "null"
            ]
          },
          "whale": {
            "type": "boolean"
          },
          "more": {
            "type": "integer"
          }
        },
        "required": [
          "tx",
          "txUrl",
          "ticker",
          "at",
          "kind",
          "amount",
          "usd",
          "priceBasis",
          "trader",
          "traderShort",
          "traderLabel",
          "counterpartyLabel",
          "venue",
          "whale"
        ]
      },
      "ChainRules": {
        "type": "object",
        "properties": {
          "minUsd": {
            "type": "number"
          },
          "minSupplyPct": {
            "type": "number"
          },
          "tradeUsd": {
            "type": "number"
          },
          "eventUsd": {
            "type": "number"
          }
        },
        "required": [
          "minUsd",
          "minSupplyPct",
          "tradeUsd",
          "eventUsd"
        ]
      },
      "ChainSince": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "block": {
                "type": "integer"
              },
              "at": {
                "type": "string"
              }
            },
            "required": [
              "block",
              "at"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "ChainSummary": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/TrackerSource"
          },
          "since": {
            "$ref": "#/components/schemas/ChainSince"
          },
          "indexedTo": {
            "type": [
              "integer",
              "null"
            ]
          },
          "supply": {
            "type": [
              "number",
              "null"
            ]
          },
          "supplyBlock": {
            "type": [
              "integer",
              "null"
            ]
          },
          "priceUsd": {
            "type": [
              "number",
              "null"
            ]
          },
          "priceAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "priceFresh": {
            "type": "boolean"
          },
          "holders": {
            "type": "integer"
          },
          "trackedPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "exactPct": {
            "type": [
              "number",
              "null"
            ]
          },
          "whales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainHolder"
            }
          },
          "top": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainHolder"
            }
          },
          "moves": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainMove"
            }
          },
          "rules": {
            "$ref": "#/components/schemas/ChainRules"
          }
        },
        "required": [
          "source",
          "since",
          "indexedTo",
          "supply",
          "supplyBlock",
          "priceUsd",
          "priceAt",
          "priceFresh",
          "holders",
          "trackedPct",
          "exactPct",
          "whales",
          "top",
          "moves",
          "rules"
        ]
      },
      "TickerView": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "token": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  }
                },
                "required": [
                  "address"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "inst": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/components/schemas/TrackerSource"
              },
              "period": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PeriodInfo"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "newer": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PeriodInfo"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "periods": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PeriodInfo"
                }
              },
              "price": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "usd": {
                        "type": "number"
                      },
                      "basis": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "usd",
                      "basis"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "totals": {
                "type": "object",
                "properties": {
                  "holders": {
                    "type": "integer"
                  },
                  "valueUsd": {
                    "type": "number"
                  },
                  "shares": {
                    "type": "number"
                  },
                  "netDeltaShares": {
                    "type": "number"
                  },
                  "netDeltaUsd": {
                    "type": "number"
                  },
                  "counts": {
                    "type": "object",
                    "properties": {
                      "new": {
                        "type": "integer"
                      },
                      "added": {
                        "type": "integer"
                      },
                      "trimmed": {
                        "type": "integer"
                      },
                      "exited": {
                        "type": "integer"
                      },
                      "unchanged": {
                        "type": "integer"
                      },
                      "first": {
                        "type": "integer"
                      }
                    },
                    "required": [
                      "new",
                      "added",
                      "trimmed",
                      "exited",
                      "unchanged",
                      "first"
                    ]
                  }
                },
                "required": [
                  "holders",
                  "valueUsd",
                  "shares",
                  "netDeltaShares",
                  "netDeltaUsd",
                  "counts"
                ]
              },
              "byType": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "$ref": "#/components/schemas/FilerType"
                    },
                    "label": {
                      "type": "string"
                    },
                    "holders": {
                      "type": "integer"
                    },
                    "valueUsd": {
                      "type": "number"
                    },
                    "pct": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type",
                    "label",
                    "holders",
                    "valueUsd",
                    "pct"
                  ]
                }
              },
              "holders": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InstHolder"
                }
              },
              "total": {
                "type": "integer"
              },
              "page": {
                "type": "integer"
              },
              "pageSize": {
                "type": "integer"
              },
              "sort": {
                "type": "string",
                "enum": [
                  "value",
                  "shares",
                  "pct",
                  "change",
                  "name"
                ]
              },
              "dir": {
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ]
              },
              "type": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/FilerType"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "topBuyers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InstHolder"
                }
              },
              "topSellers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InstHolder"
                }
              }
            },
            "required": [
              "source",
              "period",
              "newer",
              "periods",
              "price",
              "totals",
              "byType",
              "holders",
              "total",
              "page",
              "pageSize",
              "sort",
              "dir",
              "type",
              "topBuyers",
              "topSellers"
            ]
          },
          "bo": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/components/schemas/TrackerSource"
              },
              "filings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BoFiling"
                }
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "source",
              "filings",
              "total"
            ]
          },
          "chain": {
            "$ref": "#/components/schemas/ChainSummary"
          }
        },
        "required": [
          "ticker",
          "name",
          "token",
          "inst",
          "bo",
          "chain"
        ]
      },
      "InstitutionView": {
        "type": "object",
        "properties": {
          "cik": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/FilerType"
          },
          "typeLabel": {
            "type": "string"
          },
          "typeBasis": {
            "type": [
              "string",
              "null"
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "followedByWhale": {
            "type": "boolean"
          },
          "source": {
            "$ref": "#/components/schemas/TrackerSource"
          },
          "period": {
            "type": [
              "string",
              "null"
            ]
          },
          "periods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "period": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "complete",
                    "partial"
                  ]
                },
                "totalUsd": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "tokenUsd": {
                  "type": "number"
                },
                "positions": {
                  "type": "integer"
                },
                "filedDate": {
                  "type": "string"
                }
              },
              "required": [
                "period",
                "status",
                "totalUsd",
                "tokenUsd",
                "positions",
                "filedDate"
              ]
            }
          },
          "holdings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "valueUsd": {
                  "type": "number"
                },
                "shares": {
                  "type": "number"
                },
                "portfolioPct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "pctOfInst": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "change": {
                  "$ref": "#/components/schemas/PositionChange"
                },
                "deltaShares": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "deltaUsd": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "optionsUsd": {
                  "type": "number"
                }
              },
              "required": [
                "ticker",
                "name",
                "valueUsd",
                "shares",
                "portfolioPct",
                "pctOfInst",
                "change",
                "deltaShares",
                "deltaUsd",
                "optionsUsd"
              ]
            }
          },
          "filings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "accession": {
                  "type": "string"
                },
                "form": {
                  "type": "string"
                },
                "amendmentType": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "period": {
                  "type": "string"
                },
                "filedDate": {
                  "type": "string"
                },
                "inUse": {
                  "type": "boolean"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "accession",
                "form",
                "amendmentType",
                "period",
                "filedDate",
                "inUse",
                "url"
              ]
            }
          },
          "bo": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoFiling"
            }
          },
          "overlap": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "institutionUsd": {
                  "type": "number"
                },
                "change": {
                  "$ref": "#/components/schemas/PositionChange"
                },
                "ephors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "ephor": {
                        "type": "string"
                      },
                      "qty": {
                        "type": "number"
                      },
                      "valueUsd": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "ephor",
                      "qty",
                      "valueUsd"
                    ]
                  }
                }
              },
              "required": [
                "ticker",
                "institutionUsd",
                "change",
                "ephors"
              ]
            }
          }
        },
        "required": [
          "cik",
          "name",
          "type",
          "typeLabel",
          "typeBasis",
          "city",
          "state",
          "followedByWhale",
          "source",
          "period",
          "periods",
          "holdings",
          "filings",
          "bo",
          "overlap"
        ]
      },
      "TrackerSearch": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string"
          },
          "tickers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "holders": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "ticker",
                "name",
                "holders"
              ]
            }
          },
          "institutions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cik": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "$ref": "#/components/schemas/FilerType"
                },
                "typeLabel": {
                  "type": "string"
                },
                "tokenUsd": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "cik",
                "name",
                "type",
                "typeLabel",
                "tokenUsd"
              ]
            }
          }
        },
        "required": [
          "q",
          "tickers",
          "institutions"
        ]
      },
      "Movers": {
        "type": "object",
        "properties": {
          "inst": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/components/schemas/TrackerSource"
              },
              "period": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PeriodInfo"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "buys": {
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/InstHolder"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ticker": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ticker"
                      ]
                    }
                  ]
                }
              },
              "sells": {
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/InstHolder"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ticker": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "ticker"
                      ]
                    }
                  ]
                }
              },
              "byTicker": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ticker": {
                      "type": "string"
                    },
                    "netDeltaUsd": {
                      "type": "number"
                    },
                    "buyers": {
                      "type": "integer"
                    },
                    "sellers": {
                      "type": "integer"
                    },
                    "holders": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "ticker",
                    "netDeltaUsd",
                    "buyers",
                    "sellers",
                    "holders"
                  ]
                }
              }
            },
            "required": [
              "source",
              "period",
              "buys",
              "sells",
              "byTicker"
            ]
          },
          "bo": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/components/schemas/TrackerSource"
              },
              "filings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BoFiling"
                }
              }
            },
            "required": [
              "source",
              "filings"
            ]
          },
          "chain": {
            "type": "object",
            "properties": {
              "source": {
                "$ref": "#/components/schemas/TrackerSource"
              },
              "since": {
                "$ref": "#/components/schemas/ChainSince"
              },
              "windowHours": {
                "type": "number"
              },
              "moves": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ChainMove"
                }
              },
              "rules": {
                "$ref": "#/components/schemas/ChainRules"
              }
            },
            "required": [
              "source",
              "since",
              "windowHours",
              "moves",
              "rules"
            ]
          }
        },
        "required": [
          "inst",
          "bo",
          "chain"
        ]
      },
      "Whales": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/TrackerSource"
          },
          "since": {
            "$ref": "#/components/schemas/ChainSince"
          },
          "rules": {
            "$ref": "#/components/schemas/ChainRules"
          },
          "ticker": {
            "type": [
              "string",
              "null"
            ]
          },
          "whales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChainHolder"
            }
          },
          "tokens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "holders": {
                  "type": "integer"
                },
                "whales": {
                  "type": "integer"
                },
                "supply": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "trackedPct": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "ticker",
                "holders",
                "whales",
                "supply",
                "trackedPct"
              ]
            }
          }
        },
        "required": [
          "source",
          "since",
          "rules",
          "ticker",
          "whales",
          "tokens"
        ]
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Optional MCP API key (EPHOR_MCP_KEYS on the server); only /api/mcp reads it"
      }
    }
  }
}