{"serverId":"mcp-registry/io.github.austin-starks/nexustrade-mcp","tools":[{"name":"approve_agent_plan","fixed":{"name":"approve_agent_plan","description":"⚠ INDIRECTLY COSTS LLM CREDITS — approving the plan unfreezes the agent which then runs more planning + execution LLM calls. Manual approval required; do NOT call unless the user explicitly told you to advance their Aurora agent. Approve a semi-automated agent that is waiting in pending_plan_approval or pending_action_approval. Auto-detects which approval the agent needs and emits the matching state-machine event so the agent resumes execution. Returns 400 if the agent is not in a pending-approv","inputSchema":{"type":"object","required":["agentId"],"properties":{"agentId":{"type":"string","description":"MongoDB agent _id to approve"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":192,"tokensAfter":192},{"name":"archive_agent","fixed":{"name":"archive_agent","description":"Aurora agent surface (no LLM cost — pure DB write). Only relevant when managing Aurora agents. Archive an agent (soft-delete). The agent remains in the database but is hidden from default listings. Address by agentId OR exact title (XOR).","inputSchema":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"Exact case-insensitive user-assigned title (XOR with agentId)"},"agentId":{"type":"string","description":"MongoDB agent _id to archive (XOR with title)"}}},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: true, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":149,"tokensAfter":149},{"name":"create_agent","fixed":{"name":"create_agent","description":"⚠ COSTS LLM CREDITS on the NexusTrade account — spins up an Aurora agent via Router V5 classification + ReAct execution loops, billed per token. **Manual approval required**: do NOT call unless the user explicitly asked to launch an Aurora agent. For strategy creation/backtesting/analysis prefer no-LLM tools: structured create_portfolio (pass full IPortfolio JSON), backtest_portfolio, query_backtest_history, query_*, fetch_portfolios. Create a new autonomous Aurora agent using the same body shap","inputSchema":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"Optional user-assigned display name for the new agent (max 100 chars). Enables later lookup via title on get_agent / send_agent_message / etc."},"messages":{"type":"array","items":{"type":"object","required":["sender","content"],"properties":{"data":{"type":"object","description":"Optional message metadata"},"sender":{"type":"string","description":"Message sender, usually User"},"content":{"type":"string","description":"Message content"},"timestamp":{"type":"string","description":"Optional ISO timestamp"}}},"description":"ChatMessage array, e.g. [{\"sender\":\"User\",\"content\":\"...\"}]"},"maxIterations":{"type":"number","description":"Max agent iterations. When omitted, uses the user's saved ChatSettings.agentIterations (same as the web UI)."},"session_depth":{"enum":["smart","deep"],"type":"string","description":"Deprecated compatibility field. Both values use Aurora's adaptive routing policy."},"attachment_ids":{"type":"array","items":{"type":"string"},"description":"READY chat-attachment ids from upload_chat_attachment. Bound onto the last user message as fileAttachments (same refs as the web FILES tab)."},"automationMode":{"enum":["automated","semi-automated"],"type":"string","description":"automated | semi-automated. When omitted, uses ChatSettings.agentAutomationMode."},"conversationId":{"type":"string","description":"Optional NexusGenAI conversation id"},"idempotencyKey":{"type":"string","description":"Caller-chosen token that makes this create retry-safe. Creation runs the router and the planner and regularly takes longer than the transport will wait, so a call that times out has usually SUCCEEDED. Pass a unique key, and if the call appears to fail, retry with the SAME key: you get the agent the first call created, never a second billed run. A key reused for a different prompt is rejected rather than silently replayed."}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":696,"tokensAfter":696},{"name":"create_portfolio","fixed":{"name":"create_portfolio","description":"Create an algorithmic trading portfolio. **PREFERRED PATH (no LLM cost): pass a fully-structured IPortfolio JSON payload** — see inputSchema for name + strategies[] with nested condition/action/indicator objects and optional strategy-owned orderExecution. DynamicRebalance.deploymentPercent and RebalanceOption.totalBudget.amount are indicator objects: use Value for a constant or PoliticalPurchaseShare with a Bioguide memberId, instrument Equity/Option, and amountBasis Midpoint for a dynamic purch","inputSchema":{"type":"object","$defs":{"asset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"window":{"type":"object","required":["length","interval"],"properties":{"length":{"type":"number","minimum":1},"interval":{"enum":["Day","Hour","Minute"],"type":"string"}},"description":"Rolling time window. e.g. {length:14, interval:'Day'} = trailing 14 trading days."},"strategy":{"type":"object","required":["name","condition","action"],"properties":{"name":{"type":"string","description":"Human-readable strategy name."},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"active":{"type":"boolean","description":"Whether the strategy is active (default true)."},"condition":{"$ref":"#/$defs/condition"},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."}},"description":"A trading strategy: a trigger condition + an action to take when the condition is true. Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price.","additionalProperties":true},"condition":{"type":"object","required":["type"],"properties":{"lhs":{"$ref":"#/$defs/indicator","description":"Base only: left-hand indicator."},"rhs":{"$ref":"#/$defs/indicator","description":"Base only: right-hand indicator."},"name":{"type":"string","description":"Optional name; auto-derived if omitted."},"type":{"enum":["And","Or","Base","Multi","Then"],"type":"string"},"value":{"type":"number","description":"Multi only: threshold count (>=1)."},"window":{"type":"object","required":["length","interval"],"properties":{"length":{"type":"number"},"interval":{"enum":["Day","Hour","Minute"],"type":"string"}},"description":"Then only: how long each step has to be followed by the next one, e.g. {length: 30, interval: 'Minute'}. length must be > 0."},"comparison":{"enum":["lessThan","greaterThan","lessThanOrEqual","greaterThanOrEqual","equal","notEqual"],"type":"string","description":"Base / Multi only: how to compare."},"conditions":{"type":"array","items":{"$ref":"#/$defs/condition"},"description":"And / Or / Multi / Then only: nested conditions. Then reads them in order (at least 2)."}},"description":"A condition tree (Bridge pattern). type='Base' compares lhs vs rhs with a comparator; type='And'/'Or' combine an array of nested conditions; type='Multi' fires when N nested conditions are true (count vs threshold); type='Then' is sequential — it fires when the last nested condition is true now and each earlier one was true at a strictly earlier tick within 'window' of the next, so it needs at least 2 conditions and a window with length > 0.","additionalProperties":true},"indicator":{"type":"object","required":["type"],"properties":{"base":{"type":"number","description":"Log: logarithm base (>0, ≠1)."},"form":{"type":"object","description":"Optional auto-generated form metadata. Usually omit; the server fills this.","additionalProperties":true},"name":{"type":"string","description":"Optional human-readable name. Auto-derived if omitted."},"side":{"enum":["Buy","Sell"],"type":"string","description":"Order-side indicators: Buy or Sell."},"type":{"enum":["DaysSinceAgent","MinutesSinceAgent","DaysSinceAlert","MinutesSinceAlert","StockReport","DaysUntilEarnings","DaysSinceEarnings","ImpliedVolatility","IVRank","IVPercentile","IVHVRatio","LastOrderPrice","Fundamental","Economic","CustomIndicator","Index","BollingerBand","RelativeStrengthIndex","MovingAverageConvergenceDivergence","AverageDirectionalIndex","RelativeVolume","Stochastic","CommodityChannelIndex","WilliamsR","MoneyFlowIndex","OnBalanceVolume","AccumulationDistribution","ChaikinMoneyFlow","DonchianChannel","KeltnerChannel","Supertrend","IchimokuCloud","ParabolicSar","PriceMeanAbsoluteDeviation","ExponentialMovingAverage","SimpleMovingAverage","PriceStandardDeviation","PriceRateOfChange","MaxDrawdown","MaxDrawup","MinimumPrice","MaximumPrice","IndicatorMeanAbsoluteDeviation","IndicatorExponentialMovingAverage","IndicatorSimpleMovingAverage","IndicatorStandardDeviation","IndicatorRateOfChange","DaysSinceOrder","DaysSinceOptionOrder","DaysSinceStrategyFired","DaysSinceLastRebalanceOptionOrder","MinutesSinceOptionOrder","MinutesSinceOrder","DaysSinceTransaction","InitialValue","BuyingPower","PositionValue","PositionPercentChange","PortfolioValue","RebalanceDecisionMetric","Value","Price","Plus","Minus","Multiply","Divide","Negative","AbsoluteValue","SquareRoot","Max","Min","Day","Month","Date","Year","CurrentTimeSeconds","CurrentTimeMinutes","CurrentTimeHours","TrailingSum","CompoundAnnualGrowthRate","Log","Exponentiation","SumOrderQuantity","SumOrderAmount","MinutesAfterOpen","OpeningPrice","MinuteBarHigh","HeikinAshi","MinuteBarLow","PreviousClosingPrice","HighOfDay","LowOfDay","MinutesUntilClose","PriceChangeSinceOpen","GapSize","GapPercentage","TrueRange","AverageTrueRange","Volume","VWAP","BullishFairValueGap","BearishFairValueGap","IndicatorAtMinutesAfterOpen","IndicatorWindowAgo","IndicatorAtEntry","IsIndexMember","PoliticalTrades","PoliticalPurchaseShare","InsiderTrades","InstitutionalHoldings","IsIndustry","IsAssetType","IsAsset","IsNotAsset","CrossAbove","CrossBelow","Correlation","PositionMaxDrawdown","PositionMaxDrawup","UnderlyingMaxDrawdown","ConsecutiveTrue","CountTrue","OptionPositionValue","OptionPositionCount","OptionPositionPercentChange","OptionPositionMaxDrawdown","OptionDaysToExpiration","OptionDaysHeld","OptionCollateral","OptionSpreadCount","OptionSpreadEntryPrice","OptionUnrealizedPnL","OptionRealizedPnL","OptionRealizedPremium","OptionGrossExposurePercent"],"type":"string"},"filer":{"type":"string","description":"PoliticalTrades member full or last name; empty means all members."},"index":{"enum":["SP500","NASDAQ100","DJIA"],"type":"string","description":"IsIndexMember: point-in-time index id ('SP500', 'NASDAQ100', or 'DJIA')."},"value":{"type":"number","description":"Required for Value indicators (numeric constant)."},"years":{"type":"number","description":"CompoundAnnualGrowthRate: years over which to compute CAGR."},"length":{"type":"number","description":"TrailingSum and similar — window length in days."},"maxDte":{"type":"number","description":"Option* indicators: max days to expiration."},"metric":{"type":"string","description":"PoliticalTrades: NetAmount, BuyAmount, SellAmount, BuyCount, SellCount, DistinctBuyers, Held. InstitutionalHoldings: HolderCount, TotalShares, TotalValue, BookSharePercent, ConcentrationTop5, NetShareChange, NetHolderChange, NewHolders, ClosedHolders. Fundamental/CompoundAnnualGrowthRate: financial metric (e.g. 'peRatio'). Economic: economic indicator (e.g. 'UNRATE'). Index: index symbol (e.g. 'VIX', 'SPX'). RebalanceDecisionMetric: allocationDrift, plannedTurnover, estimatedCost, expectedBenefit, or netBenefit."},"minDte":{"type":"number","description":"Option* indicators: min days to expiration."},"window":{"type":"object","required":["length","interval"],"properties":{"length":{"type":"number","minimum":1},"interval":{"enum":["Day","Hour","Minute"],"type":"string"}},"description":"Rolling time window. e.g. {length:14, interval:'Day'} = trailing 14 trading days."},"chamber":{"enum":["All","House","Senate"],"type":"string","description":"PoliticalTrades optional cohort filter. All combines House and Senate."},"manager":{"type":"string","description":"InstitutionalHoldings filing manager: a CIK such as 1067983 matches exactly, any other text matches a filed name containing it, and empty reads every manager. Prefer the CIK — one CIK files under as many as six spellings of its own name, and a name like 'berkshire' spans Buffett's firm, two of its insurance subsidiaries and an unrelated asset manager."},"message":{"type":"string","description":"DaysSinceAlert / MinutesSinceAlert: alert message to match."},"compound":{"type":"boolean"},"exponent":{"type":"number","description":"Exponentiation: power exponent."},"industry":{"type":"string","description":"IsIndustry: industry tag."},"memberId":{"type":"string","description":"Bioguide member id (e.g. P000197). Required for PoliticalPurchaseShare, whose member-wide public purchase amounts include symbols outside the trading universe; also selects an exact PoliticalTrades member and overrides filer."},"minOrMax":{"enum":["min","max"],"type":"string","description":"OptionDaysToExpiration / OptionDaysHeld: aggregate selector."},"assetType":{"type":"string","description":"IsAssetType: e.g. 'Stock', 'Cryptocurrency'."},"condition":{"$ref":"#/$defs/condition","description":"ConsecutiveTrue / CountTrue: the condition to evaluate over the window."},"direction":{"enum":["long","short"],"type":"string","description":"Option* indicators: long or short."},"indicators":{"type":"array","items":{"$ref":"#/$defs/indicator"},"description":"Sub-indicators for compound types (Plus, CrossAbove, etc.)."},"instrument":{"enum":["Equity","Option","All"],"type":"string","description":"PoliticalTrades instrument class (Equity, Option, All). PoliticalPurchaseShare requires Equity or Option and returns that side's percent of member-wide public purchases."},"matchAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"IsAsset / IsNotAsset: the asset to match against.","additionalProperties":true},"optionType":{"enum":["call","put"],"type":"string","description":"Option* indicators: call or put."},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string","description":"Option* indicators: vertical, ironCondor, etc."},"underlying":{"type":"string","description":"Option* indicators: underlying ticker (e.g. 'SPY')."},"windowDays":{"type":"integer","maximum":3650,"minimum":1,"description":"PoliticalTrades / InsiderTrades trailing calendar days. InstitutionalHoldings reads a disclosed quarter only if its filing became public within this many days, so it defaults to 180 rather than 90: a 13F is quarterly plus a filing lag of up to 45 days, and 91 days can separate two filings."},"amountBasis":{"enum":["LowerBound","Midpoint","UpperBound"],"type":"string","description":"Disclosed transaction range endpoint. PoliticalPurchaseShare defaults to Midpoint; PoliticalTrades amount metrics default to LowerBound."},"orderStatus":{"enum":["Pending","Accepted","Pending User Approval","Canceled","Filled","Partially Filled"],"type":"string","description":"Order-side indicators: filter by status."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"The asset this indicator measures (most price/option indicators).","additionalProperties":true},"lookbackDays":{"type":"integer","maximum":36500,"minimum":1,"description":"OptionRealizedPnL / OptionRealizedPremium: only count activity within this many days of the evaluation date. Omit for the whole life of the book."},"targetAssets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true},"description":"Multi-asset variant (position / order indicators)."},"positionEffect":{"type":"string","description":"Option* indicators: open or close."},"transactionType":{"enum":["Deposit","Withdraw"],"type":"string","description":"DaysSinceTransaction: Deposit or Withdraw."},"minutesAfterOpen":{"type":"number","maximum":390,"minimum":0,"description":"IndicatorAtMinutesAfterOpen: 0–390."},"customIndicatorId":{"type":"string","description":"REQUIRED when type is CustomIndicator. Mongo ObjectId hex string for the owned custom data source (see list_custom_indicators or MCP session instructions). Never omit — display name alone is rejected."},"transactionStatus":{"enum":["Pending","Canceled","Completed"],"type":"string","description":"DaysSinceTransaction: transaction status."},"customIndicatorName":{"type":"string","description":"Optional display label for CustomIndicator. Ignored for lookup; customIndicatorId is authoritative."},"numStandardDeviations":{"type":"number","description":"BollingerBand: e.g. 2."}},"description":"An indicator. Single permissive shape — the 'type' field selects one of ~90 indicator kinds; other fields are required only when that kind needs them. Server-side IndicatorFactory.validate enforces per-type rules. PoliticalTrades needs targetAsset, filer, metric, windowDays, amountBasis, instrument, and chamber; InstitutionalHoldings (SEC Form 13F positions) needs targetAsset, metric, windowDays and optional manager, reads the latest quarter public on or before the evaluation date, never sums across quarters, and measures accumulation and crowding rather than entry timing since a 13F is long-only and up to 45 days stale; House and Senate are unified, so use chamber All unless explicitly filtering. Equity excludes confirmed option disclosures. Amount metrics use disclosed ranges and default to conservative LowerBound. CustomIndicator (alt-data): REQUIRED customIndicatorId (24-char hex ObjectId from list_custom_indicators or MCP session catalog); optional customIndicatorName is display-only. In DynamicRebalance/RebalanceOption/OpenOption pipelines omit targetAsset on asset-scoped CustomIndicators (binds per candidate). RebalanceDecisionMetric reads the prospective DynamicRebalance/RebalanceOption plan computed before the strategy condition and requires metric allocationDrift, plannedTurnover, estimatedCost, expectedBenefit, or netBenefit. Common kinds: Value (numeric constant; needs 'value'), Price (current asset price; needs 'targetAsset'), SimpleMovingAverage/ExponentialMovingAverage/RelativeStrengthIndex/BollingerBand/MaxDrawdown/MaxDrawup/MinimumPrice/MaximumPrice/PriceStandardDeviation/PriceMeanAbsoluteDeviation/PriceRateOfChange (need targetAsset+window; BollingerBand also numStandardDeviations), MovingAverageConvergenceDivergence (MACD; needs targetAsset; optional fastLength/slowLength/signalLength defaulting to 12/26/9 with slowLength > fastLength, interval Day|Hour|Minute default Day, and line macd|signal|histogram selecting which of the three MACD outputs to emit), AverageDirectionalIndex (Wilder ADX trend-strength system 0-100; needs targetAsset+window; optional line adx|plusDi|minusDi — ADX measures strength, +DI/-DI direction), RelativeVolume (RVOL; needs targetAsset+window; current bar volume divided by the mean volume of the trailing N completed bars, ~1.0 is its recent pace), Stochastic (needs targetAsset+window; optional smoothK/smoothD defaulting to 3/3 and line k|d), CommodityChannelIndex (CCI; needs targetAsset+window; optional constant defaulting to 0.015), WilliamsR (needs targetAsset+window; −100 to 0 scale), MoneyFlowIndex (MFI; needs targetAsset+window; volume-weighted 0-100), OnBalanceVolume (OBV; needs targetAsset; optional interval default Day), AccumulationDistribution (ADL; needs targetAsset; optional interval default Day), ChaikinMoneyFlow (CMF; needs targetAsset+window; −1 to +1 scale), DonchianChannel (needs targetAsset+window; optional line upper|lower|middle default upper), KeltnerChannel (needs targetAsset+window; optional multiplier default 2 and line upper|middle|lower default middle), Supertrend (needs targetAsset+window; optional multiplier default 3 and line value|direction default value, direction reads +1 up / −1 down), IchimokuCloud (needs targetAsset+window; optional spanLength default 52 and line tenkan|kijun|senkouA|senkouB|chikou default tenkan; lines unshifted), ParabolicSar (needs targetAsset; optional interval default Day, step default 0.02, maximum default 0.2), HeikinAshi (needs targetAsset + line open|high|low|close|streak; candles from completed one-minute regular-session bars, identical in backtests and live; streak is the signed length of the current same-color run since the last color change, 0 on a doji or once the run shows an opposite-direction wick, so three clean same-color candles are streak >= 3 or <= -3), TrueRange/AverageTrueRange (need targetAsset; ATR also window), VWAP (needs targetAsset; resets each trading day), Plus/Minus/Multiply/Divide/Max/Min (need 'indicators' array of 2 sub-indicators), Negative/AbsoluteValue/SquareRoot (need 1 sub-indicator), Log (needs base + 1 sub-indicator), Exponentiation (needs exponent + 1 sub-indicator), CrossAbove/CrossBelow (need 2 sub-indicators), Correlation (rolling Pearson of two sub-indicators' returns; needs 2 sub-indicators + window with length >= 2), TrailingSum/IndicatorWindowAgo/IndicatorAtMinutesAfterOpen (compound; need indicators + window/length/minutesAfterOpen), IndicatorAtEntry (compound; the operand's value frozen at the last matching fill — needs 1 nested indicator + targetAsset + side + orderStatus), Fundamental/CompoundAnnualGrowthRate (need targetAsset + metric; CAGR also needs years), Economic/Index (need metric), DaysSinceOrder/MinutesSinceOrder/SumOrderQuantity/SumOrderAmount/LastOrderPrice (need targetAssets/targetAsset + side + orderStatus), DaysSinceStrategyFired/DaysSinceLastRebalanceOptionOrder (no fields), DaysSinceTransaction (transactionType + transactionStatus), IsAsset/IsNotAsset/IsAssetType/IsIndustry/IsIndexMember (need targetAsset + matchAsset/assetType/industry/index), OptionPositionValue/OptionPositionCount/OptionPositionPercentChange/OptionPositionMaxDrawdown/OptionDaysToExpiration/OptionDaysHeld/OptionCollateral/OptionSpreadCount/OptionSpreadEntryPrice/OptionUnrealizedPnL (optional underlying + optionType + direction + spreadType filters; OptionSpreadEntryPrice is the contract-weighted net entry price per share of the matching open spreads, positive for a debit and negative for a credit, with no value when none match), OptionRealizedPnL (net realized P&L on CLOSED option positions; the same optional underlying/optionType/direction/spreadType filters + optional lookbackDays), OptionRealizedPremium (realized premium still available to spend: closed short-option P&L minus premium already spent by 'percent of realized premium' opens; optional underlying + optional lookbackDays ONLY, and it rejects optionType/direction/spreadType), OptionGrossExposurePercent (no fields), DaysSinceAgent/MinutesSinceAgent/DaysSinceAlert/MinutesSinceAlert, Day/Month/Year/Date/CurrentTimeHours/CurrentTimeMinutes/CurrentTimeSeconds/MinutesAfterOpen/MinutesUntilClose, PortfolioValue/BuyingPower/InitialValue, PositionValue/PositionPercentChange/PositionMaxDrawdown/PositionMaxDrawup/UnderlyingMaxDrawdown.","additionalProperties":true},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."},"deploymentBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"rebalanceOptionSleeve":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true},"optionStructureTemplate":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true}},"required":["name","strategies"],"properties":{"main":{"type":"boolean","description":"Mark as main portfolio (optional)."},"name":{"type":"string","description":"Portfolio name (required)."},"policy":{"type":"object","required":["stockEligibility"],"properties":{"stockEligibility":{"type":"object","properties":{"industryFilter":{"type":"object","required":["mode","match","industries"],"properties":{"mode":{"enum":["ALL","INCLUDE_ONLY"],"type":"string"},"match":{"enum":["ANY","ALL"],"type":"string"},"industries":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"shareClassBehavior":{"enum":["ONE_PER_COMPANY","ALL_CLASSES"],"type":"string","description":"ONE_PER_COMPANY (default) keeps one share class per company in a dynamic-universe selection, so a top-5 holds five companies (GOOGL over GOOG on a tie). ALL_CLASSES lets every class through, for a book that trades share classes against each other (a GOOG/GOOGL pair). Omit to keep the portfolio's current setting."},"maximumMarketCapUsd":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Largest market cap allowed, or null for no ceiling (default)."},"minimumMarketCapUsd":{"type":"integer","minimum":0,"description":"Smallest market cap a dynamic-universe candidate may have. Default 1000000000 ($1B); lower it for a small-cap strategy."},"missingMarketCapBehavior":{"enum":["EXCLUDE","INCLUDE"],"type":"string","description":"EXCLUDE (default) drops a dynamic-universe candidate with no known market cap (most ETFs, some filers). INCLUDE keeps it; the cap bounds then apply only to names whose cap is known. Omit to keep the portfolio's current setting."}},"additionalProperties":false}},"description":"OPTIONAL. Which stocks the portfolio's dynamic universes may select. Only stockEligibility is accepted; omitted fields take the defaults. Automated trading can never be set here: it starts off and only the owner enables it in the NexusTrade UI.","additionalProperties":false},"message":{"type":"string","description":"OPTIONAL natural-language fallback. If provided WITHOUT name/strategies, the server runs a paid LLM to translate NL→portfolio. Prefer the structured fields (no LLM cost)."},"strategies":{"type":"array","items":{"type":"object","required":["name","condition","action"],"properties":{"name":{"type":"string","description":"Human-readable strategy name."},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"active":{"type":"boolean","description":"Whether the strategy is active (default true)."},"condition":{"$ref":"#/$defs/condition"},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."}},"description":"A trading strategy: a trigger condition + an action to take when the condition is true. Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price.","additionalProperties":true},"minItems":1,"description":"Array of strategies. Each strategy is { name, condition, action, orderExecution? }. RebalanceOption actions may include action.positionScope (portfolio | strategy). Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price. See $defs.strategy / $defs.condition / $defs/indicator."},"initialValue":{"type":"number","minimum":0,"description":"Starting cash (default 10000). Use 0 for agent-only / LaunchAgent portfolios that never trade capital."},"alertsEnabled":{"type":"boolean"},"supportsCrypto":{"type":"boolean"},"supportsFractionalShares":{"type":"boolean"}},"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":45191,"tokensAfter":45191},{"name":"create_portfolio_variant","fixed":{"name":"create_portfolio_variant","description":"Deep-copy a source portfolio (chat OR deployed) into a NEW chat portfolio with fresh strategy IDs and no YAML/NL re-authoring. Use this when an existing portfolio must remain the exact semantic baseline. Omit patches (or pass []) for a clone-only control; supply RFC-6902 JSON-Pointer patches (op/path/value) only for deliberate surgical changes. Patch paths target the IPortfolio shape and are action-type-specific: DynamicRebalance cash/deploy → `/strategies/0/action/deploymentPercent` (indicator ","inputSchema":{"type":"object","required":["source_portfolio_id","name"],"properties":{"name":{"type":"string","description":"Required new portfolio name."},"dry_run":{"type":"boolean","description":"Resolve, diff and validate without persisting."},"patches":{"type":"array","description":"RFC6902-style ops against canonical IPortfolio JSON. Omit or pass [] for an exact semantic clone."},"source_portfolio_id":{"type":"string","description":"Source portfolio ID (live, paper, or chat) to deep-copy."}},"additionalProperties":false},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":302,"tokensAfter":302},{"name":"fetch_portfolios","fixed":{"name":"fetch_portfolios","description":"List or search your portfolios with lightweight metadata (strategy id + name). Matches portfolio name, strategy names, and tickers — same workspace search as the dashboard / GET /api/chat-portfolio. include_chat_portfolios returns workspace DRAFTS only (excludes deployedMirror rows). Recover a past chat draft: include_paper=false, include_live=false, include_chat_portfolios=true, search=\"Delta 0.07\" (then get_portfolio for full strategy JSON). Returns an object: { portfolios, page, limit, total,","inputSchema":{"type":"object","required":[],"properties":{"page":{"type":"number","description":"Page number (default 1)"},"limit":{"type":"number","description":"Max portfolios to return (default 20, max 50)"},"search":{"type":"string","description":"Free-text search (max 100 chars) over portfolio name, strategy names, and tickers, ranked by relevance. Matches stemmed whole words (Postgres full-text) and case-insensitive substrings of 3+ characters (so prefixes like \"neckb\" find \"Neckbeard\"). Omit for list/paginate mode. Matches the dashboard workspace search — not condition-field values."},"include_live":{"type":"boolean","description":"Include live trading portfolios (default true)"},"include_paper":{"type":"boolean","description":"Include paper portfolios (default true)"},"portfolio_ids":{"type":"array","items":{"type":"string"},"description":"Specific portfolio IDs to fetch (omit for all)"},"include_inactive":{"type":"boolean","description":"Include inactive portfolios (default true)"},"include_positions":{"type":"boolean","description":"Include positions + spread-grouped holdings (default true when not searching; default false when search is set). cash and buyingPower are always returned for deployed portfolios regardless of this flag."},"include_chat_portfolios":{"type":"boolean","description":"Include workspace draft chat portfolios (default false). Excludes deployedMirror. Set true with include_paper=false and include_live=false for draft-only search."}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":567,"tokensAfter":567},{"name":"get_agent","fixed":{"name":"get_agent","description":"Aurora agent surface (no LLM cost on this call — pure DB read). Only relevant when the user is actively working with an Aurora agent. Returns status, plan, messages, config. Address by agentId OR by exact title (case-insensitive); provide exactly one. Duplicate titles fail closed with candidate ids. Polling/liveness: use agent.lastProgressAt (advances during sandbox steps, tool cards, LLM rounds, and — while waiting_for_subagents — when children progress) — NOT agent.updatedAt (state transitions","inputSchema":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"Exact case-insensitive user-assigned title (XOR with agentId). Fails if 0 or >1 matches."},"agentId":{"type":"string","description":"MongoDB agent _id (XOR with title)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":225,"tokensAfter":225},{"name":"get_agent_trajectory","fixed":{"name":"get_agent_trajectory","description":"Aurora agent surface (no LLM cost on this call — pure DB read). Only relevant when inspecting an Aurora agent run. Raw trace / trajectory events for an agent (for inspection or building evaluator input). Address by agentId OR exact title (XOR).","inputSchema":{"type":"object","required":[],"properties":{"title":{"type":"string","description":"Exact case-insensitive user-assigned title (XOR with agentId)"},"agentId":{"type":"string","description":"MongoDB agent _id (XOR with title)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":149,"tokensAfter":149},{"name":"get_portfolio","fixed":{"name":"get_portfolio","description":"Fetch one portfolio with full strategy objects (condition, action, indicators), positions, and spread-grouped holdings. Zero LLM cost — same data path as GET /api/portfolio/:portfolioId. Resolves deployed paper/live portfolios first, then chat portfolios. Use fetch_portfolios to discover IDs. Response includes conditionFieldAudit (comparison, value, window.length per base condition) — use that for Gate-7/Gate-8 deploy verification, NOT strategy.name or condition.name (those may be stale after GA","inputSchema":{"type":"object","required":["portfolio_id"],"properties":{"portfolio_id":{"type":"string","description":"Portfolio ID (deployed paper/live or chat portfolio ID from fetch_portfolios / create_portfolio)."}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":212,"tokensAfter":212},{"name":"list_agents","fixed":{"name":"list_agents","description":"Aurora agent surface (no LLM cost on this call itself — pure DB read). Useful only when the user is actively operating an Aurora agent. For strategy creation/backtesting prefer the structured no-LLM tools (create_portfolio with full JSON payload, backtest_portfolio, query_*, fetch_portfolios). List your Aurora agents with pagination using the same query shape as the agent controller.","inputSchema":{"type":"object","required":[],"properties":{"page":{"type":"number","description":"Page number (default 1)"},"limit":{"type":"number","description":"Page size (default 10, max 100)"},"search":{"type":"string","description":"Case-insensitive substring match over title and initialPrompt"},"portfolioId":{"type":"string","description":"Optional portfolio id or alias to filter agents"},"starredOnly":{"type":"boolean","description":"Return only starred top-level agents, sorted by starredOrder asc then starredAt desc. Default false"},"includeArchived":{"type":"boolean","description":"Include archived agents. Default false"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":297,"tokensAfter":297},{"name":"query_backtest_history","fixed":{"name":"query_backtest_history","description":"Return a time series of {time, value, cash, positionValue, comparisonValue, reservedCollateral} per tick for a completed backtest. Reads from the backtesthistories collection (full minute-resolution; 30-day TTL). Use this to find suspicious single-tick portfolio value jumps without needing the codebase — feed the result through your own jump-detection logic. Cash is derived as value minus Σ(position.quantity × lastPrice). `reservedCollateral` is the collateral locked by open positions at that ti","inputSchema":{"type":"object","required":["backtest_id"],"properties":{"page":{"type":"number","description":"Page number (default 1)"},"end_date":{"type":"string","description":"ISO date filter end (e.g. 2024-10-18). Inclusive; T23:59:59.999Z is appended if a bare date is given."},"page_size":{"type":"number","description":"Rows per page (default 500, max 5000). Larger than events because history is plain numbers — cheap to emit."},"start_date":{"type":"string","description":"ISO date filter start (e.g. 2024-10-07). Inclusive."},"backtest_id":{"type":"string","description":"Backtest ID (required). Must be owned by the calling MCP user."},"jump_bps_threshold":{"type":"number","description":"If set, the response appends a 'Suspicious jumps' section listing every single-tick Δvalue whose magnitude exceeds this many basis points of the FIRST point's value. E.g. 50 = flag any >0.5% move between consecutive ticks. Useful for mark-to-market bug hunts. Default: omitted (no jump scan)."}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":430,"tokensAfter":430},{"name":"query_backtest_status","fixed":{"name":"query_backtest_status","description":"Return the parent backtest document's status, error, interval, timestamps, elapsed time, and completed statistics without reading history/events. Use immediately after backtest_portfolio or before query_backtest_history so ERROR/PENDING/RUNNING states are explicit. Statistics include peakReservedCollateral and medianReservedCollateral — how much capital the book actually had on the line, which a percentage return does not say. Both read \"not recorded\" for a run made before collateral reporting e","inputSchema":{"type":"object","required":["backtest_id"],"properties":{"backtest_id":{"type":"string","description":"Backtest ID (required). Must be owned by the calling MCP user."}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":205,"tokensAfter":205},{"name":"search_public_portfolios","fixed":{"name":"search_public_portfolios","description":"Search and browse publicly shared portfolios from other NexusTrade users, sorted by performance metrics. Optional profileId filters to one creator's public/monetized books (from Search Creators / /p/:profileId).","inputSchema":{"type":"object","required":[],"properties":{"page":{"type":"integer","minimum":1,"description":"Page number (default 1)"},"limit":{"type":"number","maximum":100,"minimum":1,"description":"Results per page (default 20, max 100)"},"sort_by":{"enum":["week","month","threeMonths","sixMonths","year","ytd","allTime","followerCount","bookmarkCount","maxDrawdown","sharpeRatio"],"type":"string","description":"Sort field: week, month, threeMonths, sixMonths, year, ytd, allTime, followerCount, bookmarkCount, maxDrawdown, sharpeRatio. maxDrawdown ranks lowest |drawdown| first and excludes 0 (idle books). sharpeRatio ranks highest first."},"min_sharpe":{"type":"number","description":"Minimum Sharpe ratio filter. Combine with max_drawdown."},"profile_id":{"type":"string","description":"Optional public creator profileId (from search_creators / /p/:profileId). When set, returns only that creator's public/monetized shared portfolios."},"sort_order":{"enum":["1","-1"],"type":"string","description":"Sort order: 1 or -1 (default -1, or 1 when sort_by is maxDrawdown)"},"max_drawdown":{"type":"number","description":"Keep listings whose |max drawdown| is at most this percent. Idle books with max drawdown of 0 are excluded. Combine with min_sharpe.","exclusiveMinimum":0},"trading_type":{"enum":["paper-trading","live-trading"],"type":"string","description":"Trading type: paper-trading or live-trading"},"min_followers":{"type":"number","minimum":0,"description":"Minimum follower count filter (default 0)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":496,"tokensAfter":496},{"name":"send_agent_message","fixed":{"name":"send_agent_message","description":"⚠ COSTS LLM CREDITS — re-runs the Aurora planner LLM after appending the user's follow-up. Manual approval required; do NOT call unless the user explicitly asked to push a message into an active Aurora agent. Address by agentId OR exact title (XOR). Send a follow-up user message to an agent and re-run the planner, matching POST /api/agent/:agentId/message. This can charge planning tokens, rejects actively running/approved states, may recover terminal states, may transition the agent, and publish","inputSchema":{"type":"object","required":["content"],"properties":{"title":{"type":"string","description":"Exact case-insensitive user-assigned title (XOR with agentId)"},"agentId":{"type":"string","description":"MongoDB agent _id to send the message to (XOR with title)"},"content":{"type":"string","description":"The user message text to append to the conversation"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":255,"tokensAfter":255},{"name":"send_chat_message","fixed":{"name":"send_chat_message","description":"⚠ COSTS LLM CREDITS — same path as POST /api/chat. Router V5 classifies the message: Ask Clarity (persisted), Create Agent (spawns Aurora research), or single-tool fulfill (queued prompt job). Use this for chat turns; use create_agent only when you explicitly want agent spawn without single-tool fulfill. Aurora chooses the complete route adaptively.","inputSchema":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"type":"object","required":["sender","content"],"properties":{"data":{"type":"object"},"sender":{"type":"string"},"content":{"type":"string"},"timestamp":{"type":"string"}}},"description":"Full or partial ChatMessage array, e.g. [{\"sender\":\"User\",\"content\":\"...\"}]"},"session_depth":{"enum":["smart","deep"],"type":"string","description":"Deprecated compatibility field. Both values use Aurora's adaptive routing policy."},"attachment_ids":{"type":"array","items":{"type":"string"},"description":"READY chat-attachment ids from upload_chat_attachment. Bound onto the last user message as fileAttachments."},"conversationId":{"type":"string","description":"Optional NexusGenAI conversation id"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":335,"tokensAfter":335},{"name":"stop_agent","fixed":{"name":"stop_agent","description":"Aurora agent surface (no LLM cost — pure state transition). Only relevant when actively managing an Aurora agent. Stop a running agent. Sends a cancellation request and cascades to all descendant subagents. The agent must be in an active state (running, initializing, pending approval, etc.).","inputSchema":{"type":"object","required":["agentId"],"properties":{"agentId":{"type":"string","description":"MongoDB agent _id to stop"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":131,"tokensAfter":131},{"name":"update_portfolio","fixed":{"name":"update_portfolio","description":"Deploy, undeploy, rename, delete, add/remove/replace strategies, or set deployment frequency on portfolios. **rename** requires a non-empty `name` on the operation. **delete** permanently removes a chat, paper, or live portfolio (archives deployed paper/live books; deleting a chat portfolio also archives linked deployments). Pass confirmLive:true only after explicit user confirmation when deleting an active live portfolio. **Structured path (zero LLM cost):** pass an `operations` array — see inp","inputSchema":{"type":"object","$defs":{"asset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"window":{"type":"object","required":["length","interval"],"properties":{"length":{"type":"number","minimum":1},"interval":{"enum":["Day","Hour","Minute"],"type":"string"}},"description":"Rolling time window. e.g. {length:14, interval:'Day'} = trailing 14 trading days."},"strategy":{"type":"object","required":["name","condition","action"],"properties":{"name":{"type":"string","description":"Human-readable strategy name."},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"active":{"type":"boolean","description":"Whether the strategy is active (default true)."},"condition":{"$ref":"#/$defs/condition"},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."}},"description":"A trading strategy: a trigger condition + an action to take when the condition is true. Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price.","additionalProperties":true},"condition":{"type":"object","required":["type"],"properties":{"lhs":{"$ref":"#/$defs/indicator","description":"Base only: left-hand indicator."},"rhs":{"$ref":"#/$defs/indicator","description":"Base only: right-hand indicator."},"name":{"type":"string","description":"Optional name; auto-derived if omitted."},"type":{"enum":["And","Or","Base","Multi","Then"],"type":"string"},"value":{"type":"number","description":"Multi only: threshold count (>=1)."},"window":{"type":"object","required":["length","interval"],"properties":{"length":{"type":"number"},"interval":{"enum":["Day","Hour","Minute"],"type":"string"}},"description":"Then only: how long each step has to be followed by the next one, e.g. {length: 30, interval: 'Minute'}. length must be > 0."},"comparison":{"enum":["lessThan","greaterThan","lessThanOrEqual","greaterThanOrEqual","equal","notEqual"],"type":"string","description":"Base / Multi only: how to compare."},"conditions":{"type":"array","items":{"$ref":"#/$defs/condition"},"description":"And / Or / Multi / Then only: nested conditions. Then reads them in order (at least 2)."}},"description":"A condition tree (Bridge pattern). type='Base' compares lhs vs rhs with a comparator; type='And'/'Or' combine an array of nested conditions; type='Multi' fires when N nested conditions are true (count vs threshold); type='Then' is sequential — it fires when the last nested condition is true now and each earlier one was true at a strictly earlier tick within 'window' of the next, so it needs at least 2 conditions and a window with length > 0.","additionalProperties":true},"indicator":{"type":"object","required":["type"],"properties":{"base":{"type":"number","description":"Log: logarithm base (>0, ≠1)."},"form":{"type":"object","description":"Optional auto-generated form metadata. Usually omit; the server fills this.","additionalProperties":true},"name":{"type":"string","description":"Optional human-readable name. Auto-derived if omitted."},"side":{"enum":["Buy","Sell"],"type":"string","description":"Order-side indicators: Buy or Sell."},"type":{"enum":["DaysSinceAgent","MinutesSinceAgent","DaysSinceAlert","MinutesSinceAlert","StockReport","DaysUntilEarnings","DaysSinceEarnings","ImpliedVolatility","IVRank","IVPercentile","IVHVRatio","LastOrderPrice","Fundamental","Economic","CustomIndicator","Index","BollingerBand","RelativeStrengthIndex","MovingAverageConvergenceDivergence","AverageDirectionalIndex","RelativeVolume","Stochastic","CommodityChannelIndex","WilliamsR","MoneyFlowIndex","OnBalanceVolume","AccumulationDistribution","ChaikinMoneyFlow","DonchianChannel","KeltnerChannel","Supertrend","IchimokuCloud","ParabolicSar","PriceMeanAbsoluteDeviation","ExponentialMovingAverage","SimpleMovingAverage","PriceStandardDeviation","PriceRateOfChange","MaxDrawdown","MaxDrawup","MinimumPrice","MaximumPrice","IndicatorMeanAbsoluteDeviation","IndicatorExponentialMovingAverage","IndicatorSimpleMovingAverage","IndicatorStandardDeviation","IndicatorRateOfChange","DaysSinceOrder","DaysSinceOptionOrder","DaysSinceStrategyFired","DaysSinceLastRebalanceOptionOrder","MinutesSinceOptionOrder","MinutesSinceOrder","DaysSinceTransaction","InitialValue","BuyingPower","PositionValue","PositionPercentChange","PortfolioValue","RebalanceDecisionMetric","Value","Price","Plus","Minus","Multiply","Divide","Negative","AbsoluteValue","SquareRoot","Max","Min","Day","Month","Date","Year","CurrentTimeSeconds","CurrentTimeMinutes","CurrentTimeHours","TrailingSum","CompoundAnnualGrowthRate","Log","Exponentiation","SumOrderQuantity","SumOrderAmount","MinutesAfterOpen","OpeningPrice","MinuteBarHigh","HeikinAshi","MinuteBarLow","PreviousClosingPrice","HighOfDay","LowOfDay","MinutesUntilClose","PriceChangeSinceOpen","GapSize","GapPercentage","TrueRange","AverageTrueRange","Volume","VWAP","BullishFairValueGap","BearishFairValueGap","IndicatorAtMinutesAfterOpen","IndicatorWindowAgo","IndicatorAtEntry","IsIndexMember","PoliticalTrades","PoliticalPurchaseShare","InsiderTrades","InstitutionalHoldings","IsIndustry","IsAssetType","IsAsset","IsNotAsset","CrossAbove","CrossBelow","Correlation","PositionMaxDrawdown","PositionMaxDrawup","UnderlyingMaxDrawdown","ConsecutiveTrue","CountTrue","OptionPositionValue","OptionPositionCount","OptionPositionPercentChange","OptionPositionMaxDrawdown","OptionDaysToExpiration","OptionDaysHeld","OptionCollateral","OptionSpreadCount","OptionSpreadEntryPrice","OptionUnrealizedPnL","OptionRealizedPnL","OptionRealizedPremium","OptionGrossExposurePercent"],"type":"string"},"filer":{"type":"string","description":"PoliticalTrades member full or last name; empty means all members."},"index":{"enum":["SP500","NASDAQ100","DJIA"],"type":"string","description":"IsIndexMember: point-in-time index id ('SP500', 'NASDAQ100', or 'DJIA')."},"value":{"type":"number","description":"Required for Value indicators (numeric constant)."},"years":{"type":"number","description":"CompoundAnnualGrowthRate: years over which to compute CAGR."},"length":{"type":"number","description":"TrailingSum and similar — window length in days."},"maxDte":{"type":"number","description":"Option* indicators: max days to expiration."},"metric":{"type":"string","description":"PoliticalTrades: NetAmount, BuyAmount, SellAmount, BuyCount, SellCount, DistinctBuyers, Held. InstitutionalHoldings: HolderCount, TotalShares, TotalValue, BookSharePercent, ConcentrationTop5, NetShareChange, NetHolderChange, NewHolders, ClosedHolders. Fundamental/CompoundAnnualGrowthRate: financial metric (e.g. 'peRatio'). Economic: economic indicator (e.g. 'UNRATE'). Index: index symbol (e.g. 'VIX', 'SPX'). RebalanceDecisionMetric: allocationDrift, plannedTurnover, estimatedCost, expectedBenefit, or netBenefit."},"minDte":{"type":"number","description":"Option* indicators: min days to expiration."},"window":{"type":"object","required":["length","interval"],"properties":{"length":{"type":"number","minimum":1},"interval":{"enum":["Day","Hour","Minute"],"type":"string"}},"description":"Rolling time window. e.g. {length:14, interval:'Day'} = trailing 14 trading days."},"chamber":{"enum":["All","House","Senate"],"type":"string","description":"PoliticalTrades optional cohort filter. All combines House and Senate."},"manager":{"type":"string","description":"InstitutionalHoldings filing manager: a CIK such as 1067983 matches exactly, any other text matches a filed name containing it, and empty reads every manager. Prefer the CIK — one CIK files under as many as six spellings of its own name, and a name like 'berkshire' spans Buffett's firm, two of its insurance subsidiaries and an unrelated asset manager."},"message":{"type":"string","description":"DaysSinceAlert / MinutesSinceAlert: alert message to match."},"compound":{"type":"boolean"},"exponent":{"type":"number","description":"Exponentiation: power exponent."},"industry":{"type":"string","description":"IsIndustry: industry tag."},"memberId":{"type":"string","description":"Bioguide member id (e.g. P000197). Required for PoliticalPurchaseShare, whose member-wide public purchase amounts include symbols outside the trading universe; also selects an exact PoliticalTrades member and overrides filer."},"minOrMax":{"enum":["min","max"],"type":"string","description":"OptionDaysToExpiration / OptionDaysHeld: aggregate selector."},"assetType":{"type":"string","description":"IsAssetType: e.g. 'Stock', 'Cryptocurrency'."},"condition":{"$ref":"#/$defs/condition","description":"ConsecutiveTrue / CountTrue: the condition to evaluate over the window."},"direction":{"enum":["long","short"],"type":"string","description":"Option* indicators: long or short."},"indicators":{"type":"array","items":{"$ref":"#/$defs/indicator"},"description":"Sub-indicators for compound types (Plus, CrossAbove, etc.)."},"instrument":{"enum":["Equity","Option","All"],"type":"string","description":"PoliticalTrades instrument class (Equity, Option, All). PoliticalPurchaseShare requires Equity or Option and returns that side's percent of member-wide public purchases."},"matchAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"IsAsset / IsNotAsset: the asset to match against.","additionalProperties":true},"optionType":{"enum":["call","put"],"type":"string","description":"Option* indicators: call or put."},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string","description":"Option* indicators: vertical, ironCondor, etc."},"underlying":{"type":"string","description":"Option* indicators: underlying ticker (e.g. 'SPY')."},"windowDays":{"type":"integer","maximum":3650,"minimum":1,"description":"PoliticalTrades / InsiderTrades trailing calendar days. InstitutionalHoldings reads a disclosed quarter only if its filing became public within this many days, so it defaults to 180 rather than 90: a 13F is quarterly plus a filing lag of up to 45 days, and 91 days can separate two filings."},"amountBasis":{"enum":["LowerBound","Midpoint","UpperBound"],"type":"string","description":"Disclosed transaction range endpoint. PoliticalPurchaseShare defaults to Midpoint; PoliticalTrades amount metrics default to LowerBound."},"orderStatus":{"enum":["Pending","Accepted","Pending User Approval","Canceled","Filled","Partially Filled"],"type":"string","description":"Order-side indicators: filter by status."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"The asset this indicator measures (most price/option indicators).","additionalProperties":true},"lookbackDays":{"type":"integer","maximum":36500,"minimum":1,"description":"OptionRealizedPnL / OptionRealizedPremium: only count activity within this many days of the evaluation date. Omit for the whole life of the book."},"targetAssets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true},"description":"Multi-asset variant (position / order indicators)."},"positionEffect":{"type":"string","description":"Option* indicators: open or close."},"transactionType":{"enum":["Deposit","Withdraw"],"type":"string","description":"DaysSinceTransaction: Deposit or Withdraw."},"minutesAfterOpen":{"type":"number","maximum":390,"minimum":0,"description":"IndicatorAtMinutesAfterOpen: 0–390."},"customIndicatorId":{"type":"string","description":"REQUIRED when type is CustomIndicator. Mongo ObjectId hex string for the owned custom data source (see list_custom_indicators or MCP session instructions). Never omit — display name alone is rejected."},"transactionStatus":{"enum":["Pending","Canceled","Completed"],"type":"string","description":"DaysSinceTransaction: transaction status."},"customIndicatorName":{"type":"string","description":"Optional display label for CustomIndicator. Ignored for lookup; customIndicatorId is authoritative."},"numStandardDeviations":{"type":"number","description":"BollingerBand: e.g. 2."}},"description":"An indicator. Single permissive shape — the 'type' field selects one of ~90 indicator kinds; other fields are required only when that kind needs them. Server-side IndicatorFactory.validate enforces per-type rules. PoliticalTrades needs targetAsset, filer, metric, windowDays, amountBasis, instrument, and chamber; InstitutionalHoldings (SEC Form 13F positions) needs targetAsset, metric, windowDays and optional manager, reads the latest quarter public on or before the evaluation date, never sums across quarters, and measures accumulation and crowding rather than entry timing since a 13F is long-only and up to 45 days stale; House and Senate are unified, so use chamber All unless explicitly filtering. Equity excludes confirmed option disclosures. Amount metrics use disclosed ranges and default to conservative LowerBound. CustomIndicator (alt-data): REQUIRED customIndicatorId (24-char hex ObjectId from list_custom_indicators or MCP session catalog); optional customIndicatorName is display-only. In DynamicRebalance/RebalanceOption/OpenOption pipelines omit targetAsset on asset-scoped CustomIndicators (binds per candidate). RebalanceDecisionMetric reads the prospective DynamicRebalance/RebalanceOption plan computed before the strategy condition and requires metric allocationDrift, plannedTurnover, estimatedCost, expectedBenefit, or netBenefit. Common kinds: Value (numeric constant; needs 'value'), Price (current asset price; needs 'targetAsset'), SimpleMovingAverage/ExponentialMovingAverage/RelativeStrengthIndex/BollingerBand/MaxDrawdown/MaxDrawup/MinimumPrice/MaximumPrice/PriceStandardDeviation/PriceMeanAbsoluteDeviation/PriceRateOfChange (need targetAsset+window; BollingerBand also numStandardDeviations), MovingAverageConvergenceDivergence (MACD; needs targetAsset; optional fastLength/slowLength/signalLength defaulting to 12/26/9 with slowLength > fastLength, interval Day|Hour|Minute default Day, and line macd|signal|histogram selecting which of the three MACD outputs to emit), AverageDirectionalIndex (Wilder ADX trend-strength system 0-100; needs targetAsset+window; optional line adx|plusDi|minusDi — ADX measures strength, +DI/-DI direction), RelativeVolume (RVOL; needs targetAsset+window; current bar volume divided by the mean volume of the trailing N completed bars, ~1.0 is its recent pace), Stochastic (needs targetAsset+window; optional smoothK/smoothD defaulting to 3/3 and line k|d), CommodityChannelIndex (CCI; needs targetAsset+window; optional constant defaulting to 0.015), WilliamsR (needs targetAsset+window; −100 to 0 scale), MoneyFlowIndex (MFI; needs targetAsset+window; volume-weighted 0-100), OnBalanceVolume (OBV; needs targetAsset; optional interval default Day), AccumulationDistribution (ADL; needs targetAsset; optional interval default Day), ChaikinMoneyFlow (CMF; needs targetAsset+window; −1 to +1 scale), DonchianChannel (needs targetAsset+window; optional line upper|lower|middle default upper), KeltnerChannel (needs targetAsset+window; optional multiplier default 2 and line upper|middle|lower default middle), Supertrend (needs targetAsset+window; optional multiplier default 3 and line value|direction default value, direction reads +1 up / −1 down), IchimokuCloud (needs targetAsset+window; optional spanLength default 52 and line tenkan|kijun|senkouA|senkouB|chikou default tenkan; lines unshifted), ParabolicSar (needs targetAsset; optional interval default Day, step default 0.02, maximum default 0.2), HeikinAshi (needs targetAsset + line open|high|low|close|streak; candles from completed one-minute regular-session bars, identical in backtests and live; streak is the signed length of the current same-color run since the last color change, 0 on a doji or once the run shows an opposite-direction wick, so three clean same-color candles are streak >= 3 or <= -3), TrueRange/AverageTrueRange (need targetAsset; ATR also window), VWAP (needs targetAsset; resets each trading day), Plus/Minus/Multiply/Divide/Max/Min (need 'indicators' array of 2 sub-indicators), Negative/AbsoluteValue/SquareRoot (need 1 sub-indicator), Log (needs base + 1 sub-indicator), Exponentiation (needs exponent + 1 sub-indicator), CrossAbove/CrossBelow (need 2 sub-indicators), Correlation (rolling Pearson of two sub-indicators' returns; needs 2 sub-indicators + window with length >= 2), TrailingSum/IndicatorWindowAgo/IndicatorAtMinutesAfterOpen (compound; need indicators + window/length/minutesAfterOpen), IndicatorAtEntry (compound; the operand's value frozen at the last matching fill — needs 1 nested indicator + targetAsset + side + orderStatus), Fundamental/CompoundAnnualGrowthRate (need targetAsset + metric; CAGR also needs years), Economic/Index (need metric), DaysSinceOrder/MinutesSinceOrder/SumOrderQuantity/SumOrderAmount/LastOrderPrice (need targetAssets/targetAsset + side + orderStatus), DaysSinceStrategyFired/DaysSinceLastRebalanceOptionOrder (no fields), DaysSinceTransaction (transactionType + transactionStatus), IsAsset/IsNotAsset/IsAssetType/IsIndustry/IsIndexMember (need targetAsset + matchAsset/assetType/industry/index), OptionPositionValue/OptionPositionCount/OptionPositionPercentChange/OptionPositionMaxDrawdown/OptionDaysToExpiration/OptionDaysHeld/OptionCollateral/OptionSpreadCount/OptionSpreadEntryPrice/OptionUnrealizedPnL (optional underlying + optionType + direction + spreadType filters; OptionSpreadEntryPrice is the contract-weighted net entry price per share of the matching open spreads, positive for a debit and negative for a credit, with no value when none match), OptionRealizedPnL (net realized P&L on CLOSED option positions; the same optional underlying/optionType/direction/spreadType filters + optional lookbackDays), OptionRealizedPremium (realized premium still available to spend: closed short-option P&L minus premium already spent by 'percent of realized premium' opens; optional underlying + optional lookbackDays ONLY, and it rejects optionType/direction/spreadType), OptionGrossExposurePercent (no fields), DaysSinceAgent/MinutesSinceAgent/DaysSinceAlert/MinutesSinceAlert, Day/Month/Year/Date/CurrentTimeHours/CurrentTimeMinutes/CurrentTimeSeconds/MinutesAfterOpen/MinutesUntilClose, PortfolioValue/BuyingPower/InitialValue, PositionValue/PositionPercentChange/PositionMaxDrawdown/PositionMaxDrawup/UnderlyingMaxDrawdown.","additionalProperties":true},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."},"deploymentBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"rebalanceOptionSleeve":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true},"optionStructureTemplate":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true}},"required":["operations"],"properties":{"operations":{"type":"array","items":{"type":"object","required":["type","portfolioId"],"properties":{"name":{"type":"string"},"type":{"enum":["deploy","undeploy","addStrategies","removeStrategies","replaceStrategy","replaceStrategies","setDeploymentFrequency","rename","delete","setStockEligibility"],"type":"string"},"confirmLive":{"type":"boolean"},"portfolioId":{"type":"string"},"strategyIds":{"type":"array","items":{"type":"string"}},"strategyObject":{"type":"object","required":["name","condition","action"],"properties":{"name":{"type":"string","description":"Human-readable strategy name."},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"active":{"type":"boolean","description":"Whether the strategy is active (default true)."},"condition":{"$ref":"#/$defs/condition"},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."}},"description":"A trading strategy: a trigger condition + an action to take when the condition is true. Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price.","additionalProperties":true},"strategyObjects":{"type":"array","items":{"type":"object","required":["name","condition","action"],"properties":{"name":{"type":"string","description":"Human-readable strategy name."},"action":{"type":"object","oneOf":[{"type":"object","required":["type","targetAsset","amount"],"properties":{"type":{"enum":["Buy","Sell"],"type":"string"},"amount":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","percent of buying power","percent of current positions","dollars","number of assets"],"type":"string"},"amount":{"type":"number"}},"description":"Buy/Sell allocation. type: 'percent of portfolio', 'percent of buying power', 'percent of current positions', 'dollars', or 'number of assets'. amount: the value (e.g. amount:25, type:'percent of buying power')."},"targetAsset":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"description":"Buy or Sell a stock/crypto position.","additionalProperties":true},{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","const":"Alert"},"message":{"type":"string"}},"description":"Send an alert message (no order).","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator"],"properties":{"type":{"type":"string","const":"DynamicRebalance"},"limit":{"type":"number","minimum":1},"canSell":{"$ref":"#/$defs/condition","description":"Candidate-bound condition evaluated for each held equity leaving the selected set. False or unavailable retains the position. Example: PositionPercentChange(candidate) >= 0 implements rotate winners only. Does not gate trims of still-selected names; deploymentPercent=0 overrides it for a full cash-out."},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"deploymentPercent":{"$ref":"#/$defs/indicator","description":"Indicator returning percent of portfolio NAV to deploy, 0–100 (remainder cash). Use Value for a constant, or PoliticalPurchaseShare with memberId and instrument Equity. Do not use totalBudget here."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["percent of portfolio","dollars"],"type":"string"},"amount":{"type":"number","exclusiveMinimum":0}},"description":"Per-name cap for DynamicRebalance. type: 'percent of portfolio' or 'dollars' only — contracts, percent of buying power and percent of realized premium are rejected.","additionalProperties":true}},"description":"Dynamic rebalance: filter/rank a universe by a pipeline, then allocate the selected equities. Without allocationPolicy, weightIndicator supplies score weights. With allocationPolicy, weightIndicator remains required for deterministic ranking and warmup fallback while the joint policy sizes selected names. exposurePolicy may independently scale total risky exposure. Book-level cash/deploy is the deploymentPercent indicator (0–100; use Value for a constant). perNameAllocation caps any single name. canSell optionally gates non-target full equity exits; target-weight trims remain enabled. A strategy condition may compare RebalanceDecisionMetric values because the prospective plan is computed before condition evaluation.","additionalProperties":true},{"type":"object","required":["type","planningModel","executionModel","initialMessage","maxIterations","includeMarketData","continueExisting","skipPlanning"],"properties":{"type":{"type":"string","const":"LaunchAgent"},"skipPlanning":{"type":"boolean"},"maxIterations":{"type":"number","minimum":1},"planningModel":{"type":"string"},"executionModel":{"type":"string"},"initialMessage":{"type":"string"},"cooldownMinutes":{"type":"number","minimum":0},"continueExisting":{"type":"boolean"},"includeMarketData":{"type":"boolean"}},"description":"Launch an Aurora agent (paid LLM action — costs research tokens per run; ensure cooldownMinutes is sensible).","additionalProperties":true},{"type":"object","required":["type","builder"],"properties":{"type":{"type":"string","const":"OpenOption"},"against":{"type":"object","description":"Optional parent-position selector (e.g. for covered calls).","additionalProperties":true},"builder":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false},"underlyingSymbol":{"type":"string"},"dynamicUnderlying":{"type":"object","required":["universe"],"properties":{"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true}},"additionalProperties":true}},"description":"OpenOption builder: resolve contracts at execution time. Use underlyingSymbol for a fixed ticker, OR dynamicUnderlying for per-strategy universe selection. For coordinated multi-name option rotation with shared totalBudget and ranked selection, use action type RebalanceOption instead.","additionalProperties":true},"allocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true}},"description":"Open a new options position via the OptionsBuilder. Use 'against' to write a leg against an existing parent option position.","additionalProperties":true},{"type":"object","required":["type","universe","pipeline","weightIndicator","structureTemplates"],"properties":{"type":{"type":"string","const":"RebalanceOption"},"limit":{"type":"number","minimum":1},"sleeves":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"limit":{"type":"number","minimum":1},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"weightIndicator":{"$ref":"#/$defs/indicator"},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption sleeve for heterogeneous universe/ranking/sizing groups sharing one action-level totalBudget (sleeves cannot define totalBudget).","additionalProperties":true}},"pipeline":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type","condition"],"properties":{"type":{"type":"string","const":"Filter"},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":true},{"type":"object","required":["type","metric","limit","direction"],"properties":{"type":{"type":"string","const":"SelectTop"},"limit":{"type":"number","minimum":1},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"}},"additionalProperties":true},{"type":"object","required":["type","metric","percentile","direction"],"properties":{"type":{"type":"string","const":"SelectPercentile"},"metric":{"$ref":"#/$defs/indicator"},"direction":{"enum":["Highest","Lowest"],"type":"string"},"percentile":{"type":"number","maximum":100,"minimum":0}},"additionalProperties":true}],"description":"Universe pipeline stage (DynamicRebalance and RebalanceOption). Filter: applies a condition. SelectTop: keeps top-N ranked by an indicator. SelectPercentile: keeps assets at/above a percentile."}},"universe":{"type":"object","required":["source"],"properties":{"assets":{"type":"array","items":{"type":"object","required":["type","symbol"],"properties":{"name":{"type":"string"},"type":{"enum":["Stock","Cryptocurrency","Option","Other"],"type":"string"},"symbol":{"type":"string"}},"description":"Asset reference. Stock/Crypto/Option/Other. Stocks use {type:'Stock', symbol:'AAPL', name:'Apple Inc.'}.","additionalProperties":true}},"source":{"enum":["ALL_US_STOCKS","SP500","NASDAQ100","DJIA","CRYPTO","SPECIFIC_ASSETS"],"type":"string"}},"description":"Universe of candidate assets. source ALL_US_STOCKS or CRYPTO needs no other field. SPECIFIC_ASSETS requires assets[].","additionalProperties":true},"sizingMode":{"enum":["fixedPerName","proportionalToWeight"],"type":"string"},"totalBudget":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio"],"type":"string"},"amount":{"$ref":"#/$defs/indicator","description":"Budget indicator evaluated when the action fires. Use Value for a constant or PoliticalPurchaseShare for a member's equity/option purchase mix."}},"description":"Book-level deployment cap for RebalanceOption (totalBudget). percent of portfolio: percentage of NAV (0–100); dollars: fixed dollars. The amount is an indicator evaluated when the action fires.","additionalProperties":true},"positionScope":{"enum":["portfolio","strategy"],"type":"string","description":"Which option spreads this rebalance manages. portfolio: rotation-close and open-skip apply portfolio-wide (recommended for single-book portfolios). strategy: only spreads opened by this strategy (multi-strategy books). Omit on new strategies → portfolio in TS/UI; legacy persisted docs without this field deserialize to strategy in Rust until backfilled."},"exposurePolicy":{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","targetAnnualizedVolatilityPercent","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"VolatilityTarget"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0},"targetAnnualizedVolatilityPercent":{"type":"number","maximum":1000,"minimum":0}},"description":"Optional volatility-target exposure overlay, independent from allocationPolicy. Scales risky weights or option premium budgets down using selected-underlying historical volatility; never adds leverage beyond the action cap. For RebalanceOption this targets underlying volatility and scales premium budget, not option-P&L volatility.","additionalProperties":false},"weightIndicator":{"$ref":"#/$defs/indicator"},"allocationPolicy":{"oneOf":[{"type":"object","required":["type","lookbackPeriods","minimumObservations","riskAversion","expectedReturnShrinkage","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MeanVariance"},"riskAversion":{"type":"number","maximum":1000,"minimum":0},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"expectedReturnShrinkage":{"type":"number","maximum":1,"minimum":0},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"RiskParity"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false},{"type":"object","required":["type","lookbackPeriods","minimumObservations","covarianceShrinkage","turnoverPenalty","estimatedTransactionCostBps"],"properties":{"type":{"type":"string","const":"MaximumDiversification"},"lookbackPeriods":{"type":"integer","maximum":5000,"minimum":2},"turnoverPenalty":{"type":"number","maximum":10000,"minimum":0},"covarianceShrinkage":{"type":"number","maximum":1,"minimum":0},"minimumObservations":{"type":"integer","maximum":5000,"minimum":2},"estimatedTransactionCostBps":{"type":"number","maximum":10000,"minimum":0}},"additionalProperties":false}],"description":"Optional joint allocator applied after universe filtering/ranking. Supports MeanVariance, RiskParity, and MaximumDiversification using point-in-time completed daily returns. Selection remains the pipeline/weightIndicator responsibility; this policy sizes the selected names. If warmup history is insufficient, the existing score-weighted allocator is used deterministically."},"perNameAllocation":{"type":"object","required":["type","amount"],"properties":{"type":{"enum":["dollars","percent of portfolio","percent of buying power","contracts","percent of realized premium"],"type":"string"},"amount":{"type":"number"}},"description":"Allocation for an options position (OpenOption.allocation) or per-name cap (RebalanceOption.perNameAllocation). On OpenOption.allocation, type 'percent of realized premium' spends a percent of the OptionRealizedPremium balance (closed short-option P&L minus premium already spent this way, never gross premium collected) and resolves to 0 while that balance is not positive, so it needs no separate balance condition. Its amount must be at most 100, because more would spend more than the realized balance. DynamicRebalance also takes a `perNameAllocation`, but only accepts type 'percent of portfolio' or 'dollars'.","additionalProperties":true},"structureTemplates":{"type":"array","items":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","items":{"type":"object","required":["optionType","direction","expirationSelector","strikeSelector"],"properties":{"ratio":{"type":"number"},"direction":{"enum":["long","short"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"greekFilter":{"type":"object","description":"Optional min/max constraints on Greeks during resolution.","additionalProperties":true},"strikeRange":{"type":"object","description":"Optional fallback search window used when the target strike is unaffordable. startDistance/endDistance are %-OTM offsets measured from ATM, in the same units and sign as strikeSelector.distance (positive = OTM for calls and puts alike) — NOT offsets from the target strike.","additionalProperties":true},"strikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number","description":"Distance from ATM. Calls: positive = OTM (higher strike). Puts: positive = OTM (lower strike). 0 = ATM. For 'percent' this is a WHOLE-NUMBER percent — 15 means 15% OTM; 0.15 is rejected, not read as 15%. For 'delta' it is the absolute target delta (0-1, exclusive)."},"distanceType":{"type":"string","description":"'percent', 'dollars', or 'delta' — how strike distance is measured from ATM."}}},"expirationRange":{"type":"object","additionalProperties":true},"liquidityFilter":{"type":"object","properties":{"minBid":{"type":"number"},"maxSpreadPct":{"type":"number"},"maxSpreadAbsolute":{"type":"number"}},"description":"Optional bid/ask constraints during resolution. maxSpreadPct is (ask-bid)/mid and is preferred over maxSpreadAbsolute, since $0.50 is 50% of a $1.00 contract and 1.7% of a $30.00 one; when both are set both must pass. minBid excludes contracts that cannot be sold into. Contracts with no real NBBO quote are always rejected.","additionalProperties":false},"expirationSelector":{"type":"object","required":["minDaysToExpiration","maxDaysToExpiration","preference"],"properties":{"preference":{"enum":["nearest","middle","furthest"],"type":"string"},"maxDaysToExpiration":{"type":"number","minimum":0},"minDaysToExpiration":{"type":"number","minimum":0}}},"fallbackStrikeSelector":{"type":"object","required":["distanceType","distance"],"properties":{"distance":{"type":"number"},"distanceType":{"enum":["percent","dollars"],"type":"string"}},"description":"Non-delta fallback used when distanceType is 'delta' and no contract resolves close enough to the requested delta. The resolver's own rejection names this field: \"Set a fallbackStrikeSelector (percent or dollars) to keep thin chains tradeable.\" Without it a thin chain fails the leg outright. distanceType here must be 'percent' or 'dollars' — a delta fallback is rejected.","additionalProperties":false}},"description":"Single leg of an option builder.","additionalProperties":true},"minItems":1},"name":{"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"eligibility":{"$ref":"#/$defs/condition"},"widthConstraint":{"type":"object","properties":{"minWidthDollars":{"type":"number","exclusiveMinimum":0},"minWidthPercent":{"type":"number","exclusiveMinimum":0}},"description":"Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps independently to the nearest listed strike, so the authored offsets and the width you actually get differ by up to a full strike-grid step in either direction — a 3% short-leg offset on LLY's $20 Mar-2027 grid resolved to one $20 step, 1.76% of spot. minWidthPercent is a WHOLE-NUMBER percent of spot (4 = 4%). When both bounds are set, both must pass. A structure below the floor is rejected and the next structureTemplate in the ladder is tried; single-leg structures have no width and are exempt.","additionalProperties":false}},"description":"RebalanceOption structure template. Optional eligibility gates the template; legs define the spread; templates are tried in order — at most one open per underlying per rebalance pass.","additionalProperties":true},"minItems":1}},"description":"RebalanceOption: filter/rank a universe, then allocate option premium under totalBudget. sizingMode fixedPerName (default) uses weightIndicator only to rank names and perNameAllocation to size each. sizingMode proportionalToWeight splits totalBudget among selected names in proportion to positive weightIndicator values; perNameAllocation is ignored, and sleeves/allocationPolicy/exposurePolicy cannot be combined with it. allocationPolicy may jointly size selected names in fixedPerName mode; exposurePolicy may scale the total premium budget using selected-underlying volatility (not option-P&L volatility). Use DaysSinceLastRebalanceOptionOrder for shared cadence. Keep take-profit/stop-loss/DTE/short-leg exits in separate CloseOption strategies.","additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"CloseOption"},"quantity":{"type":"object","description":"How many contracts to close. Defaults to all matching when omitted.","additionalProperties":true},"triggers":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"pnl"},"maxPnlPercent":{"type":"number"},"minPnlPercent":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"dte"},"maxDte":{"type":"number"},"minDte":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"daysHeld"},"maxDaysHeld":{"type":"number"},"minDaysHeld":{"type":"number"}},"additionalProperties":true},{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"greeks"},"maxIv":{"type":"number"},"minIv":{"type":"number"},"maxSpreadDelta":{"type":"number"},"maxSpreadTheta":{"type":"number"},"minSpreadDelta":{"type":"number"},"minSpreadTheta":{"type":"number"}},"additionalProperties":true}],"description":"Close trigger for an options exit. Triggers within an array are OR-gated."}},"direction":{"enum":["long","short"],"type":"string"},"closeScope":{"enum":["spread","leg"],"type":"string"},"optionType":{"enum":["call","put"],"type":"string"},"spreadType":{"enum":["vertical","calendar","diagonal","ironCondor","straddle","strangle","custom"],"type":"string"},"underlyings":{"type":"array","items":{"type":"string"}}},"description":"Close existing options positions. Position selectors (underlyings, optionType, direction, spreadType) are AND gates; triggers[] groups are OR gates.","additionalProperties":true}],"description":"The action to execute when the strategy's condition triggers. One of: Buy/Sell (stock or crypto with targetAsset+amount), Deposit/Withdraw (cash flow), Alert (send a message), DynamicRebalance (universe→pipeline→weightIndicator), LaunchAgent (spin up an Aurora agent), RebalanceOption (rank universe, rotate option book via structureTemplates; pair with CloseOption lifecycle exits), OpenOption (open via OptionsBuilder), CloseOption (close positions filtered by triggers)."},"active":{"type":"boolean","description":"Whether the strategy is active (default true)."},"condition":{"$ref":"#/$defs/condition"},"orderExecution":{"type":"object","oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Market"}},"additionalProperties":false},{"type":"object","required":["type","price"],"properties":{"type":{"type":"string","const":"Limit"},"price":{"oneOf":[{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"UnitPrice"},"amount":{"type":"number","minimum":1e-8}},"description":"Buy/Sell only. The maximum unit price for a buy or minimum unit price for a sell. Supports stocks and crypto.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MinimumNetCredit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for at least this net credit per share.","additionalProperties":false},{"type":"object","required":["type","amount"],"properties":{"type":{"type":"string","const":"MaximumNetDebit"},"amount":{"oneOf":[{"type":"number","minimum":1e-8},{"$ref":"#/$defs/indicator"}],"description":"Dollars per share: a positive number, or an indicator evaluated when the strategy fires (for example Plus of OptionSpreadEntryPrice and Value to price one spread off another spread's fill)."}},"description":"OpenOption/CloseOption only. Wait until the complete option structure can execute for no more than this net debit per share.","additionalProperties":false},{"type":"object","required":["type","reference"],"properties":{"type":{"type":"string","const":"QuoteRelative"},"reference":{"type":"string","const":"Current"}},"description":"Snapshot a marketable Limit from the current executable quote when the strategy fires. Valid for all order-producing strategy actions; this is a protection cap, not a user-named waiting price.","additionalProperties":false}]},"workingTime":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"Day"}},"description":"Stocks/options expire after the current regular US session; crypto expires after a rolling 24 hours.","additionalProperties":false},{"type":"object","required":["type","minutes"],"properties":{"type":{"type":"string","const":"Minutes"},"minutes":{"type":"number","minimum":1}},"additionalProperties":false}]}},"additionalProperties":false}],"description":"Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price."}},"description":"A trading strategy: a trigger condition + an action to take when the condition is true. Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price.","additionalProperties":true}},"stockEligibility":{"type":"object","properties":{"industryFilter":{"type":"object","required":["mode","match","industries"],"properties":{"mode":{"enum":["ALL","INCLUDE_ONLY"],"type":"string"},"match":{"enum":["ANY","ALL"],"type":"string"},"industries":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"shareClassBehavior":{"enum":["ONE_PER_COMPANY","ALL_CLASSES"],"type":"string","description":"ONE_PER_COMPANY (default) keeps one share class per company in a dynamic-universe selection, so a top-5 holds five companies (GOOGL over GOOG on a tie). ALL_CLASSES lets every class through, for a book that trades share classes against each other (a GOOG/GOOGL pair). Omit to keep the portfolio's current setting."},"maximumMarketCapUsd":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Largest market cap allowed, or null for no ceiling (default)."},"minimumMarketCapUsd":{"type":"integer","minimum":0,"description":"Smallest market cap a dynamic-universe candidate may have. Default 1000000000 ($1B); lower it for a small-cap strategy."},"missingMarketCapBehavior":{"enum":["EXCLUDE","INCLUDE"],"type":"string","description":"EXCLUDE (default) drops a dynamic-universe candidate with no known market cap (most ETFs, some filers). INCLUDE keeps it; the cap bounds then apply only to names whose cap is known. Omit to keep the portfolio's current setting."}},"description":"setStockEligibility only: the stock-eligibility fields to change on the portfolio's policy. Omitted fields keep their current values. Automated trading can never be changed through MCP.","additionalProperties":false},"targetStrategyId":{"type":"string"},"targetStrategyName":{"type":"string"},"deploymentFrequency":{"enum":["Constant","OpenClose"],"type":"string"}},"additionalProperties":false},"maxItems":20,"minItems":1,"description":"Array of edit operations. Each operation needs \"portfolioId\" (live, paper, or chat — server resolves automatically). Supported types include \"rename\" (requires non-empty \"name\"), \"delete\" (permanently remove a chat/paper/live portfolio; archives deployed books; pass confirmLive:true only after explicit user confirmation when deleting an active live portfolio). DEPLOY SAFETY: deploying a chat portfolio ID creates a NEW PAPER-TRADING portfolio (simulated money, no broker order ever placed). It cannot place real-money trades. A LIVE/real-brokerage deployment only happens when the target is an EXISTING real-brokerage portfolio (re-activating it, or addStrategies/replaceStrategies on a portfolio already connected to a live broker). You cannot create a live brokerage account from a chat portfolio through this tool. Fetch the portfolio first and use strategy IDs from the returned \"strategies\" array for removals. To add/replace strategies, pass FINISHED strategy objects ({name, condition, action, orderExecution?} — same shape as create_portfolio.strategies) via \"strategyObjects\" (or \"strategyObject\" for replaceStrategy). These are ingested deterministically with zero LLM cost; prefer them. Optional strategy-level `orderExecution` defaults to `{type:\"Market\"}`. For a true waiting Limit, use `{type:\"Limit\",price:{type:\"UnitPrice\",amount:...},workingTime:{type:\"Day\"|\"Minutes\",minutes?:...}}` on Buy/Sell stock or crypto strategies; use `MinimumNetCredit` or `MaximumNetDebit` for OpenOption/CloseOption. An option net limit `amount` may be an indicator instead of a number; it is evaluated when the strategy fires, e.g. `{type:\"Plus\",indicators:[{type:\"OptionSpreadEntryPrice\",underlying:\"SPX\",optionType:\"call\",direction:\"long\",spreadType:\"vertical\"},{type:\"Value\",value:0.5}]}` waits for a credit of at least the held debit spread's fill plus $0.50, and no order is placed when it has no positive value. `QuoteRelative` snapshots the current executable quote when the strategy fires, so it caps execution but normally does not wait for a user-named price. RebalanceOption `action.positionScope`: `\"portfolio\"` (default for single-book portfolios — rotation-close and open-skip span all option spreads in the portfolio) or `\"strategy\"` (only spreads this strategy opened; use when multiple RebalanceOption strategies share one portfolio). Set on `create_portfolio` strategies[].action or on `update_portfolio` replaceStrategy/replaceStrategies `strategyObject.action`. Examples: [{\"type\":\"deploy\",\"portfolioId\":\"id\"}, {\"type\":\"undeploy\",\"portfolioId\":\"id\"}, {\"type\":\"delete\",\"portfolioId\":\"id\"}, {\"type\":\"addStrategies\",\"portfolioId\":\"id\",\"strategyObjects\":[{\"name\":\"...\",\"condition\":{...},\"action\":{...},\"orderExecution\":{\"type\":\"Limit\",\"price\":{\"type\":\"UnitPrice\",\"amount\":150},\"workingTime\":{\"type\":\"Day\"}}}]}, {\"type\":\"removeStrategies\",\"portfolioId\":\"id\",\"strategyIds\":[\"strategyId\"]}, {\"type\":\"replaceStrategy\",\"portfolioId\":\"id\",\"targetStrategyId\":\"strategyId\",\"strategyObject\":{\"name\":\"...\",\"condition\":{...},\"action\":{\"type\":\"RebalanceOption\",\"positionScope\":\"portfolio\",...}}}, {\"type\":\"replaceStrategies\",\"portfolioId\":\"id\",\"strategyObjects\":[{\"name\":\"...\",\"condition\":{...},\"action\":{...}}]}, {\"type\":\"setDeploymentFrequency\",\"portfolioId\":\"id\",\"deploymentFrequency\":\"Constant\"}, {\"type\":\"rename\",\"portfolioId\":\"id\",\"name\":\"New Portfolio Name\"}, {\"type\":\"setStockEligibility\",\"portfolioId\":\"id\",\"stockEligibility\":{\"shareClassBehavior\":\"ALL_CLASSES\"}}]. \"setStockEligibility\" changes only stock eligibility (market-cap bounds, industry filter, missingMarketCapBehavior, shareClassBehavior); automated trading can never be changed through MCP."}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":57880,"tokensAfter":57880}],"toolsChanged":17,"tokensSaved":0,"todo":[{"tool":"build_portfolio","params":["alertsEnabled","supportsCrypto","supportsFractionalShares"]},{"tool":"create_portfolio","params":["alertsEnabled","supportsCrypto","supportsFractionalShares"]}],"note":"Deterministic fixes. Changes marked verify need a human look before shipping (renames, inferred annotations, inferred types, removed text). Parameter descriptions in `todo` need to be written by someone who knows the API."}