{"openapi":"3.1.0","info":{"title":"Meridian agent API","description":"Free, read-only JSON for software agents: current OpenLL regimes across crypto, stocks, ETFs, bonds and commodities; a daily model target portfolio with explicit rebalance events; curated supply-chain research; and a cursor change feed. Start at `/api/agent` or `/llms.txt`. Every agent response carries `meta.revision` (the ETag) and `meta.snapshot`. Model research, not personalized financial advice.","version":"2026-11-11"},"paths":{"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"head":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/orange-signals":{"get":{"summary":"Orange Signals Api","description":"Return the latest in-memory Orange signals after background warming.","operationId":"orange_signals_api_api_orange_signals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/refresh":{"get":{"summary":"Refresh","operationId":"refresh_refresh_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/recalculate":{"get":{"summary":"Recalculate","operationId":"recalculate_recalculate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/chart/{asset_type}/{symbol}/{pair}":{"get":{"summary":"Get Chart Data","description":"Return OHLC bars and LL regime indicators for the chart modal.","operationId":"get_chart_data_chart__asset_type___symbol___pair__get","parameters":[{"name":"asset_type","in":"path","required":true,"schema":{"type":"string","title":"Asset Type"}},{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Symbol"}},{"name":"pair","in":"path","required":true,"schema":{"type":"string","title":"Pair"}},{"name":"indicator","in":"query","required":false,"schema":{"type":"string","default":"ema_atr","title":"Indicator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/backtest":{"get":{"summary":"Backtest Page","operationId":"backtest_page_backtest_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/backtest/btc":{"get":{"summary":"Get Backtest Btc","operationId":"get_backtest_btc_api_backtest_btc_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/gobig":{"get":{"summary":"Get Gobig Signal","description":"BTC GO BIG deep-capitulation signal card — computed from the in-memory daily BTC bars\n(no network). Lets the page refresh the fire prices / armed tiers without a full reload.","operationId":"get_gobig_signal_api_gobig_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/orange-funding-shadow":{"get":{"summary":"Get Orange Funding Shadow","description":"Read-only paper status; never changes the production Orange allocation.","operationId":"get_orange_funding_shadow_api_orange_funding_shadow_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/liquidations":{"get":{"summary":"Liquidations Page","operationId":"liquidations_page_liquidations_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/btc-liquidations":{"get":{"summary":"Get Btc Liquidations","description":"Recorded BTCUSDT liquidations and price responses; no forecast or trading.","operationId":"get_btc_liquidations_api_btc_liquidations_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"type":"string","pattern":"^(combined|bybit_linear|binance_usdm)$","default":"combined","title":"Source"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":6,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/btc-collector-health":{"get":{"summary":"Get Btc Collector Health","description":"Durable liveness probe for external monitoring; no market fetch or restart.","operationId":"get_btc_collector_health_api_btc_collector_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/btc-spot-flows":{"get":{"summary":"Get Btc Spot Flows","description":"Persisted BTC spot minute summaries; never collect on a visitor request.","operationId":"get_btc_spot_flows_api_btc_spot_flows_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/btc-book-liquidity":{"get":{"summary":"Get Btc Book Liquidity","description":"Persisted sampled BTC liquidity by market; no visitor-triggered book connection.","operationId":"get_btc_book_liquidity_api_btc_book_liquidity_get","parameters":[{"name":"market","in":"query","required":false,"schema":{"enum":["spot","perpetual"],"type":"string","default":"spot","title":"Market"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/btc-auction-map":{"get":{"summary":"Get Btc Auction Map","description":"Persisted execution profiles and completed-candle references; never collect on GET.","operationId":"get_btc_auction_map_api_btc_auction_map_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/btc-aligned-evidence":{"get":{"summary":"Get Btc Aligned Evidence","description":"Strict common-minute price/flow/leverage comparisons; no new market collection.","operationId":"get_btc_aligned_evidence_api_btc_aligned_evidence_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/liquidation-estimates":{"get":{"summary":"Liquidation Estimates Page","operationId":"liquidation_estimates_page_liquidation_estimates_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/market-analysis":{"get":{"summary":"Get Market Analysis","description":"Only serve committed agent-authored assessments; never trigger analysis.","operationId":"get_market_analysis_api_market_analysis_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/btc-liquidation-estimates":{"get":{"summary":"Get Btc Liquidation Estimates","description":"Paper-only, independently recorded scenario maps; never a trading instruction.","operationId":"get_btc_liquidation_estimates_api_btc_liquidation_estimates_get","parameters":[{"name":"asof_ms","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}],"title":"Asof Ms"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/btc-liquidation-evaluation":{"get":{"summary":"Get Btc Liquidation Evaluation","description":"Read persisted descriptive horizon results; requests never run an evaluation.","operationId":"get_btc_liquidation_evaluation_api_btc_liquidation_evaluation_get","parameters":[{"name":"asof_ms","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Asof Ms"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":72,"minimum":4,"default":4,"title":"Hours"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","pattern":"^(combined|bybit_linear|binance_usdm)$","default":"combined","title":"Source"}},{"name":"scenario","in":"query","required":false,"schema":{"type":"string","pattern":"^(pro_rata|oldest_first)_(5|10|20)x$","default":"pro_rata_5x","title":"Scenario"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/btc-history":{"get":{"summary":"Get Btc History","description":"Stored hourly/daily BTC history aligned with UTC candles; requests never build rows.","operationId":"get_btc_history_api_btc_history_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":92,"minimum":1,"default":7,"title":"Days"}},{"name":"resolution","in":"query","required":false,"schema":{"type":"string","pattern":"^(1h|1d)$","default":"1d","title":"Resolution"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"End"}},{"name":"sections","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Sections"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indicators":{"get":{"summary":"Get Indicator Catalogue","description":"Indicator catalogue moved from Lithium, with parameters, sources and conventions.","operationId":"get_indicator_catalogue_api_indicators_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/indicators/panel":{"get":{"summary":"Get Indicator Panel","description":"One swing-analysis bundle of indicator envelopes; computed from cached public inputs.","operationId":"get_indicator_panel_api_indicators_panel_get","parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string","maxLength":12,"default":"BTC","title":"Asset"}},{"name":"full","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Full"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/indicators/{indicator_id}":{"get":{"summary":"Get Indicator","description":"Compute one indicator; status=error responses use HTTP 503 and keep the envelope.","operationId":"get_indicator_api_indicators__indicator_id__get","parameters":[{"name":"indicator_id","in":"path","required":true,"schema":{"type":"string","title":"Indicator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data-health":{"get":{"summary":"Get Data Health","description":"Indicator, upstream-source, collector and analyst-flag health; never collects market data.","operationId":"get_data_health_api_data_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/data-health":{"get":{"summary":"Data Health Page","operationId":"data_health_page_data_health_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/backtest/session":{"post":{"summary":"Create Backtest Session","description":"Return a fresh session UUID. Called on page load and after Reset.","operationId":"create_backtest_session_api_backtest_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/backtest/trade-event":{"post":{"summary":"Record Trade Event","description":"Accept a trade event and write it to Firestore asynchronously.","operationId":"record_trade_event_api_backtest_trade_event_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_TradeEventPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orange-performance":{"get":{"summary":"Orange Performance Page","operationId":"orange_performance_page_orange_performance_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/orange-performance/{asset}":{"get":{"summary":"Orange Performance Api","description":"Run a production Orange strategy for BTC, ETH, or SOL.","operationId":"orange_performance_api_api_orange_performance__asset__get","parameters":[{"name":"asset","in":"path","required":true,"schema":{"type":"string","title":"Asset"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","default":"2017-01-01","title":"Start Date"}},{"name":"capital","in":"query","required":false,"schema":{"type":"number","default":10000.0,"title":"Capital"}},{"name":"indicator","in":"query","required":false,"schema":{"type":"string","default":"ema_atr","title":"Indicator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio":{"get":{"summary":"Portfolio Page","operationId":"portfolio_page_portfolio_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/beta":{"get":{"summary":"Meridian Beta","operationId":"meridian_beta_beta_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/portfolio/status":{"get":{"summary":"Portfolio Status","description":"Lightweight readiness probe for the Portfolio button — never triggers a compute.\n\n``ready`` is True only once the requested indicator's recommendation is cached, so\nthe UI can keep the button disabled while startup data load / precompute runs.","operationId":"portfolio_status_api_portfolio_status_get","parameters":[{"name":"indicator","in":"query","required":false,"schema":{"type":"string","default":"ema_atr","title":"Indicator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolio/holdings-backtest":{"post":{"summary":"Holdings Backtest","description":"Descriptive backtest of the user's ACTUAL holdings (current weights held constant)\nvs SPY over their shared history window. Returns equity curves + CAGR/vol/maxDD.\nThe legacy composed-book curves are intentionally excluded. This is history, NOT a forecast.","operationId":"holdings_backtest_api_portfolio_holdings_backtest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_HoldingsBacktestPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolio":{"get":{"summary":"Portfolio Api","description":"Get current portfolio recommendation (cached per indicator).\n\nFresh cache is returned immediately. After a data refresh invalidates the cache,\nthe previous recommendation is served with ``stale: True`` while a single background\nrecompute runs — so the UI keeps showing the last-good portfolio instead of a blank,\nnever-ending spinner. Only a genuine cold start (nothing cached yet) reports loading.","operationId":"portfolio_api_api_portfolio_get","parameters":[{"name":"indicator","in":"query","required":false,"schema":{"type":"string","default":"ema_atr","title":"Indicator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/portfolio/forward-shadow":{"get":{"summary":"Portfolio Forward Shadow Api","operationId":"portfolio_forward_shadow_api_api_portfolio_forward_shadow_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/ai-portfolio":{"get":{"summary":"Ai Portfolio Api","description":"AI committee portfolio: the committed review ledger plus its daily paper valuation.\n\nValuations recompute on the daily refresh, or in the background when the ledger\nchanges; the response never waits for Yahoo.","operationId":"ai_portfolio_api_api_ai_portfolio_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agent":{"get":{"tags":["agent"],"summary":"Agent Capabilities Api","description":"Start here: every agent resource, its parameters, conventions and workflows.","operationId":"agent_capabilities_api_api_agent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapabilitiesResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/agent/about":{"get":{"tags":["agent"],"summary":"Agent About Api","description":"Describe Meridian's live portfolio methodology for software agents.\n\nThis endpoint is independent of portfolio readiness and exposes no user-specific data,\nbooks, candles, equity curves, or historical indicator series.","operationId":"agent_about_api_api_agent_about_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/agent/signals":{"get":{"tags":["agent"],"summary":"Agent Signals Api","description":"Return current OpenLL regimes, breadth and flips, optionally filtered and paged.\n\nThe default reproduces the full grouped tables shown in Meridian's UI. Use\n``view=assets`` with ``q``, ``instrument_id``, ``symbol``, ``regime`` or ``flipped``\nfor compact lookups. No candles or historical indicator series are returned.","operationId":"agent_signals_api_api_agent_signals_get","parameters":[{"name":"asset_class","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"crypto, stocks, etfs, bonds or commodities; omit for all.","title":"Asset Class"},"description":"crypto, stocks, etfs, bonds or commodities; omit for all."},{"name":"view","in":"query","required":false,"schema":{"type":"string","description":"classes (grouped, default), assets (flat, paged), flips (flat, paged) or summary (counts only).","default":"classes","title":"View"},"description":"classes (grouped, default), assets (flat, paged), flips (flat, paged) or summary (counts only)."},{"name":"instrument_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact canonical ID, e.g. STOCKS:US:NVDA.","title":"Instrument Id"},"description":"Exact canonical ID, e.g. STOCKS:US:NVDA."},{"name":"symbol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact ticker; may match several asset classes.","title":"Symbol"},"description":"Exact ticker; may match several asset classes."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Case-insensitive search over symbol and name, best match first.","title":"Q"},"description":"Case-insensitive search over symbol and name, best match first."},{"name":"regime","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"BULL, NEUTRAL or BEAR, evaluated on pair.","title":"Regime"},"description":"BULL, NEUTRAL or BEAR, evaluated on pair."},{"name":"pair","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"usd (USD/USDT, default for regime) or btc.","title":"Pair"},"description":"usd (USD/USDT, default for regime) or btc."},{"name":"flipped","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Keep assets that did (true) or did not (false) flip in the latest update.","title":"Flipped"},"description":"Keep assets that did (true) or did not (false) flip in the latest update."},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"view=assets projection, comma-separated, e.g. symbol,name,signals.","title":"Fields"},"description":"view=assets projection, comma-separated, e.g. symbol,name,signals."},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Page size 1-500 (default 100); view=assets or flips.","title":"Limit"},"description":"Page size 1-500 (default 100); view=assets or flips."},{"name":"offset","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"0-based offset; view=assets or flips.","title":"Offset"},"description":"0-based offset; view=assets or flips."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalsResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/agent/supply-chain":{"get":{"tags":["agent"],"summary":"Agent Supply Chain Api","description":"Discover curated supply chains, search or read a category, or analyze a node.\n\nCore dependencies expand transitively; alternative and legacy links are optional\none-hop context. Research dates, sources and uncertainty remain in ``view=full``.\nThis public read-only endpoint does not depend on portfolio readiness.","operationId":"agent_supply_chain_api_api_agent_supply_chain_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Category ID; omit to list categories.","title":"Category"},"description":"Category ID; omit to list categories."},{"name":"node","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact node ID to analyze; requires category.","title":"Node"},"description":"Exact node ID to analyze; requires category."},{"name":"basis","in":"query","required":false,"schema":{"type":"string","description":"Country basis: hq or ops.","default":"hq","title":"Basis"},"description":"Country basis: hq or ops."},{"name":"include_alt","in":"query","required":false,"schema":{"type":"boolean","description":"Include one-hop alternative suppliers.","default":false,"title":"Include Alt"},"description":"Include one-hop alternative suppliers."},{"name":"include_legacy","in":"query","required":false,"schema":{"type":"boolean","description":"Include one-hop legacy suppliers.","default":false,"title":"Include Legacy"},"description":"Include one-hop legacy suppliers."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search node id, name and tickers; requires category.","title":"Q"},"description":"Search node id, name and tickers; requires category."},{"name":"view","in":"query","required":false,"schema":{"type":"string","description":"full (complete dataset) or compact (node index, edges and analysis).","default":"full","title":"View"},"description":"full (complete dataset) or compact (node index, edges and analysis)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplyChainResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/agent/drawdowns":{"get":{"tags":["agent"],"summary":"Agent Drawdowns Api","description":"List every selectable book by observed research drawdown and comparison with SPY.\n\nThis is a free, unauthenticated discovery endpoint. It returns aggregate research\nmetrics only: no candles, indicator history, equity curves, or other historical series.\nPass a returned ``allocation_level`` (or its ``historical_max_drawdown_pct`` as ``dd``)\nto ``/api/agent/book``.","operationId":"agent_drawdowns_api_api_agent_drawdowns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrawdownsResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/agent/changes":{"get":{"tags":["agent"],"summary":"Agent Changes Api","description":"Poll what changed since a cursor instead of re-downloading every resource.\n\nEntries are notifications: fetch the linked ``resource`` for authoritative current\nstate. Delivery is at-least-once (deduplicate by ``change_id``); filtered entries still\nadvance ``next_cursor``. Store ``next_cursor`` and continue while ``has_more`` is true.","operationId":"agent_changes_api_api_agent_changes_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A next_cursor or head_cursor from an earlier response; omit to read the oldest retained entries.","title":"Since"},"description":"A next_cursor or head_cursor from an earlier response; omit to read the oldest retained entries."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Entries per page, 1-500.","default":100,"title":"Limit"},"description":"Entries per page, 1-500."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma list of change types to return.","title":"Type"},"description":"Comma list of change types to return."},{"name":"allocation_level","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict book.event entries to one allocation level.","title":"Allocation Level"},"description":"Restrict book.event entries to one allocation level."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangesResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"410":{"description":"Cursor expired; re-read the resources and restart from head_cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/agent/book":{"get":{"tags":["agent"],"summary":"Agent Book Api","description":"Return one complete committed target book, its rebalance event and decision semantics.\n\nOmit ``dd`` and ``allocation_level`` for the default level-50 book. ``book.positions``\nis the complete committed target; only ``rebalance_event.orders`` changes it, and an\nempty list means hold. Each position's ``signal`` is today's analytical ranking, not an\norder; ``decision`` and ``decision_context`` explain why a position can be retained.","operationId":"agent_book_api_api_agent_book_get","parameters":[{"name":"dd","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"An observed historical_max_drawdown_pct from /api/agent/drawdowns; non-exact values resolve to the nearest.","title":"Dd"},"description":"An observed historical_max_drawdown_pct from /api/agent/drawdowns; non-exact values resolve to the nearest."},{"name":"schema_version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required: 2.0.","title":"Schema Version"},"description":"Required: 2.0."},{"name":"allocation_level","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Allocation level 0-100 in steps of 5; alternative to dd.","title":"Allocation Level"},"description":"Allocation level 0-100 in steps of 5; alternative to dd."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookResponse"}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"422":{"description":"Malformed parameter type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"503":{"description":"Temporarily unavailable; honor retryable and Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}},"409":{"description":"schema_version=2.0 is required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentError"}}}}}}},"/api/portfolio/update-positions":{"post":{"summary":"Portfolio Update Positions","description":"Update held positions (manual entry tracking).\nBody: { \"positions\": [{ \"symbol\", \"name\", \"asset_class\", \"entry_price\", \"entry_date\", \"weight\", ... }] }","operationId":"portfolio_update_positions_api_portfolio_update_positions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AboutResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"data_type":{"type":"string","const":"portfolio_methodology","title":"Data Type"},"audience":{"type":"string","const":"software_agents","title":"Audience"},"authentication_required":{"type":"boolean","title":"Authentication Required"},"historical_market_data_included":{"type":"boolean","const":false,"title":"Historical Market Data Included"},"user_specific_data_included":{"type":"boolean","const":false,"title":"User Specific Data Included"},"current_coverage":{"additionalProperties":true,"type":"object","title":"Current Coverage","description":"Tracked universe, readiness and price sources."},"model":{"additionalProperties":true,"type":"object","title":"Model","description":"Model version and the exact OpenLL calculation."},"methodology":{"additionalProperties":true,"type":"object","title":"Methodology","description":"Conviction, eligibility, composition and rebalance rules."},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"},"api_contract":{"additionalProperties":{"type":"string"},"type":"object","title":"Api Contract"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["schema_version","data_type","audience","authentication_required","historical_market_data_included","user_specific_data_included","current_coverage","model","methodology","limitations","api_contract","meta"],"title":"AboutResponse"},"AgentError":{"properties":{"error":{"type":"string","title":"Error","description":"Human-readable message."},"error_code":{"type":"string","title":"Error Code","description":"Stable machine-readable code, e.g. invalid_parameter, not_ready, cursor_expired."},"retryable":{"type":"boolean","title":"Retryable"},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds","description":"Suggested wait before retrying; mirrored in Retry-After."},"docs":{"type":"string","title":"Docs"},"required_schema_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Schema Version"},"details":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Details"}},"additionalProperties":true,"type":"object","required":["error","error_code","retryable","docs"],"title":"AgentError"},"Book":{"properties":{"positions":{"items":{"$ref":"#/components/schemas/BookPosition"},"type":"array","title":"Positions"},"position_count":{"type":"integer","title":"Position Count"},"target_weight":{"type":"number","title":"Target Weight"},"cash_weight":{"type":"number","title":"Cash Weight"}},"additionalProperties":true,"type":"object","required":["positions","position_count","target_weight","cash_weight"],"title":"Book"},"BookPosition":{"properties":{"symbol":{"type":"string","title":"Symbol"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"instrument_id":{"type":"string","title":"Instrument Id"},"asset_class":{"type":"string","title":"Asset Class"},"venue":{"type":"string","title":"Venue"},"quote_symbol":{"type":"string","title":"Quote Symbol"},"target_weight":{"type":"number","title":"Target Weight","description":"Committed execution target weight (0-1)."},"target_weight_pct":{"type":"number","title":"Target Weight Pct"},"regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regime"},"conviction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Conviction"},"signal":{"anyOf":[{"type":"string","enum":["BUY","HOLD","EXIT","OUT"]},{"type":"null"}],"title":"Signal","description":"Analytical ranking signal, not an order."},"decision":{"$ref":"#/components/schemas/PositionDecision"}},"additionalProperties":true,"type":"object","required":["symbol","instrument_id","asset_class","venue","quote_symbol","target_weight","target_weight_pct","decision"],"title":"BookPosition"},"BookResponse":{"properties":{"schema_version":{"type":"string","const":"2.0","title":"Schema Version"},"data_type":{"type":"string","const":"current_portfolio_target","title":"Data Type"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of","description":"UTC calendar date of the recommendation."},"recommendation_timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Timestamp","description":"Legacy form; part of event identity. Prefer the _utc field."},"recommendation_timestamp_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Timestamp Utc"},"model_version":{"type":"string","title":"Model Version"},"drawdown_selection":{"additionalProperties":true,"type":"object","title":"Drawdown Selection"},"book":{"$ref":"#/components/schemas/Book"},"execution_policy":{"additionalProperties":true,"type":"object","title":"Execution Policy"},"rebalance_event":{"$ref":"#/components/schemas/RebalanceEvent"},"candidate_divergence":{"$ref":"#/components/schemas/CandidateDivergence"},"decision_context":{"$ref":"#/components/schemas/DecisionContext"},"stale":{"type":"boolean","title":"Stale"},"paper_run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paper Run Id"},"paper_execution_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paper Execution Enabled"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["schema_version","data_type","model_version","drawdown_selection","book","execution_policy","rebalance_event","candidate_divergence","decision_context","stale","meta"],"title":"BookResponse"},"Breadth":{"properties":{"bull":{"type":"integer","title":"Bull"},"neutral":{"type":"integer","title":"Neutral"},"bear":{"type":"integer","title":"Bear"},"unavailable":{"type":"integer","title":"Unavailable"},"total":{"type":"integer","title":"Total"}},"additionalProperties":true,"type":"object","required":["bull","neutral","bear","unavailable","total"],"title":"Breadth"},"CandidateDivergence":{"properties":{"executable":{"type":"boolean","const":false,"title":"Executable"},"count":{"type":"integer","title":"Count"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"explanation":{"type":"string","title":"Explanation"}},"additionalProperties":true,"type":"object","required":["executable","count","items","explanation"],"title":"CandidateDivergence"},"CapabilitiesResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"data_type":{"type":"string","const":"agent_capabilities","title":"Data Type"},"audience":{"type":"string","const":"software_agents","title":"Audience"},"product":{"additionalProperties":true,"type":"object","title":"Product"},"access":{"additionalProperties":true,"type":"object","title":"Access"},"data_cadence":{"additionalProperties":{"type":"string"},"type":"object","title":"Data Cadence"},"conventions":{"additionalProperties":{"type":"string"},"type":"object","title":"Conventions"},"resources":{"items":{"$ref":"#/components/schemas/ResourceDescription"},"type":"array","title":"Resources"},"workflows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Workflows"},"documentation":{"additionalProperties":{"type":"string"},"type":"object","title":"Documentation"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["schema_version","data_type","audience","product","access","data_cadence","conventions","resources","workflows","documentation","meta"],"title":"CapabilitiesResponse"},"ChangeEntry":{"properties":{"seq":{"type":"integer","title":"Seq"},"cursor":{"type":"string","title":"Cursor"},"change_id":{"type":"string","title":"Change Id","description":"Deduplication key; delivery is at-least-once."},"revision":{"type":"string","title":"Revision"},"type":{"type":"string","enum":["signals.updated","portfolio.candidate_updated","book.event","model.version_changed"],"title":"Type"},"recorded_at_utc":{"type":"string","title":"Recorded At Utc"},"resource":{"type":"string","title":"Resource","description":"Fetch this authoritative resource for current state."}},"additionalProperties":true,"type":"object","required":["seq","cursor","change_id","revision","type","recorded_at_utc","resource"],"title":"ChangeEntry"},"ChangesResponse":{"properties":{"data_type":{"type":"string","const":"agent_change_feed","title":"Data Type"},"feed_id":{"type":"string","title":"Feed Id"},"changes":{"items":{"$ref":"#/components/schemas/ChangeEntry"},"type":"array","title":"Changes"},"returned":{"type":"integer","title":"Returned"},"next_cursor":{"type":"string","title":"Next Cursor"},"head_cursor":{"type":"string","title":"Head Cursor"},"earliest_cursor":{"type":"string","title":"Earliest Cursor"},"has_more":{"type":"boolean","title":"Has More"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["data_type","feed_id","changes","returned","next_cursor","head_cursor","earliest_cursor","has_more","meta"],"title":"ChangesResponse"},"ClassFreshness":{"properties":{"status":{"type":"string","enum":["fresh","partial","stale","unknown"],"title":"Status"},"expected_session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Session"},"latest_price_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Price Date"},"fresh_count":{"type":"integer","title":"Fresh Count"},"stale_count":{"type":"integer","title":"Stale Count"},"unknown_count":{"type":"integer","title":"Unknown Count"},"stale_symbols":{"items":{"type":"string"},"type":"array","title":"Stale Symbols"}},"additionalProperties":true,"type":"object","required":["status","fresh_count","stale_count","unknown_count","stale_symbols"],"title":"ClassFreshness"},"DecisionContext":{"properties":{"output_kind":{"type":"string","title":"Output Kind"},"authority":{"type":"string","title":"Authority"},"paper_execution_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Paper Execution Enabled"},"event_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Status"},"orders_authorized":{"type":"boolean","title":"Orders Authorized"},"order_count":{"type":"integer","title":"Order Count"},"executable_fields":{"items":{"type":"string"},"type":"array","title":"Executable Fields"},"context_only_fields":{"items":{"type":"string"},"type":"array","title":"Context Only Fields"},"rules":{"items":{"type":"string"},"type":"array","title":"Rules"},"signal_values":{"additionalProperties":{"type":"string"},"type":"object","title":"Signal Values"},"retention_reasons":{"additionalProperties":{"type":"string"},"type":"object","title":"Retention Reasons"}},"additionalProperties":true,"type":"object","required":["output_kind","authority","orders_authorized","order_count","executable_fields","context_only_fields","rules","signal_values","retention_reasons"],"title":"DecisionContext"},"DrawdownChoice":{"properties":{"allocation_level":{"type":"integer","title":"Allocation Level"},"historical_max_drawdown_pct":{"type":"number","title":"Historical Max Drawdown Pct"},"default":{"type":"boolean","title":"Default"},"research_only":{"type":"boolean","title":"Research Only"},"performance_vs_spy":{"$ref":"#/components/schemas/PerformanceVsSpy"},"historically_dominated":{"type":"boolean","title":"Historically Dominated"}},"additionalProperties":true,"type":"object","required":["allocation_level","historical_max_drawdown_pct","default","research_only","performance_vs_spy","historically_dominated"],"title":"DrawdownChoice"},"DrawdownsResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"data_type":{"type":"string","const":"portfolio_drawdown_choices","title":"Data Type"},"default_dd":{"type":"number","title":"Default Dd"},"choices":{"items":{"$ref":"#/components/schemas/DrawdownChoice"},"type":"array","title":"Choices"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["schema_version","data_type","default_dd","choices","meta"],"title":"DrawdownsResponse"},"Flip":{"properties":{"asset_class":{"type":"string","title":"Asset Class"},"symbol":{"type":"string","title":"Symbol"},"instrument_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instrument Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"pair":{"type":"string","title":"Pair"},"from_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Regime"},"to_regime":{"type":"string","enum":["BULL","NEUTRAL","BEAR","N/A"],"title":"To Regime"},"flip_time_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flip Time Utc"}},"additionalProperties":true,"type":"object","required":["asset_class","symbol","pair","to_regime"],"title":"Flip"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Meta":{"properties":{"contract_version":{"type":"string","title":"Contract Version"},"revision":{"type":"string","title":"Revision","description":"Content hash; equals the ETag. Send If-None-Match to receive 304."},"snapshot":{"anyOf":[{"$ref":"#/components/schemas/Snapshot"},{"type":"null"}]},"docs":{"type":"string","title":"Docs"},"openapi":{"type":"string","title":"Openapi"}},"additionalProperties":true,"type":"object","required":["contract_version","revision","docs","openapi"],"title":"Meta"},"OrderLeg":{"properties":{"symbol":{"type":"string","title":"Symbol"},"instrument_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instrument Id"},"asset_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Class"},"venue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue"},"quote_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Symbol"},"action":{"type":"string","enum":["BUY","SELL","INCREASE","DECREASE"],"title":"Action"},"previous_weight":{"type":"number","title":"Previous Weight"},"target_weight":{"type":"number","title":"Target Weight"},"weight_change":{"type":"number","title":"Weight Change"}},"additionalProperties":true,"type":"object","required":["symbol","action","previous_weight","target_weight","weight_change"],"title":"OrderLeg"},"Page":{"properties":{"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"returned":{"type":"integer","title":"Returned"},"total":{"type":"integer","title":"Total"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"next":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}},"additionalProperties":true,"type":"object","required":["limit","offset","returned","total"],"title":"Page"},"PerformanceVsSpy":{"properties":{"annualized_return_pct":{"type":"number","title":"Annualized Return Pct"},"spy_annualized_return_pct":{"type":"number","title":"Spy Annualized Return Pct"},"max_drawdown_pct":{"type":"number","title":"Max Drawdown Pct"},"spy_max_drawdown_pct":{"type":"number","title":"Spy Max Drawdown Pct"},"sharpe":{"type":"number","title":"Sharpe"},"spy_sharpe":{"type":"number","title":"Spy Sharpe"},"summary":{"type":"string","title":"Summary"}},"additionalProperties":true,"type":"object","required":["annualized_return_pct","spy_annualized_return_pct","max_drawdown_pct","spy_max_drawdown_pct","sharpe","spy_sharpe","summary"],"title":"PerformanceVsSpy"},"PositionDecision":{"properties":{"committed_target_weight":{"type":"number","title":"Committed Target Weight"},"candidate_target_weight":{"type":"number","title":"Candidate Target Weight","description":"Today's unconstrained model weight; context only."},"in_current_candidate":{"type":"boolean","title":"In Current Candidate"},"status":{"type":"string","enum":["aligned_with_candidate","retained_by_rebalance_policy"],"title":"Status"},"retention_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retention Reason"},"analytical_signal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analytical Signal"},"analytical_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analytical Regime"},"sleeve":{"type":"string","enum":["crypto","non_crypto"],"title":"Sleeve"}},"additionalProperties":true,"type":"object","required":["committed_target_weight","candidate_target_weight","in_current_candidate","status","sleeve"],"title":"PositionDecision"},"RebalanceEvent":{"properties":{"event_id":{"type":"string","title":"Event Id"},"allocation_level":{"type":"integer","title":"Allocation Level"},"status":{"type":"string","enum":["INITIAL_TARGET","REBALANCE","HOLD"],"title":"Status"},"recommendation_timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Timestamp"},"recommendation_timestamp_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Timestamp Utc"},"from_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From As Of"},"to_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To As Of"},"changes":{"items":{"$ref":"#/components/schemas/OrderLeg"},"type":"array","title":"Changes"},"orders":{"items":{"$ref":"#/components/schemas/OrderLeg"},"type":"array","title":"Orders","description":"The only executable legs; empty means hold."},"executed_sleeves":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Executed Sleeves"},"non_crypto_next_eligible_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Non Crypto Next Eligible Date"}},"additionalProperties":true,"type":"object","required":["event_id","allocation_level","status","changes","orders"],"title":"RebalanceEvent"},"ResourceDescription":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"purpose":{"type":"string","title":"Purpose"},"parameters":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Parameters"},"examples":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Examples"},"cache":{"type":"string","title":"Cache"}},"additionalProperties":true,"type":"object","required":["id","path","purpose","cache"],"title":"ResourceDescription"},"Signal":{"properties":{"pair":{"type":"string","enum":["USD","USDT","BTC"],"title":"Pair","description":"USD/USDT for dollar terms, BTC for Bitcoin-denominated terms."},"regime":{"type":"string","enum":["BULL","NEUTRAL","BEAR","N/A"],"title":"Regime"},"flipped":{"type":"boolean","title":"Flipped","description":"True when the regime flipped in the latest daily update."},"from_regime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Regime"},"flip_timestamp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Flip Timestamp","description":"Unix seconds of the last flip."},"flip_time_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flip Time Utc"},"approximate":{"type":"boolean","title":"Approximate"}},"additionalProperties":true,"type":"object","required":["pair","regime","flipped","approximate"],"title":"Signal"},"SignalAsset":{"properties":{"symbol":{"type":"string","title":"Symbol"},"instrument_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instrument Id","description":"Canonical ASSET_CLASS:VENUE:QUOTE_SYMBOL identity, shared with the book."},"asset_class":{"type":"string","enum":["crypto","stocks","etfs","bonds","commodities"],"title":"Asset Class"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"price":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price","description":"Display-formatted price."},"price_raw":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Raw","description":"Numeric last close in USD (crypto: USDT)."},"market_cap":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Market Cap"},"price_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Date","description":"Date of the daily candle behind price (Yahoo classes)."},"stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stale","description":"True when price_date predates the latest completed NYSE session."},"signals":{"anyOf":[{"items":{"$ref":"#/components/schemas/Signal"},"type":"array"},{"type":"null"}],"title":"Signals"}},"additionalProperties":true,"type":"object","required":["symbol","asset_class"],"title":"SignalAsset"},"SignalClass":{"properties":{"status":{"type":"string","enum":["ready","updating","warming_or_unavailable"],"title":"Status"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of","description":"When the pipeline last ran (UTC), not the market date."},"updating":{"type":"boolean","title":"Updating"},"asset_count":{"type":"integer","title":"Asset Count"},"matched_asset_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Matched Asset Count"},"breadth":{"$ref":"#/components/schemas/Breadth"},"assets":{"anyOf":[{"items":{"$ref":"#/components/schemas/SignalAsset"},"type":"array"},{"type":"null"}],"title":"Assets"},"flips":{"anyOf":[{"items":{"$ref":"#/components/schemas/Flip"},"type":"array"},{"type":"null"}],"title":"Flips"},"flip_count":{"type":"integer","title":"Flip Count"},"freshness":{"anyOf":[{"$ref":"#/components/schemas/ClassFreshness"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["status","updating","asset_count","breadth","flip_count"],"title":"SignalClass"},"SignalsResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"data_type":{"type":"string","const":"current_market_signals","title":"Data Type"},"status":{"type":"string","enum":["ready","partial","warming_or_unavailable"],"title":"Status"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"asset_class_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Class Filter"},"asset_count":{"type":"integer","title":"Asset Count"},"breadth":{"$ref":"#/components/schemas/Breadth"},"classes":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/SignalClass"},"type":"object"},{"type":"null"}],"title":"Classes","description":"view=classes and view=summary."},"flips":{"anyOf":[{"items":{"$ref":"#/components/schemas/Flip"},"type":"array"},{"type":"null"}],"title":"Flips","description":"view=classes."},"flip_count":{"type":"integer","title":"Flip Count"},"results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Results","description":"view=assets (SignalAsset) or view=flips (Flip)."},"page":{"anyOf":[{"$ref":"#/components/schemas/Page"},{"type":"null"}]},"query":{"additionalProperties":true,"type":"object","title":"Query"},"freshness":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Freshness"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["schema_version","data_type","status","asset_count","breadth","flip_count","query","meta"],"title":"SignalsResponse"},"Snapshot":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id","description":"Identifies the serving state shared by every agent resource at one moment."},"model_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Version"},"recommendation_timestamp_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Timestamp Utc","description":"When the current portfolio candidate was computed (UTC)."},"signals_as_of_utc":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Signals As Of Utc","description":"When each asset-class pipeline last ran (UTC)."}},"additionalProperties":true,"type":"object","required":["snapshot_id","signals_as_of_utc"],"title":"Snapshot"},"SupplyChainResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version"},"data_type":{"type":"string","enum":["supply_chain_catalogue","supply_chain_dataset","supply_chain_analysis"],"title":"Data Type"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"},"categories":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Categories","description":"Discovery only."},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"view":{"anyOf":[{"type":"string","enum":["full","compact"]},{"type":"null"}],"title":"View"},"dataset":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dataset","description":"view=full: the complete curated dataset."},"nodes":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Nodes","description":"view=compact: node index."},"edges":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Edges","description":"Supplier (from) to consumer (to) relationships."},"matches":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Matches","description":"Nodes matching q, best first."},"analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Analysis"},"meta":{"$ref":"#/components/schemas/Meta"}},"additionalProperties":true,"type":"object","required":["schema_version","data_type","limitations","meta"],"title":"SupplyChainResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"_HoldingsBacktestPayload":{"properties":{"holdings":{"items":{},"type":"array","title":"Holdings","default":[]},"risk":{"type":"integer","title":"Risk","default":50},"indicator":{"type":"string","title":"Indicator","default":"ema_atr"}},"type":"object","title":"_HoldingsBacktestPayload"},"_TradeEventPayload":{"properties":{"session_id":{"type":"string","title":"Session Id"},"side":{"type":"string","title":"Side"},"pct":{"type":"number","title":"Pct"},"price":{"type":"number","title":"Price"},"usd_amount":{"type":"number","title":"Usd Amount"},"btc_amount":{"type":"number","title":"Btc Amount"},"market_time":{"type":"integer","title":"Market Time"},"pnl":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pnl"}},"type":"object","required":["session_id","side","pct","price","usd_amount","btc_amount","market_time"],"title":"_TradeEventPayload"}}}}