{
  "openapi": "3.1.0",
  "info": {
    "title": "Quotient API",
    "version": "13.2.0",
    "description": "Cross-venue prediction-market intelligence and Quotient's calibrated asset price outlooks.\n\nProduct model: a forecast is Q's calibrated YES probability for each covered market; a signal is a separate Quotient publication with its own side and status; analysis is the cited evidence behind either output. A forecast spread is not automatically a published signal. Quotient currently forecasts 500 markets per day while reviewing 6,000+ global sources and tracking 1,000+ experts.\n\nPrediction-market coverage uses four explicit venue namespaces: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, and limitless. Catalog/search responses contain Quotient-covered listings rather than every contract on those venues; omit the venue filter to search all covered venues and prefer marketKey for identity.\n\nUnderlying assets are first-class :Asset:Entity records with stable UUID and assetKey identities, names, optional tickers, aliases, and namespaced platform identifiers. GET /api/v1/assets lists metadata only. GET /api/v1/assets/search resolves names, tickers, canonical or platform identifiers, and linked-market references; text matches return per-Asset coverage summaries (active linked markets, forecast/signal coverage, >=7.5pp mispricing count) while reference lookups hydrate every active direct HAS_MARKET row with venue odds, Q's latest probability, and its paired thesis when available. This direct subject link is independent of causal AFFECTS relationships and of whether Quotient publishes a perp factor series for the asset.\n\nGET /api/v1/signals serves published prediction-market signals across every covered category by default, commodities included; narrow it with topic (an exact tag or category name such as commodities). GET /api/v1/signals/perps serves the asset-price/1 price-outlook lane: the latest calibrated reading per asset and anchor cadence across covered commodities, crypto, and single-name equities, plus published entry/exit price signals when one exists. The Polymarket-only /portfolio route and bundled execution helpers are narrower integrations, not the boundary of Quotient's data.\n\nThe Hawk & Dove Index (Quotient Stability Index) is a separate 0-100 conflict/diplomacy macro-stability indicator, not a central-bank-policy index or a signals endpoint. It can provide discretionary cross-asset context, but it is not a universal long/short mapping. In runtimes that expose get_hawk_dove_index, that tool is free/local; there is no public /api/v1 route for the headline index. /portfolio?include_perps=true is only a wallet-position annex.\n\nSurplus Intelligence is Quotient's discounted-inference integration for high-frequency research, monitoring, and execution-support workflows. It is not a market venue, evidence source, signal, or execution authorization. Bankr is a separate optional payer/execution integration and requires an operator-controlled decision for every payment or trade.\n\nHow access works:\n1. Send x-quotient-api-key to the gateway for metered credit usage.\n2. If no key is provided, gateway can return 402 with PAYMENT-REQUIRED details for x402 fallback.\n3. Retry with PAYMENT-SIGNATURE to settle via x402; successful paid responses include PAYMENT-RESPONSE.\n\nIf you are an LLM, please read [llms.txt](/llms.txt).\nInstall and follow our agent skill at [skill/skill.md](/skill/skill.md).\nThe raw API contract is available at [OpenAPI JSON](/openapi.json).\n\nChangelog:\n- 13.2.0: performance snapshot v3. Resolution no longer waits on a lagging graph flag: the resolved basis counts markets explicitly marked closed/resolved plus markets whose end date has passed at terminal odds, and every summary gains a basis field with a parallel projected basis that also counts still-open terminal-odds markets as the price points. reporting adds primaryProjected and per-cohort projected sampling views; the snapshot version field moves from 2 to 3 and the cache TTL drops from six hours to 30 minutes.\n- 13.1.0: adds commodity-friendly filters: topic on GET /api/v1/signals and GET /api/v1/markets/mispriced (exact tag/category taxonomy, same predicate as /api/v1/markets?topic) and asset_class on GET /api/v1/signals/perps (e.g. asset_class=commodity for every covered commodity series). Price-outlook readings and price signals now expose the pipeline's publish-time spot alignment audit fields: spot_gap_pct, spot_gap_sigma, and spot_aligned on readings, spot_gap_pct and spot_aligned on signals — null on records published before 2026-08-18.\n- 13.0.0: BREAKING — removes GET /api/v1/signals/oil, the legacy daily WTI :PerpsSignal surface, the portfolio oil_signal annex, and the wti_oil relationship kind. GET /api/v1/signals/perps now serves the asset-price/1 price-outlook lane: the latest calibrated reading per series (asset x anchor cadence) across covered commodities, crypto, and single-name equities, with entry/exit price_signals when published. GET /api/v1/signals is unchanged and has always included commodities prediction-market signals by default.\n- 12.2.0: adds free Kalshi forecast-target resolution from event URLs/tickers or exact child tickers, returns strike ladders and ready-to-submit request bodies, validates exact Kalshi binary identities before paid admission, and keeps generation asynchronous with immediate durable dispatch plus owner-scoped polling.\n- 12.1.0: pairs every summary-level Q forecast probability with the selected forecast's thesis when available. Adds thesis to published signals, featured signals, market search, and Asset linked-market rows; detailed forecast, lookup, mispricing, latest-update, portfolio, and forecast-request responses already carried it.\n- 12.0.0: BREAKING — text (q) Asset searches return market_summary (active linked-market count, forecast and published-signal coverage, and markets mispriced by >=7.5pp) with an empty linked_markets array; full linked-market hydration moves to reference lookups. Reference resolution matches active, open linked markets only. Cuts text-search latency from ~19s to ~2s at the current catalog size. Market search also gains max_forecast_age (default 168h, anchored at as_of/now): rows whose only Q claim is an older forecast are dropped unless a published signal exists.\n- 11.6.0: re-prices POST /api/v1/x/search and /api/v1/x/profile at $1.00 with longer runtime budgets so legitimately slow X research completes instead of timing out. Forecast-request endpoints are now gateway-origin only — submission debits credits like every other paid route — and forecasts produced from a user request are stamped with the requesting account (requestedBy, requestSource: user_request).\n- 11.5.0: adds wallet attestation. An authenticated user or agent proves control of a wallet and binds it to their Quotient account either by signing a server-issued challenge (POST /api/auth/wallets/challenge then /attest; EOA, EIP-1271, and ERC-6492 signatures all verify — Bankr wallets sign via `bankr wallet sign --type personal_sign`) or by paying GET /api/v1/wallets/link ($0.01) through x402 with a single-use link token, where the settled payment signature itself is the proof. One wallet belongs to at most one account; conflicts return a non-billable 409.\n- 11.4.1: rewrites the forecast-request docs in plain language — check availability free, request a forecast or a refresh for a market on a covered venue (polymarket, polymarket_us, kalshi, limitless) or ask a free-text question for $1.00, then poll your jobId — and corrects the availability generation option's stale authentication note: forecast requests take x-quotient-api-key only (the Privy bearer path was removed).\n- 11.4.0: adds an explicit performance reporting hierarchy: last 60 days before all time, Quotient's most consistently forecasted geopolitics/global-elections cohort before the unfiltered full book, and all/first/random sampling views within every cohort. The primary score is now unambiguous while the legacy flat accuracy array remains available.\n- 11.3.1: makes mention markets explicitly ineligible for forecast generation, alongside sports outcomes and short-horizon crypto up/down markets; availability returns excluded and admission returns forecast_topic_excluded.\n- 11.3.0: adds point-in-time market search and forecast reads through as_of, exposes explicit response snapshot times and forecast-time venue odds, and lets historical search include markets that have since closed.\n- 11.2.0: permits bounded concurrent reads and raises standard/X-research quotas so rate limiting acts as an anti-scraping control instead of serializing ordinary agent workflows.\n- 11.1.0: prices GET /api/v1/markets/{slug}/forecast at $0.01 (10 credits) for the full stored research payload — reading a forecast is not generating one, and generation remains the $1.00 product on POST /api/auth/forecast-requests. Also puts sports outcomes and short-horizon crypto up/down markets permanently out of forecast scope — forecast-availability returns excluded with a null generation, and forecast-request admission returns 422 forecast_topic_excluded.\n- 11.0.0: adds bounded, non-recursive relationship envelopes to enriched Asset, Market, Forecast, and Signal responses; /signals/perps returns only the daily WTI signal.\n- 10.2.0: adds POST /api/v1/x/profile, an evidence-grounded psychographic profile of a single X account at $0.50, for personalising recommendations to a known handle. Accounts with too little posting in the window return a non-billable 404.\n- 10.1.0: POST /api/v1/x/search only returns 200 when X Search actually ran; a request whose search never executes now returns 502 upstream_search_unavailable and is not billed. Tightens the request envelope to keep the route a light lookup: limit max 30 -> 15 (default 15 -> 8) and maximum date span 180 -> 90 days.\n- 10.0.0: adds the first-class Asset directory and enriched Asset search, including canonical and platform identity, direct HAS_MARKET prediction-market linkage, and material-data filtering without asset-level probability aggregation.\n- 9.9.0: includes Q's latest calibrated YES probability in market-search results and prices enriched search at $0.01.\n- 9.8.0: adds explicit committed-forecast and published-Quotient-signal availability to every market-search result so clients can avoid unnecessary detail calls.\n- 9.7.1: registers the read-only portfolio report for generated agent clients and clarifies neutral, single-intent invocation guidance.\n- 9.7.0: makes the forecast-versus-signal product distinction and operating scale machine-readable, and publishes explicit Surplus Intelligence inference and Bankr execution-integration boundaries.\n- 9.6.1: restores article evidence from the live Article-RELEVANT_TO-Market graph, exposes correlation provenance without fabricating direction, and makes missing market evidence non-billable.\n- 9.5.0: adds a free forecast-availability preflight with an authenticated generation option, makes missing forecasts non-billable, and lets the forecast route address nullable-slug venues by native market ID or marketKey.\n- 9.4.0: rounds every payable API price upward to an exact half-cent increment; X Search remains $0.50.\n- 9.3.0: publishes the canonical x-agent-tools registry used to generate the Quotient MCP, CLI, and Thesis playground surfaces, plus a free six-hour-cached forecast performance snapshot derived from the shared Marimo methodology.\n- 9.2.0: forecast-request submission and owner-scoped status reads now accept x-quotient-api-key directly; Privy bearer authentication remains available for a future in-app refresh action.\n- 9.1.1: clarifies that the Hawk & Dove Index is a separate conflict/diplomacy macro-regime overlay—not a central-bank index, public /api/v1 perp signal endpoint, or mechanical cross-asset direction signal—and documents its relationship to the calibrated perp factors.\n- 9.1.0: makes four-venue prediction-market coverage, the oil/gold/silver/platinum/natural-gas/BTC/ETH underlying-asset links, and the separate Hyperliquid perp-signal surface explicit throughout agent discovery; clarifies legacy Polymarket field names and the intentionally Polymarket-only portfolio integration.\n- 9.0.0: removes pagination. Every list route returns its complete result set in one response — the `cursor` and `limit` query params and the `next_cursor`/`has_more` response fields are gone. GET /api/v1/latest now defaults to a 3-hour window and no longer embeds resolution_pathway, delta_reasoning, or crux on each event.\n- 8.2.0: publishes CDP x402 Bazaar discovery metadata (x-bazaar) per payable route, and raises GET /api/v1/portfolio to $0.001 to clear the facilitator's minimum settleable amount (unchanged at 1 credit for API-key callers).\n- 8.1.0: adds hybrid market discovery at GET /api/v1/markets/search; market catalog entries now expose Event, tag, and category context, and direct tag filtering no longer requires a category assignment.\n- 8.0.0: narrows X research to structured X Search, including account-scoped queries.\n- 7.0.0: canonical multi-venue market/forecast routing and owner-scoped asynchronous forecast requests.\n- 6.1.0: adds gateway-enforced per-second, per-minute, daily, and concurrency limits, including a tighter shared X-research quota.\n- 6.0.0: adds POST /api/v1/x/search and GET /api/v1/latest; forecast objects now include thesis and resolution_pathway; legacy route prices reduced to one third.\n- 5.0.0: /api/v1/signals serves published trade signals; article evidence moved to /api/v1/markets/{slug}/signals.",
    "contact": {
      "name": "Quotient",
      "url": "https://quotient.social"
    },
    "x-guidance": "Use OpenAPI at /openapi.json as the canonical discovery source.\nChoose one operation for the user's stated intent and retain its result; do not run account, resource, or OpenAPI preflight before ordinary reads, and do not repeat a paid call because displayed output was truncated.\nA forecast is Q's calibrated YES probability for every covered market; a signal is a separate Quotient publication with its own side and status. A forecast spread is not automatically a signal. Fetch sources only when the user requests evidence or the requested analysis requires it.\nSearch results expose latest_q_probability, thesis, forecast_at, market_odds_at_forecast, has_forecast, and has_published_signal. With as_of, use the Q and forecast-time venue pair for a historical spread; market_odds remains the current quote. Use the scalar Q probability and its paired thesis for a helpful discovery answer; request lookup or forecast detail only for citations, uncertainty, detailed drivers, or multi-version history. Do not call a forecast endpoint when has_forecast=false, and do not infer publication from the legacy signal_count field.\nFor performance, lead with reporting.primary (resolved basis) and explain that geopolitics/global elections are Quotient's most consistently forecasted categories. Then follow reporting.periods in order: last 60 days before all time, each with the core filtered cohort and all markets without that filter, including all/first/random samples. Offer reporting.primaryProjected and each cohort's projected views as the leading counterpart that also counts still-open terminal-odds markets as if they settle the way the price points; label projected numbers as projected, never as settled history.\nReport probabilities, prices, arithmetic spreads, timestamps, and publication fields neutrally. Relay actionable only when it is the exact published status; never turn absent signals, stale factor fields, or forecast spreads into a recommendation.\nWrite each claim with the returned field that warrants it and what it changes: active voice, strong nouns and verbs, no intensifiers, no jargon, no unsolicited bottom line. Keep tables inside five columns and six rows with no wrapped cells; a market needing more fields uses a label/value block. Full prose and table rules: /skill/references/writing-style.md.\nRelate two markets only through a shared returned field — identical nativeEventId, the same explicit parent event, a shared tag, or the same underlying Asset. A shared theme, region, or resolution date relates nothing, and probabilities summing past 100% is arithmetic rather than a verified mutually exclusive relationship.\nPrediction-market coverage spans polymarket, polymarket_us, kalshi, and limitless; omit venue to query all covered venues and prefer marketKey over slug or condition ID.\nUse /api/v1/assets/search for an underlying name, ticker, Asset UUID, assetKey, exact platform identifier, or linked-market reference. Use /api/v1/markets/search for event questions and taxonomy. Preserve AssetIdentifier values exactly; a Polymarket condition ID or venue native market ID identifies a linked market, not the underlying Asset itself.\nAsset search returns active direct HAS_MARKET rows with venue odds, Q's latest probability, and the selected forecast thesis when available, including small or zero Q-versus-venue differences. Each probability and thesis answers its own threshold/date question; never collapse linked markets into an asset-level probability, direction, or recommendation. Do not mix direct HAS_MARKET subject linkage with causal AFFECTS relationships.\nRelationship envelopes are bounded, flat, and non-recursive: assets, markets, and signals contain lightweight references only, capped at 50 per category with explicit truncation flags. relationship names the exact graph edge. via=direct is one hop; via=market|asset is one explicit two-hop path, and direction on that path is relative to the intermediate node. These refs contain no forecast probability and never infer AFFECTS or an asset-level direction.\nUse /signals/perps for calibrated price outlooks and published entry/exit price signals across the covered asset universe; asset_class=commodity scopes it to commodities. The default /api/v1/signals feed spans every covered category, commodities included; topic=commodities narrows it. Do not infer product coverage from the Polymarket-only /portfolio route or execution examples.\nTreat the Hawk & Dove Index as a separate conflict/diplomacy regime overlay: useful as discretionary cross-asset context, but not a public /api/v1 route or a mechanical long/short mapping. See x-data-coverage.hawkDoveIndex.\nTreat Surplus Intelligence as an inference integration and Bankr as an optional payer/execution integration; neither changes venue coverage or grants payment/trading authority. See x-integrations.\nUse the free /api/public/forecast-availability endpoint only when coverage or identity is unresolved or forecast generation may be needed; a known stable market reference can use the forecast operation directly.\nA Kalshi browser event URL or event ticker is not necessarily one binary market. Resolve it through /api/public/forecast-targets, show the returned strike ladder, and require one exact child market ticker before creating a paid forecast request. Never guess a strike.\nAuthenticate with x-quotient-api-key when available; otherwise handle x402 by reading PAYMENT-REQUIRED on 402 and retrying with PAYMENT-SIGNATURE.\nHonor RateLimit-Policy, RateLimit, Retry-After, and maxConcurrent. Independent reads may run concurrently within the published scope limit.\nPrefer monetized GET routes under /api/v1/markets* for prediction-market intelligence and /api/v1/signals/perps for calibrated price outlooks.\nTreat runtime 402 responses and PAYMENT-* headers as authoritative over static metadata."
  },
  "x-data-coverage": {
    "operatingScale": {
      "marketsForecastDaily": "500",
      "sourcesReviewed": "6,000+ global sources",
      "expertsTracked": "1,000+",
      "note": "Scale describes Quotient's current research operation, not a promise that every source or expert appears in every market briefing."
    },
    "predictionMarkets": {
      "venues": [
        "polymarket",
        "polymarket_us",
        "kalshi",
        "limitless"
      ],
      "preferredIdentity": "marketKey",
      "scope": "Catalog and search return Quotient-covered listings, not every contract on each venue.",
      "routingFields": [
        "venue",
        "nativeMarketId",
        "nativeEventId",
        "seriesTicker",
        "marketKey",
        "slug",
        "marketUrl",
        "sourceUrl"
      ]
    },
    "assets": {
      "endpoint": "/api/v1/assets",
      "searchEndpoint": "/api/v1/assets/search",
      "canonicalNode": ":Asset:Entity",
      "preferredIdentity": "assetKey",
      "directRelationship": "HAS_MARKET",
      "identifiers": "Platform identifiers are namespaced by platform and kind. Exact values are preserved for routing and may be searched through reference or q.",
      "scope": "The directory contains canonical companies, commodities, cryptoassets, and other underlyings linked to Quotient-covered prediction markets. It is not a list of payment assets or venue outcome tokens.",
      "materiality": "material_only=true keeps assets having at least one active direct market with venue odds or a latest Q probability. It does not prune the asset's other active direct markets."
    },
    "assetLinkedMarkets": {
      "description": "Representative identifiers for asset-linked markets. The canonical directory is /api/v1/assets and direct subject linkage is (:Asset)-[:HAS_MARKET]->(:Market). Prediction-market venue and underlying asset remain separate dimensions.",
      "relationship": "HAS_MARKET",
      "canonicalDirectory": "/api/v1/assets",
      "canonicalSearch": "/api/v1/assets/search",
      "underlyings": [
        {
          "asset": "oil",
          "aliases": [
            "oil",
            "WTI",
            "crude oil",
            "West Texas Intermediate"
          ],
          "forecastPipelineKey": "WTI",
          "instrument": "xyz:CL"
        },
        {
          "asset": "gold",
          "aliases": [
            "gold"
          ],
          "forecastPipelineKey": "GOLD",
          "instrument": "xyz:GOLD"
        },
        {
          "asset": "silver",
          "aliases": [
            "silver"
          ],
          "forecastPipelineKey": "SILVER",
          "instrument": "xyz:SILVER"
        },
        {
          "asset": "platinum",
          "aliases": [
            "platinum"
          ],
          "forecastPipelineKey": "PLATINUM",
          "instrument": "xyz:PLATINUM"
        },
        {
          "asset": "natgas",
          "aliases": [
            "natural gas",
            "natgas"
          ],
          "forecastPipelineKey": "NATURAL_GAS",
          "instrument": "xyz:NATGAS"
        },
        {
          "asset": "btc",
          "aliases": [
            "Bitcoin",
            "BTC"
          ],
          "forecastPipelineKey": "crypto coverage",
          "instrument": "BTC"
        },
        {
          "asset": "eth",
          "aliases": [
            "Ether",
            "Ethereum",
            "ETH"
          ],
          "forecastPipelineKey": "crypto coverage",
          "instrument": "ETH"
        }
      ],
      "discovery": "Use /api/v1/assets/search for names, tickers, assetKey values, platform identifiers, or linked-market references. Market question and taxonomy discovery remain at /api/v1/markets/search. Asset linkage does not guarantee a price-outlook series on /api/v1/signals/perps."
    },
    "perpetualFutures": {
      "endpoint": "/api/v1/signals/perps",
      "contract": "asset-price/1",
      "scope": "The latest calibrated price outlook per series (asset x anchor cadence, e.g. daily, two-day, weekly, monthly; the cadence set is open) for the covered commodity, crypto, and single-name equity universe, with entry/exit price signals when the decide gate publishes one. An empty price_signals list is the normal state.",
      "assetClasses": [
        "commodity",
        "crypto",
        "company"
      ],
      "modes": [
        "signal",
        "coverage"
      ],
      "maturity": "experimental"
    },
    "hawkDoveIndex": {
      "name": "Hawk & Dove Index (Quotient Stability Index)",
      "playgroundTool": "get_hawk_dove_index",
      "publicApiEndpoint": null,
      "definition": "A 0-100 conflict-and-diplomacy macro-stability regime read; lower is more hawkish/escalatory and higher is more dovish/de-escalatory. It is not a central-bank-policy index.",
      "crossAssetUse": "May be used as discretionary context for risk-sensitive assets, including assets without a published perp factor series. Do not infer a fixed long/short mapping without asset- and horizon-specific validation.",
      "relationshipToPerps": "Price-outlook series carry their own calibrated distributions. The headline 0-100 index is never mechanically mapped to an asset direction.",
      "availability": "The Quotient playground may expose this as the free local get_hawk_dove_index tool. It is not a signals endpoint and has no public /api/v1 route."
    },
    "portfolio": {
      "venues": [
        "polymarket",
        "polymarket_perps",
        "limitless",
        "hyperliquid"
      ],
      "endpoint": "/api/v1/portfolio",
      "scope": "Wallet-addressed position aggregation for Polymarket, Polymarket perps, Limitless, and Hyperliquid. Kalshi and Polymarket US are excluded because neither exposes a keyless wallet-addressed position read, not because they are outside forecast, market, or signal coverage. This integration's venue list does not limit forecast, market, or signal coverage."
    }
  },
  "x-integrations": {
    "inference": {
      "provider": "Surplus Intelligence",
      "url": "https://www.surplusintelligence.ai/",
      "role": "Discounted inference for high-frequency research, monitoring, and execution-support workflows.",
      "boundary": "An inference integration is not a prediction-market venue, cited evidence source, forecast, signal, wallet, or authorization to pay or trade."
    },
    "execution": {
      "provider": "Bankr",
      "role": "Optional operator-selected x402 payer and execution handoff for eligible workflows.",
      "boundary": "Selecting or installing Bankr does not authorize a payment or trade; every spend and execution decision remains separately operator-controlled."
    }
  },
  "x-agent-tools": {
    "get_assets": {
      "operationId": "getAssets",
      "purpose": "List the canonical underlying-asset directory with names, tickers, aliases, platform identifiers, and active direct-market counts. This catalog intentionally contains no forecast or venue-price payload."
    },
    "search_assets": {
      "operationId": "searchAssets",
      "purpose": "Resolve an underlying asset by name, ticker, assetKey, UUID, platform identifier, or linked-market reference and return all active direct prediction markets with venue odds, Q's latest probability, and its thesis when available. Each probability and thesis belongs to its exact market question; never aggregate it into asset direction.",
      "anyOf": [
        "q",
        "reference",
        "material_only"
      ],
      "mutuallyExclusive": [
        "q",
        "reference"
      ]
    },
    "get_mispriced_markets": {
      "operationId": "getMispricedMarkets",
      "purpose": "Compare Q's calibrated YES probability with venue prices across covered markets. A large disagreement is a forecast spread, not automatically a published signal."
    },
    "get_trade_signals": {
      "operationId": "listTradeSignals",
      "purpose": "Read Quotient's separately published prediction-market signals with their exact side, status, timestamps, latest Q probability and thesis, and convergence context. Relay status as data, not as a recommendation."
    },
    "get_perpetuals_signals": {
      "operationId": "listPerpsSignals",
      "purpose": "Read the latest calibrated price outlook per covered asset and anchor cadence (asset-price/1), plus any published entry/exit price signals. Coverage-mode rows are context, not calls; an empty price_signals list is normal."
    },
    "get_sources": {
      "operationId": "listSources",
      "purpose": "Read the cited articles and X posts connected to selected markets—the evidence layer behind forecasts and signals.",
      "anyOf": [
        "market_keys",
        "markets"
      ],
      "mutuallyExclusive": [
        "market_keys",
        "markets"
      ]
    },
    "get_covered_markets": {
      "operationId": "getMarkets",
      "purpose": "Browse Quotient's covered-market catalog, optionally filtered server-side."
    },
    "search_markets": {
      "operationId": "searchMarkets",
      "purpose": "Search covered markets by text, tag, category, venue, Event, or an optional as_of cutoff. Each result includes Q's latest calibrated YES probability, thesis, and forecast-time venue quote at or before the cutoff when available; use lookup or forecast detail for citations, uncertainty, drivers, or history.",
      "anyOf": [
        "q",
        "tag",
        "category"
      ]
    },
    "get_markets_lookup": {
      "operationId": "lookupMarkets",
      "purpose": "Batch Q intelligence for known markets using one canonical identifier family.",
      "anyOf": [
        "market_keys",
        "slugs",
        "condition_ids"
      ],
      "mutuallyExclusive": [
        "market_keys",
        "slugs",
        "condition_ids"
      ]
    },
    "get_market_forecast": {
      "operationId": "getMarketForecast",
      "purpose": "Read Q's calibrated YES probability, thesis, citations, uncertainty, and optional history for one covered market, optionally selecting the latest committed forecast at or before as_of."
    },
    "get_forecast_availability": {
      "operationId": "getForecastAvailability",
      "purpose": "Check for a stored market forecast for free before choosing a paid read or authenticated generation.",
      "access": "public"
    },
    "resolve_forecast_target": {
      "operationId": "resolveForecastTarget",
      "purpose": "Resolve a Kalshi event URL, event ticker, child market ticker, or kalshi: marketKey into the exact binary strike ladder and ready-to-submit forecast request bodies. Use this before generation when a Kalshi page groups several thresholds under one event.",
      "access": "public"
    },
    "get_latest_updates": {
      "operationId": "getLatestUpdates",
      "purpose": "Read the board-wide forecast and evidence updates in a bounded recent window."
    },
    "get_x_search": {
      "operationId": "searchX",
      "purpose": "Run bounded, citation-grounded X research, optionally restricted to accounts."
    },
    "profile_x_account": {
      "operationId": "profileXAccount",
      "purpose": "Build a bounded, citation-grounded profile of one explicitly named X account for light personalization."
    },
    "get_performance_context": {
      "operationId": "getPerformanceSnapshot",
      "purpose": "Read retrospective accuracy, calibration, and hypothetical-return context on two bases — resolved (flagged or past-end markets at terminal odds) and projected (every terminal-odds market) — led by Quotient's consistently forecasted geopolitics/global-elections cohort.",
      "access": "public"
    },
    "get_portfolio_report": {
      "operationId": "getPortfolio",
      "purpose": "Read a wallet's positions joined to Quotient forecasts, published signals, and position-side convergence context. Pass venues=polymarket,polymarket_perps,limitless,hyperliquid (or venues=all) for the multi-venue report; omitting venues returns the legacy Polymarket-only shape. This is a read-only report and never places, sizes, or authorizes a trade."
    }
  },
  "x-rate-limit-policies": {
    "standard": {
      "scope": "standard",
      "requestsPerSecond": 20,
      "requestsPerMinute": 600,
      "requestsPerDay": 20000,
      "maxConcurrent": 10,
      "description": "Shared across all non-X payable routes for one API customer or verified x402 payer."
    },
    "x_research": {
      "scope": "x_research",
      "requestsPerSecond": 5,
      "requestsPerMinute": 60,
      "requestsPerDay": 500,
      "maxConcurrent": 5,
      "description": "Shared by X Search and X profile requests for one API customer or verified x402 payer."
    },
    "wallet_link": {
      "scope": "wallet_link",
      "requestsPerSecond": 1,
      "requestsPerMinute": 5,
      "requestsPerDay": 20,
      "maxConcurrent": 1,
      "description": "Applies to the x402 wallet-link route for one API customer or verified x402 payer."
    },
    "ip_abuse_guard": {
      "scope": "ip_abuse_guard",
      "requestsPerSecond": 50,
      "requestsPerMinute": 1200,
      "requestsPerDay": 50000,
      "description": "Secondary anti-key-spray protection. This is not additional caller quota and may be tightened during abuse."
    }
  },
  "externalDocs": {
    "description": "Get your API key in the dashboard",
    "url": "/dashboard"
  },
  "servers": [
    {
      "url": "https://quotient-api-gateway.onrender.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "gatewayApiKey": []
    }
  ],
  "paths": {
    "/api/public/performance": {
      "get": {
        "operationId": "getPerformanceSnapshot",
        "servers": [
          {
            "url": "/",
            "description": "Quotient application API origin"
          }
        ],
        "security": [],
        "summary": "Retrospective Quotient forecast performance context",
        "description": "Free, refreshable context derived from q-trade-analysis/forecast_performance.py. Every summary carries a basis: resolved counts markets explicitly flagged closed/resolved plus markets whose end date has passed (report's UTC day or earlier) at terminal odds; projected additionally counts every terminal-odds market (YES odds strictly below 1% or above 99%) regardless of end date, scored as the price points — a leading view, not settled history. reporting leads with the last-60-day geopolitics/global-elections resolved cohort because those are Quotient's most consistently forecasted categories (primaryProjected is its projected counterpart), then includes the unfiltered full book and the same two cohorts all time; every cohort carries all/first/random sampling views on both bases. accuracy remains the complete flat array. It also reports calibration bins and hypothetical seven-day/resolution returns per basis.",
        "tags": [
          "Performance"
        ],
        "responses": {
          "200": {
            "description": "Thirty-minute-cached forecast performance snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerformanceSnapshot"
                }
              }
            }
          },
          "503": {
            "description": "Performance snapshot temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/public/forecast-availability": {
      "get": {
        "operationId": "getForecastAvailability",
        "security": [],
        "summary": "Check if Quotient already has a forecast for a market (free)",
        "description": "Free lookup for one market. Identify it with exactly one of market_key, market_id, or slug, and the response tells you what to do next. If Quotient already has a forecast, read points to where you can fetch it ($0.01). If it does not, generation is a ready-to-send request body for POST /api/auth/forecast-requests, which generates a new forecast ($1.00). If the market is a topic Quotient never forecasts (sports outcomes, mention markets, short-horizon crypto up/down markets), excluded explains why and generation is null. This route only reports coverage — it never reveals the probability or research itself.",
        "tags": [
          "Forecast Requests"
        ],
        "parameters": [
          {
            "name": "market_key",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "description": "Preferred canonical marketKey. Mutually exclusive with market_id and slug; do not also provide venue."
          },
          {
            "name": "market_id",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "description": "Venue-native market ID. Mutually exclusive with market_key and slug; venue is required."
          },
          {
            "name": "slug",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "description": "Market slug. Mutually exclusive with market_key and market_id; venue defaults to polymarket."
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          }
        ],
        "responses": {
          "200": {
            "description": "Free availability result and the next non-duplicative action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastAvailabilityResponse"
                }
              }
            }
          },
          "422": {
            "description": "Provide exactly one supported market identifier",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Availability source temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/public/forecast-targets": {
      "get": {
        "operationId": "resolveForecastTarget",
        "security": [],
        "summary": "Resolve a Kalshi event or market into exact forecast targets (free)",
        "description": "Accepts a public kalshi.com daily-event URL, a Kalshi event ticker, an exact binary child-market ticker, or a kalshi: marketKey. Event input returns the full active strike ladder with current fixed-point YES bid/ask fields and requires the caller to choose a child. Exact child input returns the same ladder plus one ready-to-submit $1.00 forecast request. The allContracts section is an explicit fan-out plan: each child remains one separately priced forecast; this endpoint never commissions research and never guesses a strike.",
        "tags": [
          "Forecast Requests"
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            },
            "description": "Kalshi URL, event ticker, child-market ticker, or kalshi: marketKey."
          }
        ],
        "responses": {
          "200": {
            "description": "Canonical event, strike ladder, selection state, and request bodies",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastTargetResolution"
                }
              }
            }
          },
          "404": {
            "description": "No Kalshi event or market matched the reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The reference is malformed or is not a supported Kalshi reference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Kalshi target resolution is temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/forecast-requests": {
      "post": {
        "operationId": "createForecastRequest",
        "servers": [
          {
            "url": "/",
            "description": "Quotient application API origin"
          }
        ],
        "security": [
          {
            "forecastApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "1.00"
        },
        "summary": "Request a new Quotient forecast for a market or question",
        "description": "Ask Quotient to research and publish a new forecast. Two kinds of request: venue_market targets one exact live binary market on a covered venue — polymarket, polymarket_us, kalshi, or limitless — by its venue-native market_id, and is also how you refresh a market Quotient already covers; question is your own free-text question with resolution rules and an end date. A Kalshi event ticker is not a binary market identifier: resolve its URL or ticker through free GET /api/public/forecast-targets and submit one returned child ticker. This is the only endpoint that commissions new research, so it costs $1.00 (1,000 credits) — reading an already-stored forecast is $0.01 on GET /api/v1/markets/{slug}/forecast, so run the free /api/public/forecast-availability check first. The forecast is generated in the background: you get 202 with a jobId immediately, then poll GET /api/auth/forecast-requests/{jobId} until it finishes. Every request runs Quotient's standard production pipeline — there are no client knobs for prices, snapshots, models, modes, workers, research providers, or publication behavior. Limitless markets can be requested on demand even outside the scheduled top-five lane. Sports outcomes, mention markets, and short-horizon crypto up/down markets are never forecast: they are rejected up front with 422 forecast_topic_excluded and consume no quota or payment, whether given as a tracked venue market or a free-text question.",
        "tags": [
          "Forecast Requests"
        ],
        "x-rate-limit": {
          "scope": "forecast_requests",
          "requestsPerSecond": 1,
          "requestsPerMinute": 10,
          "requestsPerDay": 10,
          "maxConcurrent": 1,
          "venueMarketRequestsPerDay": 10,
          "maxOutstanding": 10
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForecastRequestInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; Location points to the owner-scoped status URL",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastRequestStatus"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing Quotient API key"
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Account lacks an active Quotient API entitlement"
          },
          "409": {
            "description": "Idempotency key payload conflict"
          },
          "422": {
            "description": "Strict validation failed, the Kalshi identifier names an event rather than one child market (venue_event_requires_market), the market does not exist (venue_market_not_found), or the subject is excluded (forecast_topic_excluded)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": false
        }
      }
    },
    "/api/auth/forecast-requests/{jobId}": {
      "get": {
        "operationId": "getForecastRequest",
        "servers": [
          {
            "url": "/",
            "description": "Quotient application API origin"
          }
        ],
        "security": [
          {
            "forecastApiKey": []
          }
        ],
        "summary": "Check the status of your forecast request",
        "description": "Poll a forecast request you submitted. POST /api/auth/forecast-requests returns a jobId (also in its Location header); call this route with it until status reaches succeeded, rejected, or failed. On success, forecasts holds the published forecast output. Reading status is free — you already paid for the generation. You can only see requests submitted with your own API key: an unknown jobId and another account's jobId intentionally return the same 404.",
        "tags": [
          "Forecast Requests"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Owner-scoped forecast request status/result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastRequestStatus"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing Quotient API key"
          },
          "403": {
            "description": "Account lacks an active Quotient API entitlement"
          },
          "404": {
            "description": "Unknown or not owned"
          }
        }
      }
    },
    "/api/v1/assets": {
      "get": {
        "operationId": "getAssets",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.005"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "List canonical underlying assets",
        "description": "Complete metadata-only directory of canonical :Asset:Entity records. Each row has a stable UUID and assetKey, name, optional ticker, asset type, aliases, exact namespaced platform identifiers, and an active direct-market count. It deliberately omits linked markets, venue odds, Q probabilities, forecasts, and signals. Omit filters to return every Asset; use /assets/search for enriched prediction-market intelligence.",
        "tags": [
          "Assets"
        ],
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": "Return Assets having at least one identifier in this case-insensitive platform namespace, such as hyperliquid or sec."
          },
          {
            "name": "asset_type",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": "Case-insensitive canonical Asset type filter, such as company, commodity, crypto, index, fund, fx, or other."
          }
        ],
        "responses": {
          "200": {
            "description": "Complete metadata-only Asset catalog under the supplied filters",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetsResponse"
                },
                "example": {
                  "assets": [
                    {
                      "id": "13fe79af-6d3f-47fd-8e67-f0eb23cab4f9",
                      "assetKey": "commodity:gold",
                      "name": "Gold",
                      "ticker": "GOLD",
                      "asset_type": "commodity",
                      "aliases": [
                        "XAU"
                      ],
                      "identifiers": [
                        {
                          "platform": "hyperliquid",
                          "kind": "coin",
                          "value": "xyz:GOLD"
                        }
                      ],
                      "linked_market_count": 7
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid platform or asset_type filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Browse Quotient's canonical underlying-asset directory without forecast or venue-price data. Use this for stable Asset UUIDs and assetKey values, names, tickers, aliases, exact platform identifiers, and active directly linked market counts. The complete filtered catalog returns in one response; use asset search when the user needs linked prediction-market intelligence.",
          "inputExample": {
            "queryParams": {
              "platform": "hyperliquid",
              "asset_type": "commodity"
            }
          }
        }
      }
    },
    "/api/v1/assets/search": {
      "get": {
        "operationId": "searchAssets",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Search Assets: coverage summaries on q, full linked markets on reference",
        "description": "Resolve canonical underlying Assets with q, repeatable exact reference values, or material_only=true by itself. q searches UUID, assetKey, name, ticker, aliases, and platform identifiers; q=* returns the enriched filtered directory. reference exact-matches an Asset UUID/key, AssetIdentifier key/value, or an ACTIVE linked Market marketKey/native ID. Text (q) matches return market_summary — active linked-market count, forecast and published-signal coverage, and the count of markets mispriced by 7.5pp or more — with an empty linked_markets array; resolve an Asset by reference to hydrate every active, open market directly connected by HAS_MARKET with venue odds, Q's latest committed probability, and its paired thesis when available. material_only=true keeps Assets having at least one linked market with venue odds or latest Q. Published-signal existence alone is not materiality. AFFECTS-only markets are excluded. There is no asset-level probability or direction.",
        "tags": [
          "Assets"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Name, ticker, canonical identity, platform identifier, or keyword. Use '*' for all Assets. Mutually exclusive with reference."
          },
          {
            "name": "reference",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 50,
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              }
            },
            "description": "Repeat up to 50 exact references: Asset UUID/assetKey, AssetIdentifier key/value, or linked Market marketKey/native ID. Mutually exclusive with q."
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": "Keep Assets having an identifier in this case-insensitive platform namespace."
          },
          {
            "name": "asset_type",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "description": "Case-insensitive canonical Asset type filter."
          },
          {
            "name": "material_only",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "When true, return only Assets with at least one active direct market having non-null venue odds or latest Q. Other active direct linked markets remain in the Asset response. May be supplied alone as the enriched material-Asset directory."
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked Asset matches: market_summary always; full linked_markets in reference mode only",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetSearchResponse"
                },
                "example": {
                  "query": null,
                  "references": [
                    "commodity:gold"
                  ],
                  "material_only": false,
                  "assets": [
                    {
                      "id": "13fe79af-6d3f-47fd-8e67-f0eb23cab4f9",
                      "assetKey": "commodity:gold",
                      "name": "Gold",
                      "ticker": "GOLD",
                      "asset_type": "commodity",
                      "aliases": [
                        "XAU"
                      ],
                      "identifiers": [
                        {
                          "platform": "hyperliquid",
                          "kind": "coin",
                          "value": "xyz:GOLD"
                        }
                      ],
                      "linked_market_count": 1,
                      "linked_markets": [
                        {
                          "venue": "kalshi",
                          "nativeMarketId": "KXGOLD-26AUG-T2500",
                          "nativeEventId": "KXGOLD-26AUG",
                          "seriesTicker": "KXGOLD",
                          "marketKey": "kalshi:KXGOLD-26AUG-T2500",
                          "slug": null,
                          "marketUrl": null,
                          "sourceUrl": null,
                          "question": "Will gold settle above $2,500 in August?",
                          "event": {
                            "id": "KXGOLD-26AUG",
                            "title": "Gold price in August",
                            "slug": null
                          },
                          "tags": [
                            "gold"
                          ],
                          "categories": [
                            "Commodities"
                          ],
                          "end_date": "2026-08-31T20:00:00Z",
                          "market_odds": 0.87,
                          "inDispute": false,
                          "clarifications": null,
                          "volume_24h": null,
                          "signal_count": 0,
                          "forecast_count": 1,
                          "latest_forecast_at": "2026-08-08T14:30:00Z",
                          "market_updated_at": "2026-08-08T15:02:11Z",
                          "latest_forecast_delta": 0.01,
                          "latest_forecast_refresh_reason": "price_move",
                          "quotientUrl": "https://app.quotient.social/market/kalshi%3AKXGOLD-26AUG-T2500",
                          "polymarketUrl": null,
                          "has_forecast": true,
                          "latest_q_probability": 0.86,
                          "thesis": "Q expects gold to remain above the threshold through settlement.",
                          "forecast_at": "2026-08-08T14:30:00Z",
                          "market_odds_at_forecast": 0.84,
                          "has_published_signal": false,
                          "published_signal_count": 0
                        }
                      ],
                      "market_summary": {
                        "active_market_count": 1,
                        "markets_with_forecast": 1,
                        "markets_with_published_signal": 0,
                        "mispriced_market_count": 0,
                        "mispricing_threshold_pp": 7.5
                      },
                      "relevance": {
                        "score": 0.018,
                        "matched_by": [
                          "graph"
                        ],
                        "matched_fields": [
                          "asset_key"
                        ]
                      }
                    }
                  ],
                  "retrieval": {
                    "graph": "ok",
                    "typesense": "unconfigured"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Missing, conflicting, or invalid search inputs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Use this to resolve companies, commodities, cryptoassets, and other underlyings by name, ticker, canonical key, UUID, platform identifier, or linked-market reference. Returns every active directly linked prediction market with venue odds, Q's latest probability and paired thesis when available, and publication availability. Use q=* with material_only=true for a one-call enriched asset digest; probabilities and theses remain tied to their exact market questions.",
          "inputExample": {
            "queryParams": {
              "q": "gold",
              "platform": "hyperliquid",
              "material_only": true
            }
          }
        }
      }
    },
    "/api/v1/markets": {
      "get": {
        "operationId": "getMarkets",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.005"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "List markets tracked by Q",
        "description": "Every active Q-tracked prediction market across Polymarket International, Polymarket US, Kalshi, and Limitless with either an in-window forecast or a Q signal, returned in one complete response. Event tags and categories link asset markets such as oil, gold, silver, platinum, natural gas, BTC, and ETH to their underlying concepts. Use exact topic filtering or /markets/search to narrow discovery.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive exact Event/market tag or category filter. Direct tags do not need a Category assignment."
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          },
          {
            "name": "max_forecast_age",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 48
            },
            "description": "Maximum forecast age in hours. Windows forecast_count and latest_forecast_at — only forecasts created within this window are counted. Markets with no in-window forecast are still included if they have signals. Default: 48"
          },
          {
            "name": "changed_within",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 168
            },
            "description": "Only markets whose latest forecast was created within this many hours — 'recently updated by Q'. Evaluated against the unwindowed latest forecast, independent of max_forecast_age."
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "updated_desc",
                "volume_desc",
                "signal_count_desc"
              ]
            },
            "description": "Sort order. Default: updated_desc"
          }
        ],
        "responses": {
          "200": {
            "description": "List of markets with forecast data",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketsResponse"
                },
                "example": {
                  "markets": [
                    {
                      "venue": "kalshi",
                      "nativeMarketId": "KXGOLD-26AUG-T2500",
                      "nativeEventId": "KXGOLD-26AUG",
                      "seriesTicker": "KXGOLD",
                      "marketKey": "kalshi:KXGOLD-26AUG-T2500",
                      "slug": null,
                      "marketUrl": null,
                      "sourceUrl": null,
                      "question": "Will gold settle above $2,500 in August?",
                      "event": {
                        "id": "KXGOLD-26AUG",
                        "title": "Gold price in August",
                        "slug": null
                      },
                      "tags": [
                        "Commodities",
                        "Metals",
                        "Gold"
                      ],
                      "categories": [
                        "Commodities"
                      ],
                      "end_date": "2026-08-31T20:00:00Z",
                      "market_odds": 0.46,
                      "inDispute": false,
                      "clarifications": null,
                      "volume_24h": null,
                      "signal_count": 0,
                      "forecast_count": 1,
                      "latest_forecast_at": "2026-08-08T14:30:00Z",
                      "market_updated_at": "2026-08-08T15:02:11Z",
                      "latest_forecast_delta": 0.03,
                      "latest_forecast_refresh_reason": "price_move",
                      "quotientUrl": "https://app.quotient.social/market/kalshi%3AKXGOLD-26AUG-T2500",
                      "polymarketUrl": null
                    }
                  ],
                  "venue_facets": [
                    {
                      "venue": "kalshi",
                      "count": 1
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Browse every prediction market Quotient tracks across Polymarket International, Polymarket US, Kalshi, and Limitless, with venue odds, available volume, resolution date, and forecast recency. Use this to discover covered event markets or exact linked oil, gold, silver, platinum, natural-gas, BTC, and ETH topics. Filter by venue or topic; the complete covered catalog returns in one response.",
          "inputExample": {
            "queryParams": {
              "topic": "oil",
              "max_forecast_age": 48,
              "sort": "volume_desc"
            }
          }
        }
      }
    },
    "/api/v1/markets/search": {
      "get": {
        "operationId": "searchMarkets",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Search covered markets by meaning, text, tags, or categories",
        "description": "Hybrid discovery over active Quotient-covered markets—not every contract listed by a venue. With as_of it becomes a point-in-time search over markets having coverage at or before the cutoff, including markets that have since closed. It fuses graph text/tag matches with optional lexical and embedding recall. Each market includes Q's latest committed probability and paired thesis at or before the cutoff, forecast_at, the forecast-time venue quote, current market_odds, and explicit forecast/published-signal availability. For a historical spread compare latest_q_probability with market_odds_at_forecast, never the current market_odds. A published signal may be historical and is not necessarily active now. Canonical routing supports Polymarket International, Polymarket US, Kalshi, and Limitless. Relevance scores order only this response; they are not probabilities. Supply q, tag, or category; q defaults to '*' for filter-only searches. By default results are windowed to forecasts from the last 168 hours (markets with a published signal always stay); widen or effectively disable with max_forecast_age.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Natural-language or keyword query. Optional when tag or category is supplied."
          },
          {
            "name": "tag",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 10,
              "items": {
                "type": "string",
                "maxLength": 80
              }
            },
            "description": "Case-insensitive Event/market tag filter. Repeat the parameter or comma-separate values; any supplied tag may match."
          },
          {
            "name": "category",
            "in": "query",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "maxItems": 10,
              "items": {
                "type": "string",
                "maxLength": 80
              }
            },
            "description": "Case-insensitive category filter. Repeat the parameter or comma-separate values; any supplied category may match."
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          },
          {
            "name": "as_of",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional inclusive historical cutoff. Accepts YYYY-MM-DD (expanded to 23:59:59.999 UTC that day) or an RFC 3339 date-time with Z or an explicit offset. Omit for the current view."
          },
          {
            "name": "max_forecast_age",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 168
            },
            "description": "Maximum forecast age in hours, anchored at as_of (or now). Rows whose only Q claim is a forecast older than this window are dropped; markets with a published signal always stay, matching the catalog route. Default: 168 (7 days). Set a large value (e.g. 8760) to effectively disable windowing."
          },
          {
            "name": "group_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "market",
                "event"
              ],
              "default": "market"
            },
            "description": "Set event to additionally group the returned matches by parent Event. The markets array is always present."
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked covered-market matches at the stated snapshot cutoff",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketSearchResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid query, filters, grouping, or venue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Use this endpoint to search Quotient-covered markets by meaning, taxonomy, asset, venue, or historical cutoff. Results carry current venue odds plus Q and venue odds captured at the selected forecast. Use as_of for point-in-time discovery and the forecast-time pair for historical spreads. Covers Polymarket International, Polymarket US, Kalshi, and Limitless, including since-closed markets in historical mode.",
          "inputExample": {
            "queryParams": {
              "q": "oil supply disruption",
              "tag": [
                "oil"
              ],
              "group_by": "event"
            }
          },
          "outputExample": {
            "as_of": "2026-08-11T23:59:59.999Z",
            "historical": true,
            "query": "oil supply disruption",
            "group_by": "event",
            "markets": [
              {
                "venue": "polymarket",
                "nativeMarketId": "123",
                "nativeEventId": "e1",
                "seriesTicker": null,
                "marketKey": "polymarket:123",
                "slug": "strait-of-hormuz-traffic-restored-by-september",
                "marketUrl": "https://polymarket.com/event/hormuz-traffic",
                "sourceUrl": "https://gamma-api.polymarket.com/markets/123",
                "question": "Will Strait of Hormuz traffic be restored by September?",
                "event": {
                  "id": "e1",
                  "title": "Strait of Hormuz traffic",
                  "slug": "hormuz-traffic"
                },
                "tags": [
                  "oil",
                  "Strait of Hormuz"
                ],
                "categories": [],
                "market_odds": 0.42,
                "has_forecast": true,
                "latest_q_probability": 0.57,
                "thesis": "Q expects traffic normalization to remain constrained through the cutoff.",
                "forecast_at": "2026-08-11T20:14:03Z",
                "market_odds_at_forecast": 0.4,
                "has_published_signal": false,
                "published_signal_count": 0,
                "relevance": {
                  "score": 0.0503,
                  "matched_by": [
                    "graph",
                    "typesense",
                    "semantic"
                  ],
                  "matched_fields": [
                    "event_title",
                    "tags"
                  ]
                }
              }
            ],
            "events": [],
            "facets": {
              "tags": [
                {
                  "value": "oil",
                  "count": 16
                }
              ],
              "categories": []
            },
            "retrieval": {
              "graph": "ok",
              "typesense": "ok",
              "semantic": "ok"
            }
          }
        }
      }
    },
    "/api/v1/markets/mispriced": {
      "get": {
        "operationId": "getMispricedMarkets",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.02"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Markets where Q diverges from market odds",
        "description": "Returns covered Polymarket International, Polymarket US, Kalshi, and Limitless markets where Q's forecast diverges from venue YES odds by at least min_spread. Only markets with odds from 0.1 through 0.8 are eligible. Volume is nullable and venue-reported, so do not compare it blindly across venues.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive exact tag or category name, matched against the market's Event tags, categories, and market-level tags — the same taxonomy as /api/v1/markets?topic. topic=commodities narrows the response to commodity markets. Unknown values return an empty list."
          },
          {
            "name": "min_spread",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "default": 0.05
            },
            "description": "Minimum absolute spread between Q forecast and market odds (0-1). Default: 0.05"
          },
          {
            "name": "max_forecast_age",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 48
            },
            "description": "Maximum forecast age in hours. Default: 48"
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "spread_desc",
                "spread_asc",
                "updated_desc",
                "volume_desc"
              ]
            },
            "description": "Sort order. Default: spread_desc"
          }
        ],
        "responses": {
          "200": {
            "description": "List of mispriced markets with forecast data",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MispricedMarketsResponse"
                },
                "example": {
                  "markets": [
                    {
                      "venue": "polymarket",
                      "nativeMarketId": "123456",
                      "nativeEventId": "98765",
                      "seriesTicker": null,
                      "marketKey": "polymarket:123456",
                      "slug": "fed-rate-cut-june-2026",
                      "marketUrl": "https://polymarket.com/event/fed-rate-cut-june-2026",
                      "sourceUrl": "https://gamma-api.polymarket.com/markets/123456",
                      "question": "Will the Fed cut rates by June 2026?",
                      "end_date": "2026-06-30T00:00:00Z",
                      "quotient_odds": 0.34,
                      "market_odds": 0.46,
                      "inDispute": false,
                      "clarifications": "Rate cut markets resolve based on the upper bound of the target range.",
                      "bluf": "Persistent inflation data makes a June cut unlikely.",
                      "spread": 0.12,
                      "spread_direction": "q_lower",
                      "volume_24h": 182400,
                      "last_updated": "2026-03-05T14:30:00Z",
                      "signal_count": 5,
                      "quotientUrl": "https://app.quotient.social/market/polymarket%3A123456",
                      "polymarketUrl": "https://polymarket.com/event/fed-rate-cut-june-2026"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Find covered prediction markets where Quotient's probability differs from venue odds. Use this to rank current Q-vs-venue disagreements. Returns canonical routing, Q probability, venue odds, spread, direction, thesis, and available volume across Polymarket International, Polymarket US, Kalshi, and Limitless. Values are venue-specific; inspect nullable volume and pricing freshness before comparing markets.",
          "inputExample": {
            "queryParams": {
              "min_spread": 0.08,
              "max_forecast_age": 48,
              "sort": "spread_desc"
            }
          }
        }
      }
    },
    "/api/v1/markets/lookup": {
      "get": {
        "operationId": "lookupMarkets",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.005"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Look up intelligence for one or more markets",
        "description": "Retrieve Q's full intelligence for up to 10 markets in a single request. Prefer globally unique market_keys; legacy slug and condition-ID requests default to Polymarket unless venue is supplied.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "market_keys",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Preferred comma-separated globally unique marketKey values (1-10). Mutually exclusive with slugs and condition_ids."
          },
          {
            "name": "slugs",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated market slugs (1-10). Mutually exclusive with market_keys and condition_ids; omission of venue uses the legacy Polymarket namespace.",
            "example": "btc-above-100k-june,eth-above-5k-june"
          },
          {
            "name": "condition_ids",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated Polymarket condition IDs (1-10). Mutually exclusive with market_keys and slugs.",
            "example": "0x1234abcd,0x5678efgh"
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup results with intelligence for each found market and a list of identifiers that were not found",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LookupResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request — provide exactly one of market_keys, slugs, or condition_ids; max 10 identifiers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Fetch full Quotient intelligence for up to ten markets across Polymarket International, Polymarket US, Kalshi, and Limitless. Use this for a stable batch read of forecasts, theses, cited drivers, resolution pathways, venue odds, and sentiment. Prefer globally unique market_keys, especially when a venue has no slug. Legacy slugs and condition IDs default to Polymarket unless venue is supplied.",
          "inputExample": {
            "queryParams": {
              "market_keys": "kalshi:KXFED-26SEP-T4.00,limitless:4291"
            }
          },
          "outputExample": {
            "results": [
              {
                "venue": "kalshi",
                "nativeMarketId": "KXFED-26SEP-T4.00",
                "nativeEventId": "KXFED-26SEP",
                "seriesTicker": "KXFED",
                "marketKey": "kalshi:KXFED-26SEP-T4.00",
                "slug": null,
                "marketUrl": null,
                "sourceUrl": null,
                "question": "Will the federal funds target range be below 4.00% in September?",
                "quotient_odds": 0.43,
                "market_odds": 0.36,
                "bluf": "Current inflation and labor data leave a September cut possible but not dominant.",
                "key_drivers": [
                  {
                    "factor": "Core inflation remains above target",
                    "direction": "against",
                    "impact": "significant",
                    "citation": "https://example-news.com/inflation"
                  }
                ],
                "sentiment": {
                  "pct_bullish": 44,
                  "pct_bearish": 41,
                  "pct_neutral": 15
                }
              }
            ],
            "not_found": [
              "limitless:4291"
            ]
          }
        }
      }
    },
    "/api/v1/markets/{slug}/intelligence": {
      "get": {
        "operationId": "getMarketIntelligence",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Full intelligence on a market",
        "description": "Q's forecast with key drivers, live correlated article evidence, provenance, and an explicitly unclassified sentiment share when direction is unavailable.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Market slug identifier"
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          }
        ],
        "responses": {
          "200": {
            "description": "Market intelligence with forecast, key drivers, signals, and sentiment",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketIntelResponse"
                },
                "example": {
                  "venue": "polymarket",
                  "nativeMarketId": "123456",
                  "nativeEventId": "98765",
                  "seriesTicker": null,
                  "marketKey": "polymarket:123456",
                  "slug": "fed-rate-cut-june-2026",
                  "marketUrl": "https://polymarket.com/event/fed-rate-cut-june-2026",
                  "sourceUrl": "https://gamma-api.polymarket.com/markets/123456",
                  "question": "Will the Fed cut rates by June 2026?",
                  "end_date": "2026-06-30T00:00:00Z",
                  "quotient_odds": 0.34,
                  "market_odds": 0.46,
                  "inDispute": false,
                  "clarifications": "Rate cut markets resolve based on the upper bound of the target range.",
                  "bluf": "Persistent inflation data makes a June cut unlikely.",
                  "last_updated": "2026-03-05T14:30:00Z",
                  "volume_24h": 182400,
                  "quotientUrl": "https://app.quotient.social/market/polymarket%3A123456",
                  "polymarketUrl": "https://polymarket.com/event/fed-rate-cut-june-2026",
                  "key_drivers": [
                    {
                      "factor": "CPI re-acceleration in February print",
                      "direction": "against",
                      "impact": "critical",
                      "citation": "Bureau of Labor Statistics CPI Report, March 2026"
                    }
                  ],
                  "signals": [
                    {
                      "id": "https://example.com/march-cpi",
                      "title": "March CPI Report Shows Re-acceleration",
                      "comment": "CPI re-acceleration and hawkish Fed minutes suggest rate cuts are unlikely near-term.",
                      "direction": null,
                      "url": "https://example.com/march-cpi",
                      "source": "Example News",
                      "published_at": "2026-03-05T13:45:00Z",
                      "correlated_at": "2026-03-05T14:25:00Z",
                      "confidence": "high",
                      "evidence_quote": "Inflation re-accelerated in the March release."
                    }
                  ],
                  "sentiment": {
                    "pct_bullish": 20,
                    "pct_bearish": 70,
                    "pct_neutral": 10
                  },
                  "source_reads_updated_at": "2026-03-05T14:25:00Z"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Invalid market slug, or no forecast/source-read coverage. The gateway does not bill or settle non-success responses.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": false
        }
      }
    },
    "/api/v1/markets/{slug}/signals": {
      "get": {
        "operationId": "getMarketSignals",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Article evidence for a market",
        "description": "Complete list of live Article-RELEVANT_TO-Market evidence (title, correlation reasoning, URL, source, confidence, evidence quote, and timestamps), newest first. Direction is null when the correlation layer does not assess it; the API never fabricates direction. These are distinct from published trade signals at /api/v1/signals. If none exist, the route returns 404 and the gateway does not bill or settle the request.",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Market slug identifier"
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          }
        ],
        "responses": {
          "200": {
            "description": "Article evidence with sentiment breakdown",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Invalid market slug or no article evidence. The gateway does not bill or settle this response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": false
        }
      }
    },
    "/api/v1/signals": {
      "get": {
        "operationId": "listTradeSignals",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Published Quotient trade signals",
        "description": "Active Quotient prediction-market signals across all four supported venues, ordered by latest forecast update. The default feed spans every covered category, commodities included; narrow it with topic (an exact tag or category name, e.g. topic=commodities). The newest published signal is selected before eligibility filters, so there is at most one signal per market and no older fallback. latest_q and thesis come from that latest forecast; thesis is null when neither a thesis nor BLUF is stored. published_at/is_new_today describe publication; forecast_updated_at/is_fresh describe research freshness. entry_pm is a legacy wire name for the venue YES price. Only Polymarket International rows receive the live CLOB overlay; other venues use graph pricing and report live_priced=false. Article evidence remains at /api/v1/markets/{slug}/signals.",
        "tags": [
          "Trade Signals"
        ],
        "parameters": [
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 168,
              "default": 24
            },
            "description": "Lookback window in hours for the latest forecast update, not signal publication. Active signals may have been published earlier. Default: 24"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated subset of: actionable, unconfirmed, paused, done, retired. Default: actionable, unconfirmed (paused, done, and retired rows are omitted)."
          },
          {
            "name": "side",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "YES",
                "NO"
              ]
            },
            "description": "Filter by the signal's trade side"
          },
          {
            "name": "market",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by market slug"
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Case-insensitive exact tag or category name, matched against the market's Event tags, categories, and market-level tags — the same taxonomy as /api/v1/markets?topic. topic=commodities narrows the feed to commodity signals. Unknown values return an empty list."
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          },
          {
            "name": "min_conviction",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3
            },
            "description": "Minimum conviction tier (1-3). Tiers measure the forecaster's ensemble-draw agreement, not spread."
          },
          {
            "name": "min_capacity_usd",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0
            },
            "description": "Minimum near-touch capacity in USD (capacity_usd_at_2c). Signals with unknown capacity pass only via the volume fallback (24h volume >= 5000)."
          },
          {
            "name": "exclude_drawdown_risk",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "When true, omit signals whose drawdown_risk_elevated is true. Signals with a null read (no risk-model coverage) are kept — null means unknown, not safe."
          },
          {
            "name": "exclude_crash_risk",
            "in": "query",
            "deprecated": true,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Deprecated former name for exclude_drawdown_risk. Accepted for one release; exclude_drawdown_risk wins when both are sent."
          }
        ],
        "responses": {
          "200": {
            "description": "Active, recently forecast-updated trade signals with explicit publication and freshness context",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeSignalsResponse"
                },
                "example": {
                  "signals": [
                    {
                      "id": "3f9d2c1e-6b7a-4f7e-9c2d-1a2b3c4d5e6f",
                      "created_at": "2026-08-01T14:15:00Z",
                      "published_at": "2026-08-01T14:15:00Z",
                      "forecast_updated_at": "2026-08-03T16:20:00Z",
                      "is_new_today": false,
                      "is_fresh": true,
                      "is_active": true,
                      "side": "NO",
                      "entry_q": 22,
                      "entry_pm": 44,
                      "entry_spread_pp": 22,
                      "window_days": 12,
                      "resolves_in_window": false,
                      "status": "actionable",
                      "retired_reason": null,
                      "conviction_tier": 3,
                      "conviction": "high",
                      "has_band": true,
                      "latest_q": 0.22,
                      "thesis": "Q sees the ceasefire conditions as unlikely to be met before year-end.",
                      "q_side": "NO",
                      "q_value_cents": 78,
                      "entry_cost_cents": 56,
                      "current_cost_cents": 58,
                      "distance_to_convergence_cents": 20,
                      "converge_upside_pct": 34,
                      "max_roi_pct": 72,
                      "live_priced": true,
                      "priced_at": "2026-08-01T16:00:00Z",
                      "capacity_usd_at_2c": 3400,
                      "capacity_available": true,
                      "capacity_basis": "depth-2c",
                      "capacity_as_of": "2026-08-01T02:31:00Z",
                      "drawdown_risk_elevated": false,
                      "crash_risk_elevated": false,
                      "market": {
                        "venue": "polymarket",
                        "nativeMarketId": "789012",
                        "nativeEventId": "34567",
                        "seriesTicker": null,
                        "marketKey": "polymarket:789012",
                        "slug": "russia-ukraine-ceasefire-2026",
                        "marketUrl": "https://polymarket.com/event/russia-ukraine-ceasefire-2026",
                        "sourceUrl": "https://gamma-api.polymarket.com/markets/789012",
                        "question": "Will there be a Russia-Ukraine ceasefire in 2026?",
                        "condition_id": "0x1234abcd",
                        "end_date": "2026-12-31T00:00:00Z",
                        "market_odds": 0.42,
                        "volume_24h": 120000,
                        "quotientUrl": "https://app.quotient.social/market/polymarket%3A789012",
                        "polymarketUrl": "https://polymarket.com/event/russia-ukraine-ceasefire-2026"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Quotient's published prediction-market signals across Polymarket International, Polymarket US, Kalshi, and Limitless. Use this to scan side, entry odds, the latest Q probability and thesis, conviction, venue spread, convergence, and capacity, one signal per covered market. Filter by venue, topic (exact tag or category, e.g. commodities), side, conviction, capacity, and status. Only Polymarket rows receive the live CLOB overlay; inspect live_priced on every row.",
          "inputExample": {
            "queryParams": {
              "window": 24,
              "status": "actionable",
              "side": "NO",
              "min_conviction": 2,
              "min_capacity_usd": 500,
              "exclude_drawdown_risk": true
            }
          }
        }
      }
    },
    "/api/v1/signals/featured": {
      "get": {
        "operationId": "getFeaturedSignal",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.005"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "The featured trade signal",
        "description": "The signal Quotient is currently featuring: an operator pin when set, else a deterministic pick over active actionable signals with a recent forecast update (live-priced, volume and expiry floors; freshest publish day, then conviction, then convergence upside). Returns signal: null when nothing clears the floors.",
        "tags": [
          "Trade Signals"
        ],
        "parameters": [
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 168,
              "default": 24
            },
            "description": "Latest-forecast update lookback in hours for the auto pick. Default: 24"
          }
        ],
        "responses": {
          "200": {
            "description": "The featured signal, or null when nothing qualifies",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeaturedSignalResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Use this when the user asks which prediction-market signal is currently designated as featured by Quotient. Returns its published side and status, entry and current fields, forecast context, capacity, and canonical market routing; it may be empty. The featured designation is a database field, not a recommendation.",
          "inputExample": {
            "queryParams": {
              "window": 24
            }
          },
          "outputExample": {
            "signal": {
              "id": "qs_a41d2c",
              "side": "NO",
              "entry_q": 29,
              "entry_pm": 38,
              "entry_spread_pp": 9,
              "status": "actionable",
              "conviction_tier": 3,
              "conviction": "high",
              "latest_q": 0.29,
              "thesis": "Q sees no credible path to a ceasefire before the market deadline.",
              "q_value_cents": 71,
              "current_cost_cents": 64,
              "distance_to_convergence_cents": 7,
              "converge_upside_pct": 11,
              "max_roi_pct": 56,
              "capacity_usd_at_2c": 5400,
              "market": {
                "venue": "polymarket",
                "nativeMarketId": "512345",
                "nativeEventId": "event-123",
                "seriesTicker": null,
                "marketKey": "polymarket:512345",
                "slug": "russia-x-ukraine-ceasefire-in-2026",
                "marketUrl": "https://polymarket.com/event/russia-x-ukraine-ceasefire-in-2026",
                "sourceUrl": "https://gamma-api.polymarket.com/markets/512345",
                "question": "Russia x Ukraine ceasefire in 2026?",
                "market_odds": 0.36,
                "volume_24h": 184233.5
              }
            },
            "featured_by": "auto"
          }
        }
      }
    },
    "/api/v1/signals/perps": {
      "get": {
        "operationId": "listPerpsSignals",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Calibrated asset price outlooks",
        "description": "The latest calibrated price outlook per series (asset x anchor cadence) under the asset-price/1 contract, covering commodities, crypto, and single-name equities. Each reading carries a median and p10/p25/p75/p90 distribution derived from Quotient forecasts and venue prices, spot at observation, freshness, and signal-versus-coverage mode. Published entry/exit price signals attach per series when the decide gate has fired; an empty price_signals list is the normal state. Readings revise at most hourly; the newest revision per anchor wins.",
        "tags": [
          "Trade Signals"
        ],
        "parameters": [
          {
            "name": "asset",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional asset filter: a key tail such as wti, gold, btc, or nvda, or a full assetKey such as commodity:wti. Unknown values return an empty series list."
          },
          {
            "name": "anchor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional anchor-cadence filter, e.g. daily, two-day, weekly, monthly. The cadence set is open; unknown values return an empty series list."
          },
          {
            "name": "asset_class",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional asset-class filter, e.g. commodity, crypto, or company. asset_class=commodity returns every covered commodity series in one call. The class set is open; unknown values return an empty series list."
          }
        ],
        "responses": {
          "200": {
            "description": "Latest price outlook per series, with any published price signals",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceOutlookResponse"
                },
                "example": {
                  "as_of": "2026-08-17T12:00:00.000Z",
                  "contract": "asset-price/1",
                  "filters": {
                    "asset": "wti",
                    "anchor": "weekly",
                    "asset_class": null
                  },
                  "series_count": 1,
                  "series": [
                    {
                      "series_id": "commodity:wti:price-outlook:weekly",
                      "asset_key": "commodity:wti",
                      "asset_class": "commodity",
                      "anchor_type": "weekly",
                      "display_name": "WTI crude oil",
                      "venue": "kalshi",
                      "venue_series": "KXWTIW",
                      "observable": "wti-settle",
                      "mode": "signal",
                      "mode_reason": "terminal ladder measured",
                      "headline": "WTI weekly settle outlook",
                      "maturity": "experimental",
                      "outlook": {
                        "outlook_id": "po:commodity:wti:price-outlook:weekly:2026-08-22:a1b2c3d4:0f1e2d3c",
                        "anchor_date": "2026-08-22",
                        "anchor_at": "2026-08-22T18:30:00Z",
                        "window_start_at": null,
                        "horizon_days": 5,
                        "status": "ok",
                        "state": "neutral",
                        "side": null,
                        "strength": null,
                        "revision": 4,
                        "revisions": 4,
                        "median_price": 64.1,
                        "p10": 60.2,
                        "p25": 62.3,
                        "p75": 66,
                        "p90": 68.1,
                        "spot_at_obs": 63.8,
                        "sigma_diffusive": 1.9,
                        "sigma_total": 2.2,
                        "implied_mean": 64,
                        "implied_sigma": 2.1,
                        "spot_gap_pct": 0.0047,
                        "spot_gap_sigma": 0.16,
                        "spot_aligned": null,
                        "displacement_sigma": 0.14,
                        "edge_pct": null,
                        "ref_median": 63.9,
                        "reference_basis": "weekly-settle",
                        "freshness_state": "fresh",
                        "freshness_reason": null,
                        "observed_at": "2026-08-17T11:00:03Z",
                        "published_at": "2026-08-17T11:00:05Z"
                      },
                      "price_signals": []
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Quotient's calibrated price outlooks (asset-price/1): the latest reading per asset and anchor cadence across covered commodities, crypto, and single-name equities, each with a median and p10-p90 distribution derived from Quotient forecasts and venue prices, plus published entry/exit price signals when one exists. Use this for expected price levels and distribution context on a covered asset; filter by asset, anchor, or asset_class. An empty price_signals list is normal.",
          "inputExample": {
            "queryParams": {
              "asset": "wti",
              "anchor": "weekly"
            }
          },
          "outputExample": {
            "as_of": "2026-08-17T12:00:00.000Z",
            "contract": "asset-price/1",
            "filters": {
              "asset": "wti",
              "anchor": "weekly",
              "asset_class": null
            },
            "series_count": 1,
            "series": [
              {
                "series_id": "commodity:wti:price-outlook:weekly",
                "asset_key": "commodity:wti",
                "asset_class": "commodity",
                "anchor_type": "weekly",
                "display_name": "WTI crude oil",
                "mode": "signal",
                "maturity": "experimental",
                "outlook": {
                  "anchor_date": "2026-08-22",
                  "median_price": 64.1,
                  "p10": 60.2,
                  "p90": 68.1,
                  "spot_at_obs": 63.8,
                  "status": "ok",
                  "published_at": "2026-08-17T11:00:05Z"
                },
                "price_signals": []
              }
            ]
          }
        }
      }
    },
    "/api/v1/portfolio": {
      "get": {
        "operationId": "getPortfolio",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.005"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Quotient intelligence for a wallet's portfolio across venues",
        "description": "Fetches a wallet's open positions and joins each prediction-market position to Quotient coverage: latest forecast (with delta), latest trade signal (with status), and a convergence assessment computed against the position's own side from live position pricing.\n\nTwo modes. Omitting `venues` returns the legacy Polymarket-only shape unchanged, failing closed with 502 upstream_unavailable when the Polymarket data API is down, and annexing Polymarket perps positions when include_perps=true. Passing `venues` returns the multi-venue envelope covering polymarket, polymarket_perps, limitless, and hyperliquid: each venue carries its own wallet, status, and positions, and a venue whose upstream is unavailable is reported as status=unavailable rather than failing the whole report. Within a venue, positions still fail closed — never a partial list.\n\nKalshi and Polymarket US are not available here: neither exposes a keyless wallet-addressed position read, so an address alone cannot produce a report. That is an integration limit, not the boundary of Quotient's market coverage.",
        "tags": [
          "Portfolio"
        ],
        "parameters": [
          {
            "name": "wallet",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "description": "Wallet address used for every requested venue. Required unless a per-venue wallet is supplied for each one. For Polymarket this is the proxy wallet."
          },
          {
            "name": "venues",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "polymarket,limitless,hyperliquid",
            "description": "Comma-separated venues for the multi-venue report: polymarket, polymarket_perps, limitless, hyperliquid, or all. Omit for the legacy Polymarket-only response."
          },
          {
            "name": "polymarket_wallet",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "description": "Overrides wallet for Polymarket only (proxy wallet)."
          },
          {
            "name": "polymarket_perps_wallet",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "description": "Overrides wallet for Polymarket perps only."
          },
          {
            "name": "limitless_wallet",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "description": "Overrides wallet for Limitless only."
          },
          {
            "name": "hyperliquid_wallet",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            },
            "description": "Overrides wallet for Hyperliquid only (the trading EOA)."
          },
          {
            "name": "size_threshold",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 1
            },
            "description": "Minimum position size to include (passed to the Polymarket data API)"
          },
          {
            "name": "include_perps",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Legacy mode only: annex Polymarket perps positions. In multi-venue mode request the polymarket_perps venue instead."
          }
        ],
        "responses": {
          "200": {
            "description": "Positions joined to Quotient coverage. Legacy shape without `venues`; the multi-venue envelope with it.",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/PortfolioResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MultiVenuePortfolioResponse"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters (wallet must be a 0x address; venues must name supported venues)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "description": "Legacy mode only: Polymarket data API unavailable (upstream_unavailable). In multi-venue mode an unavailable venue is reported as status=unavailable inside a 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Wallet-addressed positions across Polymarket, Polymarket perps, Limitless, and Hyperliquid, each prediction-market position joined to Quotient's forecast, signal, and position-side convergence assessment. Use this for wallet size, prices, PnL, and Q alignment. venues=all covers every venue; omitting venues keeps the legacy Polymarket-only shape. Kalshi and Polymarket US are absent only for lack of a keyless wallet read, not a limit on Quotient coverage.",
          "inputExample": {
            "queryParams": {
              "wallet": "0xEE4E0EB3A626713F5Efa98DB422fA73FdD1e94b8",
              "venues": "polymarket,limitless,hyperliquid",
              "size_threshold": 1
            }
          },
          "outputExample": {
            "wallet": "0xee4e0eb3a626713f5efa98db422fa73fdd1e94b8",
            "as_of": "2026-08-01T16:03:11Z",
            "value_usd": 1243.87,
            "positions_count": 6,
            "covered_count": 4,
            "unmatched_count": 2,
            "positions_capped": false,
            "positions": [
              {
                "title": "Russia x Ukraine ceasefire in 2026?",
                "slug": "russia-x-ukraine-ceasefire-in-2026",
                "outcome": "No",
                "size": 120.5,
                "avg_price": 0.58,
                "cur_price": 0.64,
                "current_value_usd": 77.12,
                "cash_pnl": 7.23,
                "percent_pnl": 10.34,
                "quotient": {
                  "covered": true,
                  "forecast": {
                    "id": "fc_9f2c1a",
                    "probability": 0.29,
                    "delta_from_prior": -0.04,
                    "bluf": "Negotiation preconditions have hardened; no credible path to a 2026 ceasefire.",
                    "thesis": "Negotiation preconditions have hardened, leaving no credible path to a 2026 ceasefire.",
                    "conviction_tier": 3
                  },
                  "signal": {
                    "id": "qs_a41d2c",
                    "side": "NO",
                    "status": "actionable"
                  },
                  "convergence": {
                    "q_value_cents": 71,
                    "current_cost_cents": 64,
                    "distance_to_convergence_cents": 7,
                    "converge_upside_pct": 11,
                    "max_roi_pct": 56,
                    "aligned": true,
                    "q_side": "NO"
                  }
                }
              }
            ],
            "unmatched": []
          }
        }
      }
    },
    "/api/v1/markets/{slug}/forecast": {
      "get": {
        "operationId": "getMarketForecast",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Q's forecast for a market",
        "description": "Paid forecast-only read for a known market. Omit as_of for the latest committed forecast, or supply it to select the newest committed forecast at or before an inclusive historical cutoff. Each forecast carries its stored market_odds_at_forecast; the response-level market_odds remains the current venue quote. Includes intraforecast change primitives and optional prior history relative to the selected forecast. The path accepts a slug, nativeMarketId, or marketKey within the selected venue.",
        "tags": [
          "Markets"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Market slug, nativeMarketId, or marketKey"
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          },
          {
            "name": "as_of",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Optional inclusive historical cutoff. Accepts YYYY-MM-DD (expanded to 23:59:59.999 UTC that day) or an RFC 3339 date-time with Z or an explicit offset. Omit for the current view."
          },
          {
            "name": "history",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10,
              "default": 0
            },
            "description": "Number of prior forecasts to include for intraforecast diffing (0-10)"
          }
        ],
        "responses": {
          "200": {
            "description": "The market's latest forecast at or before the stated cutoff",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForecastResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unknown market, no stored forecast, or no committed forecast at/before as_of; no x402 settlement and API-key debit is refunded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": false
        }
      }
    },
    "/api/v1/sources": {
      "get": {
        "operationId": "listSources",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.005"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Recent sources for selected markets",
        "description": "Recent evidence for up to 10 covered markets across Polymarket International, Polymarket US, Kalshi, and Limitless: correlated articles and relevant X posts ordered by published time. Prefer market_keys for cross-venue or nullable-slug rows. Legacy markets= slugs share one explicit venue and default to Polymarket. X posts window on when last seen as relevant, so a re-sighted older post can appear.",
        "tags": [
          "Sources"
        ],
        "parameters": [
          {
            "name": "markets",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated market slugs (1-10). Mutually exclusive with market_keys; legacy default venue is polymarket."
          },
          {
            "name": "market_keys",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Preferred comma-separated globally unique marketKey values (1-10). Mutually exclusive with markets."
          },
          {
            "name": "venue",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_us",
                "kalshi",
                "limitless"
              ],
              "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
            },
            "description": "Optional prediction-market venue filter. Omit it on catalog/feed routes to include every covered venue. On legacy slug or condition-ID lookups, omission retains the Polymarket namespace; prefer marketKey for collision-safe cross-venue lookup."
          },
          {
            "name": "window",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 168,
              "default": 48
            },
            "description": "Lookback window in hours. Default: 48"
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated subset of: article, x_post. Default: both."
          }
        ],
        "responses": {
          "200": {
            "description": "Recent sources across the selected markets, newest first",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourcesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "The news and X/Twitter evidence behind Quotient forecasts on Polymarket International, Polymarket US, Kalshi, and Limitless: recent articles and relevant posts for up to ten markets, with reasoning, evidence quotes, source tiers, authors, and canonical routing. Prefer market_keys for cross-venue or nullable-slug rows. Use this to audit a forecast or see what is moving event and asset-linked markets.",
          "inputExample": {
            "queryParams": {
              "markets": "russia-x-ukraine-ceasefire-in-2026",
              "window": 48,
              "types": "article,x_post"
            }
          },
          "outputExample": {
            "sources": [
              {
                "type": "article",
                "market_slug": "russia-x-ukraine-ceasefire-in-2026",
                "market": {
                  "venue": "polymarket",
                  "nativeMarketId": "512345",
                  "nativeEventId": "event-123",
                  "seriesTicker": null,
                  "marketKey": "polymarket:512345",
                  "slug": "russia-x-ukraine-ceasefire-in-2026",
                  "marketUrl": "https://polymarket.com/event/russia-x-ukraine-ceasefire-in-2026",
                  "sourceUrl": "https://gamma-api.polymarket.com/markets/512345"
                },
                "title": "Kremlin rules out talks before autumn",
                "url": "https://example-news.com/kremlin-talks",
                "source_name": "Reuters",
                "feed_tier": "primary",
                "published_at": "2026-08-01T07:40:00Z",
                "relevance": {
                  "confidence": "high",
                  "reasoning": "Directly addresses the ceasefire negotiation timeline.",
                  "evidence_quote": "No conditions exist for negotiations before autumn."
                },
                "author_handle": null,
                "is_expert": null
              },
              {
                "type": "x_post",
                "market_slug": "russia-x-ukraine-ceasefire-in-2026",
                "market": {
                  "venue": "polymarket",
                  "nativeMarketId": "512345",
                  "nativeEventId": "event-123",
                  "seriesTicker": null,
                  "marketKey": "polymarket:512345",
                  "slug": "russia-x-ukraine-ceasefire-in-2026",
                  "marketUrl": "https://polymarket.com/event/russia-x-ukraine-ceasefire-in-2026",
                  "sourceUrl": "https://gamma-api.polymarket.com/markets/512345"
                },
                "title": null,
                "url": "https://x.com/osint_account/status/1950000000000000000",
                "source_name": null,
                "feed_tier": "specialist",
                "published_at": "2026-07-31T22:10:00Z",
                "relevance": {
                  "confidence": "interesting",
                  "reasoning": "First-hand report on frontline posture relevant to ceasefire feasibility.",
                  "evidence_quote": "Rotation activity continues on both axes."
                },
                "author_handle": "osint_account",
                "is_expert": true
              }
            ]
          }
        }
      }
    },
    "/api/v1/x/search": {
      "post": {
        "operationId": "searchX",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "1.00"
        },
        "x-rate-limit": {
          "scope": "x_research",
          "requestsPerSecond": 5,
          "requestsPerMinute": 60,
          "requestsPerDay": 500,
          "maxConcurrent": 5
        },
        "summary": "Structured Grok 4.5 search over X",
        "description": "Search X with xAI Grok 4.5 and return citation-grounded posts, accounts, optional Quotient market context, and Quotient expert metadata. Results are not persisted by Quotient and the provider request sets store=false. This is a bounded single-pass lookup, not a research session: issue follow-up searches to go deeper rather than widening one call. A request whose underlying X Search never executes returns 502 upstream_search_unavailable and is not billed; a 200 always means the search ran, so meta.result_count of 0 is a genuine empty result.",
        "tags": [
          "X Research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "market_slugs": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional cached Quotient markets to pair with X results."
                  },
                  "from_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Inclusive YYYY-MM-DD. Defaults to 30 days before to_date; the maximum span is 90 days."
                  },
                  "to_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Inclusive YYYY-MM-DD. Defaults to today."
                  },
                  "allowed_x_handles": {
                    "type": "array",
                    "maxItems": 20,
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional provider-enforced account allowlist."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 15,
                    "default": 8
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Structured, citation-grounded X results",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XSearchResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "description": "xAI unavailable (upstream_unavailable), or X Search did not execute for this request (upstream_search_unavailable). Not billed in either case.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "X search is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Structured X/Twitter search grounded in citations, powered by Grok. Returns matching posts, author accounts, a synthesized summary, identified evidence gaps, and citations — optionally paired with Quotient prediction-market context and flags for accounts on Quotient's reviewed expert list. Use this for real-time research on breaking news, geopolitics, macro, crypto, and event markets when you need sourced X posts rather than a model's recollection.",
          "inputExample": {
            "body": {
              "query": "What evidence is changing the odds of a 2026 Ukraine ceasefire?",
              "market_slugs": [
                "russia-x-ukraine-ceasefire-in-2026"
              ],
              "limit": 15
            }
          },
          "outputExample": {
            "query": "What evidence is changing the odds of a 2026 Ukraine ceasefire?",
            "summary": "Reporting over the window points to hardening preconditions, with no credible negotiation track before autumn.",
            "posts": [
              {
                "post_id": "1950000000000000000",
                "url": "https://x.com/osint_account/status/1950000000000000000",
                "author_handle": "osint_account",
                "author_name": "OSINT Account",
                "published_at": "2026-07-31T22:10:00Z",
                "relevant_excerpt": "Rotation activity continues on both axes.",
                "relevance": "First-hand report on frontline posture relevant to ceasefire feasibility.",
                "stance": "supports_no",
                "linked_market_slugs": [
                  "russia-x-ukraine-ceasefire-in-2026"
                ],
                "author_metadata": {
                  "is_quotient_expert": true
                }
              }
            ],
            "accounts": [
              {
                "handle": "osint_account",
                "display_name": "OSINT Account",
                "profile_url": "https://x.com/osint_account",
                "quotient_metadata": {
                  "is_quotient_expert": true
                }
              }
            ],
            "quotient_markets": [],
            "gaps": [
              "No primary-source confirmation of a negotiation timetable."
            ],
            "citations": [
              "https://x.com/osint_account/status/1950000000000000000"
            ],
            "meta": {
              "post_count": 1
            }
          }
        }
      }
    },
    "/api/v1/x/profile": {
      "post": {
        "operationId": "profileXAccount",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "1.00"
        },
        "x-rate-limit": {
          "scope": "x_research",
          "requestsPerSecond": 5,
          "requestsPerMinute": 60,
          "requestsPerDay": 500,
          "maxConcurrent": 5
        },
        "summary": "Psychographic profile of one X account",
        "description": "Profile a single X account from its own recent posts using Grok 4.5 X Search. Three fixed sweeps — interests and beliefs, risk and trading behaviour, and reasoning style — are followed by a synthesis pass, returning evidenced interests, beliefs, tendencies, risk posture, information-processing style, and hints for tailoring recommendations. Every claim cites post_ids present in the returned evidence; claims whose supporting posts fail citation grounding are dropped rather than returned unsupported. Coverage is a relevance-ranked sample of the window, not a complete timeline: call again for another angle rather than expecting one call to widen. Accounts with fewer than 15 grounded posts in the window return 404 and are not billed. Results are not persisted by Quotient and the provider request sets store=false.",
        "tags": [
          "X Research"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "handle"
                ],
                "properties": {
                  "handle": {
                    "type": "string",
                    "pattern": "^@?[A-Za-z0-9_]{1,15}$",
                    "description": "X handle to profile, with or without a leading @."
                  },
                  "lookback_days": {
                    "type": "integer",
                    "minimum": 14,
                    "maximum": 180,
                    "default": 120,
                    "description": "Size of the trailing window to study. Defaults to 120 days."
                  },
                  "focus": {
                    "type": "string",
                    "enum": [
                      "general",
                      "trading",
                      "reasoning"
                    ],
                    "default": "general",
                    "description": "Reweights the same three sweeps toward speculative decision-making or toward information processing. Does not add a fourth sweep."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Evidence-grounded psychographic profile",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/XProfileResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "The account has too little public posting in the window to profile (insufficient_post_history). The gateway does not bill or settle this response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "description": "xAI unavailable, or fewer than two sweeps completed. Not billed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "X profiling is not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "Psychographic profile of a single X account, built by Grok from that account's own recent posts. Returns evidenced interests, stated beliefs, behavioural tendencies, risk posture, and how the person handles complex or conflicting information, plus hints for tailoring suggestions to them. Use this to personalise recommendations to a known handle. Every claim cites the posts supporting it; three sweeps sample the account rather than exhaust it.",
          "inputExample": {
            "body": {
              "handle": "vitalikbuterin",
              "lookback_days": 120,
              "focus": "trading"
            }
          },
          "outputExample": {
            "handle": "vitalikbuterin",
            "display_name": "vitalik.eth",
            "window": {
              "from_date": "2026-04-11",
              "to_date": "2026-08-09",
              "lookback_days": 120,
              "post_count": 41
            },
            "interests": [
              {
                "topic": "protocol decentralisation",
                "weight": 0.9,
                "post_ids": [
                  "1950000000000000001"
                ]
              }
            ],
            "beliefs": [
              {
                "claim": "Favours L1 simplicity over throughput maximalism.",
                "confidence": "high",
                "post_ids": [
                  "1950000000000000001"
                ]
              }
            ],
            "tendencies": [
              {
                "trait": "steelmans opposing arguments",
                "description": "Restates the strongest counterargument before answering it.",
                "post_ids": [
                  "1950000000000000001"
                ]
              }
            ],
            "risk_profile": {
              "posture": "long-horizon, low leverage",
              "time_horizon": "multi-year",
              "position_sizing": "rarely discusses sizing",
              "reaction_to_loss": "revises the model publicly rather than defending it",
              "post_ids": [
                "1950000000000000001"
              ]
            },
            "information_processing": {
              "style": "decomposes into first principles then bounds the uncertainty",
              "evidence_preference": "formal arguments and measured data over narrative",
              "handles_ambiguity": "states explicit probabilities",
              "changes_mind_when": "shown a concrete counterexample",
              "post_ids": [
                "1950000000000000001"
              ]
            },
            "recommendation_hints": {
              "market_categories": [
                "crypto",
                "technology"
              ],
              "tone": "technical, uncertainty-explicit",
              "avoid": [
                "hype framing",
                "short-dated leverage"
              ]
            },
            "confidence": "medium",
            "gaps": [
              "No posts bearing on position sizing in the window."
            ],
            "meta": {
              "sweeps_succeeded": 3,
              "coverage": "sampled",
              "post_count": 41
            }
          }
        }
      }
    },
    "/api/v1/latest": {
      "get": {
        "operationId": "getLatestUpdates",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.02"
        },
        "x-rate-limit": {
          "scope": "standard",
          "requestsPerSecond": 20,
          "requestsPerMinute": 600,
          "requestsPerDay": 20000,
          "maxConcurrent": 10
        },
        "summary": "Latest forecasts and associated sources across Quotient",
        "description": "A board-wide chronological feed of new forecasts and newly associated articles/X posts. Defaults to the last hour and supports up to six hours. Every included forecast carries its thesis, resolution pathway, venue, and core market metadata.",
        "tags": [
          "Latest"
        ],
        "parameters": [
          {
            "name": "hours",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 6,
              "default": 3
            },
            "description": "Lookback in whole hours."
          },
          {
            "name": "types",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated subset of forecast, article, x_post."
          }
        ],
        "responses": {
          "200": {
            "description": "Latest board-wide update events",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LatestResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": true,
          "description": "A chronological feed of new forecasts and newly linked articles/X posts across Quotient-covered Polymarket International, Polymarket US, Kalshi, and Limitless listings. Events include canonical venue routing, compact forecast context, and thesis, but omit resolution_pathway; use market detail for full rules context. Use this complete-window feed to monitor cross-venue changes without per-market fan-out.",
          "inputExample": {
            "queryParams": {
              "hours": 3,
              "types": "forecast,article,x_post"
            }
          },
          "outputExample": {
            "as_of": "2026-08-01T16:00:00Z",
            "window": {
              "hours": 3,
              "since": "2026-08-01T13:00:00Z"
            },
            "types": [
              "forecast",
              "article",
              "x_post"
            ],
            "events": [
              {
                "type": "forecast",
                "id": "fc_9f2c1a",
                "occurred_at": "2026-08-01T15:14:03Z",
                "source": null,
                "market": {
                  "venue": "polymarket",
                  "nativeMarketId": "512345",
                  "nativeEventId": "event-123",
                  "seriesTicker": null,
                  "marketKey": "polymarket:512345",
                  "slug": "russia-x-ukraine-ceasefire-in-2026",
                  "marketUrl": "https://polymarket.com/event/russia-x-ukraine-ceasefire-in-2026",
                  "sourceUrl": "https://gamma-api.polymarket.com/markets/512345",
                  "question": "Russia x Ukraine ceasefire in 2026?"
                },
                "forecast": {
                  "id": "fc_9f2c1a",
                  "probability": 0.29,
                  "delta_from_prior": -0.04,
                  "refresh_reason": "price_move",
                  "bluf": "Negotiation preconditions have hardened; no credible path to a 2026 ceasefire.",
                  "thesis": "Negotiation preconditions have hardened, leaving no credible path to a 2026 ceasefire."
                }
              }
            ],
            "count": 1
          }
        }
      }
    },
    "/api/v1/wallets/link": {
      "get": {
        "operationId": "linkWallet",
        "security": [
          {
            "gatewayApiKey": []
          }
        ],
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "pricingMode": "fixed",
          "price": "0.01"
        },
        "x-rate-limit": {
          "scope": "wallet_link",
          "requestsPerSecond": 1,
          "requestsPerMinute": 5,
          "requestsPerDay": 20,
          "maxConcurrent": 1
        },
        "summary": "Attest the paying wallet to a Quotient account via x402",
        "description": "Payment-as-proof wallet attestation. First obtain a single-use link token from POST /api/auth/wallets/x402-token (authenticated with x-quotient-api-key or a Privy bearer), then call this route with an x402 payment from the wallet being linked — a Bankr wallet via `bankr x402 call`, or any x402-capable signer. The gateway verifies the payment signature and the settled payer wallet is attested to the token's account. Wallets whose keys cannot be exported (custodial or provider-managed) can therefore be linked without any message-signing support. A wallet already attested to a different account returns a non-billable 409; the signature-challenge alternative lives at POST /api/auth/wallets/challenge + /attest.",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^qlt_[A-Za-z0-9_-]{43}$",
              "description": "Single-use link token from POST /api/auth/wallets/x402-token."
            },
            "description": "Binds this payment's payer wallet to the Quotient account the token was issued to. Expires after 15 minutes and is consumed on first use."
          }
        ],
        "responses": {
          "200": {
            "description": "The paying wallet is now attested to the token's account",
            "headers": {
              "x-billing-credits-remaining": {
                "$ref": "#/components/headers/XBillingCreditsRemaining"
              },
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "wallet",
                    "already_attested"
                  ],
                  "properties": {
                    "wallet": {
                      "type": "object",
                      "required": [
                        "address",
                        "chain_id",
                        "provider",
                        "method",
                        "attested_at"
                      ],
                      "properties": {
                        "address": {
                          "type": "string",
                          "description": "Lowercased attested wallet address."
                        },
                        "chain_id": {
                          "type": "integer"
                        },
                        "provider": {
                          "type": "string",
                          "nullable": true
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "eoa",
                            "erc1271",
                            "erc6492",
                            "x402"
                          ],
                          "description": "How control was proven; x402 means a settled payment signature."
                        },
                        "attested_at": {
                          "type": "string"
                        }
                      }
                    },
                    "already_attested": {
                      "type": "boolean",
                      "description": "True when the wallet was already attested to this same account."
                    }
                  }
                },
                "example": {
                  "wallet": {
                    "address": "0x52908400098527886e0f7030069857d2e4169ee7",
                    "chain_id": 8453,
                    "provider": null,
                    "method": "x402",
                    "attested_at": "2026-08-12T00:00:00Z"
                  },
                  "already_attested": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "$ref": "#/components/headers/PaymentRequired"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient credits for the requested route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unknown link token (link_token_not_found). Not billed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The paying wallet is attested to a different account (wallet_already_attested). Not billed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Missing/expired token, or the call carried no verifiable x402 payer (x402_payment_required). Not billed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "x-bazaar": {
          "discoverable": false
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "gatewayApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-quotient-api-key",
        "description": "Public requests are served by quotient-api-gateway. Provide your qt_ key in x-quotient-api-key. If you do not provide a key, the gateway can require x402 payment via PAYMENT-REQUIRED."
      },
      "forecastApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-quotient-api-key",
        "description": "Quotient API key for the forecast-request endpoints, sent through quotient-api-gateway like every other public route. Jobs and status reads are owner-scoped to the key's user."
      }
    },
    "responses": {
      "RateLimited": {
        "description": "The caller exceeded a per-second, per-minute, daily, or concurrency limit. No credits are debited and no x402 payment is settled for this response.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit-Policy": {
            "$ref": "#/components/headers/RateLimitPolicy"
          },
          "RateLimit": {
            "$ref": "#/components/headers/RateLimit"
          },
          "X-Quotient-Max-Concurrent": {
            "$ref": "#/components/headers/XQuotientMaxConcurrent"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "headers": {
      "PaymentRequired": {
        "description": "x402 challenge metadata for a 402 response. Sign and retry with PAYMENT-SIGNATURE.",
        "schema": {
          "type": "string"
        }
      },
      "PaymentResponse": {
        "description": "x402 settlement metadata returned on successful paid requests.",
        "schema": {
          "type": "string"
        }
      },
      "XBillingCreditsRemaining": {
        "description": "Remaining credits after successful metered key-based request.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Whole seconds to wait before retrying. This takes precedence over other reset hints on a 429 response.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      },
      "RateLimitPolicy": {
        "description": "Active request quotas, including their one-second, one-minute, and one-day windows.",
        "schema": {
          "type": "string"
        },
        "example": "\"standard-second\";q=20;w=1, \"standard-minute\";q=600;w=60, \"standard-day\";q=20000;w=86400"
      },
      "RateLimit": {
        "description": "Remaining quota and reset time for each active window. Values follow the current IETF RateLimit header draft.",
        "schema": {
          "type": "string"
        },
        "example": "\"standard-second\";r=19;t=1, \"standard-minute\";r=599;t=60, \"standard-day\";r=19999;t=86400"
      },
      "XQuotientMaxConcurrent": {
        "description": "Maximum requests that may be in flight for the caller in this policy scope.",
        "schema": {
          "type": "integer",
          "minimum": 1
        },
        "example": 10
      }
    },
    "schemas": {
      "PerformanceScoreSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scope",
          "period",
          "sample",
          "basis",
          "qBrier",
          "marketBrier",
          "qAdvantage",
          "actualYesRate",
          "forecasts",
          "markets"
        ],
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "all_markets",
              "geopolitics_global_elections"
            ]
          },
          "period": {
            "type": "string",
            "enum": [
              "all_time",
              "last_60_days"
            ]
          },
          "sample": {
            "type": "string",
            "enum": [
              "all_forecasts",
              "first_per_market",
              "one_random_per_market"
            ]
          },
          "basis": {
            "type": "string",
            "enum": [
              "resolved",
              "projected"
            ],
            "description": "resolved = explicitly flagged closed/resolved, or ended (end date on/before the report's UTC day) with terminal odds. projected = every terminal-odds market, still-open ones included, scored as the price points."
          },
          "qBrier": {
            "type": [
              "number",
              "null"
            ]
          },
          "marketBrier": {
            "type": [
              "number",
              "null"
            ]
          },
          "qAdvantage": {
            "type": [
              "number",
              "null"
            ],
            "description": "marketBrier minus qBrier; positive favors Quotient."
          },
          "actualYesRate": {
            "type": [
              "number",
              "null"
            ]
          },
          "forecasts": {
            "type": "integer",
            "minimum": 0
          },
          "markets": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PerformanceSnapshot": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "calculationVersion",
          "generatedAt",
          "refreshTtlHours",
          "methodology",
          "population",
          "reporting",
          "accuracy",
          "calibration",
          "hypotheticalReturns",
          "caveats"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "const": 3
          },
          "calculationVersion": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "refreshTtlHours": {
            "type": "number",
            "minimum": 0
          },
          "methodology": {
            "type": "object",
            "description": "Machine-readable definitions for the resolved and projected bases, outcome mapping, Brier comparison, benchmark, hypothetical returns, scopes, periods, and sampling methods.",
            "additionalProperties": true
          },
          "population": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": [
                    "all_markets",
                    "geopolitics_global_elections"
                  ]
                },
                "forecasts": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Full terminal-odds population — everything the projected basis scores."
                },
                "markets": {
                  "type": "integer",
                  "minimum": 0
                },
                "resolvedForecasts": {
                  "type": "integer",
                  "minimum": 0
                },
                "resolvedMarkets": {
                  "type": "integer",
                  "minimum": 0
                },
                "firstForecastAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "lastForecastAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          },
          "reporting": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "context",
              "primary",
              "primaryProjected",
              "periods"
            ],
            "description": "Canonical reporting hierarchy. Read primary for the headline resolved-basis score and primaryProjected for its projected counterpart, then periods in returned order for the requested with/without-category-filter comparison and sampling breakdowns.",
            "properties": {
              "context": {
                "type": "string"
              },
              "primary": {
                "$ref": "#/components/schemas/PerformanceScoreSummary"
              },
              "primaryProjected": {
                "$ref": "#/components/schemas/PerformanceScoreSummary"
              },
              "periods": {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "period",
                    "label",
                    "context",
                    "cohorts"
                  ],
                  "properties": {
                    "period": {
                      "type": "string",
                      "enum": [
                        "last_60_days",
                        "all_time"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string"
                    },
                    "cohorts": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 2,
                      "description": "Geopolitics/global elections first as the consistent core cohort, then all markets without that category filter.",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "scope",
                          "label",
                          "context",
                          "samples",
                          "projected"
                        ],
                        "properties": {
                          "scope": {
                            "type": "string",
                            "enum": [
                              "geopolitics_global_elections",
                              "all_markets"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "context": {
                            "type": "string"
                          },
                          "samples": {
                            "type": "array",
                            "minItems": 3,
                            "maxItems": 3,
                            "description": "Resolved-basis sampling views.",
                            "items": {
                              "$ref": "#/components/schemas/PerformanceScoreSummary"
                            }
                          },
                          "projected": {
                            "type": "array",
                            "minItems": 3,
                            "maxItems": 3,
                            "description": "The same sampling views on the projected basis (every terminal-odds market, still-open ones included).",
                            "items": {
                              "$ref": "#/components/schemas/PerformanceScoreSummary"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "accuracy": {
            "type": "array",
            "description": "Complete flat Brier comparisons for every basis × scope × period × sampling method. Prefer reporting for presentation order and context.",
            "items": {
              "$ref": "#/components/schemas/PerformanceScoreSummary"
            }
          },
          "calibration": {
            "type": "array",
            "description": "Ten-point probability-bin calibration context for Quotient and the market-at-forecast benchmark, per basis.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "hypotheticalReturns": {
            "type": "array",
            "description": "Uncosted hypothetical returns for buying the side Quotient considered underpriced at 5, 10, and 15 percentage-point disagreement thresholds, per basis; projected rows presume the price-implied outcome.",
            "items": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string"
                },
                "period": {
                  "type": "string"
                },
                "basis": {
                  "type": "string",
                  "enum": [
                    "resolved",
                    "projected"
                  ]
                },
                "minimumSpreadPp": {
                  "type": "number"
                },
                "horizon": {
                  "type": "string",
                  "enum": [
                    "seven_days",
                    "resolution"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "all",
                    "YES",
                    "NO"
                  ]
                },
                "meanReturnPct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "medianReturnPct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "positiveShare": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "forecasts": {
                  "type": "integer",
                  "minimum": 0
                },
                "markets": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CanonicalMarketRouting": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          }
        },
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl"
        ]
      },
      "RelationshipMetadata": {
        "type": "object",
        "required": [
          "relationship",
          "direction",
          "via"
        ],
        "properties": {
          "relationship": {
            "type": "string",
            "enum": [
              "HAS_MARKET",
              "ON_MARKET",
              "ON_FORECAST",
              "HAS_SIGNAL"
            ],
            "description": "Exact graph edge at the final hop. The API does not synthesize AFFECTS relationships."
          },
          "direction": {
            "type": "string",
            "enum": [
              "incoming",
              "outgoing"
            ],
            "description": "Direction of the final graph edge relative to the response subject for direct refs, or relative to the explicit via node for two-hop refs."
          },
          "via": {
            "type": "string",
            "enum": [
              "direct",
              "market",
              "asset"
            ],
            "description": "direct is one graph hop; market or asset names the explicit intermediate node for a bounded two-hop ref."
          }
        }
      },
      "RelationshipAssetRef": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RelationshipMetadata"
          },
          {
            "type": "object",
            "required": [
              "id",
              "assetKey",
              "name",
              "ticker",
              "asset_type"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "assetKey": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "ticker": {
                "type": "string",
                "nullable": true
              },
              "asset_type": {
                "type": "string"
              }
            }
          }
        ]
      },
      "RelationshipMarketRef": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RelationshipMetadata"
          },
          {
            "type": "object",
            "required": [
              "marketKey",
              "venue",
              "nativeMarketId",
              "question"
            ],
            "properties": {
              "marketKey": {
                "type": "string"
              },
              "venue": {
                "type": "string",
                "enum": [
                  "polymarket",
                  "polymarket_us",
                  "kalshi",
                  "limitless"
                ],
                "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
              },
              "nativeMarketId": {
                "type": "string"
              },
              "question": {
                "type": "string",
                "nullable": true
              }
            }
          }
        ]
      },
      "RelationshipSignalRef": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RelationshipMetadata"
          },
          {
            "type": "object",
            "required": [
              "id",
              "signal_type",
              "canonical_endpoint",
              "side",
              "published_at"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "signal_type": {
                "type": "string",
                "enum": [
                  "prediction_market"
                ]
              },
              "canonical_endpoint": {
                "type": "string",
                "enum": [
                  "/api/v1/signals"
                ]
              },
              "side": {
                "type": "string",
                "nullable": true
              },
              "published_at": {
                "type": "string",
                "nullable": true
              }
            }
          }
        ]
      },
      "RelationshipsEnvelope": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "assets",
          "markets",
          "signals",
          "truncated"
        ],
        "description": "Bounded, non-recursive graph references. Each category publishes at most 50 lightweight refs. These refs contain no forecast probability, venue odds, aggregate asset probability, or inferred causal AFFECTS edge.",
        "properties": {
          "assets": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/RelationshipAssetRef"
            }
          },
          "markets": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/RelationshipMarketRef"
            }
          },
          "signals": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/RelationshipSignalRef"
            }
          },
          "truncated": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "assets",
              "markets",
              "signals"
            ],
            "properties": {
              "assets": {
                "type": "boolean"
              },
              "markets": {
                "type": "boolean"
              },
              "signals": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "CanonicalMarketWithRelationships": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "ForecastTargetMarket": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ticker",
          "eventTicker",
          "title",
          "subtitle",
          "strikeType",
          "floorStrike",
          "capStrike",
          "yesBid",
          "yesAsk",
          "lastPrice",
          "volume24h",
          "openInterest",
          "status",
          "closeTime",
          "generation"
        ],
        "properties": {
          "ticker": {
            "type": "string"
          },
          "eventTicker": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "subtitle": {
            "type": "string",
            "nullable": true
          },
          "strikeType": {
            "type": "string",
            "nullable": true
          },
          "floorStrike": {
            "type": "number",
            "nullable": true
          },
          "capStrike": {
            "type": "number",
            "nullable": true
          },
          "yesBid": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "nullable": true
          },
          "yesAsk": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "nullable": true
          },
          "lastPrice": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "nullable": true
          },
          "volume24h": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "openInterest": {
            "type": "number",
            "minimum": 0,
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "closeTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "generation": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "costUsd",
              "body"
            ],
            "properties": {
              "costUsd": {
                "type": "string",
                "const": "1.00"
              },
              "body": {
                "$ref": "#/components/schemas/VenueMarketForecastRequest"
              }
            }
          }
        }
      },
      "ForecastTargetResolution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "input",
          "venue",
          "targetType",
          "selectionRequired",
          "event",
          "selectedMarket",
          "markets",
          "generation",
          "allContracts"
        ],
        "properties": {
          "input": {
            "type": "string"
          },
          "venue": {
            "type": "string",
            "const": "kalshi"
          },
          "targetType": {
            "type": "string",
            "enum": [
              "market",
              "event"
            ]
          },
          "selectionRequired": {
            "type": "boolean"
          },
          "event": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "ticker",
              "title",
              "subtitle",
              "category",
              "mutuallyExclusive",
              "sourceUrl"
            ],
            "properties": {
              "ticker": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "subtitle": {
                "type": "string",
                "nullable": true
              },
              "category": {
                "type": "string",
                "nullable": true
              },
              "mutuallyExclusive": {
                "type": "boolean",
                "nullable": true
              },
              "sourceUrl": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "selectedMarket": {
            "$ref": "#/components/schemas/ForecastTargetMarket",
            "nullable": true
          },
          "markets": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/ForecastTargetMarket"
            }
          },
          "generation": {
            "$ref": "#/components/schemas/VenueMarketForecastRequest",
            "nullable": true
          },
          "allContracts": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "marketCount",
              "estimatedCostUsd",
              "requests"
            ],
            "properties": {
              "marketCount": {
                "type": "integer",
                "minimum": 1
              },
              "estimatedCostUsd": {
                "type": "string"
              },
              "requests": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "$ref": "#/components/schemas/VenueMarketForecastRequest"
                }
              }
            }
          }
        }
      },
      "ForecastAvailabilityResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tracked",
          "available",
          "market",
          "question",
          "latestForecast",
          "read",
          "generation",
          "targetResolution",
          "excluded"
        ],
        "properties": {
          "tracked": {
            "type": "boolean",
            "description": "Whether the market identity currently resolves to a Quotient Market row."
          },
          "available": {
            "type": "boolean",
            "description": "Whether a committed stored forecast exists. This check is free."
          },
          "market": {
            "$ref": "#/components/schemas/CanonicalMarketWithRelationships",
            "nullable": true
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "latestForecast": {
            "type": "object",
            "nullable": true,
            "additionalProperties": false,
            "required": [
              "id",
              "createdAt",
              "relationships"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "relationships": {
                "$ref": "#/components/schemas/RelationshipsEnvelope"
              }
            },
            "description": "Existence metadata only. Probability and research remain in the paid forecast response."
          },
          "read": {
            "type": "object",
            "nullable": true,
            "additionalProperties": false,
            "required": [
              "method",
              "endpoint",
              "paid"
            ],
            "properties": {
              "method": {
                "type": "string",
                "const": "GET"
              },
              "endpoint": {
                "type": "string"
              },
              "paid": {
                "type": "boolean",
                "const": true
              }
            }
          },
          "generation": {
            "type": "object",
            "nullable": true,
            "additionalProperties": false,
            "required": [
              "method",
              "endpoint",
              "authentication",
              "idempotencyKeyRequired",
              "body"
            ],
            "properties": {
              "method": {
                "type": "string",
                "const": "POST"
              },
              "endpoint": {
                "type": "string",
                "const": "/api/auth/forecast-requests"
              },
              "authentication": {
                "type": "string",
                "const": "x-quotient-api-key"
              },
              "idempotencyKeyRequired": {
                "type": "boolean",
                "const": true
              },
              "body": {
                "$ref": "#/components/schemas/VenueMarketForecastRequest"
              }
            },
            "description": "Null when a forecast already exists or when excluded is non-null."
          },
          "targetResolution": {
            "type": "object",
            "nullable": true,
            "additionalProperties": false,
            "required": [
              "endpoint",
              "reason",
              "message",
              "marketCount"
            ],
            "properties": {
              "endpoint": {
                "type": "string"
              },
              "reason": {
                "type": "string",
                "const": "venue_event_requires_market"
              },
              "message": {
                "type": "string"
              },
              "marketCount": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Non-null when the supplied Kalshi identifier names a multi-contract event. Resolve the endpoint and choose one exact child ticker before generation."
          },
          "excluded": {
            "type": "object",
            "nullable": true,
            "additionalProperties": false,
            "required": [
              "reason",
              "message"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "enum": [
                  "sports",
                  "mentions",
                  "crypto_up_down"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "description": "Non-null when Quotient will not schedule a forecast for this market. Sports outcomes, mention markets, and short-horizon crypto up/down markets are permanently out of scope; generation is null and POST /api/auth/forecast-requests returns 422 forecast_topic_excluded."
          }
        }
      },
      "VenueMarketForecastRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "kind": {
            "type": "string",
            "const": "venue_market"
          },
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "market_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "required": [
          "kind",
          "venue",
          "market_id"
        ]
      },
      "QuestionForecastRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "kind": {
            "type": "string",
            "const": "question"
          },
          "question": {
            "type": "string",
            "minLength": 10,
            "maxLength": 2000
          },
          "resolution_rules": {
            "type": "string",
            "minLength": 20,
            "maxLength": 12000
          },
          "category": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "start_date": {
            "type": "string",
            "format": "date-time"
          },
          "end_date": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "kind",
          "question",
          "resolution_rules",
          "category",
          "end_date"
        ]
      },
      "ForecastRequestInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/VenueMarketForecastRequest"
          },
          {
            "$ref": "#/components/schemas/QuestionForecastRequest"
          }
        ],
        "discriminator": {
          "propertyName": "kind",
          "mapping": {
            "venue_market": "#/components/schemas/VenueMarketForecastRequest",
            "question": "#/components/schemas/QuestionForecastRequest"
          }
        }
      },
      "ForecastRequestForecast": {
        "type": "object",
        "additionalProperties": false,
        "description": "Published forecast output for this request. Empty until the request succeeds.",
        "properties": {
          "id": {
            "type": "string"
          },
          "question": {
            "type": "string",
            "nullable": true
          },
          "probability": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Quotient YES probability on a 0-1 scale."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "headline": {
            "type": "string",
            "nullable": true
          },
          "bluf": {
            "type": "string",
            "nullable": true
          },
          "thesis": {
            "type": "string",
            "nullable": true
          },
          "reasoningSummary": {
            "type": "string",
            "nullable": true
          },
          "citationCount": {
            "type": "integer",
            "minimum": 0
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        },
        "required": [
          "id",
          "question",
          "probability",
          "createdAt",
          "headline",
          "bluf",
          "thesis",
          "reasoningSummary",
          "citationCount",
          "relationships"
        ]
      },
      "ForecastRequestStatus": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "jobId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "submitted",
              "running",
              "succeeded",
              "rejected",
              "failed"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "forecastIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "forecasts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForecastRequestForecast"
            },
            "description": "Published forecast outputs. Empty while pending or when execution fails."
          },
          "errorCode": {
            "type": "string",
            "nullable": true
          },
          "listing": {
            "$ref": "#/components/schemas/CanonicalMarketRouting",
            "nullable": true
          }
        },
        "required": [
          "jobId",
          "status",
          "createdAt",
          "updatedAt",
          "forecastIds",
          "forecasts",
          "errorCode",
          "listing"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error code"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message"
          },
          "retry_after": {
            "type": "integer",
            "description": "Seconds to wait (only on 429)"
          },
          "retryAfter": {
            "type": "integer",
            "description": "Seconds to wait for owner-scoped forecast-request quota errors."
          },
          "limit_scope": {
            "type": "string",
            "description": "Quota scope that rejected the request, such as standard or x_research."
          },
          "quotaScope": {
            "type": "string",
            "description": "Stable forecast-request quota scope, such as venue_market_daily."
          },
          "limit": {
            "type": "integer",
            "description": "Configured bound for the forecast-request quota that was exceeded."
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "ResolutionPathway": {
        "type": "object",
        "description": "The market contract and forecast crux needed to review how this forecast can resolve.",
        "properties": {
          "criteria": {
            "type": "string",
            "nullable": true
          },
          "crux": {
            "type": "string",
            "nullable": true
          },
          "deadline": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "criteria",
          "crux",
          "deadline",
          "source"
        ]
      },
      "CompactForecast": {
        "type": "object",
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless.",
            "nullable": true
          },
          "market": {
            "$ref": "#/components/schemas/CanonicalMarketRouting",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "probability": {
            "type": "number"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "headline": {
            "type": "string",
            "nullable": true
          },
          "thesis": {
            "type": "string",
            "nullable": true
          },
          "resolution_pathway": {
            "$ref": "#/components/schemas/ResolutionPathway"
          },
          "delta_from_prior": {
            "type": "number",
            "nullable": true
          },
          "delta_reasoning": {
            "type": "string",
            "nullable": true
          },
          "refresh_reason": {
            "type": "string",
            "nullable": true
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        },
        "required": [
          "venue",
          "market",
          "id",
          "probability",
          "created_at",
          "thesis",
          "resolution_pathway",
          "relationships"
        ]
      },
      "QuotientXAccountMetadata": {
        "type": "object",
        "description": "Quotient's account classification metadata. Reviewed expert status is provenance, not an accuracy guarantee.",
        "properties": {
          "handle": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "x_user_id": {
            "type": "string",
            "nullable": true
          },
          "current_username": {
            "type": "string",
            "nullable": true
          },
          "is_quotient_expert": {
            "type": "boolean"
          },
          "quotient_expert": {
            "type": "object",
            "nullable": true,
            "properties": {
              "designation": {
                "type": "string",
                "enum": [
                  "reviewed_expert"
                ]
              },
              "policy_version": {
                "type": "string",
                "nullable": true
              }
            }
          }
        }
      },
      "XSearchPost": {
        "type": "object",
        "properties": {
          "post_id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "author_handle": {
            "type": "string"
          },
          "author_name": {
            "type": "string",
            "nullable": true
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "text": {
            "type": "string"
          },
          "relevant_excerpt": {
            "type": "string"
          },
          "relevance": {
            "type": "string"
          },
          "stance": {
            "type": "string",
            "enum": [
              "supports_yes",
              "supports_no",
              "mixed",
              "context",
              "unknown"
            ]
          },
          "linked_market_slugs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "author_metadata": {
            "$ref": "#/components/schemas/QuotientXAccountMetadata"
          }
        }
      },
      "QuotientMarketContext": {
        "type": "object",
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          },
          "market_id": {
            "type": "string",
            "nullable": true
          },
          "question": {
            "type": "string"
          },
          "resolution_criteria": {
            "type": "string",
            "nullable": true
          },
          "resolution_source": {
            "type": "string",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "condition_id": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "resolved_yes": {
            "type": "boolean",
            "nullable": true
          },
          "venue_data": {
            "type": "object",
            "properties": {
              "yes_odds": {
                "type": "number",
                "nullable": true
              },
              "volume_24h": {
                "type": "number",
                "nullable": true
              }
            }
          },
          "quotient_url": {
            "type": "string",
            "nullable": true
          },
          "forecast": {
            "$ref": "#/components/schemas/CompactForecast",
            "nullable": true
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "XSearchResponse": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/XSearchPost"
            }
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "handle": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string",
                  "nullable": true
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "profile_url": {
                  "type": "string"
                },
                "quotient_metadata": {
                  "$ref": "#/components/schemas/QuotientXAccountMetadata"
                }
              }
            }
          },
          "quotient_markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuotientMarketContext"
            }
          },
          "gaps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "EvidencedTrait": {
        "type": "object",
        "description": "A profile claim and the posts backing it. post_ids always resolve against the response's evidence array; a claim whose supporting posts fail citation grounding is omitted from the response entirely.",
        "properties": {
          "post_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "XProfileResponse": {
        "type": "object",
        "properties": {
          "handle": {
            "type": "string"
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "profile_url": {
            "type": "string"
          },
          "quotient_metadata": {
            "$ref": "#/components/schemas/QuotientXAccountMetadata"
          },
          "window": {
            "type": "object",
            "properties": {
              "from_date": {
                "type": "string",
                "format": "date"
              },
              "to_date": {
                "type": "string",
                "format": "date"
              },
              "lookback_days": {
                "type": "integer"
              },
              "post_count": {
                "type": "integer",
                "description": "Distinct citation-grounded posts the profile is built from."
              }
            }
          },
          "interests": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EvidencedTrait"
                },
                {
                  "type": "object",
                  "properties": {
                    "topic": {
                      "type": "string"
                    },
                    "weight": {
                      "type": "number",
                      "description": "Relative prominence in the window, 0-1."
                    }
                  }
                }
              ]
            }
          },
          "beliefs": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EvidencedTrait"
                },
                {
                  "type": "object",
                  "properties": {
                    "claim": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "string"
                    }
                  }
                }
              ]
            }
          },
          "tendencies": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EvidencedTrait"
                },
                {
                  "type": "object",
                  "properties": {
                    "trait": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    }
                  }
                }
              ]
            }
          },
          "risk_profile": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/EvidencedTrait"
              },
              {
                "type": "object",
                "properties": {
                  "posture": {
                    "type": "string"
                  },
                  "time_horizon": {
                    "type": "string"
                  },
                  "position_sizing": {
                    "type": "string"
                  },
                  "reaction_to_loss": {
                    "type": "string"
                  }
                }
              }
            ]
          },
          "information_processing": {
            "nullable": true,
            "description": "How the account handles complex, ambiguous, or conflicting information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EvidencedTrait"
              },
              {
                "type": "object",
                "properties": {
                  "style": {
                    "type": "string"
                  },
                  "evidence_preference": {
                    "type": "string"
                  },
                  "handles_ambiguity": {
                    "type": "string"
                  },
                  "changes_mind_when": {
                    "type": "string"
                  }
                }
              }
            ]
          },
          "recommendation_hints": {
            "type": "object",
            "nullable": true,
            "description": "Direct inputs for tailoring suggestions to this person.",
            "properties": {
              "market_categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tone": {
                "type": "string"
              },
              "avoid": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "observations": {
            "type": "array",
            "description": "Raw per-sweep findings before synthesis, each citing its own post_ids.",
            "items": {
              "type": "object",
              "properties": {
                "dimension": {
                  "type": "string"
                },
                "statement": {
                  "type": "string"
                },
                "post_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "evidence": {
            "type": "array",
            "description": "Every grounded post the profile draws on. All post_ids resolve here.",
            "items": {
              "type": "object",
              "properties": {
                "post_id": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "published_at": {
                  "type": "string",
                  "nullable": true
                },
                "excerpt": {
                  "type": "string"
                }
              }
            }
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "gaps": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the window could not establish, including any sweep that failed and was excluded."
          },
          "meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "LatestResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "window": {
            "type": "object",
            "properties": {
              "hours": {
                "type": "integer"
              },
              "since": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "forecast",
                "article",
                "x_post"
              ]
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "forecast",
                    "article",
                    "x_post"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "source": {
                  "type": "object",
                  "nullable": true,
                  "additionalProperties": true
                },
                "market": {
                  "$ref": "#/components/schemas/CanonicalMarketWithRelationships"
                },
                "forecast": {
                  "$ref": "#/components/schemas/CompactForecast",
                  "nullable": true
                }
              }
            }
          },
          "count": {
            "type": "integer"
          }
        }
      },
      "AssetIdentifier": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "platform",
          "kind",
          "value"
        ],
        "properties": {
          "platform": {
            "type": "string",
            "minLength": 1,
            "description": "Identifier namespace, such as hyperliquid, sec, kalshi, or quotient."
          },
          "kind": {
            "type": "string",
            "minLength": 1,
            "description": "Identifier family inside the platform namespace, such as coin or cik."
          },
          "value": {
            "type": "string",
            "minLength": 1,
            "description": "Exact platform value. Preserve case and punctuation for routing or execution; normalization applies only to lookup."
          }
        }
      },
      "AssetListItem": {
        "type": "object",
        "additionalProperties": false,
        "description": "Canonical metadata-only underlying Asset. Asset means the company, commodity, cryptoasset, or other underlying—not an x402 payment asset or prediction-market outcome token.",
        "required": [
          "id",
          "assetKey",
          "name",
          "ticker",
          "asset_type",
          "aliases",
          "identifiers",
          "linked_market_count"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Stable UUID for the canonical :Asset:Entity node."
          },
          "assetKey": {
            "type": "string",
            "description": "Globally unique namespaced identity, such as company:aapl, commodity:gold, or crypto:btc."
          },
          "name": {
            "type": "string"
          },
          "ticker": {
            "type": "string",
            "nullable": true,
            "description": "Common ticker when one exists. Tickers are not globally unique; prefer assetKey or a platform identifier for exact identity."
          },
          "asset_type": {
            "type": "string",
            "description": "Canonical underlying type, such as company, commodity, crypto, index, fund, fx, or other."
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetIdentifier"
            },
            "description": "Namespaced external identifiers for the underlying. Venue market IDs remain on linked markets and are not reclassified as Asset identifiers."
          },
          "linked_market_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Count of active, open prediction markets directly connected by HAS_MARKET. This count contains no forecast data."
          }
        }
      },
      "AssetsResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "assets"
        ],
        "properties": {
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetListItem"
            },
            "description": "Complete metadata-only Asset catalog under the supplied filters."
          }
        }
      },
      "AssetLinkedMarket": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MarketListItem"
          },
          {
            "type": "object",
            "required": [
              "has_forecast",
              "latest_q_probability",
              "thesis",
              "forecast_at",
              "market_odds_at_forecast",
              "has_published_signal",
              "published_signal_count"
            ],
            "properties": {
              "has_forecast": {
                "type": "boolean",
                "description": "True when Quotient has at least one committed forecast stored for this linked market."
              },
              "latest_q_probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "nullable": true,
                "description": "Q's latest committed calibrated YES probability for this exact market question. Null is valid. Never aggregate linked probabilities into asset direction."
              },
              "thesis": {
                "type": "string",
                "nullable": true,
                "description": "Reviewable thesis for the forecast represented by latest_q_probability. Falls back to that forecast's BLUF; null when no forecast thesis or BLUF is stored."
              },
              "forecast_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "Creation time of the forecast represented by latest_q_probability. Null when has_forecast is false."
              },
              "market_odds_at_forecast": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "nullable": true,
                "description": "Venue YES probability captured at forecast_at for this exact linked market. Use it with latest_q_probability for historical spread arithmetic; market_odds is the current quote."
              },
              "has_published_signal": {
                "type": "boolean",
                "description": "Historical existence of a non-backfill QuotientSignal publication; not a claim that a signal is currently active."
              },
              "published_signal_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Stored non-backfill QuotientSignal publication count, separate from legacy signal_count."
              }
            }
          }
        ]
      },
      "AssetSearchRelevance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "score",
          "matched_by",
          "matched_fields"
        ],
        "properties": {
          "score": {
            "type": "number",
            "description": "Reciprocal-rank ordering score for Asset identity matching. It is not a probability or materiality score."
          },
          "matched_by": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "graph",
                "typesense"
              ]
            }
          },
          "matched_fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AssetMarketSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "active_market_count",
          "markets_with_forecast",
          "markets_with_published_signal",
          "mispriced_market_count",
          "mispricing_threshold_pp"
        ],
        "properties": {
          "active_market_count": {
            "type": "integer",
            "description": "Active, open markets directly connected by HAS_MARKET."
          },
          "markets_with_forecast": {
            "type": "integer",
            "description": "Active linked markets with at least one committed Q forecast."
          },
          "markets_with_published_signal": {
            "type": "integer",
            "description": "Active linked markets with at least one stored QuotientSignal publication (may be historical)."
          },
          "mispriced_market_count": {
            "type": "integer",
            "description": "Active linked markets where |latest Q - venue YES| meets or exceeds mispricing_threshold_pp and both values exist."
          },
          "mispricing_threshold_pp": {
            "type": "number",
            "description": "Threshold behind mispriced_market_count, in percentage points."
          }
        }
      },
      "AssetSearchItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AssetListItem"
          },
          {
            "type": "object",
            "required": [
              "linked_markets",
              "market_summary",
              "relevance",
              "relationships"
            ],
            "properties": {
              "linked_markets": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AssetLinkedMarket"
                },
                "description": "Full hydrated rows for every active, open market directly connected by HAS_MARKET — returned only in reference mode. Text (q) searches return an empty array and summarize coverage in market_summary; resolve the Asset by reference to hydrate its markets. AFFECTS-only markets are excluded; no spread threshold prunes rows."
              },
              "market_summary": {
                "$ref": "#/components/schemas/AssetMarketSummary"
              },
              "relevance": {
                "$ref": "#/components/schemas/AssetSearchRelevance"
              },
              "relationships": {
                "$ref": "#/components/schemas/RelationshipsEnvelope"
              }
            }
          }
        ]
      },
      "AssetSearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "query",
          "references",
          "material_only",
          "assets",
          "retrieval"
        ],
        "properties": {
          "query": {
            "type": "string",
            "nullable": true,
            "description": "The supplied q value, '*' for the enriched directory, or null in reference mode."
          },
          "references": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Deduplicated exact references used for this search."
          },
          "material_only": {
            "type": "boolean",
            "description": "Whether Asset-level material-data filtering was requested."
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetSearchItem"
            }
          },
          "retrieval": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "graph",
              "typesense"
            ],
            "properties": {
              "graph": {
                "type": "string",
                "enum": [
                  "ok"
                ]
              },
              "typesense": {
                "type": "string",
                "enum": [
                  "ok",
                  "unconfigured",
                  "error"
                ]
              }
            },
            "description": "Graph is authoritative for identity and linked-market hydration. Optional Typesense lexical recall fails open to graph results."
          }
        }
      },
      "MarketEventContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "slug"
        ],
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MarketListItem": {
        "type": "object",
        "description": "Lightweight catalog entry for a market. Use /markets/mispriced or /markets/{slug}/intelligence for full forecast data.",
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl",
          "slug",
          "question",
          "event",
          "tags",
          "categories",
          "end_date",
          "market_odds",
          "inDispute",
          "clarifications",
          "volume_24h",
          "signal_count",
          "forecast_count",
          "latest_forecast_at",
          "market_updated_at",
          "latest_forecast_delta",
          "latest_forecast_refresh_reason",
          "quotientUrl",
          "polymarketUrl",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          },
          "question": {
            "type": "string",
            "description": "The market question"
          },
          "event": {
            "$ref": "#/components/schemas/MarketEventContext",
            "nullable": true,
            "description": "Parent Event context when the market is attached to an Event."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Event and venue-native market tags available for market discovery/filtering. Linkage to an underlying Asset is the graph HAS_MARKET relationship exposed by /assets/search; a tag alone is not that relationship."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories derived from Event tags and venue-native market metadata."
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When this market closes/resolves. Null if no end date is set."
          },
          "market_odds": {
            "type": "number",
            "nullable": true,
            "description": "Venue-neutral current source-venue implied YES probability (0-1) across Polymarket International, Polymarket US, Kalshi, and Limitless; null when no live canonical price is available."
          },
          "inDispute": {
            "type": "boolean",
            "description": "Whether the source venue currently reports a dispute or challenged settlement state. Legacy Polymarket rows map their UMA dispute state here."
          },
          "clarifications": {
            "type": "string",
            "nullable": true,
            "description": "Rules clarifications for the market, if provided"
          },
          "volume_24h": {
            "type": "number",
            "nullable": true,
            "description": "Nullable venue-reported 24-hour activity where available. Units, refresh cadence, and comparability can differ by venue; do not rank across venues without inspecting the source context."
          },
          "signal_count": {
            "type": "integer",
            "description": "Number of analyst signals for this market"
          },
          "forecast_count": {
            "type": "integer",
            "description": "Number of Q forecasts within the max_forecast_age window"
          },
          "latest_forecast_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When Q's most recent forecast was created"
          },
          "market_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When the market's odds or metadata last synced from its source venue"
          },
          "latest_forecast_delta": {
            "type": "number",
            "nullable": true,
            "description": "Probability change of the latest forecast vs its prior (deltaFromPrior)"
          },
          "latest_forecast_refresh_reason": {
            "type": "string",
            "nullable": true,
            "description": "Why the latest forecast reran (e.g. price_move). Null for scheduled runs."
          },
          "quotientUrl": {
            "type": "string",
            "nullable": true,
            "description": "Canonical Quotient app page URL for this market"
          },
          "polymarketUrl": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "MarketsResponse": {
        "type": "object",
        "required": [
          "markets",
          "venue_facets"
        ],
        "properties": {
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketListItem"
            }
          },
          "venue_facets": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "venue": {
                  "type": "string",
                  "enum": [
                    "polymarket",
                    "polymarket_us",
                    "kalshi",
                    "limitless"
                  ],
                  "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
                },
                "count": {
                  "type": "integer"
                }
              },
              "required": [
                "venue",
                "count"
              ]
            }
          }
        }
      },
      "MarketSearchRelevance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "score",
          "matched_by",
          "matched_fields"
        ],
        "properties": {
          "score": {
            "type": "number",
            "description": "Reciprocal-rank-fusion ordering score. Compare only within this response; it is not a probability."
          },
          "matched_by": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "graph",
                "typesense",
                "semantic"
              ]
            },
            "description": "Retrieval lanes that contributed this candidate."
          },
          "matched_fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Known lexical fields that matched; semantic-only matches may leave this empty."
          }
        }
      },
      "MarketSearchItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MarketListItem"
          },
          {
            "type": "object",
            "required": [
              "has_forecast",
              "latest_q_probability",
              "thesis",
              "forecast_at",
              "market_odds_at_forecast",
              "has_published_signal",
              "published_signal_count",
              "relevance"
            ],
            "properties": {
              "has_forecast": {
                "type": "boolean",
                "description": "True when Quotient has at least one committed Q forecast stored for this market. Use this before requesting forecast detail."
              },
              "latest_q_probability": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "nullable": true,
                "description": "Q's latest committed calibrated YES probability at or before the response as_of cutoff. Null when has_forecast is false."
              },
              "thesis": {
                "type": "string",
                "nullable": true,
                "description": "Reviewable thesis for the forecast represented by latest_q_probability. Falls back to that forecast's BLUF; null when no forecast thesis or BLUF is stored."
              },
              "forecast_at": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "Creation time of the forecast represented by latest_q_probability. Null when has_forecast is false."
              },
              "market_odds_at_forecast": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "nullable": true,
                "description": "Venue YES probability captured at forecast_at. Use this with latest_q_probability for a historical spread; market_odds is the current venue quote."
              },
              "has_published_signal": {
                "type": "boolean",
                "description": "True when Quotient has published at least one non-backfill QuotientSignal for this market. This is historical publication existence, not a claim that a signal is currently active."
              },
              "published_signal_count": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of stored non-backfill QuotientSignal publications for this market. This is separate from the legacy analyst signal_count field."
              },
              "relevance": {
                "$ref": "#/components/schemas/MarketSearchRelevance"
              }
            }
          }
        ]
      },
      "MarketSearchFacetValue": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "count"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 1
          }
        }
      },
      "MarketSearchEventGroup": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "event",
          "tags",
          "categories",
          "relevance",
          "markets"
        ],
        "properties": {
          "event": {
            "$ref": "#/components/schemas/MarketEventContext",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "relevance": {
            "$ref": "#/components/schemas/MarketSearchRelevance"
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketSearchItem"
            }
          }
        }
      },
      "MarketSearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "as_of",
          "historical",
          "query",
          "group_by",
          "markets",
          "events",
          "facets",
          "retrieval"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive snapshot cutoff applied to forecast and publication selection."
          },
          "historical": {
            "type": "boolean",
            "description": "True when the caller supplied as_of; false for the current view."
          },
          "query": {
            "type": "string",
            "description": "Normalized search query, or '*' for a filter-only search."
          },
          "group_by": {
            "type": "string",
            "enum": [
              "market",
              "event"
            ]
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketSearchItem"
            }
          },
          "events": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/MarketSearchEventGroup"
            },
            "description": "Returned matches grouped by Event when group_by=event; otherwise null."
          },
          "facets": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "tags",
              "categories"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MarketSearchFacetValue"
                }
              },
              "categories": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MarketSearchFacetValue"
                }
              }
            },
            "description": "Taxonomy counts across the returned hydrated candidate set."
          },
          "retrieval": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "graph",
              "typesense",
              "semantic"
            ],
            "properties": {
              "graph": {
                "type": "string",
                "enum": [
                  "ok"
                ]
              },
              "typesense": {
                "type": "string",
                "enum": [
                  "ok",
                  "unconfigured",
                  "error"
                ]
              },
              "semantic": {
                "type": "string",
                "enum": [
                  "ok",
                  "unconfigured",
                  "error"
                ]
              }
            },
            "description": "Per-lane health. Graph retrieval is required; optional lanes fail open to graph results."
          }
        }
      },
      "MispricedMarketItem": {
        "type": "object",
        "description": "A market where Q's forecast diverges from market odds",
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl",
          "slug",
          "question",
          "end_date",
          "quotient_odds",
          "market_odds",
          "inDispute",
          "clarifications",
          "bluf",
          "forecast",
          "spread",
          "spread_direction",
          "volume_24h",
          "last_updated",
          "signal_count",
          "quotientUrl",
          "polymarketUrl",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          },
          "question": {
            "type": "string",
            "description": "The market question"
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When this market closes/resolves"
          },
          "quotient_odds": {
            "type": "number",
            "description": "Q's forecast probability (0-1), always expressed as yes odds"
          },
          "market_odds": {
            "type": "number",
            "description": "Market yes odds (0-1)"
          },
          "inDispute": {
            "type": "boolean",
            "description": "Whether the source venue currently reports a dispute or challenged settlement state. Legacy Polymarket rows map their UMA dispute state here."
          },
          "clarifications": {
            "type": "string",
            "nullable": true,
            "description": "Rules clarifications for the market, if provided"
          },
          "bluf": {
            "type": "string",
            "description": "Bottom-line-up-front summary"
          },
          "forecast": {
            "$ref": "#/components/schemas/CompactForecast"
          },
          "spread": {
            "type": "number",
            "nullable": true,
            "description": "Absolute difference between Q forecast and market odds"
          },
          "spread_direction": {
            "type": "string",
            "enum": [
              "q_higher",
              "q_lower"
            ]
          },
          "volume_24h": {
            "type": "number",
            "nullable": true,
            "description": "Nullable venue-reported 24-hour activity. Treat it as venue-specific rather than a directly comparable cross-venue USD measure."
          },
          "last_updated": {
            "type": "string",
            "format": "date-time"
          },
          "signal_count": {
            "type": "integer",
            "description": "Number of analyst signals for this market"
          },
          "quotientUrl": {
            "type": "string",
            "nullable": true,
            "description": "Canonical Quotient app page URL for this market"
          },
          "polymarketUrl": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "MispricedMarketsResponse": {
        "type": "object",
        "required": [
          "markets"
        ],
        "properties": {
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MispricedMarketItem"
            }
          }
        }
      },
      "KeyDriver": {
        "type": "object",
        "properties": {
          "factor": {
            "type": "string",
            "description": "What this driver is"
          },
          "direction": {
            "type": "string",
            "enum": [
              "for",
              "against",
              "neutral"
            ]
          },
          "impact": {
            "type": "string",
            "enum": [
              "critical",
              "significant",
              "moderate",
              "minor"
            ]
          },
          "citation": {
            "type": "string",
            "nullable": true,
            "description": "Source citation for this driver"
          }
        }
      },
      "SignalItem": {
        "type": "object",
        "required": [
          "id",
          "title",
          "comment",
          "direction",
          "url",
          "source",
          "published_at",
          "correlated_at",
          "confidence",
          "evidence_quote"
        ],
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "description": "Stable article identifier, normally its URL"
          },
          "title": {
            "type": "string",
            "description": "Article or source title"
          },
          "comment": {
            "type": "string",
            "description": "Why the article was correlated to the market, when available"
          },
          "direction": {
            "type": "string",
            "enum": [
              "yes",
              "no",
              "neutral"
            ],
            "nullable": true,
            "description": "Direction relative to the market question; null when the article correlation does not assess direction"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Source article URL"
          },
          "source": {
            "type": "string",
            "nullable": true,
            "description": "Source publication name"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Best available article publication or ingestion time"
          },
          "correlated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When Quotient correlated or ingested the article for this market"
          },
          "confidence": {
            "type": "string",
            "nullable": true,
            "description": "Correlation confidence when available"
          },
          "evidence_quote": {
            "type": "string",
            "nullable": true,
            "description": "Supporting quote recorded on the correlation when available"
          }
        }
      },
      "Sentiment": {
        "type": "object",
        "description": "Percentage breakdown of source-read directions; pct_neutral includes correlations whose direction is unclassified/null",
        "properties": {
          "pct_bullish": {
            "type": "integer",
            "description": "Percent of signals that are bullish (yes)"
          },
          "pct_bearish": {
            "type": "integer",
            "description": "Percent of signals that are bearish (no)"
          },
          "pct_neutral": {
            "type": "integer",
            "description": "Percent of reads that are neutral or directionally unclassified"
          }
        }
      },
      "LookupResponse": {
        "type": "object",
        "description": "Batch lookup results. Markets with forecast coverage return full intelligence; markets without coverage return stub objects with null/empty fields.",
        "properties": {
          "results": {
            "type": "array",
            "description": "Intelligence objects for each found market",
            "items": {
              "$ref": "#/components/schemas/MarketIntelResponse"
            }
          },
          "not_found": {
            "type": "array",
            "description": "Input identifiers (market keys, slugs, or condition IDs) that did not match any market",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "results",
          "not_found"
        ]
      },
      "MarketIntelResponse": {
        "type": "object",
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          },
          "question": {
            "type": "string"
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When this market closes/resolves. Null if no end date is set."
          },
          "quotient_odds": {
            "type": "number",
            "description": "Q's forecast probability (0-1), always expressed as yes odds"
          },
          "market_odds": {
            "type": "number",
            "nullable": true,
            "description": "Market yes odds at time of Q's forecast (0-1)"
          },
          "inDispute": {
            "type": "boolean",
            "description": "Whether the source venue currently reports a dispute or challenged settlement state. Legacy Polymarket rows map their UMA dispute state here."
          },
          "clarifications": {
            "type": "string",
            "nullable": true,
            "description": "Rules clarifications for the market, if provided"
          },
          "bluf": {
            "type": "string",
            "description": "Bottom-line-up-front summary"
          },
          "forecast": {
            "$ref": "#/components/schemas/CompactForecast",
            "nullable": true
          },
          "last_updated": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When Q's most recent forecast was created"
          },
          "volume_24h": {
            "type": "number",
            "nullable": true,
            "description": "Nullable venue-reported 24-hour activity where available; cadence and units can differ by venue."
          },
          "quotientUrl": {
            "type": "string",
            "nullable": true,
            "description": "Canonical Quotient app page URL for this market"
          },
          "polymarketUrl": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
          },
          "key_drivers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyDriver"
            }
          },
          "signals": {
            "type": "array",
            "description": "Up to 10 correlated articles, newest source publication first",
            "items": {
              "$ref": "#/components/schemas/SignalItem"
            }
          },
          "sentiment": {
            "$ref": "#/components/schemas/Sentiment"
          },
          "source_reads_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Publication/ingestion time of the newest returned article"
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "SignalsResponse": {
        "type": "object",
        "properties": {
          "market": {
            "$ref": "#/components/schemas/CanonicalMarketWithRelationships"
          },
          "market_slug": {
            "type": "string"
          },
          "quotientUrl": {
            "type": "string",
            "nullable": true,
            "description": "Canonical Quotient app page URL for this market"
          },
          "polymarketUrl": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
          },
          "signals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SignalItem"
            }
          },
          "sentiment": {
            "$ref": "#/components/schemas/Sentiment"
          },
          "total": {
            "type": "integer",
            "description": "Total number of signals for this market"
          },
          "last_updated": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Publication/ingestion time of the newest returned article"
          }
        }
      },
      "TradeSignalMarket": {
        "type": "object",
        "required": [
          "venue",
          "nativeMarketId",
          "nativeEventId",
          "seriesTicker",
          "marketKey",
          "slug",
          "marketUrl",
          "sourceUrl",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless."
          },
          "nativeMarketId": {
            "type": "string"
          },
          "nativeEventId": {
            "type": "string",
            "nullable": true
          },
          "seriesTicker": {
            "type": "string",
            "nullable": true
          },
          "marketKey": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "marketUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector-owned user-navigation URL. Never sourced from sourceUrl."
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "Connector provenance/API source URL; not a navigation fallback."
          },
          "question": {
            "type": "string"
          },
          "condition_id": {
            "type": "string",
            "nullable": true,
            "description": "Polymarket condition ID when the source venue provides that identifier; null for non-Polymarket rows. Use marketKey for venue-neutral identity."
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "market_odds": {
            "type": "number",
            "nullable": true,
            "description": "Graph-synced market yes odds (0-1); see priced_at for freshness"
          },
          "volume_24h": {
            "type": "number",
            "nullable": true,
            "description": "Nullable venue-reported 24-hour activity; not directly comparable across venues."
          },
          "quotientUrl": {
            "type": "string",
            "nullable": true
          },
          "polymarketUrl": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "TradeSignalItem": {
        "type": "object",
        "description": "A Quotient trade signal with separate publication, forecast-freshness, and active-lifecycle context. Entry values are frozen at publish; status, conviction, convergence, and capacity are derived live. All *_cents values are Q-side cents: the cost/value of the share on the signal's side.",
        "required": [
          "id",
          "thesis",
          "market",
          "relationships"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "deprecated": true,
            "description": "Compatibility alias for published_at"
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the signal itself was published"
          },
          "forecast_updated_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "When Q's latest forecast for the market was created"
          },
          "is_new_today": {
            "type": "boolean",
            "description": "True when published_at falls on the current UTC calendar day"
          },
          "is_fresh": {
            "type": "boolean",
            "description": "True when forecast_updated_at is no more than six hours old"
          },
          "is_active": {
            "type": "boolean",
            "description": "True while the signal is non-terminal; false only for retired signals. This is independent of is_new_today and is_fresh."
          },
          "side": {
            "type": "string",
            "enum": [
              "YES",
              "NO"
            ],
            "description": "The trade side: sign of (Q − market price) at publish"
          },
          "entry_q": {
            "type": "number",
            "description": "Quotient probability at publish (0-100 YES scale)"
          },
          "entry_pm": {
            "type": "number",
            "deprecated": true,
            "description": "Legacy wire name for the source venue's YES price at signal publication (0-100); it is not Polymarket-only."
          },
          "entry_spread_pp": {
            "type": "number",
            "description": "Raw |entry_q − entry_pm| in percentage points"
          },
          "window_days": {
            "type": "integer",
            "nullable": true,
            "description": "Days to resolution at publish"
          },
          "resolves_in_window": {
            "type": "boolean",
            "description": "Market settles inside the 7-day hold (convergence goal becomes 100¢)"
          },
          "status": {
            "type": "string",
            "enum": [
              "actionable",
              "unconfirmed",
              "paused",
              "done",
              "retired"
            ],
            "description": "actionable = live and tradeable; unconfirmed = Q's side flipped vs the prior forecast (hold one cycle); paused = temporarily unavailable after deep drawdown, venue divergence, or a safety veto; done = converged (venue reached Q's value); retired = terminal, see retired_reason"
          },
          "retired_reason": {
            "type": "string",
            "enum": [
              "resolved",
              "flipped",
              "fading_q",
              "expired"
            ],
            "nullable": true
          },
          "conviction_tier": {
            "type": "integer",
            "nullable": true,
            "description": "1-3 from the forecaster's ensemble-draw dispersion (3 = draws tightly agree). Not spread."
          },
          "conviction": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ],
            "nullable": true
          },
          "has_band": {
            "type": "boolean",
            "description": "False only when no conviction estimate could be computed at all (missing Q or price). Pre-ensemble inferred estimates report true with tier capped at 2."
          },
          "latest_q": {
            "type": "number",
            "nullable": true,
            "description": "Latest canonical Q (0-1)"
          },
          "thesis": {
            "type": "string",
            "nullable": true,
            "description": "Reviewable thesis paired with latest_q. Falls back to the latest forecast's BLUF; null when neither is stored."
          },
          "q_side": {
            "type": "string",
            "enum": [
              "YES",
              "NO"
            ],
            "description": "The side Q's latest forecast favors at current prices"
          },
          "q_value_cents": {
            "type": "integer",
            "nullable": true,
            "description": "Q's own value for the side (¢)"
          },
          "entry_cost_cents": {
            "type": "integer",
            "nullable": true,
            "description": "Side cost at publish (¢)"
          },
          "current_cost_cents": {
            "type": "integer",
            "nullable": true,
            "description": "Side cost now (¢)"
          },
          "distance_to_convergence_cents": {
            "type": "integer",
            "nullable": true,
            "description": "Cents from current cost to the convergence goal; <= 0 means converged"
          },
          "converge_upside_pct": {
            "type": "integer",
            "nullable": true,
            "description": "% return from current cost if the market converges to Q"
          },
          "max_roi_pct": {
            "type": "integer",
            "nullable": true,
            "description": "% return from current cost if the market resolves on Q's side (side share settles at 100¢) — the ceiling if Q is right at settlement"
          },
          "live_priced": {
            "type": "boolean",
            "description": "True when current pricing came from a live venue book. The current overlay supports Polymarket International CLOB rows; other venue rows report false and use graph-synced odds."
          },
          "priced_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Timestamp of the price basis (now for live, market sync time for graph fallback)"
          },
          "capacity_usd_at_2c": {
            "type": "number",
            "nullable": true,
            "description": "Persisted near-touch depth within 2¢, USD notional (refreshed ~12h)"
          },
          "capacity_available": {
            "type": "boolean",
            "nullable": true
          },
          "capacity_basis": {
            "type": "string",
            "enum": [
              "depth-2c",
              "volume-fallback"
            ],
            "nullable": true,
            "description": "volume-fallback = capacity unknown but 24h volume >= 5000"
          },
          "capacity_as_of": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "drawdown_risk_elevated": {
            "type": "boolean",
            "nullable": true,
            "description": "True when Quotient's risk model puts at least a 15% probability on this signal's side losing most of its remaining value within roughly 72 hours of the latest forecast (forecast_updated_at). The model head is trained on matured 72-hour price paths: a side counts as a deep drawdown when its price printed twice within two hours at or below a quarter of the entry price, or when the market resolved against it. Null means no current read: the forecast predates the risk model (August 2026) or the read has aged past the model's ~72h horizon — unknown, not safe. Path risk only: it never changes the published probability, and it is independent of conviction_tier (which measures ensemble-draw dispersion). Near expiry, elevated readings are common on both sides, because resolution itself takes the losing side down by more than 75%."
          },
          "crash_risk_elevated": {
            "type": "boolean",
            "nullable": true,
            "deprecated": true,
            "description": "Deprecated former name for drawdown_risk_elevated; same value. Emitted for one release."
          },
          "market": {
            "$ref": "#/components/schemas/TradeSignalMarket"
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "TradeSignalsResponse": {
        "type": "object",
        "required": [
          "signals"
        ],
        "properties": {
          "signals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeSignalItem"
            }
          }
        }
      },
      "FeaturedSignalResponse": {
        "type": "object",
        "required": [
          "signal",
          "featured_by"
        ],
        "properties": {
          "signal": {
            "$ref": "#/components/schemas/TradeSignalItem",
            "nullable": true
          },
          "featured_by": {
            "type": "string",
            "enum": [
              "pin",
              "auto"
            ],
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Present when signal is null"
          }
        }
      },
      "ForecastRead": {
        "type": "object",
        "required": [
          "venue",
          "market",
          "id",
          "probability",
          "created_at",
          "market_odds_at_forecast",
          "thesis",
          "relationships"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "polymarket_us",
              "kalshi",
              "limitless"
            ],
            "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless.",
            "nullable": true
          },
          "market": {
            "$ref": "#/components/schemas/CanonicalMarketRouting",
            "nullable": true
          },
          "id": {
            "type": "string"
          },
          "probability": {
            "type": "number",
            "description": "Canonical Q probability (0-1)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "market_odds_at_forecast": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "nullable": true,
            "description": "Venue YES probability captured when this forecast was created. Use it, rather than current response-level market_odds, for historical spread arithmetic."
          },
          "headline": {
            "type": "string",
            "nullable": true
          },
          "bluf": {
            "type": "string",
            "nullable": true,
            "description": "Bottom-line-up-front thesis"
          },
          "thesis": {
            "type": "string",
            "nullable": true,
            "description": "Reviewable forecast thesis"
          },
          "crux": {
            "type": "string",
            "nullable": true
          },
          "resolution_pathway": {
            "$ref": "#/components/schemas/ResolutionPathway"
          },
          "delta_from_prior": {
            "type": "number",
            "nullable": true,
            "description": "Signed probability change vs the prior forecast"
          },
          "delta_reasoning": {
            "type": "string",
            "nullable": true,
            "description": "Deterministic sentence explaining the delta"
          },
          "prior_forecast_id": {
            "type": "string",
            "nullable": true
          },
          "refresh_reason": {
            "type": "string",
            "nullable": true,
            "description": "Why this forecast reran (e.g. price_move); null for scheduled runs"
          },
          "refresh_triggered_by": {
            "type": "string",
            "nullable": true
          },
          "conviction_tier": {
            "type": "integer",
            "nullable": true
          },
          "draw_std_log_odds": {
            "type": "number",
            "nullable": true,
            "description": "Ensemble draw dispersion (log-odds sd)"
          },
          "draw_count": {
            "type": "integer",
            "nullable": true
          },
          "band25": {
            "type": "number",
            "nullable": true
          },
          "band75": {
            "type": "number",
            "nullable": true
          },
          "drawdown_risk_72h": {
            "type": "object",
            "nullable": true,
            "properties": {
              "yes": {
                "type": "boolean"
              },
              "no": {
                "type": "boolean"
              }
            },
            "description": "Per-side deep-drawdown flags from Quotient's risk model: a side reads true when the model puts at least a 15% probability on a position on that side losing most of its remaining value within roughly 72 hours of this forecast's created_at. The model head is trained on matured 72-hour price paths: a side counts as a deep drawdown when its price printed twice within two hours at or below a quarter of the entry price, or when the market resolved against it. The claim is anchored to the forecast — on older forecasts it is a historical reading, not current risk. Null for forecasts made before the risk model shipped (August 2026). Path risk only — it never changes probability."
          },
          "crash_risk": {
            "type": "object",
            "nullable": true,
            "deprecated": true,
            "properties": {
              "yes": {
                "type": "boolean"
              },
              "no": {
                "type": "boolean"
              }
            },
            "description": "Deprecated former name for drawdown_risk_72h; same value. Emitted for one release."
          },
          "relationships": {
            "$ref": "#/components/schemas/RelationshipsEnvelope"
          }
        }
      },
      "ForecastResponse": {
        "type": "object",
        "required": [
          "as_of",
          "historical",
          "market",
          "market_slug",
          "question",
          "forecast",
          "history"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive forecast-selection cutoff."
          },
          "historical": {
            "type": "boolean",
            "description": "True when the caller supplied as_of."
          },
          "market": {
            "$ref": "#/components/schemas/CanonicalMarketWithRelationships"
          },
          "market_slug": {
            "type": "string",
            "nullable": true
          },
          "question": {
            "type": "string"
          },
          "market_odds": {
            "type": "number",
            "nullable": true
          },
          "end_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "quotientUrl": {
            "type": "string",
            "nullable": true
          },
          "polymarketUrl": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
          },
          "forecast": {
            "$ref": "#/components/schemas/ForecastRead"
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ForecastRead"
            },
            "description": "Prior forecasts, newest first (per the history param)"
          }
        }
      },
      "SourceItem": {
        "type": "object",
        "required": [
          "type",
          "market_slug",
          "market"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "article",
              "x_post"
            ]
          },
          "market_slug": {
            "type": "string",
            "nullable": true
          },
          "market": {
            "$ref": "#/components/schemas/CanonicalMarketWithRelationships"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "source_name": {
            "type": "string",
            "nullable": true
          },
          "feed_tier": {
            "type": "string",
            "description": "primary | specialist | secondary (X posts are always specialist)"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "relevance": {
            "type": "object",
            "properties": {
              "confidence": {
                "type": "string",
                "nullable": true,
                "description": "Correlation confidence (articles) or materiality (X posts)"
              },
              "reasoning": {
                "type": "string",
                "nullable": true
              },
              "evidence_quote": {
                "type": "string",
                "nullable": true,
                "description": "Verbatim quote grounding the relevance"
              }
            }
          },
          "author_handle": {
            "type": "string",
            "nullable": true,
            "description": "X posts only"
          },
          "is_expert": {
            "type": "boolean",
            "nullable": true,
            "description": "X posts only: reviewed expert author"
          }
        }
      },
      "SourcesResponse": {
        "type": "object",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceItem"
            }
          }
        }
      },
      "PriceSignalEntry": {
        "type": "object",
        "description": "One published entry/exit call. Immutable: a revised call is a new entry pointing back through supersedes_signal_id. The decide gate publishes these rarely; a series with none is the normal state.",
        "required": [
          "signal_id",
          "side",
          "revision",
          "published_at"
        ],
        "properties": {
          "signal_id": {
            "type": "string"
          },
          "outlook_id": {
            "type": "string",
            "nullable": true,
            "description": "The reading the call was minted from"
          },
          "mode": {
            "type": "string",
            "nullable": true
          },
          "side": {
            "type": "string",
            "nullable": true,
            "description": "long | short"
          },
          "strength": {
            "type": "string",
            "nullable": true
          },
          "revision": {
            "type": "integer",
            "nullable": true
          },
          "supersedes_signal_id": {
            "type": "string",
            "nullable": true
          },
          "entry_ref_price": {
            "type": "number",
            "nullable": true,
            "description": "Reference price at publication — the entry anchor, not advice"
          },
          "entry_ref_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "entry_ref_basis": {
            "type": "string",
            "nullable": true
          },
          "spot_gap_pct": {
            "type": "number",
            "nullable": true,
            "description": "target / entry_ref_price − 1; null on calls before 2026-08-18"
          },
          "spot_aligned": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the side points the same way as target-vs-entry. false = the call disagrees with venue odds only and is not a perp entry"
          },
          "target": {
            "type": "number",
            "nullable": true
          },
          "band_low": {
            "type": "number",
            "nullable": true
          },
          "band_high": {
            "type": "number",
            "nullable": true
          },
          "wide_low": {
            "type": "number",
            "nullable": true
          },
          "wide_high": {
            "type": "number",
            "nullable": true
          },
          "stop": {
            "type": "number",
            "nullable": true
          },
          "stop_touch_probability": {
            "type": "number",
            "nullable": true
          },
          "stop_basis": {
            "type": "string",
            "nullable": true
          },
          "stop_reason": {
            "type": "string",
            "nullable": true
          },
          "displacement_sigma": {
            "type": "number",
            "nullable": true
          },
          "edge_pct": {
            "type": "number",
            "nullable": true
          },
          "ref_median": {
            "type": "number",
            "nullable": true
          },
          "reference_basis": {
            "type": "string",
            "nullable": true
          },
          "valid_from": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "confirmed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "confirming_revisions": {
            "type": "integer",
            "nullable": true
          },
          "confirming_span_hours": {
            "type": "number",
            "nullable": true
          }
        }
      },
      "PriceOutlookReading": {
        "type": "object",
        "description": "The latest calibrated reading for one series: a median and p10/p25/p75/p90 distribution derived from Quotient forecasts and venue prices. The newest revision per anchor wins.",
        "required": [
          "outlook_id",
          "anchor_date",
          "median_price",
          "status",
          "revisions"
        ],
        "properties": {
          "outlook_id": {
            "type": "string"
          },
          "anchor_date": {
            "type": "string",
            "description": "YYYY-MM-DD settlement anchor"
          },
          "anchor_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "window_start_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "horizon_days": {
            "type": "integer",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "side": {
            "type": "string",
            "nullable": true
          },
          "strength": {
            "type": "string",
            "nullable": true
          },
          "revision": {
            "type": "integer",
            "nullable": true
          },
          "revisions": {
            "type": "integer",
            "description": "Recorded revisions for this anchor"
          },
          "median_price": {
            "type": "number",
            "nullable": true
          },
          "p10": {
            "type": "number",
            "nullable": true
          },
          "p25": {
            "type": "number",
            "nullable": true
          },
          "p75": {
            "type": "number",
            "nullable": true
          },
          "p90": {
            "type": "number",
            "nullable": true
          },
          "spot_at_obs": {
            "type": "number",
            "nullable": true,
            "description": "Spot price at observation time"
          },
          "spot_gap_pct": {
            "type": "number",
            "nullable": true,
            "description": "median_price / spot_at_obs − 1; null on records before 2026-08-18"
          },
          "spot_gap_sigma": {
            "type": "number",
            "nullable": true,
            "description": "The spot gap in horizon-sigma units; null on records before 2026-08-18"
          },
          "spot_aligned": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the side points the same way as median-vs-spot. false = the call disagrees with venue odds only and is not a perp entry; null when sideless or on records before 2026-08-18"
          },
          "sigma_diffusive": {
            "type": "number",
            "nullable": true
          },
          "sigma_total": {
            "type": "number",
            "nullable": true
          },
          "implied_mean": {
            "type": "number",
            "nullable": true
          },
          "implied_sigma": {
            "type": "number",
            "nullable": true
          },
          "displacement_sigma": {
            "type": "number",
            "nullable": true,
            "description": "Median-vs-reference displacement in sigma units"
          },
          "edge_pct": {
            "type": "number",
            "nullable": true
          },
          "ref_median": {
            "type": "number",
            "nullable": true
          },
          "reference_basis": {
            "type": "string",
            "nullable": true
          },
          "freshness_state": {
            "type": "string",
            "nullable": true
          },
          "freshness_reason": {
            "type": "string",
            "nullable": true
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "published_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PriceOutlookSeriesEntry": {
        "type": "object",
        "required": [
          "series_id",
          "asset_key",
          "asset_class",
          "anchor_type",
          "mode",
          "outlook",
          "price_signals"
        ],
        "properties": {
          "series_id": {
            "type": "string",
            "description": "{assetKey}:price-outlook:{anchorType}. Read asset_key and anchor_type from their own fields; asset keys contain a colon, so never parse series_id."
          },
          "asset_key": {
            "type": "string",
            "description": "Namespaced asset key, e.g. commodity:wti, crypto:btc, company:nvda"
          },
          "asset_class": {
            "type": "string",
            "nullable": true,
            "description": "commodity | crypto | company"
          },
          "anchor_type": {
            "type": "string",
            "description": "Anchor cadence, e.g. daily, two-day, weekly, monthly. The cadence set is open."
          },
          "display_name": {
            "type": "string",
            "nullable": true
          },
          "venue": {
            "type": "string",
            "nullable": true
          },
          "venue_series": {
            "type": "string",
            "nullable": true
          },
          "observable": {
            "type": "string",
            "nullable": true
          },
          "mode": {
            "type": "string",
            "nullable": true,
            "description": "signal = eligible to publish calls; coverage = context only"
          },
          "mode_reason": {
            "type": "string",
            "nullable": true
          },
          "headline": {
            "type": "string",
            "nullable": true
          },
          "maturity": {
            "type": "string",
            "nullable": true
          },
          "outlook": {
            "$ref": "#/components/schemas/PriceOutlookReading"
          },
          "price_signals": {
            "type": "array",
            "description": "Published entry/exit calls for the current anchor. Empty is the normal state.",
            "items": {
              "$ref": "#/components/schemas/PriceSignalEntry"
            }
          }
        }
      },
      "PriceOutlookResponse": {
        "type": "object",
        "required": [
          "as_of",
          "contract",
          "filters",
          "series_count",
          "series"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "contract": {
            "type": "string",
            "const": "asset-price/1"
          },
          "filters": {
            "type": "object",
            "required": [
              "asset",
              "anchor",
              "asset_class"
            ],
            "properties": {
              "asset": {
                "type": "string",
                "nullable": true
              },
              "anchor": {
                "type": "string",
                "nullable": true
              },
              "asset_class": {
                "type": "string",
                "nullable": true
              }
            }
          },
          "series_count": {
            "type": "integer"
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceOutlookSeriesEntry"
            }
          }
        }
      },
      "PortfolioPosition": {
        "type": "object",
        "properties": {
          "condition_id": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "slug": {
            "type": "string",
            "nullable": true
          },
          "event_slug": {
            "type": "string",
            "nullable": true
          },
          "outcome": {
            "type": "string",
            "nullable": true,
            "description": "The held outcome (Yes/No; other values are uncovered)"
          },
          "size": {
            "type": "number",
            "description": "Shares held"
          },
          "avg_price": {
            "type": "number",
            "nullable": true
          },
          "cur_price": {
            "type": "number",
            "nullable": true,
            "description": "Live price of the held outcome token (data-api)"
          },
          "current_value_usd": {
            "type": "number",
            "nullable": true
          },
          "cash_pnl": {
            "type": "number",
            "nullable": true
          },
          "percent_pnl": {
            "type": "number",
            "nullable": true
          },
          "redeemable": {
            "type": "boolean"
          },
          "end_date": {
            "type": "string",
            "nullable": true
          },
          "quotient": {
            "type": "object",
            "description": "Quotient coverage for this position",
            "properties": {
              "covered": {
                "type": "boolean"
              },
              "market": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CanonicalMarketRouting"
                  },
                  {
                    "type": "object",
                    "required": [
                      "question",
                      "quotientUrl",
                      "polymarketUrl",
                      "relationships"
                    ],
                    "properties": {
                      "question": {
                        "type": "string",
                        "nullable": true
                      },
                      "quotientUrl": {
                        "type": "string",
                        "nullable": true
                      },
                      "polymarketUrl": {
                        "type": "string",
                        "nullable": true,
                        "deprecated": true,
                        "description": "Legacy Polymarket navigation alias. Populated only for Polymarket International rows and null for Polymarket US, Kalshi, and Limitless; use marketUrl for venue-neutral navigation."
                      },
                      "relationships": {
                        "$ref": "#/components/schemas/RelationshipsEnvelope"
                      }
                    }
                  }
                ]
              },
              "forecast": {
                "type": "object",
                "nullable": true,
                "required": [
                  "venue",
                  "market",
                  "id",
                  "probability",
                  "created_at",
                  "thesis",
                  "relationships"
                ],
                "properties": {
                  "venue": {
                    "type": "string",
                    "enum": [
                      "polymarket",
                      "polymarket_us",
                      "kalshi",
                      "limitless"
                    ],
                    "description": "Prediction-market venue key: polymarket (Polymarket International), polymarket_us (Polymarket US), kalshi, or limitless.",
                    "nullable": true
                  },
                  "market": {
                    "$ref": "#/components/schemas/CanonicalMarketRouting",
                    "nullable": true
                  },
                  "id": {
                    "type": "string"
                  },
                  "probability": {
                    "type": "number"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "delta_from_prior": {
                    "type": "number",
                    "nullable": true
                  },
                  "refresh_reason": {
                    "type": "string",
                    "nullable": true
                  },
                  "bluf": {
                    "type": "string",
                    "nullable": true
                  },
                  "thesis": {
                    "type": "string",
                    "nullable": true
                  },
                  "resolution_pathway": {
                    "$ref": "#/components/schemas/ResolutionPathway"
                  },
                  "conviction_tier": {
                    "type": "integer",
                    "nullable": true
                  },
                  "relationships": {
                    "$ref": "#/components/schemas/RelationshipsEnvelope"
                  }
                }
              },
              "signal": {
                "type": "object",
                "nullable": true,
                "required": [
                  "id",
                  "side",
                  "created_at",
                  "status",
                  "retired_reason",
                  "relationships"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "YES",
                      "NO"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "actionable",
                      "unconfirmed",
                      "paused",
                      "done",
                      "retired"
                    ]
                  },
                  "retired_reason": {
                    "type": "string",
                    "enum": [
                      "resolved",
                      "flipped",
                      "fading_q",
                      "expired"
                    ],
                    "nullable": true
                  },
                  "relationships": {
                    "$ref": "#/components/schemas/RelationshipsEnvelope"
                  }
                }
              },
              "convergence": {
                "type": "object",
                "nullable": true,
                "description": "Computed against the POSITION's side from live position pricing",
                "properties": {
                  "aligned": {
                    "type": "boolean",
                    "description": "True when your side matches Q's side"
                  },
                  "q_side": {
                    "type": "string",
                    "enum": [
                      "YES",
                      "NO"
                    ]
                  },
                  "q_value_cents": {
                    "type": "integer"
                  },
                  "entry_cost_cents": {
                    "type": "integer"
                  },
                  "current_cost_cents": {
                    "type": "integer"
                  },
                  "distance_to_convergence_cents": {
                    "type": "integer",
                    "description": "<= 0 means converged"
                  },
                  "converge_upside_pct": {
                    "type": "integer"
                  },
                  "max_roi_pct": {
                    "type": "integer",
                    "description": "% return from current cost if the market resolves on the position's side (share settles at 100¢)"
                  },
                  "priced_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      },
      "PortfolioResponse": {
        "type": "object",
        "required": [
          "wallet",
          "as_of",
          "positions",
          "unmatched"
        ],
        "properties": {
          "wallet": {
            "type": "string"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "value_usd": {
            "type": "number",
            "description": "Sum of open position values"
          },
          "positions_count": {
            "type": "integer"
          },
          "covered_count": {
            "type": "integer"
          },
          "unmatched_count": {
            "type": "integer"
          },
          "positions_capped": {
            "type": "boolean",
            "description": "True when the wallet may hold more than the 1500-position fetch cap"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioPosition"
            }
          },
          "unmatched": {
            "type": "array",
            "description": "Positions with no matching Quotient market",
            "items": {
              "type": "object",
              "properties": {
                "condition_id": {
                  "type": "string"
                },
                "title": {
                  "type": "string",
                  "nullable": true
                },
                "slug": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "perps": {
            "type": "object",
            "nullable": true,
            "description": "Only when include_perps=true",
            "properties": {
              "positions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "size": {
                      "type": "number",
                      "description": "Signed: positive long, negative short"
                    },
                    "entry_price": {
                      "type": "number",
                      "nullable": true
                    },
                    "unrealized_pnl": {
                      "type": "number",
                      "nullable": true
                    },
                    "return_on_equity": {
                      "type": "number",
                      "nullable": true
                    }
                  }
                }
              },
              "equity": {
                "type": "number",
                "nullable": true
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "upstream_unavailable when the perps API failed"
              }
            }
          }
        }
      },
      "PredictionVenueReport": {
        "type": "object",
        "description": "One prediction-market venue's positions joined to Quotient coverage.",
        "required": [
          "venue",
          "kind",
          "status",
          "wallet",
          "positions",
          "unmatched"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket",
              "limitless"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "prediction"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "unavailable"
            ]
          },
          "wallet": {
            "type": "string"
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "upstream_unavailable when this venue's API failed"
          },
          "value_usd": {
            "type": "number"
          },
          "positions_count": {
            "type": "integer"
          },
          "covered_count": {
            "type": "integer"
          },
          "unmatched_count": {
            "type": "integer"
          },
          "positions_capped": {
            "type": "boolean"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PortfolioPosition"
            }
          },
          "unmatched": {
            "type": "array",
            "description": "Positions with no matching Quotient market",
            "items": {
              "type": "object",
              "properties": {
                "condition_id": {
                  "type": "string",
                  "description": "conditionId on Polymarket; the marketKey on venues the graph keys by slug"
                },
                "title": {
                  "type": "string",
                  "nullable": true
                },
                "slug": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "PerpsVenueReport": {
        "type": "object",
        "description": "One perpetuals venue's open positions. Perps carry no prediction-market forecast join.",
        "required": [
          "venue",
          "kind",
          "status",
          "wallet",
          "positions"
        ],
        "properties": {
          "venue": {
            "type": "string",
            "enum": [
              "polymarket_perps",
              "hyperliquid"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "perps"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "unavailable"
            ]
          },
          "wallet": {
            "type": "string"
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "upstream_unavailable when this venue's API failed"
          },
          "equity": {
            "type": "number",
            "nullable": true,
            "description": "Account value in USD"
          },
          "positions_count": {
            "type": "integer"
          },
          "positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string",
                  "description": "WTIOIL-USD on Polymarket perps; the Hyperliquid coin (e.g. BTC, xyz:CL) on Hyperliquid"
                },
                "size": {
                  "type": "number",
                  "description": "Signed: positive long, negative short"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "long",
                    "short"
                  ]
                },
                "entry_price": {
                  "type": "number",
                  "nullable": true
                },
                "position_value_usd": {
                  "type": "number",
                  "nullable": true
                },
                "unrealized_pnl": {
                  "type": "number",
                  "nullable": true
                },
                "return_on_equity": {
                  "type": "number",
                  "nullable": true
                },
                "liquidation_price": {
                  "type": "number",
                  "nullable": true
                },
                "leverage": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          }
        }
      },
      "MultiVenuePortfolioResponse": {
        "type": "object",
        "description": "Returned when `venues` is supplied. Each venue degrades independently: an unavailable venue is reported as status=unavailable inside a 200 rather than failing the report.",
        "required": [
          "as_of",
          "requested_venues",
          "wallets",
          "totals",
          "venues"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "requested_venues": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_perps",
                "limitless",
                "hyperliquid"
              ]
            }
          },
          "wallets": {
            "type": "object",
            "description": "The address actually used per venue",
            "additionalProperties": {
              "type": "string"
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "prediction_value_usd": {
                "type": "number",
                "description": "Prediction-market position value; perps equity is reported separately and never summed into it"
              },
              "perps_equity_usd": {
                "type": "number",
                "nullable": true
              },
              "positions_count": {
                "type": "integer"
              },
              "covered_count": {
                "type": "integer",
                "description": "Prediction-market positions with Quotient coverage"
              },
              "venues_ok": {
                "type": "integer"
              },
              "venues_unavailable": {
                "type": "integer"
              }
            }
          },
          "unavailable_venues": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "polymarket",
                "polymarket_perps",
                "limitless",
                "hyperliquid"
              ]
            }
          },
          "venues": {
            "type": "object",
            "description": "Keyed by venue; only the requested venues are present",
            "additionalProperties": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/PredictionVenueReport"
                },
                {
                  "$ref": "#/components/schemas/PerpsVenueReport"
                }
              ]
            }
          }
        }
      }
    }
  }
}