{
  "components": {
    "responses": {
      "Gateway_GithubError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Gateway_GithubIntegrationError"
            }
          }
        },
        "description": "Operation rejected; see the stable error code. Rate-limited responses include Retry-After when available. When a write returns outcome_unknown, check its result before retrying.",
        "headers": {
          "Cache-Control": {
            "schema": {
              "enum": [
                "no-store"
              ],
              "type": "string"
            }
          }
        }
      },
      "Gateway_RemoteMcpError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Gateway_RemoteMcpFailure"
            }
          }
        },
        "description": "Request rejected. Refresh the connection on connection_changed.",
        "headers": {
          "Cache-Control": {
            "schema": {
              "enum": [
                "no-store"
              ],
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "AccountPreferencesResponse": {
        "properties": {
          "display_currency": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "display_currency"
        ],
        "type": "object"
      },
      "ActiveStrategyExecutionResponse": {
        "properties": {
          "execution_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "execution_id",
          "status"
        ],
        "type": "object"
      },
      "AgentScorecard": {
        "properties": {
          "avgTurnover30d": {
            "type": [
              "number",
              "null"
            ]
          },
          "benchmarkSymbol": {
            "type": [
              "string",
              "null"
            ]
          },
          "calculatedAt": {
            "type": "string"
          },
          "calculationSource": {
            "type": "string"
          },
          "cumulativeReturn": {
            "type": [
              "number",
              "null"
            ]
          },
          "cumulativeReturnReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "dailyReturn": {
            "type": [
              "number",
              "null"
            ]
          },
          "dailyReturnReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "hasSufficientData": {
            "type": "boolean"
          },
          "insight": {
            "type": "string"
          },
          "maxDrawdown": {
            "type": [
              "number",
              "null"
            ]
          },
          "monthlyAlpha": {
            "type": [
              "number",
              "null"
            ]
          },
          "overallAlpha": {
            "type": [
              "number",
              "null"
            ]
          },
          "sharpe30d": {
            "type": [
              "number",
              "null"
            ]
          },
          "sharpeOverall": {
            "type": [
              "number",
              "null"
            ]
          },
          "sortino30d": {
            "type": [
              "number",
              "null"
            ]
          },
          "volatility": {
            "type": [
              "number",
              "null"
            ]
          },
          "weeklyAlpha": {
            "type": [
              "number",
              "null"
            ]
          },
          "winRate30d": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "cumulativeReturn",
          "cumulativeReturnReason",
          "dailyReturn",
          "dailyReturnReason",
          "volatility",
          "avgTurnover30d",
          "winRate30d",
          "weeklyAlpha",
          "monthlyAlpha",
          "overallAlpha",
          "sharpe30d",
          "sharpeOverall",
          "sortino30d",
          "maxDrawdown",
          "hasSufficientData",
          "insight",
          "benchmarkSymbol",
          "calculatedAt",
          "calculationSource"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "AllocationGuidanceRequest": {
        "description": "Provide at least one market, asset class, sector, or included symbol here or through universe. Required to select a tradable scope even though this field is conditionally optional.",
        "properties": {
          "asset_classes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "type": "string"
          },
          "is_strict": {
            "type": "boolean"
          },
          "markets": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "notes": {
            "type": "string"
          },
          "pattern": {
            "enum": [
              "market_based"
            ],
            "type": "string"
          },
          "sectors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "symbols_avoid": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "symbols_include": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "pattern"
        ],
        "type": "object"
      },
      "AllocationGuidanceResponse": {
        "description": "Canonical market_based allocation guidance. Select at least one market, asset class, sector, or included symbol; universe is an alternative source of included symbols.",
        "properties": {
          "asset_classes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "created_at": {
            "type": "string"
          },
          "is_strict": {
            "type": "boolean"
          },
          "markets": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "notes": {
            "type": "string"
          },
          "pattern": {
            "enum": [
              "market_based"
            ],
            "type": "string"
          },
          "sectors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "symbols_avoid": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "symbols_include": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "pattern"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "ApprovalConflictResponse": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code"
        ],
        "type": "object"
      },
      "ApprovalProposal": {
        "properties": {
          "blockingReasonCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "decisionId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "hash": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "reviewRequired": {
            "type": "boolean"
          },
          "state": {
            "enum": [
              "ready",
              "proposal_changed",
              "preparing",
              "verification_delayed",
              "reconnect_required",
              "no_longer_applicable"
            ],
            "type": "string"
          }
        },
        "required": [
          "id",
          "decisionId",
          "hash",
          "state",
          "reviewRequired",
          "blockingReasonCode",
          "message"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "ApproveTradesRequest": {
        "additionalProperties": false,
        "properties": {
          "approvalProposal": {
            "additionalProperties": false,
            "properties": {
              "hash": {
                "minLength": 1,
                "type": "string"
              },
              "id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "id",
              "hash"
            ],
            "type": "object"
          },
          "decisionId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ApproveTradesResponse": {
        "properties": {
          "approved": {
            "type": "integer"
          },
          "executionMode": {
            "description": "paper | live",
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "approved",
          "message",
          "executionMode"
        ],
        "type": "object"
      },
      "ArtifactDashboard": {
        "properties": {
          "components": {
            "items": {
              "$ref": "#/components/schemas/ArtifactDashboardComponent"
            },
            "type": "array"
          },
          "follow_up_suggestions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "metadata": {
            "$ref": "#/components/schemas/ArtifactDashboardMetadata"
          },
          "timestamp": {
            "description": "ISO 8601 dashboard timestamp",
            "example": "2026-04-03T15:00:00.000Z",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "example": "BTC vs ETH: 1-Year Comparison",
            "type": "string"
          },
          "type": {
            "example": "dashboard",
            "type": "string"
          }
        },
        "required": [
          "type",
          "components"
        ],
        "type": "object"
      },
      "ArtifactDashboardComponent": {
        "additionalProperties": {},
        "type": "object"
      },
      "ArtifactDashboardMetadata": {
        "properties": {
          "analysis_type": {
            "type": "string"
          },
          "query": {
            "type": "string"
          },
          "symbols": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ArtifactDataFrameColumn": {
        "properties": {
          "name": {
            "example": "symbol",
            "type": "string"
          },
          "type": {
            "example": "text",
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "ArtifactDataFrameResponse": {
        "properties": {
          "data": {
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          },
          "metadata": {
            "properties": {
              "available_rows": {
                "example": 100,
                "type": "integer"
              },
              "columns": {
                "items": {
                  "$ref": "#/components/schemas/ArtifactDataFrameColumn"
                },
                "type": "array"
              },
              "page": {
                "example": 1,
                "type": "integer"
              },
              "page_size": {
                "example": 25,
                "type": "integer"
              },
              "snapshot_truncated": {
                "example": false,
                "type": "boolean"
              },
              "total_pages": {
                "example": 4,
                "type": "integer"
              },
              "total_rows": {
                "example": 100,
                "type": "integer"
              }
            },
            "required": [
              "total_rows",
              "page",
              "page_size",
              "total_pages",
              "columns"
            ],
            "type": "object"
          }
        },
        "required": [
          "data",
          "metadata"
        ],
        "type": "object"
      },
      "ArtifactMetadata": {
        "properties": {
          "analysis_type": {
            "example": "asset_comparison",
            "type": "string"
          },
          "dashboard_timestamp": {
            "description": "ISO 8601 timestamp captured from the original dashboard, if present",
            "example": "2026-04-03T15:00:00.000Z",
            "type": [
              "string",
              "null"
            ]
          },
          "snapshot_version": {
            "example": 1,
            "type": "integer"
          },
          "source_chat_id": {
            "example": "0b6342a4-ab5f-41b1-9772-60791177acf3",
            "type": [
              "string",
              "null"
            ]
          },
          "source_task_id": {
            "example": "1939d8d3dc31b215",
            "type": [
              "string",
              "null"
            ]
          },
          "symbols": {
            "example": [
              "BTC-USD.CC",
              "ETH-USD.CC"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "snapshot_version"
        ],
        "type": "object"
      },
      "ArtifactSourceLocator": {
        "description": "Private source locator identifying the dashboard part inside the chat transcript",
        "properties": {
          "kind": {
            "description": "Source locator kind",
            "enum": [
              "ui_message_part"
            ],
            "example": "ui_message_part",
            "type": "string"
          },
          "message_id": {
            "description": "AI SDK UI message id containing the dashboard part",
            "example": "cf-message-123",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "native_part_id": {
            "description": "Native AI SDK part id, such as toolCallId or data part id",
            "example": "call_abc123",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "part_type": {
            "description": "AI SDK UI message part type",
            "example": "tool-StructuredOutput",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "kind",
          "message_id",
          "part_type",
          "native_part_id"
        ],
        "type": "object"
      },
      "AuthClientConfigResponse": {
        "properties": {
          "accessTokenAudience": {
            "type": "string"
          },
          "authorizationEndpoint": {
            "format": "uri",
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "deviceAuthorizationEndpoint": {
            "format": "uri",
            "type": "string"
          },
          "jwksUri": {
            "format": "uri",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tokenEndpoint": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "clientId",
          "deviceAuthorizationEndpoint",
          "tokenEndpoint"
        ],
        "type": "object"
      },
      "AuthUserResponse": {
        "properties": {
          "user": {
            "properties": {
              "accountId": {
                "type": "string"
              },
              "email": {
                "format": "email",
                "type": "string"
              },
              "firstName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string"
              },
              "lastName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profilePictureUrl": {
                "format": "uri",
                "type": [
                  "string",
                  "null"
                ]
              },
              "userId": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "userId",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "user"
        ],
        "type": "object"
      },
      "AutoExecuteRequest": {
        "properties": {
          "autoExecute": {
            "type": "boolean"
          }
        },
        "required": [
          "autoExecute"
        ],
        "type": "object"
      },
      "BenchmarkComparisonResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BillingAction": {
        "description": "Action that resolves a billing-related rejection",
        "properties": {
          "href": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "upgrade",
              "payment_method",
              "spending_cap",
              "billing"
            ],
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "href",
          "label",
          "kind"
        ],
        "type": "object"
      },
      "BillingCosts": {
        "properties": {
          "avg_credits_per_invocation": {
            "type": "number"
          },
          "billing_config": {
            "properties": {
              "billing_enabled": {
                "type": "boolean"
              }
            },
            "required": [
              "billing_enabled"
            ],
            "type": "object"
          },
          "block_reason": {
            "enum": [
              "free_tier_exhausted",
              "spending_cap_reached",
              "subscription_inactive",
              "not_configured"
            ],
            "type": "string"
          },
          "bonus_credits": {
            "minimum": 0,
            "type": "integer"
          },
          "credits_included": {
            "minimum": 0,
            "type": "integer"
          },
          "credits_remaining": {
            "minimum": 0,
            "type": "integer"
          },
          "current_tier": {
            "enum": [
              "free",
              "included",
              "overage"
            ],
            "type": "string"
          },
          "effective_credits_included": {
            "minimum": 0,
            "type": "integer"
          },
          "has_payment_method": {
            "type": "boolean"
          },
          "input_tokens": {
            "type": "integer"
          },
          "invocation_count": {
            "type": "integer"
          },
          "is_warning_threshold": {
            "type": "boolean"
          },
          "is_within_limit": {
            "type": "boolean"
          },
          "output_tokens": {
            "type": "integer"
          },
          "overage_credits": {
            "minimum": 0,
            "type": "integer"
          },
          "overage_rate_cents_per_credit": {
            "minimum": 0,
            "type": "number"
          },
          "payg_spending_cap_cents": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "payg_spent_cents": {
            "minimum": 0,
            "type": "number"
          },
          "percentage_used": {
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "total_credits_used": {
            "type": "number"
          },
          "total_duration_seconds": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          }
        },
        "required": [
          "period_start",
          "period_end",
          "total_credits_used",
          "invocation_count",
          "total_tokens",
          "input_tokens",
          "output_tokens",
          "total_duration_seconds",
          "avg_credits_per_invocation",
          "billing_config"
        ],
        "type": "object"
      },
      "BillingPortalRequest": {
        "properties": {
          "returnUrl": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "returnUrl"
        ],
        "type": "object"
      },
      "BillingPortalResponse": {
        "additionalProperties": {},
        "properties": {
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "BillingRejection": {
        "properties": {
          "billing_action": {
            "$ref": "#/components/schemas/BillingAction"
          },
          "code": {
            "enum": [
              "SUBSCRIPTION_LIMIT_EXCEEDED"
            ],
            "type": "string"
          },
          "error": {
            "enum": [
              "AI_COST_LIMIT"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/UsageLimits"
          }
        },
        "required": [
          "error",
          "code",
          "message",
          "billing_action"
        ],
        "type": "object"
      },
      "BillingRejectionOrError": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/BillingRejection"
          },
          {
            "$ref": "#/components/schemas/Error"
          }
        ]
      },
      "BrokerConnectionListResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BrokerConnectionResponse": {
        "additionalProperties": {},
        "properties": {
          "authorization_url": {
            "format": "uri",
            "type": "string"
          },
          "broker_type": {
            "type": "string"
          },
          "connection_id": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "portfolio_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "session_id": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "sync_status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "BrokerConnectionStatus": {
        "properties": {
          "actionRequired": {
            "type": "boolean"
          },
          "actionRequiredReason": {
            "enum": [
              "inactive",
              "session_expired",
              "sync_invalid",
              "sync_error",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "brokerType": {
            "type": "string"
          },
          "connectionId": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "sessionExpired": {
            "type": "boolean"
          },
          "sessionExpiresAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "syncStatus": {
            "type": "string"
          }
        },
        "required": [
          "connectionId",
          "brokerType",
          "isActive",
          "sessionExpired",
          "sessionExpiresAt",
          "syncStatus",
          "actionRequired",
          "actionRequiredReason"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "BrokerConnectionStatusResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BrokerConnectRequest": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Trading212BrokerConnectRequest"
          },
          {
            "$ref": "#/components/schemas/RobinhoodConnectRequest"
          }
        ]
      },
      "BrokerHolding": {
        "properties": {
          "average_price": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "current_price": {
            "type": "string"
          },
          "current_value": {
            "type": "string"
          },
          "exchange": {
            "type": "string"
          },
          "pnl": {
            "type": "string"
          },
          "pnl_percent": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        },
        "required": [
          "average_price",
          "currency",
          "current_price",
          "current_value",
          "exchange",
          "pnl",
          "pnl_percent",
          "quantity",
          "symbol"
        ],
        "type": "object"
      },
      "BrokerHoldingsResponse": {
        "properties": {
          "data_source": {
            "enum": [
              "cached",
              "error",
              "live"
            ],
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "error_code": {
            "type": "string"
          },
          "holdings": {
            "items": {
              "$ref": "#/components/schemas/BrokerHolding"
            },
            "type": "array"
          },
          "retry_after_seconds": {
            "exclusiveMinimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "data_source",
          "holdings"
        ],
        "type": "object"
      },
      "BrokerMarginsResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "BrokerReconnectRequest": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Trading212BrokerConnectRequest"
          },
          {
            "$ref": "#/components/schemas/RobinhoodConnectRequest"
          }
        ]
      },
      "BrokerStatusResponse": {
        "properties": {
          "actionability": {
            "additionalProperties": {},
            "type": "object"
          },
          "active_gtt_count": {
            "type": "integer"
          },
          "broker_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "connection_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "holdings_match": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_valid": {
            "type": "boolean"
          },
          "last_validated_at": {
            "type": "string"
          },
          "reconciling": {
            "type": "boolean"
          },
          "sync_status": {
            "type": "string"
          },
          "violations": {
            "items": {
              "$ref": "#/components/schemas/SubsetViolation"
            },
            "type": "array"
          }
        },
        "required": [
          "actionability",
          "active_gtt_count",
          "broker_type",
          "connection_id",
          "holdings_match",
          "is_active",
          "is_valid",
          "last_validated_at",
          "reconciling",
          "sync_status",
          "violations"
        ],
        "type": "object"
      },
      "BrokerUserActionNotice": {
        "properties": {
          "actionLabel": {
            "type": "string"
          },
          "actionUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "brokerType": {
            "type": "string"
          },
          "code": {
            "enum": [
              "robinhood_investor_profile_required",
              "robinhood_insufficient_buying_power"
            ],
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "severity": {
            "enum": [
              "blocking",
              "warning",
              "info"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "brokerType",
          "severity",
          "title",
          "description",
          "actionLabel",
          "actionUrl"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "CancelPendingTradesRequest": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "tradeIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ChatListResponse": {
        "additionalProperties": {},
        "properties": {
          "chats": {
            "items": {
              "additionalProperties": {},
              "properties": {
                "id": {
                  "type": "string"
                },
                "resource_type": {
                  "enum": [
                    "chat",
                    null
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "pagination": {
            "properties": {
              "hasMore": {
                "type": "boolean"
              },
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "hasMore",
              "limit",
              "offset",
              "total"
            ],
            "type": "object"
          }
        },
        "required": [
          "chats"
        ],
        "type": "object"
      },
      "ChatProjectionTaskStatus": {
        "enum": [
          "queued",
          "dispatching",
          "acknowledged",
          "processing",
          "completed",
          "rendered",
          "error",
          "awaiting_input",
          "cancelled"
        ],
        "type": "string"
      },
      "ChatSharePlotlyFigure": {
        "additionalProperties": {},
        "properties": {
          "config": {},
          "data": {
            "items": {
              "$ref": "#/components/schemas/ChatSharePlotlyTrace"
            },
            "type": "array"
          },
          "layout": {}
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ChatSharePlotlyTrace": {
        "additionalProperties": {},
        "properties": {
          "name": {
            "example": "Equity curve",
            "type": "string"
          },
          "type": {
            "example": "scatter",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChatSharePlotResponse": {
        "properties": {
          "figure": {
            "$ref": "#/components/schemas/ChatSharePlotlyFigure"
          },
          "plot_id": {
            "example": "equity_curve",
            "type": "string"
          }
        },
        "required": [
          "plot_id",
          "figure"
        ],
        "type": "object"
      },
      "ChatStateResponse": {
        "additionalProperties": {},
        "properties": {
          "chat_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "messages": {
            "items": {
              "additionalProperties": {},
              "properties": {
                "id": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "resource_type": {
            "enum": [
              "chat",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ChatSyncResponse": {
        "properties": {
          "active_stream_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastTaskEventSequence": {
            "type": [
              "integer",
              "null"
            ]
          },
          "lastTaskStatus": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChatProjectionTaskStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "lastTaskUpdatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "taskCount": {
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "active_stream_id",
          "lastTaskEventSequence",
          "lastTaskStatus",
          "lastTaskUpdatedAt",
          "taskCount"
        ],
        "type": "object"
      },
      "CodexConnectionStatus": {
        "additionalProperties": false,
        "properties": {
          "access_expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "cleanup_pending": {
            "type": "boolean"
          },
          "connected": {
            "type": "boolean"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "pending_authorization": {
            "$ref": "#/components/schemas/CodexStartAuthorization"
          },
          "rollout": {
            "enum": [
              "enabled",
              "disabled",
              "unavailable"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "connected",
              "needs_reauth",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "connected",
          "rollout"
        ],
        "type": "object"
      },
      "CodexDisconnectResult": {
        "additionalProperties": false,
        "properties": {
          "disconnected": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "disconnected"
        ],
        "type": "object"
      },
      "CodexPollResult": {
        "additionalProperties": false,
        "properties": {
          "access_expires_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "interval_seconds": {
            "type": "number"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "connected",
              "denied",
              "expired"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "CodexStartAuthorization": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "type": "string"
          },
          "interval_seconds": {
            "type": "number"
          },
          "user_code": {
            "type": "string"
          },
          "verification_uri": {
            "type": "string"
          },
          "verification_uri_complete": {
            "type": "string"
          }
        },
        "required": [
          "user_code",
          "verification_uri",
          "interval_seconds",
          "expires_at"
        ],
        "type": "object"
      },
      "ConfirmPaymentRequest": {
        "properties": {
          "customerIp": {
            "type": "string"
          },
          "paymentIntentId": {
            "type": "string"
          },
          "returnUrl": {
            "format": "uri",
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          }
        },
        "required": [
          "paymentIntentId",
          "returnUrl"
        ],
        "type": "object"
      },
      "CreateArtifactRequest": {
        "properties": {
          "chat_id": {
            "description": "Chat identifier that owns the retained dashboard",
            "example": "0b6342a4-ab5f-41b1-9772-60791177acf3",
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string"
          },
          "source_locator": {
            "$ref": "#/components/schemas/ArtifactSourceLocator"
          },
          "task_id": {
            "description": "Deprecated task identifier kept for older clients; use source_locator instead.",
            "example": "1939d8d3dc31b215",
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string"
          }
        },
        "required": [
          "chat_id"
        ],
        "type": "object"
      },
      "CreateArtifactResponse": {
        "properties": {
          "artifact": {
            "$ref": "#/components/schemas/PublicArtifact"
          },
          "url": {
            "example": "https://app.itoflow.ai/a/VufIWcgY0FlG",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "artifact",
          "url"
        ],
        "type": "object"
      },
      "CreateChatShareRequest": {
        "properties": {
          "chat_id": {
            "description": "Private chat identifier to snapshot into a read-only public share",
            "example": "0b6342a4-ab5f-41b1-9772-60791177acf3",
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string"
          },
          "copied_until_message_id": {
            "description": "Optional UI message id boundary. When present, the share includes messages up to and including this id.",
            "example": "1939d8d3dc31b215-assistant",
            "maxLength": 200,
            "minLength": 1,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "chat_id"
        ],
        "type": "object"
      },
      "CreateChatShareResponse": {
        "properties": {
          "share": {
            "$ref": "#/components/schemas/PublicChatShare"
          },
          "url": {
            "example": "https://app.itoflow.ai/chat/shared/VufIWcgY0FlG",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "share",
          "url"
        ],
        "type": "object"
      },
      "CreatePortfolioRequest": {
        "properties": {
          "allocated_amount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "strategy_id": {
            "type": "string"
          }
        },
        "required": [
          "allocated_amount",
          "name"
        ],
        "type": "object"
      },
      "CreateStrategyResponse": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "effectiveConstraints": {
            "$ref": "#/components/schemas/EffectiveStrategyConstraints"
          },
          "effectiveRules": {
            "$ref": "#/components/schemas/EffectiveStrategyRules"
          },
          "executionStatus": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isActive": {
            "description": "True means the strategy exists and is not archived; inspect executionStatus to determine whether it runs.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "portfolioId",
          "isActive",
          "executionStatus",
          "effectiveConstraints",
          "effectiveRules",
          "createdAt"
        ],
        "type": "object"
      },
      "CreateWatchlistRequest": {
        "properties": {
          "mandate": {
            "maxLength": 50000,
            "minLength": 1,
            "type": "string"
          },
          "model_key": {
            "enum": [
              "luna",
              "sol",
              "sol61",
              "astra",
              "sonnet55",
              "opus55",
              "terra61",
              "haiku55",
              "fusion_deep",
              "fusion_quick",
              "fusion_light"
            ],
            "type": "string"
          },
          "name": {
            "example": "AI Infrastructure",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/WatchlistProfile"
          },
          "profile_config": {
            "$ref": "#/components/schemas/WatchlistProfileConfig"
          },
          "recurrence": {
            "$ref": "#/components/schemas/WatchlistRecurrence"
          },
          "symbol_notes": {
            "$ref": "#/components/schemas/WatchlistSymbolNotes"
          },
          "symbols": {
            "items": {
              "example": "AAPL.US",
              "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "required": [
          "name",
          "mandate"
        ],
        "type": "object"
      },
      "DataFrameResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "DecisionItem": {
        "properties": {
          "agentNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "decisionDate": {
            "type": "string"
          },
          "decisionType": {
            "type": "string"
          },
          "errorMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "marketOutlook": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasoning": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategyId": {
            "format": "uuid",
            "type": "string"
          },
          "structuredDashboard": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "targetAllocation": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "taskId": {
            "type": [
              "string",
              "null"
            ]
          },
          "userInstruction": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "strategyId",
          "taskId",
          "decisionDate",
          "decisionType",
          "reasoning",
          "confidence",
          "targetAllocation",
          "structuredDashboard",
          "marketOutlook",
          "executionStatus",
          "errorMessage",
          "userInstruction",
          "agentNotes",
          "createdAt"
        ],
        "type": "object"
      },
      "DecisionsResponse": {
        "properties": {
          "decisions": {
            "items": {
              "$ref": "#/components/schemas/DecisionItem"
            },
            "type": "array"
          },
          "metadata": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "total",
              "limit",
              "offset"
            ],
            "type": "object"
          }
        },
        "required": [
          "decisions"
        ],
        "type": "object"
      },
      "DisplayCurrencyRequest": {
        "properties": {
          "display_currency": {
            "type": "string"
          }
        },
        "required": [
          "display_currency"
        ],
        "type": "object"
      },
      "DisplayCurrencyResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "EffectiveStrategyConstraints": {
        "description": "All constraints applied at creation, including server defaults.",
        "properties": {
          "allowed_exchanges": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "blocked_symbols": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "is_strict": {
            "type": "boolean"
          },
          "max_drawdown_pct": {
            "type": "number"
          },
          "max_position_pct": {
            "type": "number"
          },
          "max_positions": {
            "type": "integer"
          },
          "min_cash_pct": {
            "type": "number"
          },
          "min_position_pct": {
            "type": "number"
          },
          "stop_loss_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "stop_on_drawdown": {
            "type": "boolean"
          }
        },
        "required": [
          "allowed_exchanges",
          "blocked_symbols",
          "is_strict",
          "max_drawdown_pct",
          "max_position_pct",
          "max_positions",
          "min_cash_pct",
          "min_position_pct",
          "stop_loss_pct",
          "stop_on_drawdown"
        ],
        "type": "object"
      },
      "EffectiveStrategyRules": {
        "description": "Rules applied at creation, including default rebalance settings.",
        "properties": {
          "lookback_days": {
            "type": "integer"
          },
          "model_key": {
            "enum": [
              "luna",
              "sol",
              "sol61",
              "astra",
              "sonnet55",
              "opus55",
              "terra61",
              "haiku55",
              "fusion_deep",
              "fusion_quick",
              "fusion_light"
            ],
            "type": "string"
          },
          "rebalance_frequency": {
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ],
            "type": "string"
          },
          "rebalance_time_utc": {
            "type": "string"
          }
        },
        "required": [
          "rebalance_frequency",
          "rebalance_time_utc"
        ],
        "type": "object"
      },
      "EligibleStrategyItem": {
        "properties": {
          "currentValue": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchanges": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "isActive": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "paperPortfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "strategyId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "strategyId",
          "name",
          "description",
          "exchanges",
          "paperPortfolioId",
          "currentValue",
          "isActive"
        ],
        "type": "object"
      },
      "EligibleStrategyListResponse": {
        "properties": {
          "ineligibleStrategies": {
            "items": {
              "properties": {
                "currentValue": {
                  "type": "null"
                },
                "reason": {
                  "type": "string"
                },
                "strategyId": {
                  "format": "uuid",
                  "type": "string"
                }
              },
              "required": [
                "strategyId",
                "currentValue",
                "reason"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "strategies": {
            "items": {
              "$ref": "#/components/schemas/EligibleStrategyItem"
            },
            "type": "array"
          }
        },
        "required": [
          "strategies",
          "ineligibleStrategies"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "available": {
            "description": "Optional available amount or value",
            "type": "string"
          },
          "billing_action": {
            "$ref": "#/components/schemas/BillingAction"
          },
          "code": {
            "description": "Machine-readable error code",
            "type": "string"
          },
          "currentVersion": {
            "description": "Current server-side version, when relevant",
            "type": "number"
          },
          "details": {
            "description": "Optional structured error details"
          },
          "error": {
            "description": "Error type or code",
            "type": "string"
          },
          "expectedVersion": {
            "description": "Client-provided expected version, when relevant",
            "type": "number"
          },
          "message": {
            "description": "Human-readable error message",
            "type": "string"
          },
          "requested": {
            "description": "Optional requested amount or value",
            "type": "string"
          },
          "usage": {
            "description": "Optional usage metadata for limit errors"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "ExitedHolding": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Holding"
          },
          {
            "properties": {
              "is_exited": {
                "enum": [
                  true
                ],
                "type": "boolean"
              },
              "realized_pnl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "realized_pnl_pct": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "realized_pnl",
              "realized_pnl_pct",
              "is_exited"
            ],
            "type": "object"
          }
        ]
      },
      "FactorRiskClassificationInputs": {
        "enum": [
          "point_in_time",
          "current_static",
          "unavailable"
        ],
        "type": "string"
      },
      "FactorRiskCovarianceRequest": {
        "additionalProperties": false,
        "properties": {
          "as_of": {
            "description": "Requested point-in-time date. The service resolves it to the nearest usable snapshot at or before this date.",
            "example": "2026-06-30",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "model_version": {
            "description": "Pin a specific factor model version. Defaults to the current version when omitted.",
            "example": "global-equity-v1",
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "symbols": {
            "description": "Symbols to build the asset covariance matrix for: up to 1000 distinct symbols after trimming and first-seen deduplication (the raw list may hold up to 5000 entries). Symbols are used as given; the server validates them when it builds the matrix.",
            "example": [
              "AAPL.US",
              "MSFT.US"
            ],
            "items": {
              "maxLength": 50,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 5000,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "as_of",
          "symbols"
        ],
        "type": "object"
      },
      "FactorRiskCovarianceResponse": {
        "properties": {
          "annualization_factor": {
            "enum": [
              252
            ],
            "type": "number"
          },
          "base_currency": {
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "JPY",
              "CHF",
              "CAD",
              "AUD",
              "NZD",
              "HKD",
              "SGD",
              "SEK",
              "NOK",
              "DKK",
              "INR",
              "CNY",
              "KRW",
              "TWD",
              "BRL",
              "MXN",
              "ZAR",
              "ILS",
              "PLN",
              "CZK",
              "HUF",
              "TRY",
              "THB",
              "MYR",
              "IDR",
              "PHP",
              "AED",
              "SAR"
            ],
            "type": "string"
          },
          "covariance": {
            "description": "Row-major asset covariance matrix aligned to `symbols` on both axes.",
            "items": {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            "type": "array"
          },
          "model_version": {
            "maxLength": 120,
            "minLength": 1,
            "type": "string"
          },
          "provenance": {
            "$ref": "#/components/schemas/FactorRiskProvenance"
          },
          "requested_as_of": {
            "type": "string"
          },
          "return_convention": {
            "enum": [
              "simple_daily",
              "log_daily"
            ],
            "type": "string"
          },
          "snapshot_as_of": {
            "description": "Snapshot date actually used, at or before `requested_as_of`.",
            "type": "string"
          },
          "symbol_warnings": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Per-symbol quality warnings the model persisted with the loadings and specific risk used in the matrix (high shrinkage, high leverage, no finite factor inputs); only symbols with warnings appear.",
            "type": "object"
          },
          "symbols": {
            "description": "Symbol ordering for both covariance axes.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "annualization_factor",
          "base_currency",
          "covariance",
          "model_version",
          "provenance",
          "requested_as_of",
          "return_convention",
          "snapshot_as_of",
          "symbols",
          "warnings",
          "symbol_warnings"
        ],
        "type": "object"
      },
      "FactorRiskError": {
        "properties": {
          "details": {
            "$ref": "#/components/schemas/FactorRiskErrorDetails"
          },
          "error": {
            "$ref": "#/components/schemas/FactorRiskErrorCode"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "details",
          "error",
          "message"
        ],
        "type": "object"
      },
      "FactorRiskErrorCode": {
        "enum": [
          "invalid_factor_risk_request",
          "factor_model_version_not_found",
          "historical_factor_snapshot_not_found",
          "historical_factor_snapshot_unusable",
          "factor_risk_service_unavailable"
        ],
        "type": "string"
      },
      "FactorRiskErrorDetails": {
        "additionalProperties": {},
        "properties": {
          "invalid_symbols": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "missing_symbol_count": {
            "type": "number"
          },
          "missing_symbols": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "model_version": {
            "type": "string"
          },
          "reason": {
            "$ref": "#/components/schemas/FactorRiskFailureReason"
          },
          "requested_as_of": {
            "type": "string"
          },
          "snapshot_as_of": {
            "type": "string"
          },
          "symbol_count": {
            "type": "number"
          }
        },
        "type": "object"
      },
      "FactorRiskFactorAvailability": {
        "properties": {
          "available": {
            "type": "boolean"
          },
          "observations": {
            "minimum": 0,
            "type": "integer"
          },
          "reason": {
            "$ref": "#/components/schemas/FactorRiskUnavailableReason"
          }
        },
        "required": [
          "available",
          "observations",
          "reason"
        ],
        "type": "object"
      },
      "FactorRiskFailureReason": {
        "enum": [
          "stale_snapshot",
          "incoherent_snapshot",
          "non_pit_inputs",
          "incomplete_factor_set",
          "incomplete_symbol_coverage",
          "missing_model_convention",
          "invalid_covariance"
        ],
        "type": "string"
      },
      "FactorRiskPitPolicy": {
        "enum": [
          "strict",
          "tiered"
        ],
        "type": "string"
      },
      "FactorRiskProvenance": {
        "properties": {
          "classification_inputs": {
            "$ref": "#/components/schemas/FactorRiskClassificationInputs"
          },
          "factor_availability": {
            "additionalProperties": {
              "$ref": "#/components/schemas/FactorRiskFactorAvailability"
            },
            "type": "object"
          },
          "factor_count": {
            "type": "number"
          },
          "pit_policy": {
            "$ref": "#/components/schemas/FactorRiskPitPolicy"
          },
          "psd_repaired": {
            "description": "True when the covariance matrix required a positive semi-definite repair.",
            "type": "boolean"
          },
          "snapshot_instant": {
            "description": "Instant the resolved snapshot was sealed.",
            "type": "string"
          },
          "style_inputs": {
            "$ref": "#/components/schemas/FactorRiskStyleInputs"
          }
        },
        "required": [
          "classification_inputs",
          "factor_count",
          "factor_availability",
          "pit_policy",
          "psd_repaired",
          "snapshot_instant",
          "style_inputs"
        ],
        "type": "object"
      },
      "FactorRiskStyleInputs": {
        "enum": [
          "point_in_time"
        ],
        "type": "string"
      },
      "FactorRiskUnavailableReason": {
        "enum": [
          "missing_point_in_time_inputs",
          "insufficient_return_observations",
          "no_calibration_exposure_support",
          null
        ],
        "type": [
          "string",
          "null"
        ]
      },
      "FxRateResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "FxRatesResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Gateway_cancelRiskMeasureResponse": {
        "additionalProperties": false,
        "properties": {
          "cancelled": {
            "type": "boolean"
          }
        },
        "required": [
          "cancelled"
        ],
        "type": "object"
      },
      "Gateway_cancelRiskRunResponse": {
        "additionalProperties": false,
        "properties": {
          "cancelled": {
            "type": "boolean"
          }
        },
        "required": [
          "cancelled"
        ],
        "type": "object"
      },
      "Gateway_ChatWorkspaceEntry": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "enum": [
              "directory",
              "file"
            ],
            "type": "string"
          },
          "modifiedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "sizeBytes": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "modifiedAt",
          "name",
          "path",
          "sizeBytes"
        ],
        "type": "object"
      },
      "Gateway_ChatWorkspaceListResponse": {
        "additionalProperties": false,
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/Gateway_ChatWorkspaceEntry"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "entries",
          "nextCursor",
          "path"
        ],
        "type": "object"
      },
      "Gateway_ErrorResponse": {
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Gateway_getRiskMeasureResponse": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "progress": {
                "$ref": "#/components/schemas/Gateway_RiskMeasureProgress",
                "description": "How many of the dates are done."
              },
              "status": {
                "const": "running",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "answer": {
                "$ref": "#/components/schemas/Gateway_RiskMeasureAnswer"
              },
              "status": {
                "const": "ok",
                "type": "string"
              }
            },
            "required": [
              "status",
              "answer"
            ],
            "type": "object"
          },
          {
            "$ref": "#/components/schemas/Gateway_RiskMeasureFailure"
          }
        ]
      },
      "Gateway_getRiskRunArtifactResponse": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Gateway_RiskRunArtifact"
          },
          {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "artifact": {
                    "additionalProperties": {},
                    "propertyNames": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "status": {
                    "const": "ready",
                    "type": "string"
                  }
                },
                "required": [
                  "artifact",
                  "status"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "limit_bytes": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "reason": {
                    "const": "too_large",
                    "type": "string"
                  },
                  "size_bytes": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "status": {
                    "const": "omitted",
                    "type": "string"
                  }
                },
                "required": [
                  "reason",
                  "size_bytes",
                  "limit_bytes",
                  "status"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "const": "not_ready",
                    "type": "string"
                  }
                },
                "required": [
                  "status"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "status": {
                    "const": "not_found",
                    "type": "string"
                  }
                },
                "required": [
                  "status"
                ],
                "type": "object"
              }
            ]
          }
        ]
      },
      "Gateway_getRiskRunResponse": {
        "anyOf": [
          {
            "additionalProperties": false,
            "properties": {
              "progress": {
                "$ref": "#/components/schemas/Gateway_RiskRunProgress"
              },
              "status": {
                "const": "running",
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "analytics": {
                "additionalProperties": false,
                "properties": {
                  "artifact_id": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "content_type": {
                    "const": "application/json",
                    "type": "string"
                  },
                  "expires_at": {
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "schema_version": {
                    "const": 2,
                    "type": "number"
                  },
                  "sha256": {
                    "maxLength": 64,
                    "minLength": 64,
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "size_bytes": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "stored": {
                    "additionalProperties": false,
                    "properties": {
                      "content_encoding": {
                        "const": "gzip",
                        "type": "string"
                      },
                      "sha256": {
                        "maxLength": 64,
                        "minLength": 64,
                        "pattern": "^[a-f0-9]{64}$",
                        "type": "string"
                      },
                      "size_bytes": {
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "content_encoding",
                      "size_bytes",
                      "sha256"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "schema_version",
                  "artifact_id",
                  "content_type",
                  "size_bytes",
                  "sha256",
                  "stored",
                  "expires_at"
                ],
                "type": "object"
              },
              "component": {
                "$ref": "#/components/schemas/Gateway_RiskRunComponent"
              },
              "status": {
                "const": "ok",
                "type": "string"
              },
              "summary": {
                "$ref": "#/components/schemas/Gateway_RiskRunSummary"
              },
              "view": {
                "$ref": "#/components/schemas/Gateway_RiskRunView"
              }
            },
            "required": [
              "status",
              "view",
              "component",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "analytics": {
                "additionalProperties": false,
                "properties": {
                  "artifact_id": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "content_type": {
                    "const": "application/json",
                    "type": "string"
                  },
                  "expires_at": {
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                    "type": "string"
                  },
                  "schema_version": {
                    "const": 2,
                    "type": "number"
                  },
                  "sha256": {
                    "maxLength": 64,
                    "minLength": 64,
                    "pattern": "^[a-f0-9]{64}$",
                    "type": "string"
                  },
                  "size_bytes": {
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991,
                    "type": "integer"
                  },
                  "stored": {
                    "additionalProperties": false,
                    "properties": {
                      "content_encoding": {
                        "const": "gzip",
                        "type": "string"
                      },
                      "sha256": {
                        "maxLength": 64,
                        "minLength": 64,
                        "pattern": "^[a-f0-9]{64}$",
                        "type": "string"
                      },
                      "size_bytes": {
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "content_encoding",
                      "size_bytes",
                      "sha256"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "schema_version",
                  "artifact_id",
                  "content_type",
                  "size_bytes",
                  "sha256",
                  "stored",
                  "expires_at"
                ],
                "type": "object"
              },
              "component": {
                "$ref": "#/components/schemas/Gateway_RiskRunComponent"
              },
              "status": {
                "const": "partial",
                "type": "string"
              },
              "summary": {
                "$ref": "#/components/schemas/Gateway_RiskRunSummary"
              },
              "view": {
                "$ref": "#/components/schemas/Gateway_RiskRunView"
              }
            },
            "required": [
              "status",
              "view",
              "component",
              "summary"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "details": {
                "$ref": "#/components/schemas/Gateway_RiskRunFaultDetails"
              },
              "failure_code": {
                "enum": [
                  "engine_refused",
                  "engine_fault",
                  "analytics_publication_failed",
                  "rate_limited",
                  "provider_unavailable",
                  "timed_out",
                  "cancelled"
                ],
                "type": "string"
              },
              "reason": {
                "description": "Why, in a sentence.",
                "maxLength": 4096,
                "minLength": 1,
                "type": "string"
              },
              "status": {
                "const": "failed",
                "type": "string"
              }
            },
            "required": [
              "status",
              "failure_code",
              "reason"
            ],
            "type": "object"
          }
        ]
      },
      "Gateway_Github_connect_Input": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "Gateway_Github_connect_Result": {
        "additionalProperties": false,
        "properties": {
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "type": "object"
      },
      "Gateway_Github_disconnect_Input": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "Gateway_Github_disconnect_Result": {
        "additionalProperties": false,
        "properties": {
          "disconnected": {
            "const": true,
            "type": "boolean"
          }
        },
        "required": [
          "disconnected"
        ],
        "type": "object"
      },
      "Gateway_Github_getConnection_Input": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "Gateway_Github_getConnection_Result": {
        "additionalProperties": false,
        "properties": {
          "installUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "providerSlug": {
            "type": "string"
          },
          "settingsUrl": {
            "type": "string"
          },
          "status": {
            "enum": [
              "connected",
              "disconnected",
              "reauthorization_required"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "providerSlug",
          "settingsUrl",
          "installUrl"
        ],
        "type": "object"
      },
      "Gateway_Github_listRepositories_Input": {
        "additionalProperties": false,
        "properties": {
          "page": {
            "default": 1,
            "description": "Page number; follow the previous response’s nextPage value.",
            "maximum": 10000,
            "minimum": 1,
            "type": "integer"
          },
          "perPage": {
            "default": 30,
            "description": "Page size; keep it unchanged while following nextPage.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Gateway_Github_listRepositories_Result": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "defaultBranch": {
                  "type": "string"
                },
                "fullName": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "private": {
                  "type": "boolean"
                },
                "repositoryId": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "repositoryId",
                "fullName",
                "name",
                "url",
                "defaultBranch",
                "private"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "nextPage": {
            "type": [
              "number",
              "null"
            ]
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "nextPage",
          "truncated"
        ],
        "type": "object"
      },
      "Gateway_GithubAvailability": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "Gateway_GithubIntegrationError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Gateway_MonitorNewsError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "enum": [
              "INVALID_REQUEST",
              "NOT_FOUND"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ],
        "type": "object"
      },
      "Gateway_MonitorNewsFetchResponse": {
        "additionalProperties": false,
        "properties": {
          "queued": {
            "description": "Subjects sent to be judged now.",
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "subjects": {
            "description": "The monitor's subjects.",
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "subjects",
          "queued"
        ],
        "type": "object"
      },
      "Gateway_MonitorNewsResponse": {
        "additionalProperties": false,
        "properties": {
          "feed": {
            "additionalProperties": false,
            "properties": {
              "coverage": {
                "additionalProperties": false,
                "description": "How many of the subjects are current.",
                "properties": {
                  "current": {
                    "description": "Subjects judged through the last 24 hours. A mandate counts only when it was judged for its current text.",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "subjects": {
                    "description": "The monitor's subjects: its companies and its mandate.",
                    "maximum": 9007199254740991,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "subjects",
                  "current"
                ],
                "type": "object"
              },
              "judged_through": {
                "anyOf": [
                  {
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The newest time a holding pair or a mandate match was judged among the items this read matched, including any past `limit`. Pass it as `since` on the next poll. Null when nothing matched; keep the earlier value then."
              },
              "largest_weight": {
                "anyOf": [
                  {
                    "minimum": 0,
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The book's largest holding weight, which the score divides by. Null for research monitors."
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Oldest last successful read across news sources. Null before the first read."
              },
              "paused": {
                "description": "True while the monitor is paused.",
                "type": "boolean"
              },
              "window_hours": {
                "const": 24,
                "description": "Hours of news the feed covers.",
                "type": "number"
              }
            },
            "required": [
              "last_success_at",
              "paused",
              "window_hours",
              "largest_weight",
              "judged_through",
              "coverage"
            ],
            "type": "object"
          },
          "items": {
            "description": "Items that reach a holding or match the mandate. Without `since`, the top items by the default score, where a mandate match scores as a holding with materiality `mandate_p` × `impact` and weight 0, and an item matched both ways takes the larger score; with `since`, items with a holding pair or a mandate match judged after 5 minutes before it, newest first, each with all its matches. Mandate matches show only when they were judged for the current mandate text.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "direction": {
                  "anyOf": [
                    {
                      "description": "Whether the news is good or bad for the company.",
                      "enum": [
                        "good",
                        "bad",
                        "mixed",
                        "unclear"
                      ],
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The top holding's direction. Null when only the mandate matched."
                },
                "direction_p": {
                  "anyOf": [
                    {
                      "maximum": 1,
                      "minimum": 0,
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Probability of the top holding's direction. Null when only the mandate matched."
                },
                "holdings": {
                  "description": "The monitor's holdings the item reaches, top holding first by the default score. Empty when only the mandate matched.",
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "direction": {
                        "description": "Whether the news is good or bad for the company.",
                        "enum": [
                          "good",
                          "bad",
                          "mixed",
                          "unclear"
                        ],
                        "type": "string"
                      },
                      "direction_p": {
                        "description": "Probability of the direction.",
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      "level": {
                        "description": "`material` from 2.5, `notable` from 1.5, otherwise `minor`.",
                        "enum": [
                          "minor",
                          "notable",
                          "material"
                        ],
                        "type": "string"
                      },
                      "materiality": {
                        "description": "Expected level for how much the news could change the company's value: 1 minor, 2 notable, 3 material. Only pairs rated 1 or above are stored.",
                        "maximum": 3,
                        "minimum": 1,
                        "type": "number"
                      },
                      "symbol": {
                        "description": "Itoflow symbol of the holding.",
                        "maxLength": 30,
                        "minLength": 1,
                        "type": "string"
                      },
                      "valuation_unavailable_reason": {
                        "description": "Why the weight is null: net assets are unknown or not positive, or an open holding that carries the company has no usable price.",
                        "type": "string"
                      },
                      "weight": {
                        "anyOf": [
                          {
                            "minimum": 0,
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The holding's current share of the portfolio's net assets, a short counted by its size. Null for research monitors and a portfolio worth nothing or less. An open holding without usable price, currency or exchange-rate evidence makes every weight null; in a live mirror valued at its broker total, only the weights of the companies it carries."
                      }
                    },
                    "required": [
                      "symbol",
                      "weight",
                      "materiality",
                      "level",
                      "direction",
                      "direction_p"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "id": {
                  "description": "News item ID, shared by every monitor it reaches.",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "type": "string"
                },
                "impact": {
                  "description": "Expected level for how much the news could move the companies or markets it concerns: 0 none, 1 minor, 2 notable, 3 material.",
                  "maximum": 3,
                  "minimum": 0,
                  "type": "number"
                },
                "is_event_p": {
                  "description": "Probability that the item reports an event rather than commentary.",
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "judged_at": {
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                  "type": "string"
                },
                "language": {
                  "description": "BCP 47 tag of the title.",
                  "minLength": 2,
                  "type": "string"
                },
                "level": {
                  "anyOf": [
                    {
                      "description": "`material` from 2.5, `notable` from 1.5, otherwise `minor`.",
                      "enum": [
                        "minor",
                        "notable",
                        "material"
                      ],
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The top holding's level. Null when only the mandate matched."
                },
                "mandate_p": {
                  "anyOf": [
                    {
                      "maximum": 1,
                      "minimum": 0,
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Probability that the item bears on the monitor's mandate, at or above the mandate bar. Null when only holdings matched, and while the mandate's matches were judged for an earlier text."
                },
                "materiality": {
                  "anyOf": [
                    {
                      "description": "Expected level for how much the news could change the company's value: 1 minor, 2 notable, 3 material. Only pairs rated 1 or above are stored.",
                      "maximum": 3,
                      "minimum": 1,
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The top holding's materiality. Null when only the mandate matched."
                },
                "published_at": {
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
                  "type": "string"
                },
                "publisher": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "repeat_of": {
                  "anyOf": [
                    {
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "An earlier item that reports the same event."
                },
                "source": {
                  "description": "The source the item came from.",
                  "enum": [
                    "gdelt",
                    "gdelt_translingual",
                    "sec_edgar"
                  ],
                  "type": "string"
                },
                "title": {
                  "description": "As published, in its own language.",
                  "maxLength": 300,
                  "minLength": 1,
                  "type": "string"
                },
                "title_en": {
                  "anyOf": [
                    {
                      "maxLength": 600,
                      "minLength": 1,
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The title in English. Null when the title is in English, the model couldn't translate it, or the backfill hasn't reached it."
                },
                "url": {
                  "description": "Link to the article or filing.",
                  "format": "uri",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "source",
                "url",
                "title",
                "title_en",
                "language",
                "publisher",
                "published_at",
                "materiality",
                "level",
                "direction",
                "direction_p",
                "holdings",
                "mandate_p",
                "is_event_p",
                "impact",
                "repeat_of",
                "judged_at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "items",
          "feed"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_addRequest": {
        "additionalProperties": false,
        "properties": {
          "bearerToken": {
            "description": "Raw provider token, without the Bearer prefix. Omit to reuse a saved token. Treat it as a secret: do not paste it into chat, print it or commit it.",
            "maxLength": 8192,
            "minLength": 1,
            "pattern": "^[\\x21-\\x7e\\x80-\\xff]+$",
            "type": "string"
          },
          "endpoint": {
            "description": "Public HTTPS Streamable HTTP endpoint. Private, local and stdio servers are unsupported.",
            "maxLength": 2048,
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "description": "Display name shared across the owner’s Itoflow chats.",
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "endpoint"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_connectRequest": {
        "additionalProperties": false,
        "properties": {
          "bearerToken": {
            "description": "Raw provider token, without the Bearer prefix. Omit to reuse a saved token. Treat it as a secret: do not paste it into chat, print it or commit it.",
            "maxLength": 8192,
            "minLength": 1,
            "pattern": "^[\\x21-\\x7e\\x80-\\xff]+$",
            "type": "string"
          },
          "connectionId": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "expectedVersion": {
            "description": "Latest connection version; refresh after connection_changed.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "connectionId",
          "expectedVersion"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_disconnectRequest": {
        "additionalProperties": false,
        "properties": {
          "connectionId": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "expectedVersion": {
            "description": "Latest connection version; refresh after connection_changed.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "connectionId",
          "expectedVersion"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_getStatusRequest": {
        "additionalProperties": false,
        "properties": {
          "attemptId": {
            "description": "Attempt ID returned by connect to check its OAuth result.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "connectionId": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          }
        },
        "required": [
          "connectionId"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_listRequest": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "Gateway_RemoteMcp_listToolsRequest": {
        "additionalProperties": false,
        "properties": {
          "connectionId": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "expectedVersion": {
            "description": "Latest connection version; refresh after connection_changed.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "connectionId",
          "expectedVersion"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_removeRequest": {
        "additionalProperties": false,
        "properties": {
          "connectionId": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "expectedVersion": {
            "description": "Latest connection version; refresh after connection_changed.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "connectionId",
          "expectedVersion"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcp_renameRequest": {
        "additionalProperties": false,
        "properties": {
          "connectionId": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "expectedVersion": {
            "description": "Latest connection version; refresh after connection_changed.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          },
          "name": {
            "description": "Display name shared across the owner’s Itoflow chats.",
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "connectionId",
          "name",
          "expectedVersion"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcpAvailability": {
        "additionalProperties": false,
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "enabled"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcpConnection": {
        "additionalProperties": false,
        "properties": {
          "auth": {
            "enum": [
              "none",
              "bearer",
              "oauth",
              "unknown"
            ],
            "type": "string"
          },
          "authStatus": {
            "enum": [
              "disconnected",
              "authorizing",
              "connected",
              "reauthorization_required"
            ],
            "type": "string"
          },
          "endpoint": {
            "maxLength": 2048,
            "type": "string"
          },
          "errorCode": {
            "anyOf": [
              {
                "enum": [
                  "invalid_url",
                  "destination_blocked",
                  "discovery_failed",
                  "unsupported_protocol",
                  "setup_needed",
                  "authorization_canceled",
                  "reauthorization_required",
                  "insufficient_scope",
                  "connection_unavailable",
                  "connection_changed",
                  "tool_changed",
                  "feature_disabled",
                  "rate_limited",
                  "limit_exceeded",
                  "outcome_unknown",
                  "cleanup_pending",
                  "unauthorized",
                  "not_found",
                  "invalid_request"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "Connection ID returned by add or list.",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "name": {
            "description": "Display name shared across the owner’s Itoflow chats.",
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "readiness": {
            "enum": [
              "unchecked",
              "checking",
              "ready",
              "unavailable",
              "setup_needed"
            ],
            "type": "string"
          },
          "toolCount": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "updatedAt": {
            "type": "string"
          },
          "version": {
            "description": "Latest connection version; refresh after connection_changed.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "endpoint",
          "version",
          "auth",
          "authStatus",
          "readiness",
          "errorCode",
          "toolCount",
          "updatedAt"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcpFailure": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "enum": [
                  "invalid_url",
                  "destination_blocked",
                  "discovery_failed",
                  "unsupported_protocol",
                  "setup_needed",
                  "authorization_canceled",
                  "reauthorization_required",
                  "insufficient_scope",
                  "connection_unavailable",
                  "connection_changed",
                  "tool_changed",
                  "feature_disabled",
                  "rate_limited",
                  "limit_exceeded",
                  "outcome_unknown",
                  "cleanup_pending",
                  "unauthorized",
                  "not_found",
                  "invalid_request"
                ],
                "type": "string"
              },
              "expectedVersion": {
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Gateway_RemoteMcpTool": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "additionalProperties": {},
            "description": "The upstream tool’s JSON Schema object.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "name": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "schemaHash": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "inputSchema",
          "schemaHash"
        ],
        "type": "object"
      },
      "Gateway_RiskAnalyticsParameter": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "items": {
              "$ref": "#/components/schemas/Gateway_RiskAnalyticsParameter"
            },
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/Gateway_RiskAnalyticsParameter"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          }
        ]
      },
      "Gateway_RiskMeasureAnswer": {
        "additionalProperties": false,
        "properties": {
          "dates": {
            "description": "One entry per date on the grid, oldest first.",
            "items": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "as_of": {
                      "description": "The date on the grid.",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    "benchmark": {
                      "anyOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "coverage": {
                              "additionalProperties": false,
                              "properties": {
                                "lookthrough_weight": {
                                  "description": "The gross weight of funds measured through their own holdings.",
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "modelled_share_of_gross": {
                                  "description": "The share of the book's gross weight the model covers, 0 to 1: not a share of net assets. Cash in the model currency counts in neither part.",
                                  "type": [
                                    "number",
                                    "null"
                                  ]
                                },
                                "unmodelled": {
                                  "description": "The 100 largest lines the model left out, at most; unmodelled_count counts them all.",
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "reason": {
                                        "type": "string"
                                      },
                                      "reason_code": {
                                        "description": "The engine names unmodelled, no_equity_listing, no_fund_book, invalid_inputs, not_listed and cash_currency today. It may add codes; reason says each one in words.",
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "symbol": {
                                        "description": "Caller's symbol for a catalogue gap; null only for an unnamed fund part not listed by its source; CASH for cash_currency.",
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "weight": {
                                        "description": "Null when the holding could not be valued; its weight is not known.",
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "symbol",
                                      "weight",
                                      "reason_code",
                                      "reason"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "unmodelled_count": {
                                  "description": "Every line the model left out, however many.",
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "required": [
                                "modelled_share_of_gross",
                                "lookthrough_weight",
                                "unmodelled_count",
                                "unmodelled"
                              ],
                              "type": "object"
                            },
                            "fund_books": {
                              "default": [],
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "accepted_at": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "as_of": {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "book_id": {
                                    "type": "string"
                                  },
                                  "fund_symbol": {
                                    "type": "string"
                                  },
                                  "holdings_date": {
                                    "format": "date",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "book_id",
                                  "fund_symbol",
                                  "holdings_date",
                                  "as_of",
                                  "accepted_at"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "holdings_as_of": {
                              "format": "date",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                              "type": "string"
                            },
                            "symbol": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "symbol",
                            "holdings_as_of",
                            "fund_books",
                            "coverage"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The benchmark fund's stored book on or before the publication's model date, with its own coverage. Null with no benchmark, or when the store holds no book for it."
                    },
                    "books": {
                      "items": {
                        "oneOf": [
                          {
                            "additionalProperties": false,
                            "properties": {
                              "active": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "beta": {
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "exposures": {
                                        "description": "One exposure per factor, in the order of factors; null for a factor this date's publication lacks.",
                                        "items": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "type": "array"
                                      },
                                      "factor_share": {
                                        "description": "Percent of variance from factors; null with no variance.",
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "factor_shares": {
                                        "description": "Percent of variance per factor, in the order of factors; null for a factor this date's publication lacks, or with no variance.",
                                        "items": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "type": "array"
                                      },
                                      "modelled_share_of_gross_active": {
                                        "description": "The share of the gross active weight the model covers, 0 to 1: the book's and the benchmark's gaps netted by name.",
                                        "type": "number"
                                      },
                                      "specific_share": {
                                        "description": "Percent of variance specific to names; null with no variance.",
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "tracking_error": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "tracking_error",
                                      "beta",
                                      "modelled_share_of_gross_active",
                                      "factor_share",
                                      "specific_share",
                                      "exposures",
                                      "factor_shares"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Null with no benchmark, when the store holds no book for it on or before the publication's model date, or when the book or the benchmark holds no name the model covers; a warning says which."
                              },
                              "coverage": {
                                "additionalProperties": false,
                                "properties": {
                                  "lookthrough_weight": {
                                    "description": "The gross weight of funds measured through their own holdings.",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "modelled_share_of_gross": {
                                    "description": "The share of the book's gross weight the model covers, 0 to 1: not a share of net assets. Cash in the model currency counts in neither part.",
                                    "type": [
                                      "number",
                                      "null"
                                    ]
                                  },
                                  "unmodelled": {
                                    "description": "The 100 largest lines the model left out, at most; unmodelled_count counts them all.",
                                    "items": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "reason": {
                                          "type": "string"
                                        },
                                        "reason_code": {
                                          "description": "The engine names unmodelled, no_equity_listing, no_fund_book, invalid_inputs, not_listed and cash_currency today. It may add codes; reason says each one in words.",
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "symbol": {
                                          "description": "Caller's symbol for a catalogue gap; null only for an unnamed fund part not listed by its source; CASH for cash_currency.",
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "weight": {
                                          "description": "Null when the holding could not be valued; its weight is not known.",
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "symbol",
                                        "weight",
                                        "reason_code",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "unmodelled_count": {
                                    "description": "Every line the model left out, however many.",
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "modelled_share_of_gross",
                                  "lookthrough_weight",
                                  "unmodelled_count",
                                  "unmodelled"
                                ],
                                "type": "object"
                              },
                              "exposure": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "gross_weight": {
                                        "type": "number"
                                      },
                                      "long_weight": {
                                        "type": "number"
                                      },
                                      "net_weight": {
                                        "type": "number"
                                      },
                                      "short_weight": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "long_weight",
                                      "short_weight",
                                      "gross_weight",
                                      "net_weight"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "fund_books": {
                                "default": [],
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "accepted_at": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "as_of": {
                                      "anyOf": [
                                        {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "book_id": {
                                      "type": "string"
                                    },
                                    "fund_symbol": {
                                      "type": "string"
                                    },
                                    "holdings_date": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "book_id",
                                    "fund_symbol",
                                    "holdings_date",
                                    "as_of",
                                    "accepted_at"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "holdings_as_of": {
                                "anyOf": [
                                  {
                                    "anyOf": [
                                      {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                        "type": "string"
                                      },
                                      {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      }
                                    ]
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "When the saved snapshot was taken; null for a list of weights."
                              },
                              "label": {
                                "type": "string"
                              },
                              "risk": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "exposures": {
                                        "description": "One exposure per factor, in the order of factors; null for a factor this date's publication lacks.",
                                        "items": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "type": "array"
                                      },
                                      "factor_share": {
                                        "description": "Percent of variance from factors; null with no variance.",
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "factor_shares": {
                                        "description": "Percent of variance per factor, in the order of factors; null for a factor this date's publication lacks, or with no variance.",
                                        "items": {
                                          "type": [
                                            "number",
                                            "null"
                                          ]
                                        },
                                        "type": "array"
                                      },
                                      "specific_share": {
                                        "description": "Percent of variance specific to names; null with no variance.",
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "total_volatility": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "total_volatility",
                                      "factor_share",
                                      "specific_share",
                                      "exposures",
                                      "factor_shares"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Null when no risky name in the book is modelled."
                              },
                              "status": {
                                "const": "ok",
                                "type": "string"
                              },
                              "top_names": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "share": {
                                      "type": "number"
                                    },
                                    "symbol": {
                                      "type": "string"
                                    },
                                    "weight": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "symbol",
                                    "weight",
                                    "share"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "label",
                              "status",
                              "fund_books",
                              "holdings_as_of",
                              "exposure",
                              "coverage",
                              "risk",
                              "active",
                              "top_names"
                            ],
                            "type": "object"
                          },
                          {
                            "additionalProperties": false,
                            "properties": {
                              "label": {
                                "type": "string"
                              },
                              "reason": {
                                "enum": [
                                  "no_holdings_at_date",
                                  "holdings_valuation_unknown"
                                ],
                                "type": "string"
                              },
                              "status": {
                                "const": "omitted",
                                "type": "string"
                              }
                            },
                            "required": [
                              "label",
                              "status",
                              "reason"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    },
                    "provenance": {
                      "additionalProperties": false,
                      "properties": {
                        "snapshot_instant": {
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "snapshot_instant"
                      ],
                      "type": "object"
                    },
                    "publication_date": {
                      "description": "The publication this date read: the newest on or before as_of. Dates that share one read the same books, but each date checks the age of inputs carried forward, so their figures can differ.",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    "status": {
                      "const": "ok",
                      "type": "string"
                    },
                    "warnings": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "as_of",
                    "status",
                    "publication_date",
                    "benchmark",
                    "books",
                    "warnings",
                    "provenance"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "as_of": {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    "nearest_after": {
                      "anyOf": [
                        {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The oldest model date after this one; null when none."
                    },
                    "nearest_before": {
                      "anyOf": [
                        {
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The newest model date before this one; null when none."
                    },
                    "reason": {
                      "type": "string"
                    },
                    "reason_code": {
                      "const": "model_date_unavailable",
                      "type": "string"
                    },
                    "status": {
                      "const": "missing",
                      "type": "string"
                    }
                  },
                  "required": [
                    "as_of",
                    "status",
                    "reason_code",
                    "reason",
                    "nearest_before",
                    "nearest_after"
                  ],
                  "type": "object"
                }
              ]
            },
            "type": "array"
          },
          "factors": {
            "description": "Every factor any date's publication has, once. Each per-factor array follows this order.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "group": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "group"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "model": {
            "additionalProperties": false,
            "properties": {
              "base_currency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dates": {
                "additionalProperties": false,
                "description": "The version's publications: month-end ones from month_ends_from, daily ones from daily_from.",
                "properties": {
                  "daily_from": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "month_ends_from": {
                    "anyOf": [
                      {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "month_ends_from",
                  "daily_from"
                ],
                "type": "object"
              },
              "version": {
                "description": "The one model version every date used.",
                "type": "string"
              }
            },
            "required": [
              "version",
              "dates",
              "base_currency"
            ],
            "type": "object"
          },
          "provenance": {
            "additionalProperties": false,
            "properties": {
              "classification_inputs": {
                "const": "current_static",
                "type": "string"
              },
              "factor_count": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "classification_inputs",
              "factor_count"
            ],
            "type": "object"
          },
          "requested": {
            "additionalProperties": false,
            "description": "The request as the measure read it, with defaults filled.",
            "properties": {
              "benchmark": {
                "description": "A fund, such as SPY.US. Its stored holdings book on or before the publication's model date gives each book active risk; without one, active is null and a warning says why.",
                "maxLength": 32,
                "minLength": 1,
                "type": "string"
              },
              "books": {
                "description": "1 to 10 books, each a saved portfolio or a list of weights.",
                "items": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "label": {
                          "description": "Your name for the book. Labels are unique within a call.",
                          "maxLength": 80,
                          "minLength": 1,
                          "type": "string"
                        },
                        "portfolio": {
                          "additionalProperties": false,
                          "properties": {
                            "holdings_at": {
                              "anyOf": [
                                {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                  "type": "string"
                                },
                                {
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                  "type": "string"
                                }
                              ],
                              "description": "A time with its offset, such as 2026-07-31T20:00:00Z. The book is the newest saved snapshot on or before it. Omitted with no as_of or range: the newest snapshot at the measure's start time, shared by every book. A dated request uses the end of the publication's model date in New York."
                            },
                            "portfolio_id": {
                              "description": "A saved portfolio you own.",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "portfolio_id"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "label",
                        "portfolio"
                      ],
                      "type": "object"
                    },
                    {
                      "additionalProperties": false,
                      "properties": {
                        "holdings": {
                          "description": "1 to 3000 lines, as fractions of net assets. With a CASH line the weights add to 1, within 0.01. Without one, the rest of the book is cash; a book that borrows lists CASH below zero. Nothing is rescaled.",
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "symbol": {
                                "description": "Ticker symbol such as NVDA.US; a bare ticker means its US listing. CASH is US dollars.",
                                "maxLength": 32,
                                "minLength": 1,
                                "type": "string"
                              },
                              "weight": {
                                "description": "Fraction of the portfolio's net assets, so 0.25 is 25%. A short is below zero, and CASH holds what its sale raised.",
                                "type": "number"
                              }
                            },
                            "required": [
                              "symbol",
                              "weight"
                            ],
                            "type": "object"
                          },
                          "maxItems": 3000,
                          "minItems": 1,
                          "type": "array"
                        },
                        "label": {
                          "description": "Your name for the book. Labels are unique within a call.",
                          "maxLength": 80,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "label",
                        "holdings"
                      ],
                      "type": "object"
                    }
                  ]
                },
                "maxItems": 10,
                "minItems": 1,
                "type": "array"
              },
              "model": {
                "additionalProperties": false,
                "default": {},
                "description": "Which dates of the factor model to measure on. Neither as_of nor range: the version's newest publication.",
                "properties": {
                  "as_of": {
                    "description": "One date, YYYY-MM-DD, not after today in New York. The newest publication on or before it counts. Not with range.",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "range": {
                    "additionalProperties": false,
                    "description": "A range of model dates, at most 60. Each date reads the newest publication on or before it.",
                    "properties": {
                      "from": {
                        "description": "YYYY-MM-DD, on or before to.",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      "step": {
                        "default": "month_end",
                        "description": "month_end: the last day of each month in the range, and to when it is not one. daily: each weekday in the range.",
                        "enum": [
                          "month_end",
                          "daily"
                        ],
                        "type": "string"
                      },
                      "to": {
                        "description": "YYYY-MM-DD, not after today in New York.",
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "from",
                      "to",
                      "step"
                    ],
                    "type": "object"
                  },
                  "version": {
                    "description": "A factor model version. Omitted: the version live when the measure starts. Every date uses it.",
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "top_names": {
                "default": 10,
                "description": "How many names to list by their share of each book's risk, 0 to 50.",
                "maximum": 50,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "model",
              "books",
              "top_names"
            ],
            "type": "object"
          },
          "units": {
            "additionalProperties": false,
            "properties": {
              "shares": {
                "type": "string"
              },
              "volatility": {
                "type": "string"
              },
              "weights": {
                "type": "string"
              }
            },
            "required": [
              "volatility",
              "weights",
              "shares"
            ],
            "type": "object"
          },
          "warnings": {
            "description": "Warnings for the whole measure, such as names left out on any date.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "requested",
          "model",
          "units",
          "factors",
          "dates",
          "warnings",
          "provenance"
        ],
        "type": "object"
      },
      "Gateway_RiskMeasureError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "additionalProperties": {},
                "propertyNames": {
                  "type": "string"
                },
                "type": "object"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Gateway_RiskMeasureFailure": {
        "additionalProperties": false,
        "properties": {
          "details": {
            "additionalProperties": {},
            "description": "answer_too_large gives size_bytes and limit_bytes.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "failure_code": {
            "enum": [
              "model_version_not_found",
              "answer_too_large",
              "engine_fault",
              "timed_out",
              "cancelled"
            ],
            "type": "string"
          },
          "reason": {
            "description": "Why, in a sentence.",
            "maxLength": 4096,
            "minLength": 1,
            "type": "string"
          },
          "status": {
            "const": "failed",
            "type": "string"
          }
        },
        "required": [
          "status",
          "failure_code",
          "reason",
          "details"
        ],
        "type": "object"
      },
      "Gateway_RiskMeasureProgress": {
        "additionalProperties": false,
        "properties": {
          "dates_done": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "dates_total": {
            "maximum": 60,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "dates_done",
          "dates_total"
        ],
        "type": "object"
      },
      "Gateway_RiskMeasureRequest": {
        "additionalProperties": false,
        "properties": {
          "benchmark": {
            "description": "A fund, such as SPY.US. Its stored holdings book on or before the publication's model date gives each book active risk; without one, active is null and a warning says why.",
            "maxLength": 32,
            "minLength": 1,
            "type": "string"
          },
          "books": {
            "description": "1 to 10 books, each a saved portfolio or a list of weights.",
            "items": {
              "anyOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "label": {
                      "description": "Your name for the book. Labels are unique within a call.",
                      "maxLength": 80,
                      "minLength": 1,
                      "type": "string"
                    },
                    "portfolio": {
                      "additionalProperties": false,
                      "properties": {
                        "holdings_at": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            }
                          ],
                          "description": "A time with its offset, such as 2026-07-31T20:00:00Z. The book is the newest saved snapshot on or before it. Omitted with no as_of or range: the newest snapshot at the measure's start time, shared by every book. A dated request uses the end of the publication's model date in New York."
                        },
                        "portfolio_id": {
                          "description": "A saved portfolio you own.",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "portfolio_id"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "label",
                    "portfolio"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "holdings": {
                      "description": "1 to 3000 lines, as fractions of net assets. With a CASH line the weights add to 1, within 0.01. Without one, the rest of the book is cash; a book that borrows lists CASH below zero. Nothing is rescaled.",
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "symbol": {
                            "description": "Ticker symbol such as NVDA.US; a bare ticker means its US listing. CASH is US dollars.",
                            "maxLength": 32,
                            "minLength": 1,
                            "type": "string"
                          },
                          "weight": {
                            "description": "Fraction of the portfolio's net assets, so 0.25 is 25%. A short is below zero, and CASH holds what its sale raised.",
                            "type": "number"
                          }
                        },
                        "required": [
                          "symbol",
                          "weight"
                        ],
                        "type": "object"
                      },
                      "maxItems": 3000,
                      "minItems": 1,
                      "type": "array"
                    },
                    "label": {
                      "description": "Your name for the book. Labels are unique within a call.",
                      "maxLength": 80,
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "label",
                    "holdings"
                  ],
                  "type": "object"
                }
              ]
            },
            "maxItems": 10,
            "minItems": 1,
            "type": "array"
          },
          "model": {
            "additionalProperties": false,
            "default": {},
            "description": "Which dates of the factor model to measure on. Neither as_of nor range: the version's newest publication.",
            "properties": {
              "as_of": {
                "description": "One date, YYYY-MM-DD, not after today in New York. The newest publication on or before it counts. Not with range.",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "type": "string"
              },
              "range": {
                "additionalProperties": false,
                "description": "A range of model dates, at most 60. Each date reads the newest publication on or before it.",
                "properties": {
                  "from": {
                    "description": "YYYY-MM-DD, on or before to.",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  },
                  "step": {
                    "default": "month_end",
                    "description": "month_end: the last day of each month in the range, and to when it is not one. daily: each weekday in the range.",
                    "enum": [
                      "month_end",
                      "daily"
                    ],
                    "type": "string"
                  },
                  "to": {
                    "description": "YYYY-MM-DD, not after today in New York.",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                    "type": "string"
                  }
                },
                "required": [
                  "from",
                  "to"
                ],
                "type": "object"
              },
              "version": {
                "description": "A factor model version. Omitted: the version live when the measure starts. Every date uses it.",
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              }
            },
            "type": "object"
          },
          "top_names": {
            "default": 10,
            "description": "How many names to list by their share of each book's risk, 0 to 50.",
            "maximum": 50,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "books"
        ],
        "type": "object"
      },
      "Gateway_RiskMeasureStart": {
        "additionalProperties": false,
        "properties": {
          "request": {
            "$ref": "#/components/schemas/Gateway_RiskMeasureRequest"
          },
          "request_key": {
            "description": "Your key for this measure. Retrying the same request with it joins the measure.",
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "request_key",
          "request"
        ],
        "type": "object"
      },
      "Gateway_RiskRunArtifact": {
        "additionalProperties": false,
        "properties": {
          "artifact_id": {
            "type": "string"
          },
          "as_of": {
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
            "type": "string"
          },
          "books": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "comparator_key": {
                  "type": "string"
                },
                "coverage_reasons": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "covered_weight": {
                  "anyOf": [
                    {
                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "unit": "fraction"
                },
                "currency": {
                  "type": "string"
                },
                "fund_book_reasons": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "fund_books": {
                  "additionalProperties": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "holdings_date": {
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "type": "string"
                },
                "holdings_valid_through": {
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "lookthrough_source": {
                  "enum": [
                    "provider:fmp",
                    "provider:eodhd",
                    "filing:nport",
                    "upload",
                    "portfolio",
                    "what_if"
                  ],
                  "type": "string"
                },
                "modelled": {
                  "maximum": 9007199254740991,
                  "minimum": 0,
                  "type": "integer",
                  "unit": "count"
                },
                "name": {
                  "type": "string"
                },
                "oldest_mark_date": {
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "type": "string"
                },
                "portfolio_id": {
                  "type": "string"
                },
                "portfolio_value_usd": {
                  "additionalProperties": false,
                  "properties": {
                    "amount": {
                      "anyOf": [
                        {
                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "unit": "currency"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "pattern": "^[A-Z]{3}(?![\\s\\S])",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "type": "object"
                },
                "priced": {
                  "maximum": 9007199254740991,
                  "minimum": 0,
                  "type": "integer",
                  "unit": "count"
                },
                "requested": {
                  "maximum": 9007199254740991,
                  "minimum": 0,
                  "type": "integer",
                  "unit": "count"
                },
                "resolved": {
                  "maximum": 9007199254740991,
                  "minimum": 0,
                  "type": "integer",
                  "unit": "count"
                },
                "role": {
                  "enum": [
                    "subject",
                    "benchmark_basket",
                    "peer"
                  ],
                  "type": "string"
                },
                "rows": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "asset_type": {
                        "enum": [
                          "equity",
                          "fund",
                          "cash",
                          "bond",
                          "derivative",
                          "balance",
                          "direct",
                          "other"
                        ],
                        "type": "string"
                      },
                      "classification_as_of": {
                        "format": "date",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "cusip": {
                        "type": "string"
                      },
                      "fx_rate_to_usd": {
                        "anyOf": [
                          {
                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "unit": "ratio"
                      },
                      "industry": {
                        "type": "string"
                      },
                      "isin": {
                        "type": "string"
                      },
                      "issuer_id": {
                        "type": "string"
                      },
                      "market_cap": {
                        "additionalProperties": false,
                        "properties": {
                          "amount": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "currency"
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ],
                        "type": "object"
                      },
                      "market_value": {
                        "additionalProperties": false,
                        "properties": {
                          "amount": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "currency"
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "amount",
                          "currency"
                        ],
                        "type": "object"
                      },
                      "name": {
                        "type": "string"
                      },
                      "not_listed": {
                        "type": "boolean"
                      },
                      "sector": {
                        "type": "string"
                      },
                      "shares": {
                        "anyOf": [
                          {
                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "unit": "count"
                      },
                      "symbol": {
                        "type": "string"
                      },
                      "unresolved": {
                        "type": "boolean"
                      },
                      "weight": {
                        "anyOf": [
                          {
                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "unit": "fraction"
                      }
                    },
                    "required": [
                      "symbol",
                      "weight"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "source": {
                  "enum": [
                    "provider:fmp",
                    "provider:eodhd",
                    "filing:nport",
                    "upload",
                    "portfolio",
                    "what_if"
                  ],
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "total_value": {
                  "additionalProperties": false,
                  "properties": {
                    "amount": {
                      "anyOf": [
                        {
                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "unit": "currency"
                    },
                    "currency": {
                      "anyOf": [
                        {
                          "pattern": "^[A-Z]{3}(?![\\s\\S])",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "type": "object"
                },
                "unvalued": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "reason": {
                        "type": "string"
                      },
                      "symbol": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "symbol",
                      "reason"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "warnings": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "key",
                "role",
                "symbol",
                "source",
                "holdings_date",
                "covered_weight",
                "rows"
              ],
              "selectors": [
                "comparator_key",
                "key"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "comparators": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "entity": {
                  "type": "string"
                },
                "key": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "entity",
                "role"
              ],
              "selectors": [
                "entity",
                "key"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "computed_at": {
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
            "type": "string"
          },
          "entities": {
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "pattern": "^(?:book|security|factor|bucket|scenario|custom):.+$",
                  "type": "string"
                },
                "kind": {
                  "enum": [
                    "book",
                    "security",
                    "factor",
                    "bucket",
                    "scenario",
                    "custom"
                  ],
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "symbol": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "key",
                "kind",
                "symbol",
                "name"
              ],
              "type": "object"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "issues": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "code": {
                  "minLength": 1,
                  "type": "string"
                },
                "entity": {
                  "anyOf": [
                    {
                      "pattern": "^(?:book|security|factor|bucket|scenario|custom):.+$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "minLength": 1,
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "reason": {
                  "minLength": 1,
                  "type": "string"
                },
                "section": {
                  "anyOf": [
                    {
                      "enum": [
                        "risk",
                        "trust",
                        "compliance",
                        "performance",
                        "attribution",
                        "factor_pnl",
                        "exposures",
                        "drivers",
                        "changes",
                        "risk_change",
                        "liquidity",
                        "bets",
                        "sizing",
                        "scenarios",
                        "valuation"
                      ],
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "source_artifact_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "code",
                "reason",
                "section",
                "path",
                "entity",
                "source_artifact_id"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "methods": {
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "parameters": {
                  "additionalProperties": {
                    "$ref": "#/components/schemas/Gateway_RiskAnalyticsParameter"
                  },
                  "propertyNames": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "version",
                "parameters"
              ],
              "type": "object"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "metric_changes": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "baseline": {
                  "anyOf": [
                    {
                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "baseline_artifact_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "baseline_as_of": {
                  "anyOf": [
                    {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "baseline_period_key": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "comparator_key": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "currency": {
                  "anyOf": [
                    {
                      "pattern": "^[A-Z]{3}(?![\\s\\S])",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "current": {
                  "anyOf": [
                    {
                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "current_period_key": {
                  "type": "string"
                },
                "difference": {
                  "anyOf": [
                    {
                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "elapsed_calendar_days": {
                  "anyOf": [
                    {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entity": {
                  "anyOf": [
                    {
                      "pattern": "^(?:book|security|factor|bucket|scenario|custom):.+$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "history_artifact_ids": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "method_key": {
                  "type": "string"
                },
                "metric_path": {
                  "type": "string"
                },
                "model_keys": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "precision": {
                  "additionalProperties": false,
                  "properties": {
                    "baseline": {
                      "anyOf": [
                        {
                          "enum": [
                            "calculation",
                            "legacy_rounded",
                            "mixed"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "difference": {
                      "anyOf": [
                        {
                          "enum": [
                            "calculation",
                            "legacy_rounded",
                            "mixed"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "z_score": {
                      "anyOf": [
                        {
                          "enum": [
                            "calculation",
                            "legacy_rounded",
                            "mixed"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "baseline",
                    "difference",
                    "z_score"
                  ],
                  "type": "object"
                },
                "unit": {
                  "enum": [
                    "fraction",
                    "pct",
                    "pts",
                    "ratio",
                    "days",
                    "currency",
                    "count"
                  ],
                  "type": "string"
                },
                "z_score": {
                  "anyOf": [
                    {
                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "metric_path",
                "comparator_key",
                "entity",
                "unit",
                "currency",
                "current_period_key",
                "baseline_period_key",
                "baseline_artifact_id",
                "baseline_as_of",
                "elapsed_calendar_days",
                "current",
                "baseline",
                "difference",
                "z_score",
                "method_key",
                "model_keys",
                "precision",
                "history_artifact_ids"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "models": {
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "publication_date": {
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "type": "string"
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "version",
                "publication_date"
              ],
              "type": "object"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "periods": {
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "actual_from": {
                  "anyOf": [
                    {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "actual_to": {
                  "anyOf": [
                    {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "calendar": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "horizon": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "kind": {
                  "enum": [
                    "point",
                    "interval"
                  ],
                  "type": "string"
                },
                "requested_from": {
                  "anyOf": [
                    {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_to": {
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                  "type": "string"
                },
                "timezone": {
                  "type": "string"
                }
              },
              "required": [
                "horizon",
                "kind",
                "requested_from",
                "requested_to",
                "actual_from",
                "actual_to",
                "timezone",
                "calendar"
              ],
              "type": "object"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "receipts": {
            "additionalProperties": false,
            "properties": {
              "books": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "book_key": {
                      "type": "string"
                    },
                    "covered_weight": {
                      "anyOf": [
                        {
                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "unit": "pct"
                    },
                    "holdings_date": {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    "lookthrough_source": {
                      "enum": [
                        "provider:fmp",
                        "provider:eodhd",
                        "filing:nport",
                        "upload",
                        "portfolio",
                        "what_if"
                      ],
                      "type": "string"
                    },
                    "modelled": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "oldest_mark_date": {
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                      "type": "string"
                    },
                    "portfolio_value_usd": {
                      "additionalProperties": false,
                      "properties": {
                        "amount": {
                          "anyOf": [
                            {
                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "unit": "currency"
                        },
                        "currency": {
                          "anyOf": [
                            {
                              "pattern": "^[A-Z]{3}(?![\\s\\S])",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ],
                      "type": "object"
                    },
                    "priced": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "requested": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "resolved": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "role": {
                      "enum": [
                        "subject",
                        "benchmark_basket",
                        "peer"
                      ],
                      "type": "string"
                    },
                    "rows": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "source": {
                      "enum": [
                        "provider:fmp",
                        "provider:eodhd",
                        "filing:nport",
                        "upload",
                        "portfolio",
                        "what_if"
                      ],
                      "type": "string"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "total_value": {
                      "additionalProperties": false,
                      "properties": {
                        "amount": {
                          "anyOf": [
                            {
                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "unit": "currency"
                        },
                        "currency": {
                          "anyOf": [
                            {
                              "pattern": "^[A-Z]{3}(?![\\s\\S])",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "amount",
                        "currency"
                      ],
                      "type": "object"
                    },
                    "valued_rows": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "warnings": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "weights": {
                      "enum": [
                        "stated",
                        "rebuilt_from_shares"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "book_key",
                    "role",
                    "symbol",
                    "source",
                    "holdings_date",
                    "rows",
                    "covered_weight",
                    "requested",
                    "resolved",
                    "priced",
                    "modelled",
                    "weights",
                    "valued_rows"
                  ],
                  "selectors": [
                    "book_key"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "factor_model_version": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "failures": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "book": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "entity": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "price",
                        "volume",
                        "classification",
                        "split",
                        "history",
                        "listing",
                        "value",
                        "currency",
                        "unmodelled",
                        "past_unmodelled",
                        "model",
                        "comparator",
                        "fund",
                        "config",
                        "provider",
                        "failed",
                        "measure",
                        "method",
                        "coverage",
                        "weights",
                        "residual"
                      ],
                      "type": "string"
                    },
                    "missing": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "reason_code": {
                      "type": "string"
                    },
                    "section": {
                      "type": "string"
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "symbol_count": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer",
                      "unit": "count"
                    },
                    "symbol_set": {
                      "enum": [
                        "complete",
                        "unknown"
                      ],
                      "type": "string"
                    },
                    "symbols": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "weight": {
                      "anyOf": [
                        {
                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "unit": "fraction"
                    }
                  },
                  "required": [
                    "reason"
                  ],
                  "selectors": [
                    "entity"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "sources": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "books",
              "sources",
              "failures",
              "factor_model_version"
            ],
            "type": "object"
          },
          "schema_version": {
            "const": 2,
            "type": "number"
          },
          "scope": {
            "additionalProperties": false,
            "properties": {
              "horizons_by_section": {
                "additionalProperties": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "propertyNames": {
                  "enum": [
                    "risk",
                    "trust",
                    "compliance",
                    "performance",
                    "attribution",
                    "factor_pnl",
                    "exposures",
                    "drivers",
                    "changes",
                    "risk_change",
                    "liquidity",
                    "bets",
                    "sizing",
                    "scenarios",
                    "valuation"
                  ],
                  "type": "string"
                },
                "type": "object"
              },
              "parameters": {
                "additionalProperties": {
                  "$ref": "#/components/schemas/Gateway_RiskAnalyticsParameter"
                },
                "propertyNames": {
                  "type": "string"
                },
                "type": "object"
              },
              "section_keys": {
                "items": {
                  "enum": [
                    "risk",
                    "trust",
                    "compliance",
                    "performance",
                    "attribution",
                    "factor_pnl",
                    "exposures",
                    "drivers",
                    "changes",
                    "risk_change",
                    "liquidity",
                    "bets",
                    "sizing",
                    "scenarios",
                    "valuation"
                  ],
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "section_keys",
              "horizons_by_section",
              "parameters"
            ],
            "type": "object"
          },
          "sections": {
            "additionalProperties": false,
            "properties": {
              "attribution": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "dimension": {
                            "type": "string"
                          },
                          "periods": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "active_return": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "allocation": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "buckets": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "allocation": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "bucket": {
                                        "type": "string"
                                      },
                                      "comparator_held": {
                                        "type": "boolean"
                                      },
                                      "comparator_return": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "comparator_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      },
                                      "effect": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "selection": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "subject_held": {
                                        "type": "boolean"
                                      },
                                      "subject_return": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "subject_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      }
                                    },
                                    "required": [
                                      "bucket",
                                      "subject_weight",
                                      "comparator_weight",
                                      "subject_held",
                                      "comparator_held",
                                      "subject_return",
                                      "comparator_return",
                                      "allocation",
                                      "selection",
                                      "effect"
                                    ],
                                    "selectors": [
                                      "bucket"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "comparator": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_key": {
                                      "type": "string"
                                    },
                                    "holdings_date": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "largest_unpriced": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "entity": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "gross_share": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "fraction"
                                            }
                                          },
                                          "required": [
                                            "entity",
                                            "gross_share"
                                          ],
                                          "selectors": [
                                            "entity"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "outside": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "fraction"
                                    },
                                    "rolled_back": {
                                      "type": "boolean"
                                    },
                                    "rolled_days": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "days"
                                    },
                                    "target_date": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "unpriced_share": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "fraction"
                                    },
                                    "weights": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "entity": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "fraction"
                                          }
                                        },
                                        "required": [
                                          "entity",
                                          "weight"
                                        ],
                                        "selectors": [
                                          "entity"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "book_key",
                                    "holdings_date",
                                    "target_date",
                                    "rolled_days",
                                    "rolled_back",
                                    "weights",
                                    "outside",
                                    "unpriced_share",
                                    "largest_unpriced"
                                  ],
                                  "selectors": [
                                    "book_key"
                                  ],
                                  "type": "object"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "comparator_return": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "gap_shape": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "breadth": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "bucket": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "comparator_return": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "median_return": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "names_below": {
                                        "anyOf": [
                                          {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer",
                                            "unit": "count"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "names_held": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer",
                                        "unit": "count"
                                      },
                                      "reference_gap": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "scope": {
                                        "enum": [
                                          "book",
                                          "bucket"
                                        ],
                                        "type": "string"
                                      },
                                      "top_name_count": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer",
                                        "unit": "count"
                                      },
                                      "top_names": {
                                        "items": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "type": "array"
                                      },
                                      "top_names_share": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "scope",
                                      "bucket",
                                      "top_names_share",
                                      "top_names",
                                      "top_name_count",
                                      "contribution",
                                      "reference_gap",
                                      "breadth",
                                      "names_held",
                                      "names_below",
                                      "median_return",
                                      "comparator_return"
                                    ],
                                    "selectors": [
                                      "bucket"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "holdings": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "active_contribution": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "bucket": {
                                        "type": "string"
                                      },
                                      "cash_currency": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "comparator_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      },
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "entity": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "is_cash": {
                                        "type": "boolean"
                                      },
                                      "listed": {
                                        "type": "boolean"
                                      },
                                      "observation_keys": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "return_value": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "subject_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      }
                                    },
                                    "required": [
                                      "entity",
                                      "bucket",
                                      "listed",
                                      "is_cash",
                                      "cash_currency",
                                      "subject_weight",
                                      "comparator_weight",
                                      "return_value",
                                      "contribution",
                                      "active_contribution",
                                      "observation_keys"
                                    ],
                                    "selectors": [
                                      "entity",
                                      "bucket"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "horizon": {
                                  "type": "string"
                                },
                                "money": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "reported_relative": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "residual": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "selection": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "subject": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_key": {
                                      "type": "string"
                                    },
                                    "holdings_date": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "largest_unpriced": {
                                      "anyOf": [
                                        {
                                          "additionalProperties": false,
                                          "properties": {
                                            "entity": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "gross_share": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "fraction"
                                            }
                                          },
                                          "required": [
                                            "entity",
                                            "gross_share"
                                          ],
                                          "selectors": [
                                            "entity"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "outside": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "fraction"
                                    },
                                    "rolled_back": {
                                      "type": "boolean"
                                    },
                                    "rolled_days": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "days"
                                    },
                                    "target_date": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "unpriced_share": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "fraction"
                                    },
                                    "weights": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "entity": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          },
                                          "weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "fraction"
                                          }
                                        },
                                        "required": [
                                          "entity",
                                          "weight"
                                        ],
                                        "selectors": [
                                          "entity"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "book_key",
                                    "holdings_date",
                                    "target_date",
                                    "rolled_days",
                                    "rolled_back",
                                    "weights",
                                    "outside",
                                    "unpriced_share",
                                    "largest_unpriced"
                                  ],
                                  "selectors": [
                                    "book_key"
                                  ],
                                  "type": "object"
                                },
                                "subject_return": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "unclassified_effect": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "horizon",
                                "subject",
                                "comparator",
                                "money",
                                "subject_return",
                                "comparator_return",
                                "active_return",
                                "reported_relative",
                                "residual",
                                "allocation",
                                "selection",
                                "unclassified_effect",
                                "holdings",
                                "buckets",
                                "gap_shape"
                              ],
                              "selectors": [
                                "comparator_key",
                                "horizon",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "price_observations": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "actual_from": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "actual_to": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "basis": {
                                  "enum": [
                                    "observed",
                                    "held_at_zero",
                                    "cash_zero",
                                    "unavailable"
                                  ],
                                  "type": "string"
                                },
                                "book_key": {
                                  "type": "string"
                                },
                                "entity": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "period_key": {
                                  "type": "string"
                                },
                                "return_value": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "entity",
                                "book_key",
                                "period_key",
                                "actual_from",
                                "actual_to",
                                "return_value",
                                "basis"
                              ],
                              "selectors": [
                                "entity",
                                "book_key"
                              ],
                              "type": "object"
                            },
                            "keySelector": "observation_key",
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          }
                        },
                        "required": [
                          "dimension",
                          "periods",
                          "price_observations"
                        ],
                        "selectors": [
                          "dimension"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "bets": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "blocks": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "shares": {
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "pct"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "shares"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "carriers": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "entity",
                                "share"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "incidental_factors": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "intended_factors": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "intended_groups": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "intent": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "hedge_benefit": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "hedged_tracking_error": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "incidental_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "intended_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "tracking_error": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "intended_share",
                                "incidental_share",
                                "tracking_error",
                                "hedged_tracking_error",
                                "hedge_benefit"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "style_tilts": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "exposure": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "entity",
                                "exposure",
                                "share"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "intended_groups",
                          "intended_factors",
                          "incidental_factors",
                          "blocks",
                          "intent",
                          "style_tilts",
                          "carriers"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "changes": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "days_since_new_book": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "days"
                          },
                          "exposure_deltas": {
                            "anyOf": [
                              {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "bucket": {
                                      "type": "string"
                                    },
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "delta": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pts"
                                    },
                                    "dimension": {
                                      "type": "string"
                                    },
                                    "horizon_days": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "days"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "horizon_days",
                                    "dimension",
                                    "bucket",
                                    "delta"
                                  ],
                                  "selectors": [
                                    "bucket",
                                    "dimension",
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "holdings_date": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "moves": {
                            "anyOf": [
                              {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "after": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "before": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "closed": {
                                      "type": "boolean"
                                    },
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "entity": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "move": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pts"
                                    },
                                    "opened": {
                                      "type": "boolean"
                                    },
                                    "price_drift": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pts"
                                    },
                                    "traded": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pts"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "entity",
                                    "before",
                                    "after",
                                    "move",
                                    "traded",
                                    "price_drift",
                                    "opened",
                                    "closed"
                                  ],
                                  "selectors": [
                                    "entity",
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "previous_holdings_date": {
                            "anyOf": [
                              {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "holdings_date",
                          "previous_holdings_date",
                          "moves",
                          "exposure_deltas",
                          "days_since_new_book"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "compliance": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "concentration": {
                            "additionalProperties": false,
                            "properties": {
                              "cash_pct": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "illiquid_share": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "largest_issuer_position": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "largest": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "positions": {
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "keySelector": "issuer",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "securities": {
                                        "additionalProperties": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "trim_to_limit": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      }
                                    },
                                    "required": [
                                      "largest",
                                      "positions",
                                      "securities",
                                      "trim_to_limit"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "weight_in_positions_above_5pct": {
                                "anyOf": [
                                  {
                                    "additionalProperties": false,
                                    "properties": {
                                      "holdings_without_issuer": {
                                        "items": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "entity": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "weight": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            }
                                          },
                                          "required": [
                                            "entity",
                                            "weight"
                                          ],
                                          "selectors": [
                                            "entity"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "lower_bound": {
                                        "type": "boolean"
                                      },
                                      "positions": {
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "keySelector": "issuer",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "securities": {
                                        "additionalProperties": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "share": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "trim_to_limit": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "issuers_cut_to_5pct": {
                                                "items": {
                                                  "type": "string"
                                                },
                                                "type": "array"
                                              },
                                              "points": {
                                                "anyOf": [
                                                  {
                                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "unit": "pts"
                                              },
                                              "points_from_rest": {
                                                "anyOf": [
                                                  {
                                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ],
                                                "unit": "pts"
                                              }
                                            },
                                            "required": [
                                              "points",
                                              "issuers_cut_to_5pct",
                                              "points_from_rest"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "share",
                                      "lower_bound",
                                      "positions",
                                      "securities",
                                      "holdings_without_issuer",
                                      "trim_to_limit"
                                    ],
                                    "type": "object"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "cash_pct",
                              "weight_in_positions_above_5pct",
                              "largest_issuer_position",
                              "illiquid_share"
                            ],
                            "type": "object"
                          },
                          "rules": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "bucket": {
                                  "anyOf": [
                                    {
                                      "pattern": "^(?:book|security|factor|bucket|scenario|custom):.+$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "comparator_key": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "coverage": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "fraction"
                                },
                                "currency": {
                                  "anyOf": [
                                    {
                                      "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "entity": {
                                  "anyOf": [
                                    {
                                      "pattern": "^(?:book|security|factor|bucket|scenario|custom):.+$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "issue_ids": {
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "lower": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unitSource": "unit"
                                },
                                "measured": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unitSource": "unit"
                                },
                                "metric_path": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "outcome": {
                                  "enum": [
                                    "pass",
                                    "warning",
                                    "breach",
                                    "unavailable",
                                    "not_applicable"
                                  ],
                                  "type": "string"
                                },
                                "parameters": {
                                  "additionalProperties": {
                                    "$ref": "#/components/schemas/Gateway_RiskAnalyticsParameter"
                                  },
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "precision": {
                                  "enum": [
                                    "calculation",
                                    "legacy_rounded",
                                    "mixed"
                                  ],
                                  "type": "string"
                                },
                                "rule_key": {
                                  "enum": [
                                    "relative_weight_sector",
                                    "relative_weight_country",
                                    "relative_weight_single_name",
                                    "relative_weight_custom_group",
                                    "cash_pct",
                                    "irs_5pct_bucket_pct",
                                    "single_issuer_pct",
                                    "illiquid_days",
                                    "tracking_error_budget",
                                    "metric_limit"
                                  ],
                                  "type": "string"
                                },
                                "source_artifact_ids": {
                                  "items": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "unit": {
                                  "enum": [
                                    "fraction",
                                    "pct",
                                    "pts",
                                    "ratio",
                                    "days",
                                    "currency",
                                    "count"
                                  ],
                                  "type": "string"
                                },
                                "upper": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unitSource": "unit"
                                },
                                "warning_lower": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unitSource": "unit"
                                },
                                "warning_upper": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unitSource": "unit"
                                }
                              },
                              "required": [
                                "rule_key",
                                "metric_path",
                                "comparator_key",
                                "entity",
                                "bucket",
                                "parameters",
                                "unit",
                                "currency",
                                "measured",
                                "lower",
                                "upper",
                                "warning_lower",
                                "warning_upper",
                                "outcome",
                                "coverage",
                                "issue_ids"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "rules",
                          "concentration"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "drivers": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "cleaning": {
                            "additionalProperties": false,
                            "properties": {
                              "days_left": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "count"
                              },
                              "fit_quality": {
                                "additionalProperties": false,
                                "properties": {
                                  "by_entity": {
                                    "additionalProperties": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "ratio"
                                    },
                                    "keySelector": "entity",
                                    "propertyNames": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "lower_decile": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "ratio"
                                  },
                                  "median": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "ratio"
                                  },
                                  "upper_decile": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "ratio"
                                  }
                                },
                                "required": [
                                  "median",
                                  "lower_decile",
                                  "upper_decile",
                                  "by_entity"
                                ],
                                "type": "object"
                              },
                              "names_cleaned": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "count"
                              },
                              "regressors_per_name": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "count"
                              }
                            },
                            "required": [
                              "names_cleaned",
                              "regressors_per_name",
                              "days_left",
                              "fit_quality"
                            ],
                            "type": "object"
                          },
                          "drivers": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "active_weight": {
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "pts"
                                  },
                                  "keySelector": "comparator_key",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "eigenvalue": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "factor_carriers": {
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "ratio"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "factor_fit": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "factor_regressors": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer",
                                  "unit": "count"
                                },
                                "fund_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "gross_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "mean_residual_correlation": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "member_weights": {
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "pct"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "members": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "persistent": {
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                },
                                "residual_variance_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "seen_by_half": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "first": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    },
                                    "second": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "first",
                                    "second"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "context",
                                "members",
                                "member_weights",
                                "fund_weight",
                                "gross_weight",
                                "active_weight",
                                "eigenvalue",
                                "mean_residual_correlation",
                                "residual_variance_share",
                                "persistent",
                                "seen_by_half",
                                "factor_fit",
                                "factor_regressors",
                                "factor_carriers"
                              ],
                              "selectors": [
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "eigenvalues": {
                            "additionalProperties": false,
                            "properties": {
                              "above_driver_threshold": {
                                "items": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "type": "array"
                              },
                              "above_edge": {
                                "items": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "type": "array"
                              },
                              "days": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "count"
                              },
                              "days_read_at": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "count"
                              },
                              "driver_threshold": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "ratio"
                              },
                              "names": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "count"
                              },
                              "noise_edge": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "ratio"
                              },
                              "spectrum": {
                                "items": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "names",
                              "days",
                              "days_read_at",
                              "noise_edge",
                              "driver_threshold",
                              "above_edge",
                              "above_driver_threshold",
                              "spectrum"
                            ],
                            "type": "object"
                          },
                          "missed_risk": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "difference": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "model_tracking_error": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "with_drivers_tracking_error": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "model_tracking_error",
                                "with_drivers_tracking_error",
                                "difference"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "residual_factor_content": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "ratio"
                          },
                          "shared_moves_the_factors_explain": {
                            "additionalProperties": false,
                            "properties": {
                              "count": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "count"
                              },
                              "drivers": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "active_weight": {
                                      "additionalProperties": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "keySelector": "comparator_key",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "eigenvalue": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "ratio"
                                    },
                                    "factor_carriers": {
                                      "additionalProperties": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "keySelector": "entity",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "factor_fit": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "ratio"
                                    },
                                    "factor_regressors": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "count"
                                    },
                                    "fund_weight": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "gross_weight": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "mean_residual_correlation": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "ratio"
                                    },
                                    "member_weights": {
                                      "additionalProperties": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "keySelector": "entity",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "members": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "persistent": {
                                      "type": [
                                        "boolean",
                                        "null"
                                      ]
                                    },
                                    "residual_variance_share": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "seen_by_half": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "first": {
                                          "type": [
                                            "boolean",
                                            "null"
                                          ]
                                        },
                                        "second": {
                                          "type": [
                                            "boolean",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "first",
                                        "second"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "members",
                                    "member_weights",
                                    "fund_weight",
                                    "gross_weight",
                                    "active_weight",
                                    "eigenvalue",
                                    "mean_residual_correlation",
                                    "residual_variance_share",
                                    "persistent",
                                    "seen_by_half",
                                    "factor_fit",
                                    "factor_regressors",
                                    "factor_carriers"
                                  ],
                                  "selectors": [
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "count",
                              "drivers"
                            ],
                            "type": "object"
                          },
                          "universe": {
                            "additionalProperties": false,
                            "properties": {
                              "active_weight_below_cut": {
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "keySelector": "comparator_key",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "names_below_cut": {
                                "additionalProperties": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "keySelector": "comparator_key",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "names_in_panel": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "count"
                              },
                              "names_left_out_for_history": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "names_left_out_for_panel_shape": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "panel_names": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "panel_shape": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "ratio"
                              },
                              "weight_left_out_for_history": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "weight_left_out_for_panel_shape": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              }
                            },
                            "required": [
                              "names_in_panel",
                              "panel_names",
                              "names_left_out_for_history",
                              "names_left_out_for_panel_shape",
                              "names_below_cut",
                              "weight_left_out_for_history",
                              "weight_left_out_for_panel_shape",
                              "panel_shape",
                              "active_weight_below_cut"
                            ],
                            "type": "object"
                          },
                          "window": {
                            "additionalProperties": false,
                            "properties": {
                              "asked_for_days": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "days"
                              },
                              "end": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "minimum_days_per_name": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "days"
                              },
                              "start": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "trading_days": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "days"
                              }
                            },
                            "required": [
                              "start",
                              "end",
                              "trading_days",
                              "asked_for_days",
                              "minimum_days_per_name"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "window",
                          "universe",
                          "cleaning",
                          "residual_factor_content",
                          "eigenvalues",
                          "drivers",
                          "shared_moves_the_factors_explain",
                          "missed_risk"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "exposures": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "dimensions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "buckets": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "active_weights": {
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pts"
                                        },
                                        "keySelector": "comparator_key",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "bucket": {
                                        "type": "string"
                                      },
                                      "comparator_sides": {
                                        "additionalProperties": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "gross_weight": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "long_weight": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "short_weight": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            }
                                          },
                                          "required": [
                                            "long_weight",
                                            "short_weight",
                                            "gross_weight"
                                          ],
                                          "type": "object"
                                        },
                                        "keySelector": "comparator_key",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "comparator_weights": {
                                        "additionalProperties": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "keySelector": "comparator_key",
                                        "propertyNames": {
                                          "type": "string"
                                        },
                                        "type": "object"
                                      },
                                      "subject_sides": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "gross_weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "pct"
                                          },
                                          "long_weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "pct"
                                          },
                                          "short_weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "pct"
                                          }
                                        },
                                        "required": [
                                          "long_weight",
                                          "short_weight",
                                          "gross_weight"
                                        ],
                                        "type": "object"
                                      },
                                      "subject_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "bucket",
                                      "subject_weight",
                                      "comparator_weights",
                                      "active_weights",
                                      "subject_sides",
                                      "comparator_sides"
                                    ],
                                    "selectors": [
                                      "bucket"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "dimension": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "context",
                                "dimension",
                                "buckets"
                              ],
                              "selectors": [
                                "dimension",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "holdings": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "asset_type": {
                                  "enum": [
                                    "equity",
                                    "fund",
                                    "cash",
                                    "bond",
                                    "derivative",
                                    "balance",
                                    "direct",
                                    "other"
                                  ],
                                  "type": "string"
                                },
                                "book_key": {
                                  "type": "string"
                                },
                                "classification_as_of": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "comparator_key": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "country": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "currency": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "market_cap": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amount": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "currency"
                                    },
                                    "currency": {
                                      "anyOf": [
                                        {
                                          "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ],
                                  "type": "object"
                                },
                                "sector": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "book_key",
                                "comparator_key",
                                "entity",
                                "weight",
                                "asset_type",
                                "sector",
                                "country",
                                "currency",
                                "market_cap",
                                "classification_as_of"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "book_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "overlap": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "active_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "comparator_names": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "count"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "fund_names": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "count"
                                },
                                "names_in_common": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "count"
                                },
                                "weight_in_common": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "active_share",
                                "weight_in_common",
                                "names_in_common",
                                "fund_names",
                                "comparator_names"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "positions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparisons": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "active_positions_eligible": {
                                        "type": "boolean"
                                      },
                                      "active_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "comparator_key": {
                                        "type": "string"
                                      },
                                      "comparator_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "comparator_key",
                                      "comparator_weight",
                                      "active_weight",
                                      "active_positions_eligible"
                                    ],
                                    "selectors": [
                                      "comparator_key",
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "is_cash": {
                                  "type": "boolean"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "native_part": {
                                  "type": "string"
                                },
                                "position": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "subject_present": {
                                  "type": "boolean"
                                },
                                "subject_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "top_holdings_eligible": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "context",
                                "position",
                                "native_part",
                                "label",
                                "is_cash",
                                "subject_weight",
                                "subject_present",
                                "top_holdings_eligible",
                                "comparisons"
                              ],
                              "selectors": [
                                "position",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "dimensions",
                          "holdings",
                          "overlap"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "factor_pnl": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "periods": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "blocks": {
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "pts"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "coverage": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "covered_gap": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "ends_on": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "factor_total": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "factors": {
                                  "additionalProperties": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "active_exposure": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "block": {
                                        "type": "string"
                                      },
                                      "contribution": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "factor_return": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "block",
                                      "active_exposure",
                                      "factor_return",
                                      "contribution"
                                    ],
                                    "type": "object"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "gap_source": {
                                  "enum": [
                                    "attribution",
                                    "own_roll"
                                  ],
                                  "type": "string"
                                },
                                "horizon": {
                                  "type": "string"
                                },
                                "loadings_date": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "realised_gap": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "reported_gap": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "stock_selection": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "uncovered_names": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "unexplained": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "unpriced_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "weight_roll_days": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer",
                                  "unit": "days"
                                },
                                "window": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "base": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "end": {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    "factor_return_days": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "days"
                                    }
                                  },
                                  "required": [
                                    "base",
                                    "end",
                                    "factor_return_days"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "horizon",
                                "window",
                                "loadings_date",
                                "realised_gap",
                                "reported_gap",
                                "factor_total",
                                "uncovered_names",
                                "covered_gap",
                                "stock_selection",
                                "unexplained",
                                "ends_on",
                                "gap_source",
                                "blocks",
                                "weight_roll_days",
                                "unpriced_weight",
                                "coverage",
                                "factors"
                              ],
                              "selectors": [
                                "comparator_key",
                                "horizon",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "periods"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "liquidity": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "aum_scenarios": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "fund_size": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amount": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "currency"
                                    },
                                    "currency": {
                                      "anyOf": [
                                        {
                                          "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ],
                                  "type": "object"
                                },
                                "key": {
                                  "type": "string"
                                },
                                "profile": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "covered_weight": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "days_to_sell_95pct": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "days"
                                    },
                                    "sellable_within": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "horizon_days": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "days"
                                          },
                                          "share": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "pct"
                                          }
                                        },
                                        "required": [
                                          "horizon_days",
                                          "share"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "weighted_days": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "days"
                                    }
                                  },
                                  "required": [
                                    "weighted_days",
                                    "days_to_sell_95pct",
                                    "covered_weight",
                                    "sellable_within"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "key",
                                "fund_size",
                                "profile"
                              ],
                              "selectors": [
                                "key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "book": {
                            "additionalProperties": false,
                            "properties": {
                              "covered_weight": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "days_to_sell_95pct": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "days"
                              },
                              "sellable_within": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "horizon_days": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "days"
                                    },
                                    "share": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "horizon_days",
                                    "share"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "weighted_days": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "days"
                              }
                            },
                            "required": [
                              "weighted_days",
                              "days_to_sell_95pct",
                              "covered_weight",
                              "sellable_within"
                            ],
                            "type": "object"
                          },
                          "capacity": {
                            "additionalProperties": false,
                            "properties": {
                              "fund_size": {
                                "additionalProperties": false,
                                "properties": {
                                  "amount": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "currency"
                                  },
                                  "currency": {
                                    "anyOf": [
                                      {
                                        "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "amount",
                                  "currency"
                                ],
                                "type": "object"
                              },
                              "horizon_days": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "days"
                              },
                              "sellable_share": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              }
                            },
                            "required": [
                              "fund_size",
                              "sellable_share",
                              "horizon_days"
                            ],
                            "type": "object"
                          },
                          "covered_weight": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "pct"
                          },
                          "holdings": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "average_daily_value": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amount": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "currency"
                                    },
                                    "currency": {
                                      "anyOf": [
                                        {
                                          "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ],
                                  "type": "object"
                                },
                                "days_to_sell": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "days"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "last_traded": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "observations": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "count"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "position_value": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "amount": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "currency"
                                    },
                                    "currency": {
                                      "anyOf": [
                                        {
                                          "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "amount",
                                    "currency"
                                  ],
                                  "type": "object"
                                },
                                "weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "entity",
                                "weight",
                                "position_value",
                                "average_daily_value",
                                "observations",
                                "last_traded",
                                "days_to_sell"
                              ],
                              "selectors": [
                                "entity"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "participation": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "pct"
                          },
                          "window": {
                            "additionalProperties": false,
                            "properties": {
                              "end": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "month_rule": {
                                "enum": [
                                  "rounded_gregorian_days",
                                  "latest_trading_observations"
                                ],
                                "type": "string"
                              },
                              "months": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "count"
                              },
                              "start": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "trading_days": {
                                "anyOf": [
                                  {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer",
                                    "unit": "days"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "start",
                              "end",
                              "months",
                              "trading_days",
                              "month_rule"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "window",
                          "participation",
                          "covered_weight",
                          "book",
                          "capacity",
                          "aum_scenarios",
                          "holdings"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "performance": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "comparators": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "horizon": {
                                  "type": "string"
                                },
                                "observation": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "value"
                                  ],
                                  "selectors": [
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "relative": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                }
                              },
                              "required": [
                                "comparator_key",
                                "horizon",
                                "observation",
                                "relative"
                              ],
                              "selectors": [
                                "comparator_key",
                                "horizon"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "inception": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "last_close": {
                            "format": "date",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                            "type": "string"
                          },
                          "peers": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "count": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer",
                                  "unit": "count"
                                },
                                "horizon": {
                                  "type": "string"
                                },
                                "population": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "comparator_key": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "entity": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "comparator_key",
                                      "entity"
                                    ],
                                    "selectors": [
                                      "comparator_key",
                                      "entity"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "quartile": {
                                  "anyOf": [
                                    {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "count"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "rank": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer",
                                  "unit": "count"
                                },
                                "returns": {
                                  "additionalProperties": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "value": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "value"
                                    ],
                                    "selectors": [
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "keySelector": "comparator_key",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "subject_return": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "value"
                                  ],
                                  "selectors": [
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "context",
                                "horizon",
                                "rank",
                                "count",
                                "quartile",
                                "subject_return",
                                "returns",
                                "population"
                              ],
                              "selectors": [
                                "horizon",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "quarters": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "value"
                                  ],
                                  "selectors": [
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "quarter_end": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "relative": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "subject": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "value"
                                  ],
                                  "selectors": [
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "quarter_end",
                                "subject",
                                "comparator",
                                "relative"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "subject": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "horizon": {
                                  "type": "string"
                                },
                                "observation": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "value": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "value"
                                  ],
                                  "selectors": [
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "horizon",
                                "observation"
                              ],
                              "selectors": [
                                "horizon"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "inception",
                          "last_close",
                          "subject",
                          "comparators",
                          "quarters",
                          "peers"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "risk": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "active": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "beta": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "realised_beta": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "realised_beta_window_days": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer",
                                  "unit": "days"
                                },
                                "tracking_error": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "tracking_error",
                                "beta",
                                "realised_beta",
                                "realised_beta_window_days"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "factor_contributions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "marginal": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "risk_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "entity",
                                "risk_share",
                                "marginal"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "headline": {
                            "additionalProperties": false,
                            "properties": {
                              "cash_weight": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "context": {
                                "additionalProperties": false,
                                "properties": {
                                  "book_keys": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "method_key": {
                                    "type": "string"
                                  },
                                  "model_keys": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "period_key": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "period_key",
                                  "book_keys",
                                  "model_keys",
                                  "method_key"
                                ],
                                "type": "object"
                              },
                              "exposures": {
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "keySelector": "entity",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "factor_risk": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "modelled_weight": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "specific_risk": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              },
                              "total_risk": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "pct"
                              }
                            },
                            "required": [
                              "context",
                              "total_risk",
                              "factor_risk",
                              "specific_risk",
                              "modelled_weight",
                              "cash_weight",
                              "exposures"
                            ],
                            "selectors": [
                              "context.period_key"
                            ],
                            "type": "object"
                          },
                          "holding_contributions": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "marginal": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "risk_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "entity",
                                "risk_share",
                                "marginal"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "modelled_names": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer",
                            "unit": "count"
                          },
                          "tracking_error_history": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "as_of": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "model": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "precision": {
                                  "enum": [
                                    "calculation",
                                    "legacy_rounded",
                                    "mixed"
                                  ],
                                  "type": "string"
                                },
                                "source_artifact_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "value": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "as_of",
                                "source_artifact_id",
                                "model",
                                "value",
                                "precision"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "modelled_names",
                          "headline",
                          "active",
                          "factor_contributions",
                          "holding_contributions",
                          "tracking_error_history"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "risk_change": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "comparators": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "change": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "movers": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "comparator_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      },
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "drifted_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      },
                                      "effect": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "entity": {
                                        "type": "string"
                                      },
                                      "fund_weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      },
                                      "marginal": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "traded": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      },
                                      "weight_now": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "fraction"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "entity",
                                      "drifted_weight",
                                      "weight_now",
                                      "fund_weight",
                                      "comparator_weight",
                                      "traded",
                                      "marginal",
                                      "effect"
                                    ],
                                    "selectors": [
                                      "entity",
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "price_drift": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "risk_model": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "steps_total": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "tracking_error_drifted": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "tracking_error_end": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "tracking_error_start": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "tracking_error_traded": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "traded_names": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer",
                                  "unit": "count"
                                },
                                "trades": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "tracking_error_start",
                                "tracking_error_drifted",
                                "tracking_error_traded",
                                "tracking_error_end",
                                "price_drift",
                                "trades",
                                "risk_model",
                                "steps_total",
                                "change",
                                "traded_names",
                                "movers"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "model_versions": {
                            "additionalProperties": false,
                            "properties": {
                              "end": {
                                "type": "string"
                              },
                              "start": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "start",
                              "end"
                            ],
                            "type": "object"
                          },
                          "window": {
                            "additionalProperties": false,
                            "properties": {
                              "end": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              },
                              "start": {
                                "format": "date",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "start",
                              "end"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "window",
                          "model_versions",
                          "comparators"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "scenarios": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "price_observations": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "actual_from": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "actual_to": {
                                  "anyOf": [
                                    {
                                      "format": "date",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "basis": {
                                  "enum": [
                                    "observed",
                                    "held_at_zero",
                                    "cash_zero",
                                    "unavailable"
                                  ],
                                  "type": "string"
                                },
                                "book_key": {
                                  "type": "string"
                                },
                                "entity": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "period_key": {
                                  "type": "string"
                                },
                                "return_value": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "entity",
                                "book_key",
                                "period_key",
                                "actual_from",
                                "actual_to",
                                "return_value",
                                "basis"
                              ],
                              "selectors": [
                                "entity",
                                "book_key"
                              ],
                              "type": "object"
                            },
                            "keySelector": "observation_key",
                            "propertyNames": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "replays": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "books": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "book_key": {
                                        "type": "string"
                                      },
                                      "comparator_key": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "coverage": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "covered_gross_weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "fraction"
                                          },
                                          "share": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "fraction"
                                          },
                                          "total_gross_weight": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "fraction"
                                          }
                                        },
                                        "required": [
                                          "covered_gross_weight",
                                          "total_gross_weight",
                                          "share"
                                        ],
                                        "type": "object"
                                      },
                                      "observation_keys": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "return_value": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "book_key",
                                      "comparator_key",
                                      "return_value",
                                      "coverage",
                                      "observation_keys"
                                    ],
                                    "selectors": [
                                      "comparator_key",
                                      "book_key",
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "drawn_from": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "end": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "fund": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "origin": {
                                  "type": "string"
                                },
                                "outcomes": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "comparator": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "comparator_key": {
                                        "type": "string"
                                      },
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "difference": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "fund": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "comparator_key",
                                      "fund",
                                      "comparator",
                                      "difference"
                                    ],
                                    "selectors": [
                                      "comparator_key",
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "start": {
                                  "format": "date",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "context",
                                "entity",
                                "origin",
                                "start",
                                "end",
                                "drawn_from",
                                "fund",
                                "outcomes",
                                "books"
                              ],
                              "selectors": [
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "shocks": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "benchmark": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "bet_against": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "comparator_keys": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "factors": {
                                  "additionalProperties": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ],
                                    "unit": "pct"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "fund": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "modelled_fund": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "origin": {
                                  "type": "string"
                                },
                                "outcomes": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "comparator": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "comparator_key": {
                                        "type": "string"
                                      },
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "difference": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "fund": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "modelled_comparator": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "comparator_key",
                                      "fund",
                                      "comparator",
                                      "difference",
                                      "modelled_comparator"
                                    ],
                                    "selectors": [
                                      "comparator_key",
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "context",
                                "entity",
                                "origin",
                                "factors",
                                "comparator_keys",
                                "bet_against",
                                "benchmark",
                                "fund",
                                "modelled_fund",
                                "outcomes"
                              ],
                              "selectors": [
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "worst": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "blocks": {
                                  "additionalProperties": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "points": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pts"
                                      },
                                      "share": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "points",
                                      "share"
                                    ],
                                    "type": "object"
                                  },
                                  "keySelector": "entity",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "scenario": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "scenario",
                                "blocks"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "shocks",
                          "replays",
                          "worst",
                          "price_observations"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "sizing": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "concentration": {
                            "additionalProperties": false,
                            "properties": {
                              "comparators": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "active_names": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "count"
                                    },
                                    "comparator_key": {
                                      "type": "string"
                                    },
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "effective_bets": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "count"
                                    },
                                    "effective_names": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "count"
                                    },
                                    "top_names_risk_share": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "comparator_key",
                                    "effective_bets",
                                    "effective_names",
                                    "active_names",
                                    "top_names_risk_share"
                                  ],
                                  "selectors": [
                                    "comparator_key",
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "effective_names_fund": {
                                "anyOf": [
                                  {
                                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "unit": "count"
                              },
                              "modelled_books": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_key": {
                                      "type": "string"
                                    },
                                    "comparator_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    },
                                    "context": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "book_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "method_key": {
                                          "type": "string"
                                        },
                                        "model_keys": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "period_key": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "period_key",
                                        "book_keys",
                                        "model_keys",
                                        "method_key"
                                      ],
                                      "type": "object"
                                    },
                                    "modelled_names": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer",
                                      "unit": "count"
                                    },
                                    "modelled_weight": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "context",
                                    "book_key",
                                    "comparator_key",
                                    "modelled_names",
                                    "modelled_weight"
                                  ],
                                  "selectors": [
                                    "comparator_key",
                                    "book_key",
                                    "context.period_key"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "top_names_count": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer",
                                "unit": "count"
                              }
                            },
                            "required": [
                              "effective_names_fund",
                              "comparators",
                              "top_names_count",
                              "modelled_books"
                            ],
                            "type": "object"
                          },
                          "holdings": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "active_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "risk_against_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "risk_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "specific_volatility": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "weight_share": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "entity",
                                "active_weight",
                                "specific_volatility",
                                "risk_share",
                                "weight_share",
                                "risk_against_weight"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "concentration",
                          "holdings"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "trust": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "comparators": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "bias": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "assessment": {
                                          "enum": [
                                            "below",
                                            "within",
                                            "above"
                                          ],
                                          "type": "string"
                                        },
                                        "band_high": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "band_low": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "context": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "book_keys": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "method_key": {
                                              "type": "string"
                                            },
                                            "model_keys": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "period_key": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "period_key",
                                            "book_keys",
                                            "model_keys",
                                            "method_key"
                                          ],
                                          "type": "object"
                                        },
                                        "count": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer",
                                          "unit": "count"
                                        },
                                        "from_date": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        },
                                        "statistic": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "to_date": {
                                          "format": "date",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "context",
                                        "statistic",
                                        "band_low",
                                        "band_high",
                                        "count",
                                        "assessment",
                                        "from_date",
                                        "to_date"
                                      ],
                                      "selectors": [
                                        "context.period_key"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "ex_ante": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "assessment": {
                                          "enum": [
                                            "below",
                                            "within",
                                            "above"
                                          ],
                                          "type": "string"
                                        },
                                        "band_high": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "band_low": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "context": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "book_keys": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "method_key": {
                                              "type": "string"
                                            },
                                            "model_keys": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "period_key": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "period_key",
                                            "book_keys",
                                            "model_keys",
                                            "method_key"
                                          ],
                                          "type": "object"
                                        },
                                        "forecast": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "realised": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "statistic": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "window_days": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer",
                                          "unit": "days"
                                        }
                                      },
                                      "required": [
                                        "context",
                                        "window_days",
                                        "forecast",
                                        "realised",
                                        "statistic",
                                        "band_low",
                                        "band_high",
                                        "assessment"
                                      ],
                                      "selectors": [
                                        "context.period_key"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "forecast_now_pct": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "path": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "band_high": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "band_low": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        },
                                        "context": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "book_keys": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "method_key": {
                                              "type": "string"
                                            },
                                            "model_keys": {
                                              "items": {
                                                "type": "string"
                                              },
                                              "type": "array"
                                            },
                                            "period_key": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            }
                                          },
                                          "required": [
                                            "period_key",
                                            "book_keys",
                                            "model_keys",
                                            "method_key"
                                          ],
                                          "type": "object"
                                        },
                                        "count": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer",
                                          "unit": "count"
                                        },
                                        "reverts": {
                                          "type": "boolean"
                                        },
                                        "statistic": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        }
                                      },
                                      "required": [
                                        "context",
                                        "statistic",
                                        "band_low",
                                        "band_high",
                                        "count",
                                        "reverts"
                                      ],
                                      "selectors": [
                                        "context.period_key"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "points": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "date": {
                                        "format": "date",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                        "type": "string"
                                      },
                                      "forecast": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "realised": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "realised_tracking_error": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "realised_tracking_error_context": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "book_keys": {
                                                "items": {
                                                  "type": "string"
                                                },
                                                "type": "array"
                                              },
                                              "method_key": {
                                                "type": "string"
                                              },
                                              "model_keys": {
                                                "items": {
                                                  "type": "string"
                                                },
                                                "type": "array"
                                              },
                                              "period_key": {
                                                "type": [
                                                  "string",
                                                  "null"
                                                ]
                                              }
                                            },
                                            "required": [
                                              "period_key",
                                              "book_keys",
                                              "model_keys",
                                              "method_key"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "rolled": {
                                        "type": "boolean"
                                      },
                                      "standardised": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "standardised_by_path": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "stretch_tracking_error": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "trading_days": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer",
                                        "unit": "days"
                                      },
                                      "until": {
                                        "anyOf": [
                                          {
                                            "format": "date",
                                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "date",
                                      "forecast",
                                      "rolled",
                                      "until",
                                      "trading_days",
                                      "realised",
                                      "stretch_tracking_error",
                                      "realised_tracking_error",
                                      "realised_tracking_error_context",
                                      "standardised",
                                      "standardised_by_path"
                                    ],
                                    "selectors": [
                                      "date",
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "realised_now": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "context": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "book_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "method_key": {
                                            "type": "string"
                                          },
                                          "model_keys": {
                                            "items": {
                                              "type": "string"
                                            },
                                            "type": "array"
                                          },
                                          "period_key": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "period_key",
                                          "book_keys",
                                          "model_keys",
                                          "method_key"
                                        ],
                                        "type": "object"
                                      },
                                      "value": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "window_days": {
                                        "maximum": 9007199254740991,
                                        "minimum": 0,
                                        "type": "integer",
                                        "unit": "days"
                                      }
                                    },
                                    "required": [
                                      "context",
                                      "window_days",
                                      "value"
                                    ],
                                    "selectors": [
                                      "context.period_key"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "bias",
                                "path",
                                "forecast_now_pct",
                                "realised_now",
                                "ex_ante",
                                "points"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "minimum_points": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer",
                            "unit": "count"
                          }
                        },
                        "required": [
                          "minimum_points",
                          "comparators"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              },
              "valuation": {
                "additionalProperties": false,
                "properties": {
                  "context": {
                    "additionalProperties": false,
                    "properties": {
                      "book_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "method_key": {
                        "type": "string"
                      },
                      "model_keys": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "period_key": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "period_key",
                      "book_keys",
                      "model_keys",
                      "method_key"
                    ],
                    "type": "object"
                  },
                  "data": {
                    "anyOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "books": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "book_key": {
                                  "type": "string"
                                },
                                "comparator_key": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "earnings_coverage": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "earnings_yield": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "holdings": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "currency": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "current_year_earnings_yield": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "dividend_yield": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "ebitda_yield": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "enterprise_value_ratio": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "entity": {
                                        "type": "string"
                                      },
                                      "ev_to_ebitda": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "forward_earnings_yield": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "forward_pe": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "input_dates": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "fiscal": {
                                            "anyOf": [
                                              {
                                                "format": "date",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "price": {
                                            "anyOf": [
                                              {
                                                "format": "date",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "snapshot": {
                                            "anyOf": [
                                              {
                                                "format": "date",
                                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "snapshot",
                                          "fiscal",
                                          "price"
                                        ],
                                        "type": "object"
                                      },
                                      "market_cap": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "amount": {
                                            "anyOf": [
                                              {
                                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ],
                                            "unit": "currency"
                                          },
                                          "currency": {
                                            "anyOf": [
                                              {
                                                "pattern": "^[A-Z]{3}(?![\\s\\S])",
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "amount",
                                          "currency"
                                        ],
                                        "type": "object"
                                      },
                                      "net_debt_ratio": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "price_to_sales": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "sales_yield": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "trailing_earnings_yield": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      },
                                      "trailing_pe": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "ratio"
                                      },
                                      "weight": {
                                        "anyOf": [
                                          {
                                            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ],
                                        "unit": "pct"
                                      }
                                    },
                                    "required": [
                                      "entity",
                                      "weight",
                                      "currency",
                                      "market_cap",
                                      "trailing_pe",
                                      "forward_pe",
                                      "price_to_sales",
                                      "ev_to_ebitda",
                                      "trailing_earnings_yield",
                                      "forward_earnings_yield",
                                      "current_year_earnings_yield",
                                      "sales_yield",
                                      "dividend_yield",
                                      "ebitda_yield",
                                      "enterprise_value_ratio",
                                      "net_debt_ratio",
                                      "input_dates"
                                    ],
                                    "selectors": [
                                      "entity"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "measures": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "dividend_yield": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "ev_ebitda": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "expected_eps_growth": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "forward_pe": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "net_debt_ebitda": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "price_to_sales": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    },
                                    "trailing_pe": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "coverage": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "pct"
                                        },
                                        "reason": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "value": {
                                          "anyOf": [
                                            {
                                              "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ],
                                          "unit": "ratio"
                                        }
                                      },
                                      "required": [
                                        "value",
                                        "coverage",
                                        "reason"
                                      ],
                                      "type": "object"
                                    }
                                  },
                                  "required": [
                                    "forward_pe",
                                    "trailing_pe",
                                    "ev_ebitda",
                                    "price_to_sales",
                                    "dividend_yield",
                                    "expected_eps_growth",
                                    "net_debt_ebitda"
                                  ],
                                  "type": "object"
                                },
                                "net_dividend_yield": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "net_exposure": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "short_measures": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "dividend_yield": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        },
                                        "ev_ebitda": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "ratio"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        },
                                        "expected_eps_growth": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        },
                                        "forward_pe": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "ratio"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        },
                                        "net_debt_ebitda": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "ratio"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        },
                                        "price_to_sales": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "ratio"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        },
                                        "trailing_pe": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "coverage": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "pct"
                                            },
                                            "reason": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "value": {
                                              "anyOf": [
                                                {
                                                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ],
                                              "unit": "ratio"
                                            }
                                          },
                                          "required": [
                                            "value",
                                            "coverage",
                                            "reason"
                                          ],
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "forward_pe",
                                        "trailing_pe",
                                        "ev_ebitda",
                                        "price_to_sales",
                                        "dividend_yield",
                                        "expected_eps_growth",
                                        "net_debt_ebitda"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "context",
                                "book_key",
                                "comparator_key",
                                "earnings_yield",
                                "earnings_coverage",
                                "net_dividend_yield",
                                "net_exposure",
                                "measures",
                                "short_measures",
                                "holdings"
                              ],
                              "selectors": [
                                "comparator_key",
                                "book_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "comparisons": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "differences": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "dividend_yield": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pts"
                                    },
                                    "expected_eps_growth": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pts"
                                    },
                                    "net_debt_ebitda": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "ratio"
                                    }
                                  },
                                  "required": [
                                    "dividend_yield",
                                    "expected_eps_growth",
                                    "net_debt_ebitda"
                                  ],
                                  "type": "object"
                                },
                                "premiums": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "ev_ebitda": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "forward_pe": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "price_to_sales": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    },
                                    "trailing_pe": {
                                      "anyOf": [
                                        {
                                          "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                          "type": "string"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "unit": "pct"
                                    }
                                  },
                                  "required": [
                                    "forward_pe",
                                    "trailing_pe",
                                    "ev_ebitda",
                                    "price_to_sales"
                                  ],
                                  "type": "object"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "premiums",
                                "differences"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "coverage_floor": {
                            "anyOf": [
                              {
                                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "unit": "pct"
                          },
                          "earnings_basis": {
                            "enum": [
                              "forward",
                              "trailing"
                            ],
                            "type": "string"
                          },
                          "exposure_effects": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "names": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "sectors": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "sectors",
                                "names"
                              ],
                              "selectors": [
                                "comparator_key",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "names": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "comparator_key": {
                                  "type": "string"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "contribution": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "earnings_yield": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "entity": {
                                  "type": "string"
                                },
                                "pe": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "entity",
                                "weight",
                                "earnings_yield",
                                "pe",
                                "contribution"
                              ],
                              "selectors": [
                                "comparator_key",
                                "entity",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "sector_comparisons": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "bucket": {
                                  "type": "string"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "comparator_multiple": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "premium": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "subject_multiple": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "ratio"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "bucket",
                                "subject_multiple",
                                "comparator_multiple",
                                "premium"
                              ],
                              "selectors": [
                                "comparator_key",
                                "bucket",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "sectors": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "bucket": {
                                  "type": "string"
                                },
                                "comparator_held": {
                                  "type": "boolean"
                                },
                                "comparator_key": {
                                  "type": "string"
                                },
                                "comparator_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "comparator_yield": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "context": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "book_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "method_key": {
                                      "type": "string"
                                    },
                                    "model_keys": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "period_key": {
                                      "type": [
                                        "string",
                                        "null"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "period_key",
                                    "book_keys",
                                    "model_keys",
                                    "method_key"
                                  ],
                                  "type": "object"
                                },
                                "effect": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "names_effect": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                },
                                "subject_held": {
                                  "type": "boolean"
                                },
                                "subject_weight": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "subject_yield": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pct"
                                },
                                "weights_effect": {
                                  "anyOf": [
                                    {
                                      "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?![\\s\\S])",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "unit": "pts"
                                }
                              },
                              "required": [
                                "context",
                                "comparator_key",
                                "bucket",
                                "subject_weight",
                                "comparator_weight",
                                "subject_yield",
                                "comparator_yield",
                                "subject_held",
                                "comparator_held",
                                "weights_effect",
                                "names_effect",
                                "effect"
                              ],
                              "selectors": [
                                "comparator_key",
                                "bucket",
                                "context.period_key"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "earnings_basis",
                          "coverage_floor",
                          "books",
                          "sectors",
                          "names",
                          "exposure_effects",
                          "comparisons",
                          "sector_comparisons"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "enum": [
                      "ok",
                      "partial",
                      "unavailable"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "status",
                  "context",
                  "data"
                ],
                "selectors": [
                  "context.period_key"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "status": {
            "enum": [
              "ok",
              "partial"
            ],
            "type": "string"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "schema_version",
          "artifact_id",
          "as_of",
          "computed_at",
          "status",
          "subject",
          "comparators",
          "entities",
          "scope",
          "periods",
          "models",
          "methods",
          "books",
          "receipts",
          "sections",
          "metric_changes",
          "issues"
        ],
        "type": "object"
      },
      "Gateway_RiskRunComponent": {
        "additionalProperties": false,
        "properties": {
          "artifact_id": {
            "minLength": 1,
            "type": "string"
          },
          "as_of": {
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "bases": {
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "basis_id": {
                  "minLength": 1,
                  "type": "string"
                },
                "calculation_definition": {
                  "enum": [
                    "daily_line_contribution.v1",
                    "start_book_centered.v1"
                  ],
                  "type": "string"
                },
                "calendar": {
                  "minLength": 1,
                  "type": "string"
                },
                "common_from": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "common_to": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "comparator": {
                  "minLength": 1,
                  "type": "string"
                },
                "comparator_from": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "comparator_path": {
                  "additionalProperties": false,
                  "properties": {
                    "books": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "book_id": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "effective_close": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "holdings_date": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "lines_digest": {
                            "pattern": "^sha256:[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "weight_basis": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "book_id",
                          "holdings_date",
                          "effective_close",
                          "weight_basis",
                          "lines_digest"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "off_session_quotes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "first_session": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "last_session": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "quote_date": {
                            "anyOf": [
                              {
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "quote_date",
                          "first_session",
                          "last_session"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "opening": {
                      "additionalProperties": false,
                      "properties": {
                        "assumption": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "availability_evidence": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "book_id": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "holdings_date": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "kind": {
                          "enum": [
                            "observed",
                            "reconstructed"
                          ],
                          "type": "string"
                        },
                        "knowledge_cutoff": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "mapped_close": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "nearest_after": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "nearest_before": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "roll_days": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "roll_direction": {
                          "enum": [
                            "none",
                            "forward",
                            "backward"
                          ],
                          "type": "string"
                        },
                        "selection_reason": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "target_close": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "book_id",
                        "holdings_date",
                        "mapped_close",
                        "target_close",
                        "knowledge_cutoff",
                        "roll_days",
                        "roll_direction",
                        "selection_reason",
                        "nearest_before",
                        "nearest_after",
                        "availability_evidence",
                        "assumption"
                      ],
                      "type": "object"
                    },
                    "unavailable_resets": {
                      "anyOf": [
                        {
                          "items": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "opening",
                    "books",
                    "off_session_quotes",
                    "unavailable_resets"
                  ],
                  "type": "object"
                },
                "comparator_symbol": {
                  "minLength": 1,
                  "type": "string"
                },
                "comparator_to": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "currency": {
                  "type": "string"
                },
                "first_session": {
                  "anyOf": [
                    {
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "gap_policy": {
                  "minLength": 1,
                  "type": "string"
                },
                "gap_summary": {
                  "additionalProperties": false,
                  "properties": {
                    "comparator": {
                      "additionalProperties": false,
                      "properties": {
                        "average_weight": {
                          "anyOf": [
                            {
                              "pattern": "^-?\\d+(\\.\\d+)?$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "gap_days": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "names": {
                          "items": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "weight_reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "gap_days",
                        "names",
                        "average_weight",
                        "weight_reason"
                      ],
                      "type": "object"
                    },
                    "subject": {
                      "additionalProperties": false,
                      "properties": {
                        "average_weight": {
                          "anyOf": [
                            {
                              "pattern": "^-?\\d+(\\.\\d+)?$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "gap_days": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "names": {
                          "items": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "weight_reason": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "gap_days",
                        "names",
                        "average_weight",
                        "weight_reason"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "subject",
                    "comparator"
                  ],
                  "type": "object"
                },
                "horizon": {
                  "anyOf": [
                    {
                      "enum": [
                        "1d",
                        "5d",
                        "2w",
                        "mtd",
                        "qtd",
                        "ytd",
                        "1y",
                        "si"
                      ],
                      "type": "string"
                    },
                    {
                      "pattern": "^[1-9]\\d*d$",
                      "type": "string"
                    }
                  ]
                },
                "issues": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "price_policy": {
                  "minLength": 1,
                  "type": "string"
                },
                "quality": {
                  "enum": [
                    "full",
                    "partial",
                    "unavailable"
                  ],
                  "type": "string"
                },
                "requested_from": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "requested_to": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "reset_policy": {
                  "minLength": 1,
                  "type": "string"
                },
                "session_count": {
                  "maximum": 9007199254740991,
                  "minimum": 0,
                  "type": "integer"
                },
                "subject": {
                  "minLength": 1,
                  "type": "string"
                },
                "subject_from": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "subject_path": {
                  "additionalProperties": false,
                  "properties": {
                    "books": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "book_id": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "effective_close": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "holdings_date": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "lines_digest": {
                            "pattern": "^sha256:[0-9a-f]{64}$",
                            "type": "string"
                          },
                          "weight_basis": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "book_id",
                          "holdings_date",
                          "effective_close",
                          "weight_basis",
                          "lines_digest"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "off_session_quotes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "first_session": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "last_session": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "quote_date": {
                            "anyOf": [
                              {
                                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "name",
                          "quote_date",
                          "first_session",
                          "last_session"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "opening": {
                      "additionalProperties": false,
                      "properties": {
                        "assumption": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "availability_evidence": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "book_id": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "holdings_date": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "kind": {
                          "enum": [
                            "observed",
                            "reconstructed"
                          ],
                          "type": "string"
                        },
                        "knowledge_cutoff": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "mapped_close": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "nearest_after": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "nearest_before": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "roll_days": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "roll_direction": {
                          "enum": [
                            "none",
                            "forward",
                            "backward"
                          ],
                          "type": "string"
                        },
                        "selection_reason": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "target_close": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "book_id",
                        "holdings_date",
                        "mapped_close",
                        "target_close",
                        "knowledge_cutoff",
                        "roll_days",
                        "roll_direction",
                        "selection_reason",
                        "nearest_before",
                        "nearest_after",
                        "availability_evidence",
                        "assumption"
                      ],
                      "type": "object"
                    },
                    "unavailable_resets": {
                      "anyOf": [
                        {
                          "items": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "opening",
                    "books",
                    "off_session_quotes",
                    "unavailable_resets"
                  ],
                  "type": "object"
                },
                "subject_to": {
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                }
              },
              "required": [
                "basis_id",
                "calculation_definition",
                "subject",
                "comparator",
                "comparator_symbol",
                "currency",
                "horizon",
                "requested_from",
                "requested_to",
                "subject_from",
                "subject_to",
                "comparator_from",
                "comparator_to",
                "common_from",
                "common_to",
                "calendar",
                "session_count",
                "first_session",
                "price_policy",
                "gap_policy",
                "reset_policy",
                "quality",
                "issues",
                "subject_path",
                "comparator_path"
              ],
              "type": "object"
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "comparators": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "minLength": 1,
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "role": {
                  "enum": [
                    "benchmark",
                    "peer",
                    "beta_reference"
                  ],
                  "type": "string"
                },
                "symbol": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "key",
                "role",
                "label",
                "symbol"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "groups": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "minLength": 1,
                  "type": "string"
                },
                "note": {
                  "type": "string"
                },
                "title": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "key",
                "title"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "insights": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "cites": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "metric_key": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "section": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "section",
                      "metric_key"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "id": {
                  "minLength": 1,
                  "type": "string"
                },
                "rationale": {
                  "type": "string"
                },
                "severity": {
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ],
                  "type": "string"
                },
                "status": {
                  "enum": [
                    "new",
                    "ongoing",
                    "resolved"
                  ],
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "title": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "severity",
                "status",
                "summary",
                "cites"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "receipt": {
            "additionalProperties": false,
            "properties": {
              "books": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "covered_weight": {
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "type": "string"
                    },
                    "exposure_unknown_reason": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "fund_total_notes": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "holdings_date": {
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "note": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "symbol": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "symbol",
                          "holdings_date",
                          "note"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "holdings_date": {
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                      "type": "string"
                    },
                    "holdings_date_inferred": {
                      "const": true,
                      "type": "boolean"
                    },
                    "portfolio_value_usd": {
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "type": "string"
                    },
                    "role": {
                      "enum": [
                        "subject",
                        "benchmark_basket",
                        "peer"
                      ],
                      "type": "string"
                    },
                    "rows": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "source": {
                      "enum": [
                        "provider:fmp",
                        "provider:eodhd",
                        "filing:nport",
                        "upload",
                        "portfolio",
                        "what_if"
                      ],
                      "type": "string"
                    },
                    "symbol": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "total_basis": {
                      "enum": [
                        "source_total",
                        "valued_sum",
                        "inferred_from_valued_share"
                      ],
                      "type": "string"
                    },
                    "total_note": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "total_value": {
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "type": "string"
                    },
                    "unresolved_rows": {
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991,
                      "type": "integer"
                    },
                    "valued_rows": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "warning_counts": {
                      "additionalProperties": {
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991,
                        "type": "integer"
                      },
                      "propertyNames": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "warnings": {
                      "items": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "weight_divergence": {
                      "pattern": "^-?\\d+(\\.\\d+)?$",
                      "type": "string"
                    },
                    "weights": {
                      "enum": [
                        "stated",
                        "rebuilt_from_shares"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "role",
                    "symbol",
                    "source",
                    "holdings_date",
                    "rows",
                    "covered_weight"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "comparators_without_books": {
                "items": {
                  "minLength": 1,
                  "type": "string"
                },
                "type": "array"
              },
              "coverage": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "book": {
                      "type": "string"
                    },
                    "names": {
                      "maximum": 9007199254740991,
                      "minimum": -9007199254740991,
                      "type": "integer"
                    },
                    "reason_code": {
                      "type": "string"
                    },
                    "weight": {
                      "anyOf": [
                        {
                          "pattern": "^-?\\d+(\\.\\d+)?$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "book",
                    "reason_code",
                    "names",
                    "weight"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "dropped_peers": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "reason": {
                      "type": "string"
                    },
                    "symbol": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "symbol",
                    "reason"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "sections_not_configured": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "sections_unavailable": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "unresolved_rows": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "books",
              "unresolved_rows",
              "sections_unavailable"
            ],
            "type": "object"
          },
          "result_id": {
            "minLength": 1,
            "type": "string"
          },
          "schema_version": {
            "anyOf": [
              {
                "const": 1,
                "type": "number"
              },
              {
                "const": 2,
                "type": "number"
              }
            ]
          },
          "sections": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "folded": {
                  "type": "boolean"
                },
                "group": {
                  "minLength": 1,
                  "type": "string"
                },
                "headline": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "label": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "metric_key": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "metric_key"
                    ],
                    "type": "object"
                  },
                  "maxItems": 3,
                  "minItems": 1,
                  "type": "array"
                },
                "key": {
                  "minLength": 1,
                  "type": "string"
                },
                "note": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "status": {
                  "enum": [
                    "ok",
                    "partial",
                    "unavailable",
                    "not_configured"
                  ],
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "views": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "about": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "basis": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "key": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "kind": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "pivot": {
                        "enum": [
                          "comparator",
                          "horizon"
                        ],
                        "type": "string"
                      },
                      "plot_id": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "rows": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "basis_id": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "change": {
                              "additionalProperties": false,
                              "properties": {
                                "current_from": {
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "type": "string"
                                },
                                "current_to": {
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "type": "string"
                                },
                                "horizon": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "prior_from": {
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "type": "string"
                                },
                                "prior_to": {
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "type": "string"
                                },
                                "value": {
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "type": "string"
                                },
                                "zscore": {
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "horizon",
                                "value"
                              ],
                              "type": "object"
                            },
                            "comparator": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "currency": {
                              "pattern": "^[A-Z]{3}$",
                              "type": "string"
                            },
                            "detail": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "basis_id": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "comparator": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "currency": {
                                    "pattern": "^[A-Z]{3}$",
                                    "type": "string"
                                  },
                                  "from": {
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  },
                                  "measure": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "term": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "to": {
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "type": "string"
                                  },
                                  "unit": {
                                    "enum": [
                                      "pct",
                                      "pts",
                                      "ratio",
                                      "days",
                                      "currency",
                                      "count"
                                    ],
                                    "type": "string"
                                  },
                                  "value": {
                                    "anyOf": [
                                      {
                                        "pattern": "^-?\\d+(\\.\\d+)?$",
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "label",
                                  "value",
                                  "unit"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "from": {
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "type": "string"
                            },
                            "group": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "horizon": {
                              "anyOf": [
                                {
                                  "enum": [
                                    "1d",
                                    "5d",
                                    "2w",
                                    "mtd",
                                    "qtd",
                                    "ytd",
                                    "1y",
                                    "si"
                                  ],
                                  "type": "string"
                                },
                                {
                                  "pattern": "^[1-9]\\d*d$",
                                  "type": "string"
                                }
                              ]
                            },
                            "horizon_label": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "measure": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "metric_key": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "role": {
                              "enum": [
                                "start",
                                "step",
                                "end"
                              ],
                              "type": "string"
                            },
                            "series": {
                              "items": {
                                "items": false,
                                "maxItems": 2,
                                "minItems": 2,
                                "prefixItems": [
                                  {
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "type": "string"
                                  },
                                  {
                                    "pattern": "^-?\\d+(\\.\\d+)?$",
                                    "type": "string"
                                  }
                                ],
                                "type": "array"
                              },
                              "type": "array"
                            },
                            "term": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "thresholds": {
                              "additionalProperties": false,
                              "properties": {
                                "amber": {
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "type": "string"
                                },
                                "direction": {
                                  "enum": [
                                    "above",
                                    "below",
                                    "outside"
                                  ],
                                  "type": "string"
                                },
                                "red": {
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "type": "string"
                                },
                                "source": {
                                  "enum": [
                                    "config",
                                    "agent"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "direction",
                                "amber",
                                "red",
                                "source"
                              ],
                              "type": "object"
                            },
                            "to": {
                              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                              "type": "string"
                            },
                            "unit": {
                              "enum": [
                                "pct",
                                "pts",
                                "ratio",
                                "days",
                                "currency",
                                "count"
                              ],
                              "type": "string"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "pattern": "^-?\\d+(\\.\\d+)?$",
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "metric_key",
                            "label",
                            "value",
                            "unit"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "title": {
                        "type": "string"
                      },
                      "truncated": {
                        "additionalProperties": false,
                        "properties": {
                          "shown": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "total": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "shown",
                          "total"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "key",
                      "kind",
                      "rows"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "key",
                "title",
                "status",
                "folded",
                "views"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "subject": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string"
              },
              "portfolio_id": {
                "minLength": 1,
                "type": "string"
              },
              "symbol": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "portfolio_id",
              "symbol",
              "name"
            ],
            "type": "object"
          },
          "summary": {
            "type": "string"
          },
          "terms": {
            "additionalProperties": {
              "additionalProperties": false,
              "properties": {
                "formula": {
                  "minLength": 1,
                  "type": "string"
                },
                "means": {
                  "minLength": 1,
                  "type": "string"
                },
                "name": {
                  "minLength": 1,
                  "type": "string"
                },
                "worked_out": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "name",
                "means"
              ],
              "type": "object"
            },
            "propertyNames": {
              "minLength": 1,
              "type": "string"
            },
            "type": "object"
          },
          "tool": {
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "const": "engine_artifact",
            "type": "string"
          }
        },
        "required": [
          "type",
          "tool",
          "schema_version",
          "artifact_id",
          "as_of",
          "subject",
          "comparators",
          "insights",
          "sections",
          "receipt"
        ],
        "type": "object"
      },
      "Gateway_RiskRunError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "flag": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "Gateway_RiskRunFaultDetails": {
        "additionalProperties": false,
        "description": "Safe failure class and publication date when known; null when unavailable.",
        "properties": {
          "exception_type": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "publication_date": {
            "anyOf": [
              {
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "exception_type",
          "publication_date"
        ],
        "type": "object"
      },
      "Gateway_RiskRunProgress": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "at_most_seconds": {
                "description": "The most the run will wait; it measures what it has then.",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "expected_seconds": {
                "description": "About how long the wait takes: 2 seconds a name, never more than at_most_seconds.",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "names_asked": {
                "description": "How many names the run asked the factor model to score.",
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "stage": {
                "const": "waiting_for_coverage",
                "type": "string"
              },
              "waited_seconds": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "stage",
              "names_asked",
              "waited_seconds",
              "expected_seconds",
              "at_most_seconds"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "stage": {
                "const": "measuring",
                "type": "string"
              }
            },
            "required": [
              "stage"
            ],
            "type": "object"
          }
        ]
      },
      "Gateway_RiskRunStart": {
        "additionalProperties": false,
        "properties": {
          "request": {
            "additionalProperties": false,
            "properties": {
              "analyses": {
                "description": "What to compute; defaults to both. \"risk\" computes risk, risk change, bets, sizing, scenarios, drivers, trust, exposures, liquidity and valuation; \"performance\" computes performance, attribution and factor P&L. A run skips the factor and price reads its sections do not use, and lists the others as not_requested.",
                "items": {
                  "enum": [
                    "risk",
                    "performance"
                  ],
                  "type": "string"
                },
                "minItems": 1,
                "type": "array",
                "uniqueItems": true
              },
              "benchmark": {
                "description": "An index or a fund to measure against, such as SPY.US.",
                "maxLength": 32,
                "minLength": 1,
                "type": "string"
              },
              "include_forecast_quality": {
                "description": "Defaults to false. Set true to include forecast-quality validation and its historical factor snapshots. Current risk, attribution, risk change and scenarios remain included either way.",
                "type": "boolean"
              },
              "peers": {
                "default": [],
                "description": "0 to 10 peer funds, such as PAVE.US. A peer with no holdings book is left out of the run and named in its view.",
                "items": {
                  "maxLength": 32,
                  "minLength": 1,
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "portfolio": {
                "anyOf": [
                  {
                    "additionalProperties": false,
                    "properties": {
                      "portfolio_id": {
                        "description": "A saved portfolio the user owns.",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "portfolio_id"
                    ],
                    "type": "object"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "holdings": {
                        "description": "A what-if: 1 to 3000 holdings. With a CASH line the weights add to 1, within 0.01. Without one, the rest of the book is cash; a book that borrows lists CASH below zero. Nothing is saved.",
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "symbol": {
                              "description": "Ticker symbol such as NVDA.US; a bare ticker means its US listing. CASH is US dollars.",
                              "maxLength": 32,
                              "minLength": 1,
                              "type": "string"
                            },
                            "weight": {
                              "description": "Fraction of the portfolio's net assets, so 0.25 is 25%. A short is below zero, and CASH holds what its sale raised.",
                              "type": "number"
                            }
                          },
                          "required": [
                            "symbol",
                            "weight"
                          ],
                          "type": "object"
                        },
                        "maxItems": 3000,
                        "minItems": 1,
                        "type": "array"
                      }
                    },
                    "required": [
                      "holdings"
                    ],
                    "type": "object"
                  }
                ],
                "description": "The book to measure: a saved portfolio, or holdings for a what-if."
              }
            },
            "required": [
              "portfolio",
              "benchmark"
            ],
            "type": "object"
          },
          "request_key": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "request_key",
          "request"
        ],
        "type": "object"
      },
      "Gateway_RiskRunSummary": {
        "additionalProperties": false,
        "properties": {
          "against": {
            "description": "The benchmark, then the peers the run measured.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "as_of": {
            "description": "Market date of the figures, YYYY-MM-DD.",
            "type": "string"
          },
          "key_figures": {
            "additionalProperties": {
              "type": [
                "string",
                "number"
              ]
            },
            "description": "At most 20 figures: what was measured, then each section's headline figures as the panel labels them. A figure the engine could not compute reads \"n/a\".",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "notes": {
            "description": "Sentences on what the run left out: the full figures when they were too large to keep, then sections, peers and names.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reason": {
            "description": "Set only for a partial run: what it did not compute.",
            "type": "string"
          },
          "status": {
            "enum": [
              "ok",
              "partial"
            ],
            "type": "string"
          },
          "subject": {
            "description": "The portfolio's name, or its symbol for a what-if.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "as_of",
          "subject",
          "against",
          "key_figures",
          "notes"
        ],
        "type": "object"
      },
      "Gateway_RiskRunView": {
        "additionalProperties": false,
        "properties": {
          "artifact_omission": {
            "additionalProperties": false,
            "properties": {
              "limit_bytes": {
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "type": "integer"
              },
              "reason": {
                "const": "too_large",
                "type": "string"
              },
              "size_bytes": {
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "type": "integer"
              }
            },
            "required": [
              "reason",
              "size_bytes",
              "limit_bytes"
            ],
            "type": "object"
          },
          "as_of": {
            "description": "Market date of the figures, YYYY-MM-DD.",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string"
          },
          "benchmark": {
            "minLength": 1,
            "type": "string"
          },
          "coverage": {
            "description": "Every current gap in subject, benchmark and peers, with signed book weight and reason. A null weight means the holding could not be valued. Absent when the request left out risk, which alone reads the current model, and on runs stored before the full list existed. Performance sections name the gaps of the models they measure on themselves.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "book": {
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "reason_code": {
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "weight": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "book",
                "symbol",
                "weight",
                "reason_code",
                "reason"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "dropped_peers": {
            "description": "Peers left out because no holdings book could be had.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "reason": {
                  "type": "string"
                },
                "symbol": {
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "symbol",
                "reason"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "exposure": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "gross_weight": {
                    "minimum": 0,
                    "type": "number"
                  },
                  "long_weight": {
                    "minimum": 0,
                    "type": "number"
                  },
                  "net_weight": {
                    "type": "number"
                  },
                  "short_weight": {
                    "maximum": 0,
                    "type": "number"
                  }
                },
                "required": [
                  "long_weight",
                  "short_weight",
                  "gross_weight",
                  "net_weight"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The book's long, short (at or below 0), gross and net weight of its net assets, cash left out; null for a saved portfolio measured through its one fund."
          },
          "missing_by_design": {
            "description": "Sections intentionally omitted or unavailable by design: sections of an analysis the request left out (reason not_requested); sections the request did not set up (status not_configured, for example compliance with no limits); trust when include_forecast_quality is false; compliance (no limits) and changes (no earlier runs) always; performance and risk change without stored history; liquidity for a what-if.",
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "type": "array"
          },
          "missing_sections": {
            "description": "Sections this kind of run could have computed but did not. Any makes the run partial.",
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "type": "array"
          },
          "modelled_weight": {
            "anyOf": [
              {
                "maximum": 1,
                "minimum": 0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Share of the portfolio's gross weight the factor model covers, from 0 to 1, or null when risk was not measured."
          },
          "peers": {
            "description": "The peers the run measured.",
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "type": "array"
          },
          "sections": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "minLength": 1,
                  "type": "string"
                },
                "reason": {
                  "type": "string"
                },
                "status": {
                  "enum": [
                    "ok",
                    "partial",
                    "unavailable",
                    "not_configured"
                  ],
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "key",
                "title",
                "status"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "subject": {
            "additionalProperties": false,
            "properties": {
              "kind": {
                "enum": [
                  "portfolio",
                  "what_if"
                ],
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "symbol": {
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "kind",
              "name",
              "symbol"
            ],
            "type": "object"
          },
          "unmodelled": {
            "description": "Holdings the factor model does not cover, heaviest first (at most 20), with unknown weights last. A null weight means the holding could not be valued. Risk figures leave them out. Empty when the request left out risk.",
            "items": {
              "additionalProperties": false,
              "properties": {
                "symbol": {
                  "minLength": 1,
                  "type": "string"
                },
                "weight": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "symbol",
                "weight"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "unmodelled_count": {
            "anyOf": [
              {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many holdings the factor model does not cover, or null when the request left out risk: only risk reads the current model."
          }
        },
        "required": [
          "as_of",
          "subject",
          "benchmark",
          "peers",
          "dropped_peers",
          "sections",
          "missing_sections",
          "missing_by_design",
          "unmodelled",
          "unmodelled_count",
          "modelled_weight",
          "exposure"
        ],
        "type": "object"
      },
      "Gateway_startRiskMeasureResponse": {
        "additionalProperties": false,
        "properties": {
          "dates_total": {
            "maximum": 60,
            "minimum": 1,
            "type": "integer"
          },
          "joined_existing_measure": {
            "type": "boolean"
          },
          "measure_id": {
            "pattern": "^measure-[0-9a-f]{32}$",
            "type": "string"
          },
          "status": {
            "description": "running for a new measure; a joined one gives its own status.",
            "enum": [
              "running",
              "ok",
              "failed"
            ],
            "type": "string"
          }
        },
        "required": [
          "measure_id",
          "status",
          "joined_existing_measure",
          "dates_total"
        ],
        "type": "object"
      },
      "Gateway_startRiskRunResponse": {
        "additionalProperties": false,
        "properties": {
          "joined_existing_run": {
            "type": "boolean"
          },
          "run_id": {
            "pattern": "^[0-9a-f]{32}$",
            "type": "string"
          },
          "status": {
            "enum": [
              "running",
              "ok",
              "partial",
              "failed"
            ],
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "status",
          "joined_existing_run"
        ],
        "type": "object"
      },
      "GoPaperRequest": {
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "HistoricalHolding": {
        "properties": {
          "price_usd": {
            "description": "Decimal string; null when the snapshot had no usable price, currency or exchange rate for this open line.",
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "snapshot_at": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "unrealized_pnl_pct": {
            "type": [
              "string",
              "null"
            ]
          },
          "unrealized_pnl_usd": {
            "type": [
              "string",
              "null"
            ]
          },
          "valuation_unavailable_reason": {
            "description": "Why the snapshot could not value its open lines; null when every line was valued.",
            "type": [
              "string",
              "null"
            ]
          },
          "value_usd": {
            "description": "Decimal string; null when the snapshot could not value this open line.",
            "type": [
              "string",
              "null"
            ]
          },
          "weight": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "symbol",
          "quantity",
          "price_usd",
          "value_usd",
          "valuation_unavailable_reason",
          "weight",
          "unrealized_pnl_usd",
          "unrealized_pnl_pct",
          "snapshot_at"
        ],
        "type": "object"
      },
      "Holding": {
        "properties": {
          "companyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "cost_basis": {
            "description": "Decimal string",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "current_price_usd": {
            "type": [
              "string",
              "null"
            ]
          },
          "current_value_usd": {
            "type": [
              "string",
              "null"
            ]
          },
          "fx_rate_to_usd": {
            "type": [
              "string",
              "null"
            ]
          },
          "holding_id": {
            "format": "uuid",
            "type": "string"
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          },
          "price_updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "Decimal string",
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "unrealized_pnl": {
            "type": [
              "string",
              "null"
            ]
          },
          "unrealized_pnl_pct": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "holding_id",
          "portfolio_id",
          "symbol",
          "quantity",
          "cost_basis",
          "currency",
          "updated_at",
          "current_price_usd",
          "current_value_usd",
          "fx_rate_to_usd",
          "price_updated_at",
          "unrealized_pnl",
          "unrealized_pnl_pct"
        ],
        "type": "object"
      },
      "HoldingsHistoryResponse": {
        "properties": {
          "asOf": {
            "type": "string"
          },
          "holdings": {
            "items": {
              "$ref": "#/components/schemas/HistoricalHolding"
            },
            "type": "array"
          }
        },
        "required": [
          "holdings",
          "asOf"
        ],
        "type": "object"
      },
      "InstrumentResolveBatchGenericFailureRow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InstrumentResolveGenericFailureResponse"
          },
          {
            "properties": {
              "index": {
                "description": "Position of the row in `items`.",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "index"
            ],
            "type": "object"
          }
        ]
      },
      "InstrumentResolveBatchItem": {
        "additionalProperties": false,
        "properties": {
          "broker_symbol": {
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          },
          "company_name": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "currency": {
            "maxLength": 10,
            "minLength": 1,
            "type": "string"
          },
          "exchange": {
            "description": "Supported Itoflow exchange code such as US or LSE; do not pass a venue name such as NASDAQ.",
            "maxLength": 20,
            "minLength": 1,
            "type": "string"
          },
          "isin": {
            "maxLength": 20,
            "minLength": 1,
            "type": "string"
          },
          "mic": {
            "description": "ISO 10383 market identifier code used as venue evidence, such as XNAS.",
            "maxLength": 10,
            "minLength": 1,
            "type": "string"
          },
          "siq_symbol": {
            "maxLength": 70,
            "minLength": 1,
            "type": "string"
          },
          "ticker": {
            "description": "Ticker on the supplied exchange or MIC. Letters followed by one dot, slash or space and one or two class letters use the dashed listing when it exists (BRK.B, BRK/B or BRK B becomes BRK-B). BRKB is not guessed. Other evidence must agree.",
            "maxLength": 80,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "InstrumentResolveBatchRequest": {
        "additionalProperties": false,
        "properties": {
          "items": {
            "description": "Identifier evidence for each instrument, with the same fields as the `GET /symbols/resolve` query. Rows come back in this order.",
            "example": [
              {
                "exchange": "US",
                "ticker": "AAPL"
              },
              {
                "isin": "US5949181045"
              },
              {
                "mic": "XNAS",
                "ticker": "QQQ"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/InstrumentResolveBatchItem"
            },
            "maxItems": 3000,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "InstrumentResolveBatchResponse": {
        "properties": {
          "results": {
            "description": "One row per item, in request order. A row answers as `GET /symbols/resolve` would, plus `index`; `resolution_unavailable` means send that row again.",
            "items": {
              "$ref": "#/components/schemas/InstrumentResolveBatchRow"
            },
            "type": "array"
          }
        },
        "required": [
          "results"
        ],
        "type": "object"
      },
      "InstrumentResolveBatchRow": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/InstrumentResolveBatchSuccessRow"
          },
          {
            "$ref": "#/components/schemas/InstrumentResolveBatchGenericFailureRow"
          },
          {
            "$ref": "#/components/schemas/InstrumentResolveBatchUnsupportedExchangeRow"
          },
          {
            "$ref": "#/components/schemas/InstrumentResolveBatchUnsupportedMicRow"
          },
          {
            "$ref": "#/components/schemas/InstrumentResolveBatchUnavailableRow"
          }
        ]
      },
      "InstrumentResolveBatchSuccessRow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InstrumentResolveSuccessResponse"
          },
          {
            "properties": {
              "index": {
                "description": "Position of the row in `items`.",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "index"
            ],
            "type": "object"
          }
        ]
      },
      "InstrumentResolveBatchUnavailableRow": {
        "properties": {
          "error": {
            "enum": [
              "resolution_unavailable"
            ],
            "type": "string"
          },
          "index": {
            "description": "Position of the row in `items`.",
            "minimum": 0,
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "enum": [
              false
            ],
            "type": "boolean"
          }
        },
        "required": [
          "error",
          "index",
          "message",
          "ok"
        ],
        "type": "object"
      },
      "InstrumentResolveBatchUnsupportedExchangeRow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InstrumentResolveUnsupportedExchangeResponse"
          },
          {
            "properties": {
              "index": {
                "description": "Position of the row in `items`.",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "index"
            ],
            "type": "object"
          }
        ]
      },
      "InstrumentResolveBatchUnsupportedMicRow": {
        "allOf": [
          {
            "$ref": "#/components/schemas/InstrumentResolveUnsupportedMicResponse"
          },
          {
            "properties": {
              "index": {
                "description": "Position of the row in `items`.",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "index"
            ],
            "type": "object"
          }
        ]
      },
      "InstrumentResolveFailureResponse": {
        "discriminator": {
          "mapping": {
            "canonical_currency_missing": "#/components/schemas/InstrumentResolveGenericFailureResponse",
            "exchange_or_mic_required": "#/components/schemas/InstrumentResolveGenericFailureResponse",
            "identifier_evidence_missing": "#/components/schemas/InstrumentResolveGenericFailureResponse",
            "instrument_identifier_conflict": "#/components/schemas/InstrumentResolveGenericFailureResponse",
            "instrument_identity_unresolved": "#/components/schemas/InstrumentResolveGenericFailureResponse",
            "unsupported_exchange": "#/components/schemas/InstrumentResolveUnsupportedExchangeResponse",
            "unsupported_mic": "#/components/schemas/InstrumentResolveUnsupportedMicResponse"
          },
          "propertyName": "error"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/InstrumentResolveGenericFailureResponse"
          },
          {
            "$ref": "#/components/schemas/InstrumentResolveUnsupportedExchangeResponse"
          },
          {
            "$ref": "#/components/schemas/InstrumentResolveUnsupportedMicResponse"
          }
        ]
      },
      "InstrumentResolveGenericFailureResponse": {
        "properties": {
          "error": {
            "enum": [
              "canonical_currency_missing",
              "exchange_or_mic_required",
              "identifier_evidence_missing",
              "instrument_identifier_conflict",
              "instrument_identity_unresolved"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "missing_evidence": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "ok": {
            "enum": [
              false
            ],
            "type": "boolean"
          }
        },
        "required": [
          "error",
          "message",
          "ok"
        ],
        "type": "object"
      },
      "InstrumentResolveInstrument": {
        "properties": {
          "broker_symbol": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "exchange": {
            "type": "string"
          },
          "isin": {
            "type": "string"
          },
          "mic": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "siq_symbol": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "exchange",
          "name",
          "siq_symbol"
        ],
        "type": "object"
      },
      "InstrumentResolveSuccessResponse": {
        "properties": {
          "instrument": {
            "$ref": "#/components/schemas/InstrumentResolveInstrument"
          },
          "ok": {
            "enum": [
              true
            ],
            "type": "boolean"
          }
        },
        "required": [
          "instrument",
          "ok"
        ],
        "type": "object"
      },
      "InstrumentResolveUnsupportedExchangeResponse": {
        "properties": {
          "error": {
            "enum": [
              "unsupported_exchange"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "enum": [
              false
            ],
            "type": "boolean"
          },
          "supported_exchanges": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "error",
          "message",
          "ok",
          "supported_exchanges"
        ],
        "type": "object"
      },
      "InstrumentResolveUnsupportedMicResponse": {
        "properties": {
          "error": {
            "enum": [
              "unsupported_mic"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "enum": [
              false
            ],
            "type": "boolean"
          },
          "supported_mics": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "error",
          "message",
          "ok",
          "supported_mics"
        ],
        "type": "object"
      },
      "LatestDecision": {
        "properties": {
          "agentNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "decisionType": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "marketOutlook": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasoning": {
            "type": "string"
          },
          "tradeCount": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "decisionType",
          "createdAt",
          "reasoning",
          "marketOutlook",
          "confidence",
          "agentNotes",
          "tradeCount"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "LeaderboardEntry": {
        "properties": {
          "anonymousStrategyName": {
            "type": "string"
          },
          "anonymousUserName": {
            "type": "string"
          },
          "calculatedAt": {
            "type": "string"
          },
          "isCurrentUser": {
            "type": "boolean"
          },
          "leaderboardEntryId": {
            "type": "string"
          },
          "monthlyAlpha": {
            "type": [
              "number",
              "null"
            ]
          },
          "overallReturn": {
            "type": [
              "number",
              "null"
            ]
          },
          "performance": {
            "type": "number"
          },
          "rank": {
            "exclusiveMinimum": 0,
            "type": "integer"
          },
          "weeklyAlpha": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "rank",
          "leaderboardEntryId",
          "anonymousUserName",
          "anonymousStrategyName",
          "isCurrentUser",
          "performance",
          "weeklyAlpha",
          "monthlyAlpha",
          "overallReturn",
          "calculatedAt"
        ],
        "type": "object"
      },
      "LeaderboardResponse": {
        "properties": {
          "champions": {
            "properties": {
              "monthly": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/LeaderboardEntry"
                  },
                  {
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                ]
              },
              "weekly": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/LeaderboardEntry"
                  },
                  {
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                ]
              }
            },
            "required": [
              "weekly",
              "monthly"
            ],
            "type": "object"
          },
          "entries": {
            "items": {
              "$ref": "#/components/schemas/LeaderboardEntry"
            },
            "type": "array"
          },
          "generatedAt": {
            "type": "string"
          },
          "pagination": {
            "properties": {
              "hasNextPage": {
                "type": "boolean"
              },
              "hasPreviousPage": {
                "type": "boolean"
              },
              "page": {
                "exclusiveMinimum": 0,
                "type": "integer"
              },
              "pageSize": {
                "exclusiveMinimum": 0,
                "type": "integer"
              },
              "totalPages": {
                "minimum": 0,
                "type": "integer"
              },
              "totalRankedEntries": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "page",
              "pageSize",
              "totalPages",
              "totalRankedEntries",
              "hasNextPage",
              "hasPreviousPage"
            ],
            "type": "object"
          },
          "period": {
            "enum": [
              "overall",
              "weekly",
              "monthly"
            ],
            "type": "string"
          },
          "viewer": {
            "properties": {
              "anonymousUserName": {
                "type": "string"
              },
              "bestPerformance": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "bestRank": {
                "exclusiveMinimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "bestStrategyName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "totalRankedEntries": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "anonymousUserName",
              "bestRank",
              "totalRankedEntries",
              "bestStrategyName",
              "bestPerformance"
            ],
            "type": "object"
          }
        },
        "required": [
          "period",
          "generatedAt",
          "viewer",
          "pagination",
          "entries",
          "champions"
        ],
        "type": "object"
      },
      "LinkedStrategyRef": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "link_type": {
            "enum": [
              "primary",
              "follower"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "link_type"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "LinkStrategyRequest": {
        "properties": {
          "strategy_id": {
            "description": "Strategy UUID to link",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "strategy_id"
        ],
        "type": "object"
      },
      "LinkStrategyResponse": {
        "properties": {
          "cancelled_pending_trades": {
            "type": "integer"
          },
          "link_type": {
            "enum": [
              "follower",
              "primary"
            ],
            "type": "string"
          },
          "linked_at": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          },
          "previous_strategy_id": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "strategy_id": {
            "format": "uuid",
            "type": "string"
          },
          "strategy_name": {
            "type": "string"
          },
          "sync_status": {
            "type": "string"
          },
          "sync_task_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id",
          "strategy_id",
          "strategy_name",
          "link_type",
          "linked_at",
          "message"
        ],
        "type": "object"
      },
      "LiquidatePortfolioRequest": {
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "LiveBrokerState": {
        "properties": {
          "availableCash": {
            "type": [
              "string",
              "null"
            ]
          },
          "availableCashUsd": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservedCash": {
            "type": [
              "string",
              "null"
            ]
          },
          "reservedCashUsd": {
            "type": [
              "string",
              "null"
            ]
          },
          "snapshotAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalCash": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalCashUsd": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalEquity": {
            "type": [
              "string",
              "null"
            ]
          },
          "totalEquityUsd": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "availableCash",
          "totalEquity",
          "currency",
          "snapshotAt"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "ModelEntitlementUnavailable": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "NestedJsonRecord": {
        "additionalProperties": {
          "$ref": "#/components/schemas/NestedJsonValue"
        },
        "type": "object"
      },
      "NestedJsonScalar": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ]
      },
      "NestedJsonValue": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/NestedJsonScalar"
          },
          {
            "items": {
              "$ref": "#/components/schemas/NestedJsonValueDepth2"
            },
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/NestedJsonValueDepth2"
            },
            "type": "object"
          }
        ]
      },
      "NestedJsonValueDepth1": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/NestedJsonScalar"
          },
          {
            "items": {
              "$ref": "#/components/schemas/NestedJsonScalar"
            },
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/NestedJsonScalar"
            },
            "type": "object"
          }
        ]
      },
      "NestedJsonValueDepth2": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/NestedJsonScalar"
          },
          {
            "items": {
              "$ref": "#/components/schemas/NestedJsonValueDepth1"
            },
            "type": "array"
          },
          {
            "additionalProperties": {
              "$ref": "#/components/schemas/NestedJsonValueDepth1"
            },
            "type": "object"
          }
        ]
      },
      "NewsSearchResponse": {
        "properties": {
          "coverage": {
            "properties": {
              "complete": {
                "description": "True when the reply is final: more judging could not change its rows. With `q`, the search judges candidates from the most important down and stops once the rest could not change its rows. False when the time budget stopped the request first. With `symbols` or `monitor_id`, call again to continue; a `q` search keeps nothing, so call again with fewer `days`.",
                "type": "boolean"
              },
              "judged_from": {
                "description": "With `symbols` or `monitor_id`, the time from which every subject is judged to the end of the window; null when a subject has nothing judged there. With `q`, the start of the window when the reply is final, else null.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "judged_items": {
                "description": "Items the model judged in this request, for every subject. A `q` search can judge far fewer items than it selected, because it stops once the rest could not change its rows.",
                "minimum": 0,
                "type": "integer"
              },
              "searched_from": {
                "description": "The earliest `judged_at` searched.",
                "format": "date-time",
                "type": "string"
              },
              "sources": {
                "description": "The sources Itoflow reads news from.",
                "items": {
                  "enum": [
                    "gdelt",
                    "gdelt_translingual",
                    "sec_edgar"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "stored_through": {
                "description": "Oldest last successful read across the sources; news after it may not be stored yet. Null before the first read.",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "sources",
              "searched_from",
              "complete",
              "stored_through",
              "judged_from",
              "judged_items"
            ],
            "type": "object"
          },
          "items": {
            "description": "With `q`, stories ranked by `match_p` × impact ÷ 3, newest first on ties. With `order=stories`, stories by the UTC day of their first report, then impact, then `published_at`, newest first. With `order=stories_newest`, the same stories by the shown row’s `published_at` descending, then `id` descending. With `q` or either story order, `limit` counts stories. Otherwise, matching items newest first by `published_at`.",
            "items": {
              "properties": {
                "countries": {
                  "description": "Up to three countries the article names, as ISO 3166-1 alpha-2 codes, most named first. Empty for SEC filings and for articles that name no country.",
                  "items": {
                    "pattern": "^[A-Z]{2}$",
                    "type": "string"
                  },
                  "maxItems": 3,
                  "type": "array"
                },
                "id": {
                  "description": "News item ID, shared by every monitor it reaches.",
                  "format": "uuid",
                  "type": "string"
                },
                "impact": {
                  "description": "Expected level for how much the news could move the companies or markets it concerns: 0 none, 1 minor, 2 notable, 3 material.",
                  "maximum": 3,
                  "minimum": 0,
                  "type": "number"
                },
                "is_event_p": {
                  "description": "Probability that the item reports an event rather than commentary.",
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "language": {
                  "description": "BCP 47 tag of the title.",
                  "minLength": 2,
                  "type": "string"
                },
                "level": {
                  "description": "With `symbols` or `monitor_id`, the level of the top matching pair; otherwise the level of `impact`.",
                  "enum": [
                    "minor",
                    "notable",
                    "material"
                  ],
                  "type": "string"
                },
                "match_p": {
                  "description": "With `q`, the model's chance that the item bears on the query. Null without `q`.",
                  "maximum": 1,
                  "minimum": 0,
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "published_at": {
                  "format": "date-time",
                  "type": "string"
                },
                "publisher": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "repeat_of": {
                  "description": "An earlier item that reports the same event.",
                  "format": "uuid",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "repeats": {
                  "description": "With `q`, the number of other matches folded into this story by `repeat_of`. With `order=stories` or `order=stories_newest`, the number of the story's other articles in the period. 0 otherwise.",
                  "minimum": 0,
                  "type": "integer"
                },
                "sec_form": {
                  "description": "The SEC form, such as 8-K, for a filing. Null for news.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sector": {
                  "description": "The sector the article is about: one of the 11 GICS sectors, or `economy` for the economy as a whole. Null when the article has not been sorted.",
                  "enum": [
                    "economy",
                    "energy",
                    "materials",
                    "industrials",
                    "consumer_discretionary",
                    "consumer_staples",
                    "health_care",
                    "financials",
                    "information_technology",
                    "communication_services",
                    "utilities",
                    "real_estate",
                    null
                  ],
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "description": "The source the item came from.",
                  "enum": [
                    "gdelt",
                    "gdelt_translingual",
                    "sec_edgar"
                  ],
                  "type": "string"
                },
                "story_day": {
                  "description": "With `order=stories` or `order=stories_newest`, the UTC day of the story's first report, as YYYY-MM-DD. It can be earlier than the day of `published_at`, which belongs to the story's highest-impact article. Absent otherwise.",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                  "type": "string"
                },
                "symbols": {
                  "description": "The item's pairs that matched: for the asked symbols, or for the monitor's holdings with `monitor_id`. Highest materiality first. Empty when the call names neither.",
                  "items": {
                    "properties": {
                      "direction": {
                        "description": "Whether the news is good or bad for the company.",
                        "enum": [
                          "good",
                          "bad",
                          "mixed",
                          "unclear"
                        ],
                        "type": "string"
                      },
                      "direction_p": {
                        "description": "Probability of the direction.",
                        "maximum": 1,
                        "minimum": 0,
                        "type": "number"
                      },
                      "level": {
                        "description": "`material` from 2.5, `notable` from 1.5, otherwise `minor`.",
                        "enum": [
                          "minor",
                          "notable",
                          "material"
                        ],
                        "type": "string"
                      },
                      "materiality": {
                        "description": "Expected level for how much the news could change the company's value: 1 minor, 2 notable, 3 material. Only pairs rated 1 or above are stored.",
                        "maximum": 3,
                        "minimum": 1,
                        "type": "number"
                      },
                      "symbol": {
                        "description": "Itoflow symbol of the company.",
                        "maxLength": 30,
                        "minLength": 1,
                        "type": "string"
                      },
                      "valuation_unavailable_reason": {
                        "description": "Why the weight is null: net assets are unknown or not positive, or an open holding that carries the company has no usable price.",
                        "type": "string"
                      },
                      "weight": {
                        "description": "With `monitor_id`, the holding's current share of that monitor portfolio's net assets, a short counted by its size; null for research monitors, when the portfolio's net assets are unknown or not positive, and when an open holding that carries the company has no usable price. Always null without `monitor_id`.",
                        "minimum": 0,
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "symbol",
                      "weight",
                      "materiality",
                      "level",
                      "direction",
                      "direction_p"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "title": {
                  "description": "As published, in its own language.",
                  "maxLength": 300,
                  "minLength": 1,
                  "type": "string"
                },
                "title_en": {
                  "description": "The title in English. Null when the title is in English, the model couldn't translate it, or the backfill hasn't reached it.",
                  "maxLength": 600,
                  "minLength": 1,
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "url": {
                  "description": "Link to the article or filing.",
                  "format": "uri",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "source",
                "url",
                "title",
                "language",
                "publisher",
                "published_at",
                "is_event_p",
                "repeat_of",
                "title_en",
                "sec_form",
                "level",
                "impact",
                "symbols",
                "match_p",
                "repeats",
                "countries",
                "sector"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "unknown_symbols": {
            "description": "Asked symbols, or with `monitor_id` the holdings, skipped because Itoflow has no company name for them.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "items",
          "coverage",
          "unknown_symbols"
        ],
        "type": "object"
      },
      "NotificationChannelPreferences": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "NotificationLogsResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "NotificationPreferences": {
        "additionalProperties": false,
        "properties": {
          "billing_credits_exhausted": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "billing_overage_started": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "billing_spending_cap_warning": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "billing_usage_warning": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "broker_reconnect_required": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "pending_approval": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "strategy_execution": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          },
          "welcome": {
            "$ref": "#/components/schemas/NotificationChannelPreferences"
          }
        },
        "type": "object"
      },
      "NotificationPreferencesResponse": {
        "additionalProperties": {},
        "properties": {
          "preferences": {
            "$ref": "#/components/schemas/NotificationPreferences"
          },
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "preferences"
        ],
        "type": "object"
      },
      "NotificationUnsubscribeRequest": {
        "properties": {
          "userId": {
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "NullableStoredWatchlistProfileConfig": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/StoredWatchlistProfileConfig"
          },
          {
            "type": "null"
          }
        ]
      },
      "NullableWatchlistProfileConfig": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/WatchlistProfileConfig"
          },
          {
            "type": "null"
          }
        ]
      },
      "OkResponse": {
        "additionalProperties": {},
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PaperTradingDecisionItem": {
        "properties": {
          "agentNotes": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "decisionDate": {
            "type": "string"
          },
          "decisionType": {
            "type": "string"
          },
          "errorMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "marketOutlook": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasoning": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategyId": {
            "format": "uuid",
            "type": "string"
          },
          "structuredDashboard": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "targetAllocation": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "taskId": {
            "type": [
              "string",
              "null"
            ]
          },
          "userInstruction": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "agentNotes",
          "confidence",
          "createdAt",
          "decisionDate",
          "decisionType",
          "errorMessage",
          "executionStatus",
          "id",
          "marketOutlook",
          "reasoning",
          "strategyId",
          "structuredDashboard",
          "targetAllocation",
          "taskId",
          "userInstruction"
        ],
        "type": "object"
      },
      "PaperTradingDecisionsResponse": {
        "properties": {
          "decisions": {
            "items": {
              "$ref": "#/components/schemas/PaperTradingDecisionItem"
            },
            "type": "array"
          },
          "metadata": {
            "properties": {
              "hasMore": {
                "type": "boolean"
              },
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "hasMore",
              "limit",
              "offset",
              "total"
            ],
            "type": "object"
          }
        },
        "required": [
          "decisions",
          "metadata"
        ],
        "type": "object"
      },
      "PaperTradingHolding": {
        "properties": {
          "companyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "cost_basis": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "fx_rate_to_usd": {
            "type": "number"
          },
          "pnl": {
            "type": "string"
          },
          "pnl_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "price": {
            "type": "string"
          },
          "price_updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          }
        },
        "required": [
          "companyName",
          "cost_basis",
          "currency",
          "fx_rate_to_usd",
          "pnl",
          "pnl_pct",
          "price",
          "price_updated_at",
          "quantity",
          "symbol",
          "value",
          "weight"
        ],
        "type": "object"
      },
      "PaperTradingStatusResponse": {
        "properties": {
          "current": {
            "properties": {
              "cash": {
                "type": "string"
              },
              "cumulativeReturn": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cumulativeReturnReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dailyReturn": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "dailyReturnReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "date": {
                "type": "string"
              },
              "totalValue": {
                "type": "string"
              }
            },
            "required": [
              "cash",
              "cumulativeReturn",
              "cumulativeReturnReason",
              "dailyReturn",
              "dailyReturnReason",
              "date",
              "totalValue"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "factorScorecard": {
            "$ref": "#/components/schemas/PortfolioFactorScorecard"
          },
          "holdings": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PaperTradingHolding"
            },
            "type": "object"
          },
          "pendingFirstExecution": {
            "type": "boolean"
          },
          "performanceHistory": {
            "items": {
              "properties": {
                "cumulativeReturn": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "cumulativeReturnReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "timestamp": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "cumulativeReturn",
                "cumulativeReturnReason",
                "timestamp",
                "value"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "scorecard": {
            "$ref": "#/components/schemas/AgentScorecard"
          },
          "strategy": {
            "properties": {
              "constraints": {
                "$ref": "#/components/schemas/StrategyConstraintsResponse"
              },
              "createdAt": {
                "type": "string"
              },
              "createdBy": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "executionStatus": {
                "type": "string"
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "initialCapital": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isActive": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "portfolioId": {
                "format": "uuid",
                "type": "string"
              },
              "rules": {
                "$ref": "#/components/schemas/StrategyRules"
              },
              "strategyContent": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "universe": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "constraints",
              "createdAt",
              "createdBy",
              "description",
              "executionStatus",
              "id",
              "initialCapital",
              "isActive",
              "name",
              "portfolioId",
              "rules",
              "strategyContent",
              "universe"
            ],
            "type": "object"
          },
          "valuationError": {
            "description": "Null when valuation is known and positive. An unpriced or nonpositive book returns no current metrics or holdings weights, with a reason.",
            "properties": {
              "code": {
                "enum": [
                  "PORTFOLIO_VALUE_NOT_POSITIVE",
                  "PORTFOLIO_VALUE_UNKNOWN"
                ],
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "current",
          "factorScorecard",
          "holdings",
          "pendingFirstExecution",
          "performanceHistory",
          "scorecard",
          "strategy",
          "valuationError"
        ],
        "type": "object"
      },
      "PaperTradingSummariesResponse": {
        "properties": {
          "summaries": {
            "items": {
              "properties": {
                "portfolio": {
                  "$ref": "#/components/schemas/PortfolioCollectionPortfolio"
                },
                "status": {
                  "$ref": "#/components/schemas/PaperTradingSummaryStatus"
                },
                "strategy": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/StrategyListItem"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "portfolio",
                "strategy",
                "status"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "summaries"
        ],
        "type": "object"
      },
      "PaperTradingSummaryStatus": {
        "properties": {
          "current": {
            "properties": {
              "cash": {
                "type": "string"
              },
              "cumulativeReturn": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cumulativeReturnReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dailyReturn": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "dailyReturnReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "date": {
                "type": "string"
              },
              "totalValue": {
                "type": "string"
              }
            },
            "required": [
              "cash",
              "cumulativeReturn",
              "cumulativeReturnReason",
              "dailyReturn",
              "dailyReturnReason",
              "date",
              "totalValue"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "factorScorecard": {
            "$ref": "#/components/schemas/PortfolioFactorScorecard"
          },
          "holdings": {
            "additionalProperties": {
              "$ref": "#/components/schemas/PaperTradingHolding"
            },
            "type": "object"
          },
          "pendingFirstExecution": {
            "type": "boolean"
          },
          "performanceHistory": {
            "items": {
              "properties": {
                "cumulativeReturn": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "cumulativeReturnReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "timestamp": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "cumulativeReturn",
                "cumulativeReturnReason",
                "timestamp",
                "value"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "scorecard": {
            "$ref": "#/components/schemas/AgentScorecard"
          },
          "strategy": {
            "properties": {
              "constraints": {
                "$ref": "#/components/schemas/StrategyConstraintsResponse"
              },
              "createdAt": {
                "type": "string"
              },
              "createdBy": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "executionStatus": {
                "type": "string"
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "initialCapital": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "isActive": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "portfolioId": {
                "format": "uuid",
                "type": "string"
              },
              "rules": {
                "$ref": "#/components/schemas/StrategyRules"
              },
              "strategyContent": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "universe": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "required": [
              "constraints",
              "createdAt",
              "createdBy",
              "description",
              "executionStatus",
              "id",
              "initialCapital",
              "isActive",
              "name",
              "portfolioId",
              "rules",
              "strategyContent",
              "universe"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "valuationError": {
            "description": "Null when valuation is known and positive. An unpriced or nonpositive book returns no current metrics or holdings weights, with a reason.",
            "properties": {
              "code": {
                "enum": [
                  "PORTFOLIO_VALUE_NOT_POSITIVE",
                  "PORTFOLIO_VALUE_UNKNOWN"
                ],
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "current",
          "factorScorecard",
          "holdings",
          "pendingFirstExecution",
          "performanceHistory",
          "scorecard",
          "strategy",
          "valuationError"
        ],
        "type": "object"
      },
      "PaperTradingTradeItem": {
        "properties": {
          "action": {
            "enum": [
              "BUY",
              "SELL",
              "SELL_SHORT",
              "BUY_TO_COVER",
              "SPLIT"
            ],
            "type": "string"
          },
          "commission": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "executedAt": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "reasoning": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategyId": {
            "format": "uuid",
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "totalValue": {
            "type": "string"
          },
          "tradeId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "action",
          "commission",
          "createdAt",
          "executedAt",
          "price",
          "quantity",
          "strategyId",
          "symbol",
          "totalValue",
          "tradeId"
        ],
        "type": "object"
      },
      "PaperTradingTradesResponse": {
        "properties": {
          "metadata": {
            "properties": {
              "hasMore": {
                "type": "boolean"
              },
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "hasMore",
              "limit",
              "offset",
              "total"
            ],
            "type": "object"
          },
          "trades": {
            "items": {
              "$ref": "#/components/schemas/PaperTradingTradeItem"
            },
            "type": "array"
          }
        },
        "required": [
          "metadata",
          "trades"
        ],
        "type": "object"
      },
      "PaymentSetupIntentResponse": {
        "properties": {
          "setupIntent": {
            "properties": {
              "client_secret": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "required": [
              "client_secret",
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "setupIntent"
        ],
        "type": "object"
      },
      "PendingApprovalsPortfolioSummary": {
        "properties": {
          "approvalProposal": {
            "$ref": "#/components/schemas/ApprovalProposal"
          },
          "awaitingApprovalCount": {
            "type": "integer"
          },
          "buyCount": {
            "type": "integer"
          },
          "exchanges": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "netChange": {
            "description": "Net notional change across open approval-route trades",
            "type": "number"
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "portfolioName": {
            "type": "string"
          },
          "sellCount": {
            "type": "integer"
          },
          "totalPendingCount": {
            "type": "integer"
          }
        },
        "required": [
          "portfolioId",
          "portfolioName",
          "awaitingApprovalCount",
          "totalPendingCount",
          "netChange",
          "exchanges",
          "buyCount",
          "sellCount",
          "approvalProposal"
        ],
        "type": "object"
      },
      "PendingApprovalsResponse": {
        "properties": {
          "portfolios": {
            "items": {
              "$ref": "#/components/schemas/PendingApprovalsPortfolioSummary"
            },
            "type": "array"
          },
          "totalAwaitingApproval": {
            "type": "integer"
          }
        },
        "required": [
          "totalAwaitingApproval",
          "portfolios"
        ],
        "type": "object"
      },
      "PendingTradeItem": {
        "properties": {
          "action": {
            "type": "string"
          },
          "actionability": {
            "properties": {
              "approvalPreparationState": {
                "type": "string"
              },
              "approvalSetStale": {
                "type": "boolean"
              },
              "approvalSetVersion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blockingReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blockingReasonCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "canApprove": {
                "type": "boolean"
              },
              "canCancelBrokerBacked": {
                "type": "boolean"
              },
              "canCancelLocal": {
                "type": "boolean"
              },
              "canPrepareApproval": {
                "type": "boolean"
              },
              "canReconcile": {
                "type": "boolean"
              },
              "derivedFrom": {
                "properties": {
                  "approval": {
                    "properties": {
                      "approvalSetVersion": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "latestDecisionId": {
                        "format": "uuid",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stale": {
                        "type": "boolean"
                      },
                      "state": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "state",
                      "latestDecisionId",
                      "approvalSetVersion",
                      "stale"
                    ],
                    "type": "object"
                  },
                  "brokerFamily": {
                    "properties": {
                      "defaultOrderFamily": {
                        "type": "string"
                      },
                      "requiresReconnectSync": {
                        "type": "boolean"
                      },
                      "supportsSessionExpiryUx": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "requiresReconnectSync",
                      "supportsSessionExpiryUx",
                      "defaultOrderFamily"
                    ],
                    "type": "object"
                  },
                  "brokerType": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "connection": {
                    "properties": {
                      "isActive": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "missingPermissions": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "rawSyncStatus": {
                        "type": "string"
                      },
                      "sessionExpired": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rawSyncStatus",
                      "isActive",
                      "sessionExpired",
                      "missingPermissions"
                    ],
                    "type": "object"
                  },
                  "portfolio": {
                    "properties": {
                      "pendingAgeMs": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "rawSyncStatus": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "reconcileInFlight": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rawSyncStatus",
                      "reconcileInFlight",
                      "pendingAgeMs"
                    ],
                    "type": "object"
                  },
                  "trade": {
                    "properties": {
                      "ageMs": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "brokerOrderIdPresent": {
                        "type": "boolean"
                      },
                      "executionAttemptCount": {
                        "type": "integer"
                      },
                      "hasExecutionAttempt": {
                        "type": "boolean"
                      },
                      "orderType": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rawStatus": {
                        "enum": [
                          "awaiting_approval",
                          "pending",
                          "executing",
                          "executed",
                          "cancel_requested",
                          "cancelled",
                          "failed",
                          "superseded",
                          "state_unknown",
                          null
                        ],
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "retryBudgetExhausted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rawStatus",
                      "orderType",
                      "brokerOrderIdPresent",
                      "hasExecutionAttempt",
                      "executionAttemptCount",
                      "retryBudgetExhausted",
                      "ageMs"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "brokerType",
                  "brokerFamily",
                  "connection",
                  "portfolio",
                  "approval",
                  "trade"
                ],
                "type": "object"
              },
              "effectiveConnectionState": {
                "type": "string"
              },
              "effectivePortfolioState": {
                "type": "string"
              },
              "effectiveTradeLogicalState": {
                "type": "string"
              },
              "illegalCombinationSignal": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latestDecisionId": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "recommendedAction": {
                "type": "string"
              },
              "reconciling": {
                "type": "boolean"
              }
            },
            "required": [
              "canApprove",
              "canPrepareApproval",
              "canCancelLocal",
              "canCancelBrokerBacked",
              "canReconcile",
              "reconciling",
              "approvalPreparationState",
              "approvalSetVersion",
              "latestDecisionId",
              "approvalSetStale",
              "blockingReasonCode",
              "blockingReason",
              "recommendedAction",
              "effectiveConnectionState",
              "effectivePortfolioState",
              "effectiveTradeLogicalState",
              "illegalCombinationSignal",
              "derivedFrom"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "actionRequired": {
            "type": "boolean"
          },
          "brokerActionRequired": {
            "$ref": "#/components/schemas/BrokerUserActionNotice"
          },
          "brokerDetailState": {
            "type": [
              "string",
              "null"
            ]
          },
          "brokerExecutionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "canonicalStatus": {
            "enum": [
              "awaiting_approval",
              "pending",
              "executing",
              "executed",
              "cancel_requested",
              "cancelled",
              "failed",
              "superseded",
              "state_unknown"
            ],
            "type": "string"
          },
          "companyName": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "decisionId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "decisionPrice": {
            "type": [
              "string",
              "null"
            ]
          },
          "detailLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorMessage": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionMode": {
            "type": "string"
          },
          "filledQuantity": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "intendedNotional": {
            "type": [
              "string",
              "null"
            ]
          },
          "limitPrice": {
            "type": [
              "string",
              "null"
            ]
          },
          "orderFamily": {
            "type": [
              "string",
              "null"
            ]
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "restingLocation": {
            "type": [
              "string",
              "null"
            ]
          },
          "shortLabel": {
            "type": "string"
          },
          "status": {
            "enum": [
              "awaiting_approval",
              "pending",
              "executing",
              "executed",
              "cancel_requested",
              "cancelled",
              "failed",
              "superseded",
              "state_unknown"
            ],
            "type": "string"
          },
          "statusAnimate": {
            "type": "boolean"
          },
          "statusLabel": {
            "type": "string"
          },
          "statusTone": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "triggerPrice": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "canonicalStatus",
          "statusLabel",
          "shortLabel",
          "statusTone",
          "detailLabel",
          "orderFamily",
          "restingLocation",
          "brokerDetailState",
          "brokerExecutionId",
          "filledQuantity",
          "actionRequired",
          "statusAnimate",
          "id",
          "portfolioId",
          "executionMode",
          "symbol",
          "action",
          "status",
          "intendedNotional",
          "decisionPrice",
          "decisionId",
          "createdAt",
          "updatedAt",
          "companyName",
          "triggerPrice",
          "limitPrice",
          "errorMessage",
          "actionability"
        ],
        "type": "object"
      },
      "PendingTradesMetadata": {
        "properties": {
          "approvalPreparationState": {
            "type": "string"
          },
          "approvalProposal": {
            "$ref": "#/components/schemas/ApprovalProposal"
          },
          "approvalSetStale": {
            "type": "boolean"
          },
          "autoExecute": {
            "type": "boolean"
          },
          "awaitingApprovalCount": {
            "type": "integer"
          },
          "brokerConnectionStatus": {
            "$ref": "#/components/schemas/BrokerConnectionStatus"
          },
          "buyCount": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "exchanges": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "executingCount": {
            "type": "integer"
          },
          "executionMode": {
            "description": "paper | live",
            "type": "string"
          },
          "latestDecisionId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "liveActionability": {
            "properties": {
              "approvalPreparationState": {
                "type": "string"
              },
              "approvalSetStale": {
                "type": "boolean"
              },
              "approvalSetVersion": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blockingReason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blockingReasonCode": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "canApprove": {
                "type": "boolean"
              },
              "canCancelBrokerBacked": {
                "type": "boolean"
              },
              "canCancelLocal": {
                "type": "boolean"
              },
              "canPrepareApproval": {
                "type": "boolean"
              },
              "canReconcile": {
                "type": "boolean"
              },
              "derivedFrom": {
                "properties": {
                  "approval": {
                    "properties": {
                      "approvalSetVersion": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "latestDecisionId": {
                        "format": "uuid",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "stale": {
                        "type": "boolean"
                      },
                      "state": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "state",
                      "latestDecisionId",
                      "approvalSetVersion",
                      "stale"
                    ],
                    "type": "object"
                  },
                  "brokerFamily": {
                    "properties": {
                      "defaultOrderFamily": {
                        "type": "string"
                      },
                      "requiresReconnectSync": {
                        "type": "boolean"
                      },
                      "supportsSessionExpiryUx": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "requiresReconnectSync",
                      "supportsSessionExpiryUx",
                      "defaultOrderFamily"
                    ],
                    "type": "object"
                  },
                  "brokerType": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "connection": {
                    "properties": {
                      "isActive": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "missingPermissions": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "rawSyncStatus": {
                        "type": "string"
                      },
                      "sessionExpired": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rawSyncStatus",
                      "isActive",
                      "sessionExpired",
                      "missingPermissions"
                    ],
                    "type": "object"
                  },
                  "portfolio": {
                    "properties": {
                      "pendingAgeMs": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "rawSyncStatus": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "reconcileInFlight": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rawSyncStatus",
                      "reconcileInFlight",
                      "pendingAgeMs"
                    ],
                    "type": "object"
                  },
                  "trade": {
                    "properties": {
                      "ageMs": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "brokerOrderIdPresent": {
                        "type": "boolean"
                      },
                      "executionAttemptCount": {
                        "type": "integer"
                      },
                      "hasExecutionAttempt": {
                        "type": "boolean"
                      },
                      "orderType": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rawStatus": {
                        "enum": [
                          "awaiting_approval",
                          "pending",
                          "executing",
                          "executed",
                          "cancel_requested",
                          "cancelled",
                          "failed",
                          "superseded",
                          "state_unknown",
                          null
                        ],
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "retryBudgetExhausted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rawStatus",
                      "orderType",
                      "brokerOrderIdPresent",
                      "hasExecutionAttempt",
                      "executionAttemptCount",
                      "retryBudgetExhausted",
                      "ageMs"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "brokerType",
                  "brokerFamily",
                  "connection",
                  "portfolio",
                  "approval",
                  "trade"
                ],
                "type": "object"
              },
              "effectiveConnectionState": {
                "type": "string"
              },
              "effectivePortfolioState": {
                "type": "string"
              },
              "effectiveTradeLogicalState": {
                "type": "string"
              },
              "illegalCombinationSignal": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latestDecisionId": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "recommendedAction": {
                "type": "string"
              },
              "reconciling": {
                "type": "boolean"
              }
            },
            "required": [
              "canApprove",
              "canPrepareApproval",
              "canCancelLocal",
              "canCancelBrokerBacked",
              "canReconcile",
              "reconciling",
              "approvalPreparationState",
              "approvalSetVersion",
              "latestDecisionId",
              "approvalSetStale",
              "blockingReasonCode",
              "blockingReason",
              "recommendedAction",
              "effectiveConnectionState",
              "effectivePortfolioState",
              "effectiveTradeLogicalState",
              "illegalCombinationSignal",
              "derivedFrom"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "netChange": {
            "description": "Net notional change (display value)",
            "type": "number"
          },
          "reconciliationRequiredCount": {
            "type": "integer"
          },
          "reconciling": {
            "type": "boolean"
          },
          "sellCount": {
            "type": "integer"
          },
          "stateUnknownCount": {
            "type": "integer"
          },
          "totalBuyAmount": {
            "type": "number"
          },
          "totalSellAmount": {
            "type": "number"
          }
        },
        "required": [
          "count",
          "netChange",
          "exchanges",
          "autoExecute",
          "awaitingApprovalCount",
          "buyCount",
          "sellCount",
          "totalBuyAmount",
          "totalSellAmount",
          "executionMode",
          "executingCount",
          "stateUnknownCount",
          "reconciliationRequiredCount",
          "brokerConnectionStatus",
          "reconciling",
          "liveActionability"
        ],
        "type": "object"
      },
      "PendingTradesResponse": {
        "properties": {
          "currentPrices": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "metadata": {
            "$ref": "#/components/schemas/PendingTradesMetadata"
          },
          "trades": {
            "items": {
              "$ref": "#/components/schemas/PendingTradeItem"
            },
            "type": "array"
          }
        },
        "required": [
          "trades",
          "metadata",
          "currentPrices"
        ],
        "type": "object"
      },
      "PerformancePoint": {
        "properties": {
          "cash": {
            "type": [
              "string",
              "null"
            ]
          },
          "cumulative_return": {
            "description": "Chained return from the first observed reading (zero). External flows are placed at the preceding reading, an approximation to flow-time valuation. Null means not known.",
            "type": [
              "string",
              "null"
            ]
          },
          "cumulative_return_reason": {
            "description": "Why the stored cumulative return is not known; null when measured.",
            "type": [
              "string",
              "null"
            ]
          },
          "daily_return": {
            "description": "Return since the last reading at or before 00:00 UTC today, from the flow-adjusted index. Null means not known, including an anchor older than the previous UTC day.",
            "type": [
              "string",
              "null"
            ]
          },
          "daily_return_reason": {
            "description": "Why the stored daily return is not known; null when measured.",
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp": {
            "type": "string"
          },
          "total_value": {
            "type": "string"
          }
        },
        "required": [
          "timestamp",
          "total_value",
          "cash",
          "daily_return_reason",
          "cumulative_return_reason",
          "daily_return",
          "cumulative_return"
        ],
        "type": "object"
      },
      "PerformanceResponse": {
        "properties": {
          "history": {
            "items": {
              "$ref": "#/components/schemas/PerformancePoint"
            },
            "type": "array"
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          },
          "strategy_periods": {
            "items": {
              "properties": {
                "period_end": {
                  "type": "string"
                },
                "period_return": {
                  "type": "number"
                },
                "period_start": {
                  "type": "string"
                },
                "strategy_id": {
                  "type": "string"
                },
                "strategy_name": {
                  "type": "string"
                },
                "strategy_version_id": {
                  "type": "string"
                }
              },
              "required": [
                "strategy_version_id",
                "strategy_id",
                "strategy_name",
                "period_start",
                "period_end"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "portfolio_id",
          "history",
          "strategy_periods"
        ],
        "type": "object"
      },
      "PlanTermsChanged": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PnLMetrics": {
        "properties": {
          "total_pnl": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_pnl_pct": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_realized_pnl": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_unrealized_pnl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "total_unrealized_pnl",
          "total_realized_pnl",
          "total_pnl",
          "total_pnl_pct"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "PortfolioActionResponse": {
        "additionalProperties": {},
        "properties": {
          "count": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "portfolio_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "total_value_usd": {
            "type": [
              "string",
              "null"
            ]
          },
          "valuation_unavailable_reason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PortfolioBenchmarkRelativeFactorScorecard": {
        "properties": {
          "benchmarkName": {
            "type": "string"
          },
          "benchmarkSource": {
            "type": "string"
          },
          "benchmarkSymbol": {
            "type": "string"
          },
          "coverage": {
            "$ref": "#/components/schemas/PortfolioFactorCoverage"
          },
          "diagnostics": {
            "$ref": "#/components/schemas/PortfolioFactorDiagnostics"
          },
          "exposures": {
            "items": {
              "$ref": "#/components/schemas/PortfolioFactorExposure"
            },
            "type": "array"
          },
          "risk": {
            "$ref": "#/components/schemas/PortfolioFactorRisk"
          }
        },
        "required": [
          "benchmarkSymbol",
          "coverage",
          "risk",
          "exposures",
          "diagnostics"
        ],
        "type": "object"
      },
      "PortfolioBenchmarkRequest": {
        "properties": {
          "benchmark_index_id": {
            "description": "Provider index id in TICKER.EXCHANGE form (for example GSPC.INDX). Null clears the index comparison.",
            "example": "GSPC.INDX",
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^\\S+\\.[A-Za-z0-9]+$",
            "type": [
              "string",
              "null"
            ]
          },
          "peer_portfolio_id": {
            "description": "Another portfolio on the platform to measure this portfolio against. Null clears the peer comparison.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "peer_portfolio_id",
          "benchmark_index_id"
        ],
        "type": "object"
      },
      "PortfolioBenchmarkResponse": {
        "properties": {
          "benchmark_index_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "peer_portfolio_id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "portfolio_id",
          "peer_portfolio_id",
          "benchmark_index_id",
          "message"
        ],
        "type": "object"
      },
      "PortfolioCollectionPortfolio": {
        "properties": {
          "allocatedCapital": {
            "type": [
              "string",
              "null"
            ]
          },
          "brokerSyncStatus": {
            "enum": [
              "not_applicable",
              "pending",
              "valid",
              "invalid",
              "out_of_sync",
              "syncing",
              "error"
            ],
            "type": "string"
          },
          "brokerType": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionMode": {
            "enum": [
              "paper",
              "live"
            ],
            "type": "string"
          },
          "linkType": {
            "enum": [
              "primary",
              "follower",
              null
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "wentLiveAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "portfolioId",
          "name",
          "description",
          "executionMode",
          "brokerType",
          "brokerSyncStatus",
          "wentLiveAt",
          "linkType",
          "allocatedCapital"
        ],
        "type": "object"
      },
      "PortfolioDetailResponse": {
        "properties": {
          "exited_holdings": {
            "items": {
              "$ref": "#/components/schemas/ExitedHolding"
            },
            "type": "array"
          },
          "factorScorecard": {
            "$ref": "#/components/schemas/PortfolioFactorScorecard"
          },
          "first_broker_snapshot_pending": {
            "type": "boolean"
          },
          "holdings": {
            "items": {
              "$ref": "#/components/schemas/Holding"
            },
            "type": "array"
          },
          "linked_strategy": {
            "additionalProperties": {},
            "description": "Full strategy object if linked",
            "type": [
              "object",
              "null"
            ]
          },
          "live_broker_state": {
            "$ref": "#/components/schemas/LiveBrokerState"
          },
          "metrics": {
            "$ref": "#/components/schemas/PortfolioMetrics"
          },
          "pnl_metrics": {
            "$ref": "#/components/schemas/PnLMetrics"
          },
          "portfolio": {
            "properties": {
              "benchmarkIndexId": {
                "description": "Provider index id (for example GSPC.INDX) used as the comparison basis for benchmark-relative factor risk",
                "type": [
                  "string",
                  "null"
                ]
              },
              "broker_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "execution_mode": {
                "type": "string"
              },
              "holdings": {
                "description": "Always empty — see top-level holdings field",
                "items": {
                  "$ref": "#/components/schemas/Holding"
                },
                "type": "array"
              },
              "is_active": {
                "type": "boolean"
              },
              "linkedAt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkedStrategyId": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "linkType": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "peerPortfolioId": {
                "description": "Another portfolio on the platform this portfolio is measured against for benchmark-relative factor risk",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "portfolio_id": {
                "format": "uuid",
                "type": "string"
              },
              "portfolio_type": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "user_email": {
                "type": "string"
              }
            },
            "required": [
              "portfolio_id",
              "user_email",
              "name",
              "description",
              "created_at",
              "updated_at",
              "is_active",
              "holdings",
              "linkedStrategyId",
              "linkType",
              "linkedAt",
              "peerPortfolioId",
              "benchmarkIndexId",
              "portfolio_type",
              "execution_mode",
              "broker_type"
            ],
            "type": "object"
          },
          "portfolio_value": {
            "description": "Original reviewed import value; null for portfolios without this provenance. Current value is in metrics.",
            "properties": {
              "amount_usd": {
                "description": "Reviewed portfolio capital value in USD at import.",
                "type": "string"
              },
              "as_of_date": {
                "description": "Source or provider mark date; not the import timestamp.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "basis": {
                "description": "Fund total NAV is present only for an explicitly reviewed, verified single-ETF import.",
                "enum": [
                  "portfolio_value",
                  "fund_total_nav"
                ],
                "type": "string"
              },
              "declared_amount": {
                "description": "Stated value in declared_currency, as reviewed; null when provider prices set the value.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "declared_currency": {
                "description": "Currency of declared_amount; null when provider prices set the value.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "enum": [
                  "provider_derived",
                  "user_declared",
                  "source_document"
                ],
                "type": "string"
              }
            },
            "required": [
              "amount_usd",
              "as_of_date",
              "basis",
              "declared_amount",
              "declared_currency",
              "source"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "price_updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "scorecard": {
            "$ref": "#/components/schemas/AgentScorecard"
          },
          "scorecard_input_dates": {
            "$ref": "#/components/schemas/PortfolioFactorScorecardInputDates"
          },
          "valuation_unavailable_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "valuationError": {
            "properties": {
              "code": {
                "enum": [
                  "PORTFOLIO_VALUE_NOT_POSITIVE",
                  "PORTFOLIO_VALUE_UNKNOWN"
                ],
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "portfolio_value",
          "portfolio",
          "holdings",
          "exited_holdings",
          "metrics",
          "valuation_unavailable_reason",
          "valuationError",
          "pnl_metrics",
          "linked_strategy",
          "price_updated_at",
          "scorecard",
          "factorScorecard"
        ],
        "type": "object"
      },
      "PortfolioFactorCoverage": {
        "properties": {
          "cashWeight": {
            "type": "string"
          },
          "grossWeight": {
            "type": [
              "string",
              "null"
            ]
          },
          "longWeight": {
            "type": [
              "string",
              "null"
            ]
          },
          "modeledWeight": {
            "type": "string"
          },
          "netWeight": {
            "type": [
              "string",
              "null"
            ]
          },
          "positionsModeled": {
            "type": "number"
          },
          "positionsTotal": {
            "type": "number"
          },
          "shortWeight": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PortfolioFactorDiagnostics": {
        "properties": {
          "cashExcluded": {
            "type": "number"
          },
          "factorCount": {
            "type": "number"
          },
          "symbolCount": {
            "type": "number"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "PortfolioFactorExposure": {
        "properties": {
          "activeRiskContribution": {
            "description": "Decimal string",
            "type": "string"
          },
          "exposure": {
            "description": "Decimal string",
            "type": "string"
          },
          "factorId": {
            "type": "string"
          },
          "group": {
            "enum": [
              "market",
              "country",
              "region",
              "gics_sector",
              "gics_industry_group",
              "gics_industry",
              "sector",
              "style",
              "currency"
            ],
            "type": "string"
          },
          "marginalRiskContribution": {
            "description": "Decimal string",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "proxyScope": {
            "type": [
              "string",
              "null"
            ]
          },
          "riskContribution": {
            "description": "Decimal string",
            "type": "string"
          },
          "varianceContribution": {
            "description": "Decimal string",
            "type": "string"
          }
        },
        "required": [
          "factorId",
          "name",
          "group",
          "proxyScope",
          "exposure"
        ],
        "type": "object"
      },
      "PortfolioFactorHolding": {
        "properties": {
          "annualizationFactor": {
            "description": "Decimal string",
            "type": "string"
          },
          "marginalContribution": {
            "description": "Decimal string",
            "type": "string"
          },
          "specificVarianceShare": {
            "description": "Decimal string",
            "type": "string"
          },
          "specificVolatility": {
            "description": "Decimal string",
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "totalRiskContributionShare": {
            "description": "Decimal string",
            "type": "string"
          },
          "volatilityConvention": {
            "description": "daily or annualized",
            "type": "string"
          },
          "weight": {
            "description": "Decimal string",
            "type": "string"
          }
        },
        "required": [
          "symbol"
        ],
        "type": "object"
      },
      "PortfolioFactorHoldingViewRow": {
        "properties": {
          "contributionShare": {
            "description": "Decimal string",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "specificVarianceShare": {
            "description": "Decimal string",
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "weight": {
            "description": "Decimal string",
            "type": "string"
          }
        },
        "required": [
          "id",
          "symbol"
        ],
        "type": "object"
      },
      "PortfolioFactorRisk": {
        "properties": {
          "activeRiskComplete": {
            "description": "Benchmark-relative risk only. False when the active risk figures leave out part of the active book; diagnostics.warnings names what is left out.",
            "type": "boolean"
          },
          "activeSpecificShare": {
            "type": "string"
          },
          "activeVariance": {
            "type": "string"
          },
          "activeVolatility": {
            "type": "string"
          },
          "annualizationFactor": {
            "description": "Return periods per year as a decimal string. When volatilityConvention is daily, annualize volatility by multiplying it by sqrt(annualizationFactor).",
            "type": "string"
          },
          "factorShare": {
            "type": "string"
          },
          "factorVariance": {
            "type": "string"
          },
          "specificRiskContribution": {
            "type": "string"
          },
          "specificShare": {
            "type": "string"
          },
          "specificVariance": {
            "type": "string"
          },
          "totalVariance": {
            "type": "string"
          },
          "totalVolatility": {
            "type": "string"
          },
          "volatilityConvention": {
            "description": "Convention for variance and volatility levels: daily means per daily return period; annualized means per year.",
            "enum": [
              "daily",
              "annualized"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortfolioFactorRiskCoverageSummary": {
        "properties": {
          "cashWeight": {
            "type": "string"
          },
          "lookthroughModeledWeight": {
            "type": "string"
          },
          "lookthroughUnmodeledWeight": {
            "type": "string"
          },
          "modeledWeight": {
            "type": "string"
          },
          "returnsFallbackWeight": {
            "type": "string"
          },
          "unmodeledWeight": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PortfolioFactorRiskView": {
        "properties": {
          "absoluteRiskRows": {
            "items": {
              "$ref": "#/components/schemas/PortfolioFactorRiskViewRow"
            },
            "type": "array"
          },
          "benchmarkRelativeRiskRows": {
            "items": {
              "$ref": "#/components/schemas/PortfolioFactorRiskViewRow"
            },
            "type": "array"
          },
          "coverageSummary": {
            "$ref": "#/components/schemas/PortfolioFactorRiskCoverageSummary"
          },
          "holdingRows": {
            "items": {
              "$ref": "#/components/schemas/PortfolioFactorHoldingViewRow"
            },
            "type": "array"
          },
          "residualSummary": {
            "$ref": "#/components/schemas/PortfolioResidualSummary"
          }
        },
        "type": "object"
      },
      "PortfolioFactorRiskViewRow": {
        "properties": {
          "contribution": {
            "type": "string"
          },
          "contributionShare": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "factor",
              "specific",
              "returns_fallback",
              "cash",
              "unmodeled"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "group"
        ],
        "type": "object"
      },
      "PortfolioFactorScorecard": {
        "properties": {
          "asOf": {
            "type": "string"
          },
          "benchmarkRelative": {
            "$ref": "#/components/schemas/PortfolioBenchmarkRelativeFactorScorecard"
          },
          "coverage": {
            "$ref": "#/components/schemas/PortfolioFactorCoverage"
          },
          "currency": {
            "type": "string"
          },
          "diagnostics": {
            "$ref": "#/components/schemas/PortfolioFactorDiagnostics"
          },
          "exposures": {
            "items": {
              "$ref": "#/components/schemas/PortfolioFactorExposure"
            },
            "type": "array"
          },
          "holdings": {
            "description": "Per-holding risk contributions, ranked by absolute total risk contribution share and capped at 100 rows.",
            "items": {
              "$ref": "#/components/schemas/PortfolioFactorHolding"
            },
            "type": "array"
          },
          "holdingsTotal": {
            "description": "Modeled symbol count before the persisted holding cap.",
            "type": "integer"
          },
          "holdingsTruncated": {
            "description": "True when holdings carries only the top-ranked slice.",
            "type": "boolean"
          },
          "modelVersion": {
            "type": "string"
          },
          "portfolioId": {
            "type": "string"
          },
          "residualDiagnostics": {
            "$ref": "#/components/schemas/PortfolioResidualDiagnostics"
          },
          "risk": {
            "$ref": "#/components/schemas/PortfolioFactorRisk"
          },
          "schemaVersion": {
            "type": "number"
          },
          "view": {
            "$ref": "#/components/schemas/PortfolioFactorRiskView"
          }
        },
        "required": [
          "schemaVersion",
          "modelVersion",
          "asOf",
          "portfolioId",
          "currency",
          "coverage",
          "exposures",
          "risk",
          "diagnostics"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "PortfolioFactorScorecardInputDates": {
        "properties": {
          "holdings_fund_books_peers_and_benchmark_read_by": {
            "description": "When the worker calculated the card, as an ISO time. Holdings, fund books, peers and benchmark constituents are the ones on file then, so they can be newer than the model date (factorScorecard.asOf) and than a requested factor_as_of. Null when not known: the current card stores no calculation time.",
            "type": [
              "string",
              "null"
            ]
          },
          "meaning": {
            "description": "What each date covers: prices and the risk model end at the model date; the book is the one on file at the calculation time.",
            "type": "string"
          }
        },
        "required": [
          "holdings_fund_books_peers_and_benchmark_read_by",
          "meaning"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "PortfolioListItem": {
        "properties": {
          "benchmark_index_id": {
            "description": "Provider index id (for example GSPC.INDX) used as the comparison basis for benchmark-relative factor risk",
            "type": [
              "string",
              "null"
            ]
          },
          "broker_sync_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "broker_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "cumulative_return": {
            "type": [
              "string",
              "null"
            ]
          },
          "cumulative_return_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "execution_mode": {
            "description": "paper | live",
            "type": "string"
          },
          "last_broker_validation_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "linked_strategy": {
            "$ref": "#/components/schemas/LinkedStrategyRef"
          },
          "name": {
            "type": "string"
          },
          "peer_portfolio_id": {
            "description": "Another portfolio on the platform this portfolio is measured against for benchmark-relative factor risk",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          },
          "portfolio_type": {
            "type": "string"
          },
          "price_updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "total_value": {
            "description": "Net asset value in USD as a decimal string: cash plus the signed value of every holding, so a short subtracts. Null, with valuationError, when an open holding has no current price with valid currency and exchange-rate evidence, or the value is zero or less.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string"
          },
          "valuation_unavailable_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "valuationError": {
            "properties": {
              "code": {
                "enum": [
                  "PORTFOLIO_VALUE_NOT_POSITIVE",
                  "PORTFOLIO_VALUE_UNKNOWN"
                ],
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "went_live_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "portfolio_id",
          "name",
          "description",
          "portfolio_type",
          "total_value",
          "valuation_unavailable_reason",
          "valuationError",
          "cumulative_return",
          "cumulative_return_reason",
          "linked_strategy",
          "peer_portfolio_id",
          "benchmark_index_id",
          "created_at",
          "updated_at",
          "price_updated_at",
          "execution_mode",
          "broker_type",
          "broker_sync_status",
          "last_broker_validation_at",
          "went_live_at"
        ],
        "type": "object"
      },
      "PortfolioListResponse": {
        "properties": {
          "portfolios": {
            "items": {
              "$ref": "#/components/schemas/PortfolioListItem"
            },
            "type": "array"
          }
        },
        "required": [
          "portfolios"
        ],
        "type": "object"
      },
      "PortfolioMetrics": {
        "properties": {
          "cash": {
            "type": "string"
          },
          "cumulativeReturn": {
            "type": [
              "string",
              "null"
            ]
          },
          "cumulativeReturnReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "dailyReturn": {
            "type": [
              "string",
              "null"
            ]
          },
          "dailyReturnReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "recordedAt": {
            "type": "string"
          },
          "totalValue": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "totalValue",
          "cash",
          "cumulativeReturn",
          "cumulativeReturnReason",
          "dailyReturn",
          "dailyReturnReason",
          "recordedAt"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "PortfolioResidualDiagnostics": {
        "properties": {
          "commonComponentRatioThreshold": {
            "description": "Decimal string",
            "type": "string"
          },
          "effectiveNumberOfBets": {
            "description": "Decimal string",
            "type": "string"
          },
          "firstComponentVarianceShare": {
            "description": "Decimal string",
            "type": "string"
          },
          "meanPairwiseResidualCorrelation": {
            "description": "Decimal string",
            "type": "string"
          },
          "medianPairwiseResidualCorrelation": {
            "description": "Decimal string",
            "type": "string"
          },
          "minimumWindowSessions": {
            "type": "integer"
          },
          "modelSpecificVariance": {
            "description": "Decimal string",
            "type": "string"
          },
          "realizedResidualVariance": {
            "description": "Decimal string",
            "type": "string"
          },
          "requestedWindowSessions": {
            "type": "integer"
          },
          "residualCommonComponentDetected": {
            "type": "boolean"
          },
          "residualVarianceRatio": {
            "description": "Decimal string",
            "type": "string"
          },
          "sufficientHistory": {
            "type": "boolean"
          },
          "symbolsMissing": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "symbolsMissingCount": {
            "type": "integer"
          },
          "symbolsUsed": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "symbolsUsedCount": {
            "type": "integer"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "weightMissing": {
            "description": "Decimal string",
            "type": "string"
          },
          "weightUsed": {
            "description": "Decimal string",
            "type": "string"
          },
          "windowSessions": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PortfolioResidualSummary": {
        "properties": {
          "commonComponentDetected": {
            "type": "boolean"
          },
          "effectiveNumberOfBets": {
            "description": "Decimal string",
            "type": "string"
          },
          "firstComponentVarianceShare": {
            "description": "Decimal string",
            "type": "string"
          },
          "meanPairwiseResidualCorrelation": {
            "description": "Decimal string",
            "type": "string"
          },
          "residualVarianceRatio": {
            "description": "Decimal string",
            "type": "string"
          },
          "sufficientHistory": {
            "type": "boolean"
          },
          "symbolsUsed": {
            "type": "integer"
          },
          "weightMissing": {
            "description": "Decimal string",
            "type": "string"
          },
          "weightUsed": {
            "description": "Decimal string",
            "type": "string"
          },
          "windowSessions": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PricingBillingSummaryResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingConfigResponse": {
        "properties": {
          "billing_enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "billing_enabled"
        ],
        "type": "object"
      },
      "PricingConfirmPaymentResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingCreditTiersResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingCustomerBalanceResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingInvoicesResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingPaymentMethodsResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingPlanRequest": {
        "properties": {
          "catalogRevision": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          }
        },
        "required": [
          "planId"
        ],
        "type": "object"
      },
      "PricingPlansResponse": {
        "additionalProperties": {},
        "properties": {
          "overage_rate_cents_per_credit": {
            "type": "number"
          },
          "plans": {
            "items": {
              "additionalProperties": {},
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "plans"
        ],
        "type": "object"
      },
      "PricingPreviewUpgradeResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingRefundBalanceResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingSubscriptionResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PricingUnavailable": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "PublicArtifact": {
        "properties": {
          "artifact_type": {
            "enum": [
              "report"
            ],
            "example": "report",
            "type": "string"
          },
          "content": {
            "$ref": "#/components/schemas/ArtifactDashboard"
          },
          "created_at": {
            "example": "2026-04-03T23:29:40.548Z",
            "type": "string"
          },
          "expires_at": {
            "example": null,
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/ArtifactMetadata"
          },
          "slug": {
            "example": "VufIWcgY0FlG",
            "pattern": "^[A-Za-z0-9_-]{12}$",
            "type": "string"
          },
          "title": {
            "example": "BTC vs ETH: 1-Year Comparison",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "artifact_type",
          "title",
          "content",
          "metadata",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "PublicArtifactResponse": {
        "properties": {
          "artifact": {
            "$ref": "#/components/schemas/PublicArtifact"
          }
        },
        "required": [
          "artifact"
        ],
        "type": "object"
      },
      "PublicChatShare": {
        "properties": {
          "chat_id": {
            "description": "ID of the read-only chat copy this public share shows",
            "example": "share_cf_123",
            "type": "string"
          },
          "copied_until_message_id": {
            "example": "share-message-1",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "example": "2026-04-03T23:29:40.548Z",
            "type": "string"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/PublicChatShareMessage"
            },
            "type": "array"
          },
          "metadata": {
            "additionalProperties": {},
            "type": "object"
          },
          "published_at": {
            "example": "2026-04-03T23:29:42.548Z",
            "type": "string"
          },
          "runtime": {
            "$ref": "#/components/schemas/PublicChatShareRuntime"
          },
          "slug": {
            "example": "VufIWcgY0FlG",
            "pattern": "^[A-Za-z0-9_-]{12}$",
            "type": "string"
          }
        },
        "required": [
          "slug",
          "chat_id",
          "copied_until_message_id",
          "metadata",
          "messages",
          "created_at",
          "published_at"
        ],
        "type": "object"
      },
      "PublicChatShareDashboardPart": {
        "properties": {
          "data": {
            "properties": {
              "dashboard": {
                "$ref": "#/components/schemas/ArtifactDashboard"
              },
              "workflow_evidence": {}
            },
            "required": [
              "dashboard"
            ],
            "type": "object"
          },
          "id": {
            "example": "share-message-1-dashboard-0",
            "type": "string"
          },
          "type": {
            "enum": [
              "data-dashboard"
            ],
            "example": "data-dashboard",
            "type": "string"
          }
        },
        "required": [
          "type",
          "data"
        ],
        "type": "object"
      },
      "PublicChatShareMessage": {
        "properties": {
          "id": {
            "example": "share-message-1",
            "minLength": 1,
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {},
            "type": "object"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/PublicChatShareMessagePart"
            },
            "type": "array"
          },
          "role": {
            "enum": [
              "user",
              "assistant",
              "system"
            ],
            "example": "assistant",
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "parts"
        ],
        "type": "object"
      },
      "PublicChatShareMessagePart": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/PublicChatShareTextPart"
          },
          {
            "$ref": "#/components/schemas/PublicChatShareDashboardPart"
          },
          {
            "$ref": "#/components/schemas/PublicChatShareQuestionPart"
          },
          {
            "$ref": "#/components/schemas/PublicChatShareNativeMessagePart"
          }
        ]
      },
      "PublicChatShareNativeMessagePart": {
        "additionalProperties": {},
        "properties": {
          "type": {
            "example": "tool-StructuredOutput",
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "PublicChatShareQuestion": {
        "properties": {
          "header": {
            "example": "Horizon",
            "type": "string"
          },
          "id": {
            "example": "horizon",
            "type": "string"
          },
          "multiSelect": {
            "example": false,
            "type": "boolean"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/PublicChatShareQuestionOption"
            },
            "type": "array"
          },
          "question": {
            "example": "What time horizon should I use?",
            "type": "string"
          },
          "required": {
            "example": true,
            "type": "boolean"
          },
          "type": {
            "enum": [
              "text",
              "single_select",
              "multi_select"
            ],
            "example": "single_select",
            "type": "string"
          }
        },
        "required": [
          "question"
        ],
        "type": "object"
      },
      "PublicChatShareQuestionData": {
        "properties": {
          "questions": {
            "items": {
              "$ref": "#/components/schemas/PublicChatShareQuestion"
            },
            "minItems": 1,
            "type": "array"
          },
          "schema_version": {
            "enum": [
              "v1"
            ],
            "example": "v1",
            "type": "string"
          },
          "title": {
            "example": "Clarification needed",
            "type": "string"
          }
        },
        "required": [
          "questions"
        ],
        "type": "object"
      },
      "PublicChatShareQuestionOption": {
        "properties": {
          "description": {
            "example": "Use a multi-year investment horizon.",
            "type": "string"
          },
          "id": {
            "example": "time_horizon",
            "type": "string"
          },
          "label": {
            "example": "Long term",
            "type": "string"
          }
        },
        "required": [
          "label"
        ],
        "type": "object"
      },
      "PublicChatShareQuestionPart": {
        "properties": {
          "input": {
            "properties": {
              "assistant_message": {
                "example": "I need one clarification before continuing.",
                "type": "string"
              },
              "question_data": {
                "$ref": "#/components/schemas/PublicChatShareQuestionData"
              }
            },
            "required": [
              "question_data"
            ],
            "type": "object"
          },
          "state": {
            "enum": [
              "input-available"
            ],
            "example": "input-available",
            "type": "string"
          },
          "toolCallId": {
            "example": "public-siq-question",
            "type": "string"
          },
          "toolName": {
            "enum": [
              "SIQQuestion"
            ],
            "example": "SIQQuestion",
            "type": "string"
          },
          "type": {
            "enum": [
              "dynamic-tool"
            ],
            "example": "dynamic-tool",
            "type": "string"
          }
        },
        "required": [
          "type",
          "toolName",
          "toolCallId",
          "state",
          "input"
        ],
        "type": "object"
      },
      "PublicChatShareResponse": {
        "properties": {
          "schema_version": {
            "enum": [
              1
            ],
            "type": "number"
          },
          "share": {
            "$ref": "#/components/schemas/PublicChatShare"
          }
        },
        "required": [
          "schema_version",
          "share"
        ],
        "type": "object"
      },
      "PublicChatShareRuntime": {
        "properties": {
          "chat_id": {
            "description": "ID of the chat this public share shows",
            "example": "share_VufIWcgY0FlG",
            "type": "string"
          },
          "expires_at": {
            "description": "Token expiry time as Unix epoch seconds",
            "example": 1770000000,
            "exclusiveMinimum": 0,
            "type": "integer"
          },
          "kind": {
            "enum": [
              "cloudflare_readonly_share"
            ],
            "example": "cloudflare_readonly_share",
            "type": "string"
          },
          "token": {
            "description": "Short-lived read-only token for viewing this share",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "chat_id",
          "token",
          "expires_at"
        ],
        "type": [
          "object",
          "null"
        ]
      },
      "PublicChatShareRuntimeTokenResponse": {
        "properties": {
          "runtime": {
            "$ref": "#/components/schemas/PublicChatShareRuntime"
          }
        },
        "required": [
          "runtime"
        ],
        "type": "object"
      },
      "PublicChatShareTextPart": {
        "properties": {
          "text": {
            "example": "NVDA has strong momentum.",
            "type": "string"
          },
          "type": {
            "enum": [
              "text"
            ],
            "example": "text",
            "type": "string"
          }
        },
        "required": [
          "type",
          "text"
        ],
        "type": "object"
      },
      "PublicStrategiesResponse": {
        "additionalProperties": {},
        "properties": {
          "strategies": {
            "items": {
              "additionalProperties": {},
              "properties": {
                "id": {
                  "type": "string"
                },
                "metrics": {
                  "properties": {
                    "sharpeOverall": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "totalReturn": {
                      "description": "Stored cumulative return as a percentage; null means not known.",
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "totalReturnReason": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "totalReturn",
                    "totalReturnReason",
                    "sharpeOverall"
                  ],
                  "type": "object"
                },
                "name": {
                  "type": "string"
                },
                "performanceHistory": {
                  "items": {
                    "properties": {
                      "date": {
                        "type": "string"
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "date",
                      "value",
                      "reason"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "id",
                "name",
                "metrics",
                "performanceHistory"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "strategies"
        ],
        "type": "object"
      },
      "ReconcilePortfolioRequest": {
        "properties": {
          "dryRun": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "RobinhoodConnectRequest": {
        "properties": {
          "broker_type": {
            "enum": [
              "robinhood"
            ],
            "type": "string"
          }
        },
        "required": [
          "broker_type"
        ],
        "type": "object"
      },
      "SetDefaultPaymentMethodRequest": {
        "properties": {
          "paymentMethodId": {
            "type": "string"
          }
        },
        "required": [
          "paymentMethodId"
        ],
        "type": "object"
      },
      "SpendingCapRequest": {
        "properties": {
          "spending_cap_cents": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "spending_cap_cents"
        ],
        "type": "object"
      },
      "SpendingCapResponse": {
        "additionalProperties": {},
        "properties": {
          "message": {
            "type": "string"
          },
          "spending_cap_cents": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "message",
          "spending_cap_cents"
        ],
        "type": "object"
      },
      "StoredWatchlistProfileConfig": {
        "additionalProperties": false,
        "description": "Optional machine-readable configuration for the monitor profile, required by fund_oversight and rejected for research. Set subject.portfolio_id to a portfolio the monitor owner holds with no linked strategy; it is the only portfolio id here. Name the benchmark index, the benchmark basket and each peer fund by qualified symbol, for example GSPC.INDX, SPY.US and IVV.US, never a display name; each peer needs a holdings book. Put oversight policy, priorities and explanation preferences in the mandate, and durable owner policy without a typed field in custom, never a copy of current portfolio state. Use only the named threshold fields, each in the unit its description gives; unknown threshold keys are rejected. To change where a limit warns, set thresholds.warnings under the limit's own field, for example {\"warnings\": {\"tracking_error_budget\": 6}}. To change one row of the latest report, key thresholds.metrics by the metric_key that report shows for it.",
        "properties": {
          "comparators": {
            "additionalProperties": false,
            "description": "What this fund is measured against.",
            "properties": {
              "benchmark": {
                "additionalProperties": false,
                "description": "The index this fund is measured against.",
                "properties": {
                  "basket_symbol": {
                    "description": "Qualified fund symbol whose shared book stands in for the index constituents. Leave it out when index_symbol is itself a fund, whose own book is then the benchmark book.",
                    "minLength": 1,
                    "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
                    "type": "string"
                  },
                  "index_symbol": {
                    "description": "Qualified symbol whose returns are the benchmark, for example SPY.US or GSPC.INDX. A price index such as GSPC.INDX leaves dividends out of its return; a fund that tracks it, such as SPY.US, keeps them in its adjusted prices.",
                    "minLength": 1,
                    "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
                    "type": "string"
                  },
                  "name": {
                    "description": "Benchmark name as the owner writes it.",
                    "maxLength": 200,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "peer_funds": {
                "description": "Peer funds with books, compared holding by holding.",
                "items": {
                  "additionalProperties": false,
                  "description": "A comparator fund whose holdings come from the shared book store.",
                  "properties": {
                    "name": {
                      "description": "Fund name as the owner writes it, for reporting only.",
                      "maxLength": 200,
                      "minLength": 1,
                      "type": "string"
                    },
                    "symbol": {
                      "description": "Qualified symbol of the shared fund book.",
                      "minLength": 1,
                      "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "symbol"
                  ],
                  "type": "object"
                },
                "maxItems": 10,
                "type": "array"
              }
            },
            "type": "object"
          },
          "custom": {
            "additionalProperties": {},
            "description": "Anything the role-named slots do not cover. The engine reads five keys here: groups ({\"name\": [\"SYM.EX\", ...]}, which a custom_group limit needs), windows (overrides of its default windows, such as sellable_horizons: [1, 5] in trading days), bets.intended_groups (the factor groups the fund means to hold), scenarios.shocks ([{\"label\", \"factors\": {factor_id: return as a fraction}}]) and scenarios.windows ([{\"label\", \"start\", \"end\"}] in ISO days). Every other key is the owner's note for the report agent.",
            "type": "object"
          },
          "subject": {
            "additionalProperties": false,
            "description": "The portfolio this monitor oversees.",
            "properties": {
              "name": {
                "description": "Subject portfolio name as the owner writes it, for reporting only.",
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              "portfolio_id": {
                "description": "Portfolio id of the subject book. Must be owned by the monitor owner and have no linked strategy.",
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "thresholds": {
            "additionalProperties": false,
            "description": "Engine-readable numeric limits, each in the unit its field gives. Put owner context outside these fields in custom.",
            "properties": {
              "aum_scenarios": {
                "description": "Fund sizes to re-run the sell-down at, each in millions (500 means 500 million) of the currency the liquidity rows report in. Each is above zero, at most 50, and no two may match to six significant figures.",
                "items": {
                  "exclusiveMinimum": 0,
                  "type": "number"
                },
                "maxItems": 50,
                "type": "array"
              },
              "cash_pct": {
                "description": "Most cash the fund may hold, in percent: 5 means 5%.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "comparator": {
                "description": "The comparator relative_weight and tracking_error_budget are held against: \"benchmark\", or the symbol of one peer_funds entry. Leave it out to hold them against the benchmark. The other comparators still appear on the dashboard, without these limits.",
                "minLength": 1,
                "type": "string"
              },
              "irs_5pct_bucket_pct": {
                "description": "Most of the fund allowed in issuers that each weigh more than 5%, in percent: 50 means 50%.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "liquidity": {
                "additionalProperties": false,
                "description": "Sell-down defaults to 10% participation over the latest 20 trading observations. Explicit settings override these defaults.",
                "properties": {
                  "adtv_window_months": {
                    "description": "Calendar-month override for average daily traded value. When unset, use the latest 20 trading observations.",
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "illiquid_days": {
                    "description": "Trading days to sell past which a holding counts as illiquid.",
                    "minimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "participation": {
                    "description": "Largest share of a day's traded value the fund may sell, as a fraction: 0.3 means 30%. Defaults to 0.1 (10%).",
                    "exclusiveMinimum": 0,
                    "maximum": 1,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "metrics": {
                "additionalProperties": {
                  "additionalProperties": false,
                  "description": "An override for one row, replacing what the rule would compute.",
                  "properties": {
                    "amber": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Where this row turns amber. Leave it out to place amber a warning_fraction buffer inside red."
                    },
                    "direction": {
                      "description": "What the limit measures: above is a ceiling, below is a floor, outside is a plus-or-minus band.",
                      "enum": [
                        "above",
                        "below",
                        "outside"
                      ],
                      "type": "string"
                    },
                    "red": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "The limit itself: where this row turns red."
                    }
                  },
                  "type": "object"
                },
                "description": "Overrides for single rows of this monitor's latest report, keyed by the metric_key that report shows for the row, copied exactly. To move where a whole limit warns, use warnings. A monitor with no report yet has no rows to key.",
                "type": "object"
              },
              "relative_weight": {
                "additionalProperties": false,
                "properties": {
                  "country": {
                    "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one country, in percentage points either way: 6 means 6 points over or under.",
                    "minimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "custom_group": {
                    "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one group named in custom.groups, in percentage points either way: 6 means 6 points over or under.",
                    "minimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "sector": {
                    "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one sector, in percentage points either way: 6 means 6 points over or under.",
                    "minimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "single_name": {
                    "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one holding, in percentage points either way: 6 means 6 points over or under.",
                    "minimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "single_issuer_pct": {
                "description": "Most of the fund allowed in any one issuer, in percent: 25 means 25%. Every listing of one issuer counts toward one position.",
                "exclusiveMinimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "tracking_error_budget": {
                "description": "Largest forecast tracking error allowed against the limits comparator, in percent a year: 4 means 4%, not 0.04.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "warning_fraction": {
                "description": "Where amber sits as a fraction of each limit: 0.8 turns a row amber at 80% of its limit, and 1 gives no amber band, so a row turns red at its limit. Left out, the engine applies its default buffer.",
                "exclusiveMinimum": 0,
                "maximum": 1,
                "type": "number"
              },
              "warnings": {
                "additionalProperties": false,
                "description": "Where a limit starts to warn, keyed by that limit's own field and in its unit. For example {\"tracking_error_budget\": 6} warns at 6% under an 8% tracking error budget. A warning must sit inside its limit. A limit with no warning here warns at warning_fraction of its value.",
                "properties": {
                  "cash_pct": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "irs_5pct_bucket_pct": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "liquidity": {
                    "additionalProperties": false,
                    "properties": {
                      "illiquid_days": {
                        "exclusiveMinimum": 0,
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "type": "object"
                  },
                  "relative_weight": {
                    "additionalProperties": false,
                    "properties": {
                      "country": {
                        "exclusiveMinimum": 0,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "custom_group": {
                        "exclusiveMinimum": 0,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "sector": {
                        "exclusiveMinimum": 0,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "single_name": {
                        "exclusiveMinimum": 0,
                        "type": [
                          "number",
                          "null"
                        ]
                      }
                    },
                    "type": "object"
                  },
                  "single_issuer_pct": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "tracking_error_budget": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "StrategyApprovalItem": {
        "properties": {
          "approval_set_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "decision_id": {
            "format": "uuid",
            "type": "string"
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          },
          "reason_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "superseded_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "trade_facts": {},
          "trade_ids": {},
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "approval_set_id",
          "created_at",
          "decision_id",
          "portfolio_id",
          "reason_code",
          "status",
          "superseded_at",
          "updated_at"
        ],
        "type": "object"
      },
      "StrategyApprovalsResponse": {
        "properties": {
          "approvals": {
            "items": {
              "$ref": "#/components/schemas/StrategyApprovalItem"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "strategyId": {
            "format": "uuid",
            "type": "string"
          },
          "totalCount": {
            "type": "integer"
          }
        },
        "required": [
          "approvals",
          "limit",
          "offset",
          "strategyId",
          "totalCount"
        ],
        "type": "object"
      },
      "StrategyConstraintsResponse": {
        "properties": {
          "allowed_exchanges": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "blocked_symbols": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "is_strict": {
            "type": "boolean"
          },
          "max_drawdown_pct": {
            "type": "number"
          },
          "max_position_pct": {
            "type": "number"
          },
          "max_positions": {
            "type": "integer"
          },
          "min_cash_pct": {
            "type": "number"
          },
          "min_position_pct": {
            "type": "number"
          },
          "stop_loss_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "stop_on_drawdown": {
            "type": "boolean"
          }
        },
        "type": [
          "object",
          "null"
        ]
      },
      "StrategyControlRequest": {
        "properties": {
          "action": {
            "description": "Control action for strategy execution",
            "enum": [
              "pause",
              "resume",
              "deactivate"
            ],
            "example": "pause",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "type": "object"
      },
      "StrategyControlResult": {
        "properties": {
          "executionStatus": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "executionStatus",
          "message"
        ],
        "type": "object"
      },
      "StrategyCreateConstraints": {
        "description": "Creation requires min_position_pct, max_position_pct, and max_positions. Other omitted fields use server defaults, including min_cash_pct=0.05, max_drawdown_pct=0.15, and stop_on_drawdown=true. The create response returns the effective values.",
        "properties": {
          "allowed_exchanges": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "blocked_symbols": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "is_strict": {
            "type": "boolean"
          },
          "max_drawdown_pct": {
            "type": "number"
          },
          "max_position_pct": {
            "type": "number"
          },
          "max_positions": {
            "type": "integer"
          },
          "min_cash_pct": {
            "minimum": 0,
            "type": "number"
          },
          "min_position_pct": {
            "type": "number"
          },
          "stop_loss_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "stop_on_drawdown": {
            "type": "boolean"
          }
        },
        "required": [
          "max_position_pct",
          "max_positions",
          "min_position_pct"
        ],
        "type": "object"
      },
      "StrategyCreateRequest": {
        "properties": {
          "activateImmediately": {
            "description": "Defaults to false. False creates an existing but paused strategy; executionStatus, not isActive, controls running.",
            "type": "boolean"
          },
          "allocationGuidance": {
            "$ref": "#/components/schemas/AllocationGuidanceRequest"
          },
          "constraints": {
            "$ref": "#/components/schemas/StrategyCreateConstraints"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "initialCapital": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "rules": {
            "$ref": "#/components/schemas/StrategyRules"
          },
          "sourceChatId": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategyContent": {
            "type": "string"
          },
          "universe": {
            "description": "Included qualified symbols. At least one selector is required here or in allocationGuidance.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "constraints",
          "strategyContent"
        ],
        "type": "object"
      },
      "StrategyDetail": {
        "properties": {
          "allocationGuidance": {
            "$ref": "#/components/schemas/AllocationGuidanceResponse"
          },
          "cloneOfStrategyId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "constraints": {
            "$ref": "#/components/schemas/StrategyConstraintsResponse"
          },
          "createdAt": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "currentVersionNumber": {
            "type": [
              "integer",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionTriggers": {
            "additionalProperties": {},
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "initialCapital": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "lastExecutionAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "mandatePending": {
            "description": "True only for a shell strategy created alongside an imported portfolio: tracked but not yet managed, because no mandate has been written. Cleared once the first real mandate (strategyContent) is saved.",
            "type": "boolean"
          },
          "mandateVersion": {
            "description": "One historical revision's full mandate text, present when mandateVersion was requested; null when that version does not exist.",
            "properties": {
              "change_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "effective_from": {
                "type": "string"
              },
              "effective_to": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "strategy_content": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "version_number": {
                "type": "integer"
              }
            },
            "required": [
              "version_number",
              "effective_from",
              "effective_to",
              "change_description",
              "strategy_content"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "owned": {
            "type": "boolean"
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "promptFile": {
            "type": [
              "string",
              "null"
            ]
          },
          "rules": {
            "$ref": "#/components/schemas/StrategyRules"
          },
          "strategyContent": {
            "type": [
              "string",
              "null"
            ]
          },
          "triggerReferenceState": {
            "properties": {
              "portfolioValueUsd": {
                "type": "number"
              },
              "positionPrices": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "positionWeights": {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              "recordedAt": {
                "type": "string"
              }
            },
            "required": [
              "portfolioValueUsd",
              "positionPrices",
              "positionWeights",
              "recordedAt"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "universe": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "updatedAt": {
            "type": "string"
          },
          "versionHistory": {
            "items": {
              "properties": {
                "change_description": {
                  "type": "string"
                },
                "effective_from": {
                  "type": "string"
                },
                "effective_to": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version_number": {
                  "type": "integer"
                }
              },
              "required": [
                "version_number",
                "effective_from",
                "effective_to",
                "change_description"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "promptFile",
          "portfolioId",
          "initialCapital",
          "isActive",
          "owned",
          "createdBy",
          "cloneOfStrategyId",
          "createdAt",
          "updatedAt",
          "strategyContent",
          "universe",
          "constraints",
          "rules",
          "executionStatus",
          "allocationGuidance",
          "executionTriggers",
          "lastExecutionAt",
          "currentVersionNumber",
          "mandatePending",
          "triggerReferenceState"
        ],
        "type": "object"
      },
      "StrategyDetailResponse": {
        "properties": {
          "strategy": {
            "$ref": "#/components/schemas/StrategyDetail"
          }
        },
        "required": [
          "strategy"
        ],
        "type": "object"
      },
      "StrategyEventsResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/StrategyExecutionEventRecord"
            },
            "type": "array"
          }
        },
        "required": [
          "events"
        ],
        "type": "object"
      },
      "StrategyExecuteRequest": {
        "properties": {
          "custom_message": {
            "type": "string"
          },
          "execution_type": {
            "enum": [
              "manual_rebalance"
            ],
            "type": "string"
          },
          "trading_date": {
            "type": "string"
          }
        },
        "required": [
          "execution_type"
        ],
        "type": "object"
      },
      "StrategyExecuteResponse": {
        "properties": {
          "estimated_duration_seconds": {
            "type": "number"
          },
          "execution_id": {
            "format": "uuid",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "strategy_id": {
            "format": "uuid",
            "type": "string"
          },
          "stream_url": {
            "type": "string"
          }
        },
        "required": [
          "execution_id",
          "strategy_id",
          "status",
          "estimated_duration_seconds",
          "stream_url"
        ],
        "type": "object"
      },
      "StrategyExecutionEventRecord": {
        "properties": {
          "agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_data": {
            "$ref": "#/components/schemas/NestedJsonRecord"
          },
          "event_timestamp": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          }
        },
        "required": [
          "agent",
          "event_data",
          "event_timestamp",
          "event_type"
        ],
        "type": "object"
      },
      "StrategyExecutionListItem": {
        "properties": {
          "agent_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "decision_date": {
            "type": "string"
          },
          "decision_type": {
            "type": "string"
          },
          "event_count": {
            "type": "integer"
          },
          "execution_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "market_outlook": {
            "type": [
              "string",
              "null"
            ]
          },
          "reasoning": {
            "type": [
              "string",
              "null"
            ]
          },
          "risk_assessment": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategy_id": {
            "format": "uuid",
            "type": "string"
          },
          "structured_dashboard": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NestedJsonRecord"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "target_allocation": {
            "additionalProperties": {
              "type": "number"
            },
            "type": [
              "object",
              "null"
            ]
          },
          "task_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_instruction": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "strategy_id",
          "decision_date",
          "decision_type",
          "reasoning",
          "confidence",
          "target_allocation",
          "market_outlook",
          "risk_assessment",
          "structured_dashboard",
          "execution_status",
          "user_instruction",
          "agent_notes",
          "task_id",
          "created_at",
          "event_count"
        ],
        "type": "object"
      },
      "StrategyExecutionsResponse": {
        "properties": {
          "executions": {
            "items": {
              "$ref": "#/components/schemas/StrategyExecutionListItem"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "executions",
          "limit",
          "offset",
          "total"
        ],
        "type": "object"
      },
      "StrategyListItem": {
        "properties": {
          "cloneOfStrategyId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "executionStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "initialCapital": {
            "description": "Decimal string for precision",
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "lastExecutionAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "latestDecision": {
            "$ref": "#/components/schemas/LatestDecision"
          },
          "mandatePending": {
            "description": "True only for a shell strategy created alongside an imported portfolio: tracked but not yet managed, because no mandate has been written. Cleared once the first real mandate (strategyContent) is saved.",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "owned": {
            "type": "boolean"
          },
          "portfolioId": {
            "format": "uuid",
            "type": "string"
          },
          "promptFile": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "promptFile",
          "portfolioId",
          "initialCapital",
          "isActive",
          "executionStatus",
          "lastExecutionAt",
          "owned",
          "createdBy",
          "cloneOfStrategyId",
          "createdAt",
          "updatedAt",
          "mandatePending",
          "latestDecision"
        ],
        "type": "object"
      },
      "StrategyListResponse": {
        "properties": {
          "strategies": {
            "items": {
              "$ref": "#/components/schemas/StrategyListItem"
            },
            "type": "array"
          }
        },
        "required": [
          "strategies"
        ],
        "type": "object"
      },
      "StrategyPendingTradesResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "StrategyRules": {
        "description": "On creation, omitted rebalance_frequency and rebalance_time_utc default to daily and 21:00 UTC. The create response returns the effective rules.",
        "properties": {
          "lookback_days": {
            "type": "integer"
          },
          "model_key": {
            "enum": [
              "luna",
              "sol",
              "sol61",
              "astra",
              "sonnet55",
              "opus55",
              "terra61",
              "haiku55",
              "fusion_deep",
              "fusion_quick",
              "fusion_light"
            ],
            "type": "string"
          },
          "rebalance_frequency": {
            "enum": [
              "daily",
              "weekly",
              "monthly"
            ],
            "type": "string"
          },
          "rebalance_time_utc": {
            "type": "string"
          }
        },
        "type": [
          "object",
          "null"
        ]
      },
      "StrategyUpdateRequest": {
        "properties": {
          "allocationGuidance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AllocationGuidanceRequest"
              },
              {
                "description": "Canonical market_based allocation guidance. Select at least one market, asset class, sector, or included symbol; universe is an alternative source of included symbols."
              }
            ]
          },
          "changeDescription": {
            "type": "string"
          },
          "constraints": {
            "properties": {
              "allowed_exchanges": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "blocked_symbols": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "array",
                  "null"
                ]
              },
              "is_strict": {
                "type": "boolean"
              },
              "max_drawdown_pct": {
                "type": "number"
              },
              "max_position_pct": {
                "type": "number"
              },
              "max_positions": {
                "type": "integer"
              },
              "min_cash_pct": {
                "type": "number"
              },
              "min_position_pct": {
                "type": "number"
              },
              "stop_loss_pct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "stop_on_drawdown": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "expectedVersion": {
            "type": "integer"
          },
          "initial_capital": {},
          "initialCapital": {},
          "name": {
            "type": "string"
          },
          "rules": {
            "properties": {
              "lookback_days": {
                "type": "integer"
              },
              "model_key": {
                "enum": [
                  "luna",
                  "sol",
                  "sol61",
                  "astra",
                  "sonnet55",
                  "opus55",
                  "terra61",
                  "haiku55",
                  "fusion_deep",
                  "fusion_quick",
                  "fusion_light"
                ],
                "type": "string"
              },
              "rebalance_frequency": {
                "enum": [
                  "daily",
                  "weekly",
                  "monthly"
                ],
                "type": "string"
              },
              "rebalance_time_utc": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "strategyContent": {
            "type": "string"
          },
          "universe": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SubsetViolation": {
        "properties": {
          "broker_quantity": {
            "type": "string"
          },
          "issue": {
            "enum": [
              "missing",
              "insufficient",
              "excess"
            ],
            "type": "string"
          },
          "siq_quantity": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        },
        "required": [
          "symbol",
          "siq_quantity",
          "broker_quantity",
          "issue"
        ],
        "type": "object"
      },
      "SymbolAnalyticsLatestResponse": {
        "properties": {
          "as_of": {
            "description": "Date of the latest close used, as YYYY-MM-DD.",
            "type": "string"
          },
          "cache": {
            "properties": {
              "hit": {
                "type": "boolean"
              },
              "ttl_seconds": {
                "type": "number"
              }
            },
            "required": [
              "hit",
              "ttl_seconds"
            ],
            "type": "object"
          },
          "computed_at": {
            "description": "When the snapshot was computed, in ISO 8601.",
            "type": "string"
          },
          "mode": {
            "enum": [
              "latest"
            ],
            "type": "string"
          },
          "schema_version": {
            "enum": [
              1
            ],
            "type": "number"
          },
          "snapshot": {
            "$ref": "#/components/schemas/SymbolAnalyticsSnapshot"
          }
        },
        "required": [
          "as_of",
          "computed_at",
          "mode",
          "schema_version",
          "snapshot"
        ],
        "type": "object"
      },
      "SymbolAnalyticsSnapshot": {
        "properties": {
          "as_of": {
            "description": "Date of the latest close used, as YYYY-MM-DD.",
            "type": "string"
          },
          "benchmark": {
            "description": "Symbol used for beta and relative performance.",
            "type": "string"
          },
          "computed_for_symbols": {
            "description": "The requested symbols that had price data.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "data_receipt": {
            "additionalProperties": {},
            "description": "Which inputs were fetched and which failed.",
            "type": "object"
          },
          "schema_version": {
            "type": "integer"
          },
          "symbols": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SymbolAnalyticsSymbol"
            },
            "type": "object"
          },
          "watchlist": {
            "additionalProperties": {},
            "description": "Analytics for the symbols as one list: equal-weight index against the benchmark, sector breakdown, market regime, correlation and highlights.",
            "type": "object"
          }
        },
        "required": [
          "schema_version",
          "as_of",
          "computed_for_symbols",
          "benchmark",
          "symbols",
          "watchlist",
          "data_receipt"
        ],
        "type": "object"
      },
      "SymbolAnalyticsSymbol": {
        "additionalProperties": {},
        "description": "Analytics for one symbol: returns, volatility, beta, 52-week range, signal z-scores, fundamentals, valuation, analyst and sector percentiles. A figure that cannot be computed is left out or null, never zero.",
        "properties": {
          "error": {
            "description": "Why this symbol has no analytics, such as no_price_data. Absent when it has them.",
            "type": [
              "string",
              "null"
            ]
          },
          "last_close": {
            "type": "number"
          },
          "symbol": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "SymbolBaselineCard": {
        "additionalProperties": {},
        "properties": {
          "as_of": {
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_close": {
            "type": "number"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol": {
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "last_close",
          "symbol"
        ],
        "type": "object"
      },
      "SymbolBaselineLatestResponse": {
        "properties": {
          "as_of": {
            "type": "string"
          },
          "cache": {
            "properties": {
              "hit": {
                "type": "boolean"
              },
              "ttl_seconds": {
                "type": "number"
              }
            },
            "required": [
              "hit",
              "ttl_seconds"
            ],
            "type": "object"
          },
          "cards": {
            "additionalProperties": {
              "$ref": "#/components/schemas/SymbolBaselineCard"
            },
            "type": "object"
          },
          "computed_at": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "latest"
            ],
            "type": "string"
          },
          "schema_version": {
            "enum": [
              1
            ],
            "type": "number"
          },
          "unresolved": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "as_of",
          "cards",
          "computed_at",
          "mode",
          "schema_version",
          "unresolved"
        ],
        "type": "object"
      },
      "SymbolCacheStatusResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SymbolExchangesResponse": {
        "properties": {
          "exchanges": {
            "items": {
              "properties": {
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "types": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "code",
                "name",
                "types"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "exchanges"
        ],
        "type": "object"
      },
      "SymbolQuotesRequest": {
        "properties": {
          "symbols": {
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 60,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "symbols"
        ],
        "type": "object"
      },
      "SymbolSearchItem": {
        "properties": {
          "code": {
            "description": "Ticker code",
            "example": "AAPL",
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange": {
            "description": "Exchange code",
            "example": "US",
            "type": "string"
          },
          "name": {
            "description": "Company name",
            "example": "Apple Inc",
            "type": "string"
          },
          "symbol": {
            "description": "Full symbol (e.g., AAPL.US)",
            "example": "AAPL.US",
            "type": "string"
          },
          "type": {
            "description": "Instrument type",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "symbol",
          "code",
          "name",
          "exchange",
          "type",
          "currency"
        ],
        "type": "object"
      },
      "SymbolSearchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/SymbolSearchItem"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "results",
          "total"
        ],
        "type": "object"
      },
      "SyncLiveStateResponse": {
        "properties": {
          "latestDecisionId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "routedAction": {
            "enum": [
              "none",
              "reconnect",
              "prepare_approval",
              "reconcile",
              "wait"
            ],
            "type": "string"
          },
          "state": {
            "enum": [
              "clean",
              "reconnect_required",
              "preparing",
              "reconciling",
              "waiting"
            ],
            "type": "string"
          },
          "taskId": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "state",
          "taskId",
          "latestDecisionId",
          "routedAction",
          "message"
        ],
        "type": "object"
      },
      "TradeExecutionAttemptsResponse": {
        "additionalProperties": {},
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "TradeItem": {
        "properties": {
          "action": {
            "enum": [
              "BUY",
              "SELL",
              "SELL_SHORT",
              "BUY_TO_COVER",
              "SPLIT"
            ],
            "type": "string"
          },
          "brokerActionRequired": {
            "$ref": "#/components/schemas/BrokerUserActionNotice"
          },
          "cancelReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "commission": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "decisionId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "decisionPrice": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorMessage": {
            "type": "string"
          },
          "executedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "historySource": {
            "enum": [
              "strategy_trade",
              "external_broker_sync"
            ],
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "intendedNotional": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "description": "Decimal string",
            "type": "string"
          },
          "priceCurrency": {
            "type": [
              "string",
              "null"
            ]
          },
          "quantity": {
            "description": "Decimal string",
            "type": "string"
          },
          "reasoning": {
            "type": "string"
          },
          "status": {
            "enum": [
              "awaiting_approval",
              "pending",
              "executing",
              "executed",
              "cancel_requested",
              "cancelled",
              "failed",
              "superseded",
              "state_unknown"
            ],
            "type": "string"
          },
          "strategyId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "symbol": {
            "type": "string"
          },
          "totalValue": {
            "description": "Decimal string",
            "type": "string"
          }
        },
        "required": [
          "id",
          "strategyId",
          "decisionId",
          "executedAt",
          "action",
          "symbol",
          "quantity",
          "price",
          "priceCurrency",
          "totalValue",
          "commission",
          "createdAt",
          "status",
          "intendedNotional",
          "decisionPrice",
          "cancelReason"
        ],
        "type": "object"
      },
      "TradesResponse": {
        "properties": {
          "metadata": {
            "properties": {
              "limit": {
                "type": "integer"
              },
              "offset": {
                "type": "integer"
              },
              "total": {
                "type": "integer"
              }
            },
            "required": [
              "total",
              "limit",
              "offset"
            ],
            "type": "object"
          },
          "trades": {
            "items": {
              "$ref": "#/components/schemas/TradeItem"
            },
            "type": "array"
          }
        },
        "required": [
          "trades",
          "metadata"
        ],
        "type": "object"
      },
      "Trading212BrokerConnectRequest": {
        "properties": {
          "api_key": {
            "minLength": 8,
            "type": "string"
          },
          "api_secret": {
            "minLength": 8,
            "type": "string"
          },
          "broker_type": {
            "enum": [
              "trading212"
            ],
            "type": "string"
          },
          "broker_user_name": {
            "type": "string"
          },
          "permissions": {
            "$ref": "#/components/schemas/Trading212Permissions"
          }
        },
        "required": [
          "api_key",
          "api_secret",
          "broker_type",
          "permissions"
        ],
        "type": "object"
      },
      "Trading212ConnectRequest": {
        "properties": {
          "api_key": {
            "minLength": 8,
            "type": "string"
          },
          "api_secret": {
            "minLength": 8,
            "type": "string"
          },
          "broker_type": {
            "enum": [
              "trading212"
            ],
            "type": "string"
          },
          "broker_user_name": {
            "type": "string"
          },
          "permissions": {
            "$ref": "#/components/schemas/Trading212Permissions"
          }
        },
        "required": [
          "api_key",
          "api_secret",
          "permissions"
        ],
        "type": "object"
      },
      "Trading212Permissions": {
        "properties": {
          "account_data": {
            "type": "boolean"
          },
          "history_dividends": {
            "type": "boolean"
          },
          "history_orders": {
            "type": "boolean"
          },
          "history_transactions": {
            "type": "boolean"
          },
          "metadata": {
            "type": "boolean"
          },
          "orders_execute": {
            "type": "boolean"
          },
          "orders_read": {
            "type": "boolean"
          },
          "pies_read": {
            "type": "boolean"
          },
          "pies_write": {
            "type": "boolean"
          },
          "portfolio": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "TransitionResponse": {
        "additionalProperties": {},
        "properties": {
          "status": {
            "type": "string"
          },
          "task_id": {
            "type": "string"
          },
          "taskId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "UnlinkStrategyResponse": {
        "properties": {
          "cancelled_pending_trades": {
            "type": "integer"
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          },
          "previous_strategy_id": {
            "format": "uuid",
            "type": "string"
          },
          "unlinked_at": {
            "type": "string"
          }
        },
        "required": [
          "portfolio_id",
          "previous_strategy_id",
          "unlinked_at",
          "cancelled_pending_trades"
        ],
        "type": "object"
      },
      "UpdateStrategyResponse": {
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "versionId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "versionNumber": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "updatedAt",
          "versionId",
          "versionNumber"
        ],
        "type": "object"
      },
      "UpdateWatchlistRequest": {
        "properties": {
          "change_description": {
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          },
          "mandate": {
            "maxLength": 50000,
            "minLength": 1,
            "type": "string"
          },
          "model_key": {
            "enum": [
              "luna",
              "sol",
              "sol61",
              "astra",
              "sonnet55",
              "opus55",
              "terra61",
              "haiku55",
              "fusion_deep",
              "fusion_quick",
              "fusion_light"
            ],
            "type": "string"
          },
          "name": {
            "example": "AI Infrastructure",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/WatchlistProfile"
          },
          "profile_config": {
            "$ref": "#/components/schemas/NullableWatchlistProfileConfig"
          },
          "recurrence": {
            "$ref": "#/components/schemas/WatchlistRecurrence"
          },
          "symbol_notes": {
            "$ref": "#/components/schemas/WatchlistSymbolNotes"
          },
          "symbols": {
            "items": {
              "example": "AAPL.US",
              "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
              "type": "string"
            },
            "maxItems": 100,
            "type": "array"
          }
        },
        "required": [
          "change_description"
        ],
        "type": "object"
      },
      "UsageLimits": {
        "properties": {
          "block_reason": {
            "enum": [
              "free_tier_exhausted",
              "spending_cap_reached",
              "subscription_inactive",
              "not_configured"
            ],
            "type": "string"
          },
          "bonus_credits": {
            "minimum": 0,
            "type": "integer"
          },
          "credits_included": {
            "minimum": 0,
            "type": "integer"
          },
          "credits_remaining": {
            "minimum": 0,
            "type": "integer"
          },
          "credits_used": {
            "minimum": 0,
            "type": "integer"
          },
          "current_tier": {
            "enum": [
              "free",
              "included",
              "overage"
            ],
            "type": "string"
          },
          "effective_credits_included": {
            "minimum": 0,
            "type": "integer"
          },
          "has_payment_method": {
            "type": "boolean"
          },
          "is_warning_threshold": {
            "type": "boolean"
          },
          "is_within_limit": {
            "type": "boolean"
          },
          "overage_credits": {
            "minimum": 0,
            "type": "integer"
          },
          "payg_spending_cap_cents": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "payg_spent_cents": {
            "minimum": 0,
            "type": "number"
          },
          "percentage_used": {
            "maximum": 100,
            "minimum": 0,
            "type": "number"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          }
        },
        "required": [
          "credits_used",
          "credits_included",
          "credits_remaining",
          "overage_credits",
          "current_tier",
          "has_payment_method",
          "payg_spending_cap_cents",
          "payg_spent_cents",
          "is_within_limit",
          "percentage_used",
          "is_warning_threshold",
          "period_start",
          "period_end",
          "bonus_credits",
          "effective_credits_included"
        ],
        "type": "object"
      },
      "Watchlist": {
        "properties": {
          "agent_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "current_version": {
            "minimum": 1,
            "type": "integer"
          },
          "current_version_id": {
            "format": "uuid",
            "type": "string"
          },
          "execution_status": {
            "$ref": "#/components/schemas/WatchlistLifecycleStatus"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/WatchlistKind"
          },
          "mandate": {
            "type": "string"
          },
          "mandate_version": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WatchlistVersion"
              },
              {
                "type": [
                  "object",
                  "null"
                ]
              }
            ]
          },
          "model_key": {
            "enum": [
              "luna",
              "sol",
              "sol61",
              "astra",
              "sonnet55",
              "opus55",
              "terra61",
              "haiku55",
              "fusion_deep",
              "fusion_quick",
              "fusion_light"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/WatchlistProfile"
          },
          "profile_config": {
            "$ref": "#/components/schemas/NullableStoredWatchlistProfileConfig"
          },
          "recurrence": {
            "$ref": "#/components/schemas/WatchlistRecurrence"
          },
          "runtime_move_pending": {
            "description": "True while the monitor is moving to the new runtime. Runs, schedule changes, edits and deletion are refused until the move finishes; reports stay readable. Monitor reads always include it.",
            "type": "boolean"
          },
          "symbol_notes": {
            "$ref": "#/components/schemas/WatchlistSymbolNotes"
          },
          "symbols": {
            "items": {
              "example": "AAPL.US",
              "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
              "type": "string"
            },
            "type": "array"
          },
          "updated_at": {
            "type": "string"
          },
          "user_email": {
            "format": "email",
            "type": "string"
          },
          "version_history": {
            "items": {
              "$ref": "#/components/schemas/WatchlistVersion"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "user_email",
          "name",
          "symbols",
          "symbol_notes",
          "agent_enabled",
          "execution_status",
          "current_version_id",
          "current_version",
          "mandate",
          "recurrence",
          "kind",
          "profile",
          "profile_config",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "WatchlistActiveExecution": {
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "execution_id": {
            "description": "Monitor execution UUID. Use this value for the reports/{reportId} detail path; it is distinct from report_id.",
            "format": "uuid",
            "type": "string"
          },
          "queued_at": {
            "type": "string"
          },
          "report_date": {
            "type": "string"
          },
          "run_type": {
            "$ref": "#/components/schemas/WatchlistRunType"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "enum": [
              "queued",
              "running"
            ],
            "type": "string"
          },
          "superseded_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "task_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "watchlist_id": {
            "format": "uuid",
            "type": "string"
          },
          "watchlist_version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "execution_id",
          "watchlist_id",
          "watchlist_version_id",
          "run_type",
          "report_date",
          "queued_at",
          "started_at",
          "completed_at",
          "superseded_at",
          "status"
        ],
        "type": "object"
      },
      "WatchlistAnalyticsSnapshot": {
        "properties": {
          "computed_at": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "schema_version": {
            "type": "integer"
          },
          "snapshot": {
            "additionalProperties": {},
            "type": "object"
          },
          "snapshot_date": {
            "type": "string"
          },
          "watchlist_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "watchlist_id",
          "snapshot_date",
          "schema_version",
          "computed_at",
          "snapshot"
        ],
        "type": "object"
      },
      "WatchlistControlRequest": {
        "properties": {
          "action": {
            "enum": [
              "enable",
              "disable"
            ],
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "type": "object"
      },
      "WatchlistDeletePendingResponse": {
        "properties": {
          "code": {
            "enum": [
              "MONITOR_DELETE_PENDING"
            ],
            "type": "string"
          },
          "delete_operation_id": {
            "format": "uuid",
            "type": "string"
          },
          "error": {
            "enum": [
              "MONITOR_DELETE_PENDING"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message"
        ],
        "type": "object"
      },
      "WatchlistKind": {
        "enum": [
          "user",
          "system"
        ],
        "type": "string"
      },
      "WatchlistLifecycleStatus": {
        "enum": [
          "paused",
          "running"
        ],
        "type": "string"
      },
      "WatchlistLifecycleUnavailableResponse": {
        "properties": {
          "code": {
            "enum": [
              "MONITOR_LIFECYCLE_UNAVAILABLE"
            ],
            "type": "string"
          },
          "error": {
            "enum": [
              "MONITOR_LIFECYCLE_UNAVAILABLE"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message"
        ],
        "type": "object"
      },
      "WatchlistListItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Watchlist"
          },
          {
            "properties": {
              "latest_report_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "latest_report_status": {
                "$ref": "#/components/schemas/WatchlistReportStatus"
              }
            },
            "type": "object"
          }
        ]
      },
      "WatchlistListResponse": {
        "items": {
          "$ref": "#/components/schemas/WatchlistListItem"
        },
        "type": "array"
      },
      "WatchlistMetricThreshold": {
        "additionalProperties": false,
        "properties": {
          "amber": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "direction": {
            "enum": [
              "above",
              "below",
              "outside"
            ],
            "type": "string"
          },
          "red": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "WatchlistMutationResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Watchlist"
          },
          {
            "properties": {
              "report_scheduling": {
                "$ref": "#/components/schemas/WatchlistReportScheduling"
              }
            },
            "type": "object"
          }
        ]
      },
      "WatchlistProfile": {
        "enum": [
          "research",
          "fund_oversight"
        ],
        "type": "string"
      },
      "WatchlistProfileBenchmark": {
        "additionalProperties": false,
        "properties": {
          "basket_symbol": {
            "example": "AAPL.US",
            "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
            "type": "string"
          },
          "index_symbol": {
            "example": "AAPL.US",
            "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WatchlistProfileBook": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "portfolio_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "WatchlistProfileComparators": {
        "additionalProperties": false,
        "properties": {
          "benchmark": {
            "$ref": "#/components/schemas/WatchlistProfileBenchmark"
          },
          "peer_funds": {
            "items": {
              "$ref": "#/components/schemas/WatchlistProfileFundSymbol"
            },
            "maxItems": 10,
            "type": "array"
          }
        },
        "type": "object"
      },
      "WatchlistProfileConfig": {
        "additionalProperties": false,
        "example": {
          "comparators": {
            "benchmark": {
              "basket_symbol": "SPY.US",
              "index_symbol": "GSPC.INDX"
            },
            "peer_funds": [
              {
                "name": "A public peer fund",
                "symbol": "IVV.US"
              },
              {
                "name": "Another public peer fund",
                "symbol": "VOO.US"
              }
            ]
          },
          "subject": {
            "name": "A public equity fund",
            "portfolio_id": "550e8400-e29b-41d4-a716-446655440000"
          },
          "thresholds": {
            "cash_pct": 1,
            "relative_weight": {
              "sector": 15
            }
          }
        },
        "properties": {
          "comparators": {
            "$ref": "#/components/schemas/WatchlistProfileComparators"
          },
          "custom": {
            "$ref": "#/components/schemas/WatchlistProfileCustom"
          },
          "subject": {
            "$ref": "#/components/schemas/WatchlistProfileBook"
          },
          "thresholds": {
            "$ref": "#/components/schemas/WatchlistThresholds"
          }
        },
        "type": "object"
      },
      "WatchlistProfileCustom": {
        "additionalProperties": {},
        "type": "object"
      },
      "WatchlistProfileFundSymbol": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "type": "string"
          },
          "symbol": {
            "example": "AAPL.US",
            "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
            "type": "string"
          }
        },
        "required": [
          "name",
          "symbol"
        ],
        "type": "object"
      },
      "WatchlistQuote": {
        "properties": {
          "as_of": {
            "type": "string"
          },
          "change_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "native_price": {
            "type": [
              "number",
              "null"
            ]
          },
          "price": {
            "type": "number"
          }
        },
        "required": [
          "price",
          "change_pct",
          "as_of"
        ],
        "type": "object"
      },
      "WatchlistQuotesResponse": {
        "additionalProperties": {
          "$ref": "#/components/schemas/WatchlistQuote"
        },
        "type": "object"
      },
      "WatchlistRecurrence": {
        "oneOf": [
          {
            "properties": {
              "kind": {
                "enum": [
                  "daily"
                ],
                "type": "string"
              },
              "local_time": {
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "type": "string"
              },
              "timezone": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "local_time",
              "timezone"
            ],
            "type": "object"
          },
          {
            "properties": {
              "kind": {
                "enum": [
                  "weekdays"
                ],
                "type": "string"
              },
              "local_time": {
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "type": "string"
              },
              "timezone": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "local_time",
              "timezone"
            ],
            "type": "object"
          },
          {
            "properties": {
              "kind": {
                "enum": [
                  "weekly"
                ],
                "type": "string"
              },
              "local_time": {
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
                "type": "string"
              },
              "timezone": {
                "type": "string"
              },
              "weekdays": {
                "items": {
                  "enum": [
                    "monday",
                    "tuesday",
                    "wednesday",
                    "thursday",
                    "friday",
                    "saturday",
                    "sunday"
                  ],
                  "type": "string"
                },
                "maxItems": 7,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "kind",
              "weekdays",
              "local_time",
              "timezone"
            ],
            "type": "object"
          },
          {
            "type": "null"
          }
        ]
      },
      "WatchlistReport": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WatchlistReportSummary"
          },
          {
            "properties": {
              "dataframe_snapshots": {
                "additionalProperties": {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": {},
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "metadata": {
                      "additionalProperties": false,
                      "properties": {
                        "available_rows": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "columns": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "format": {
                                "enum": [
                                  "percent"
                                ],
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              },
                              "unit": {
                                "enum": [
                                  "fraction",
                                  "pct",
                                  "pts",
                                  "ratio",
                                  "days",
                                  "currency",
                                  "count"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "type"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "page": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "page_size": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "snapshot_truncated": {
                          "type": "boolean"
                        },
                        "total_pages": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "total_rows": {
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "columns",
                        "page",
                        "page_size",
                        "total_pages",
                        "total_rows"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "data",
                    "metadata"
                  ],
                  "type": "object"
                },
                "type": "object"
              },
              "published_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "report": {
                "additionalProperties": {},
                "type": [
                  "object",
                  "null"
                ]
              },
              "report_id": {
                "description": "UUID of the saved report artifact. It is distinct from execution_id and is not the reports/{reportId} lookup value.",
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "structured_dashboard": {
                "additionalProperties": {},
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "report_id",
              "report",
              "structured_dashboard",
              "published_at"
            ],
            "type": "object"
          }
        ]
      },
      "WatchlistReportRunAcceptedResponse": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/WatchlistReportRunResponse"
          },
          {
            "$ref": "#/components/schemas/WatchlistReportRunPendingResponse"
          }
        ]
      },
      "WatchlistReportRunPendingResponse": {
        "properties": {
          "status": {
            "enum": [
              "pending"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "WatchlistReportRunResponse": {
        "properties": {
          "custom_message_applied": {
            "default": false,
            "type": "boolean"
          },
          "execution_id": {
            "format": "uuid",
            "type": "string"
          },
          "joined_existing_run": {
            "type": "boolean"
          },
          "report_date": {
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running"
            ],
            "type": "string"
          },
          "watchlist_version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "execution_id",
          "watchlist_version_id",
          "status",
          "joined_existing_run",
          "report_date"
        ],
        "type": "object"
      },
      "WatchlistReportScheduling": {
        "enum": [
          "unavailable"
        ],
        "type": "string"
      },
      "WatchlistReportsResponse": {
        "properties": {
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "reports": {
            "items": {
              "$ref": "#/components/schemas/WatchlistReportSummary"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "reports",
          "total",
          "limit",
          "offset"
        ],
        "type": "object"
      },
      "WatchlistReportStatus": {
        "enum": [
          "queued",
          "running",
          "completed",
          "failed",
          "superseded",
          null
        ],
        "type": [
          "string",
          "null"
        ]
      },
      "WatchlistReportSummary": {
        "properties": {
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "execution_id": {
            "description": "Monitor execution UUID. Use this value for the reports/{reportId} detail path; it is distinct from report_id.",
            "format": "uuid",
            "type": "string"
          },
          "queued_at": {
            "type": "string"
          },
          "report_date": {
            "type": "string"
          },
          "run_type": {
            "$ref": "#/components/schemas/WatchlistRunType"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/WatchlistReportStatus"
          },
          "superseded_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "task_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "watchlist_id": {
            "format": "uuid",
            "type": "string"
          },
          "watchlist_version_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "execution_id",
          "watchlist_id",
          "watchlist_version_id",
          "run_type",
          "report_date",
          "status",
          "queued_at",
          "started_at",
          "completed_at",
          "superseded_at"
        ],
        "type": "object"
      },
      "WatchlistRunReportRequest": {
        "properties": {
          "custom_message": {
            "description": "One-off instruction for this run only. It reaches this run's prompt and does not change the monitor mandate. A run that joins one already queued or running answers custom_message_applied=false.",
            "example": "Lead with the liquidity section today.",
            "maxLength": 500,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "WatchlistRunResults": {
        "properties": {
          "after": {
            "description": "The number of results skipped, as requested.",
            "minimum": 0,
            "type": "integer"
          },
          "execution_id": {
            "format": "uuid",
            "type": "string"
          },
          "results": {
            "description": "Engine results the run has shown so far, oldest first. Each has schema_version, a view (what the user sees, with status, as_of and reason) and a component (the data drawn). A failed result has a null as_of and a null component.",
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "execution_id",
          "after",
          "results"
        ],
        "type": "object"
      },
      "WatchlistRuntimeMovePendingResponse": {
        "properties": {
          "code": {
            "enum": [
              "MONITOR_RUNTIME_MOVE_PENDING"
            ],
            "type": "string"
          },
          "error": {
            "enum": [
              "MONITOR_RUNTIME_MOVE_PENDING"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message"
        ],
        "type": "object"
      },
      "WatchlistRunType": {
        "enum": [
          "manual",
          "scheduled"
        ],
        "type": "string"
      },
      "WatchlistSchedulingUnavailableResponse": {
        "properties": {
          "agent_enabled": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "report_scheduling": {
            "$ref": "#/components/schemas/WatchlistReportScheduling"
          },
          "watchlist_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message",
          "report_scheduling",
          "agent_enabled",
          "watchlist_id"
        ],
        "type": "object"
      },
      "WatchlistSymbolNotes": {
        "additionalProperties": {
          "type": "string"
        },
        "type": "object"
      },
      "WatchlistThresholds": {
        "additionalProperties": false,
        "properties": {
          "aum_scenarios": {
            "description": "Fund sizes to re-run the sell-down at, each in millions (500 means 500 million) of the currency the liquidity rows report in. Each is above zero, at most 50, and no two may match to six significant figures.",
            "items": {
              "exclusiveMinimum": 0,
              "type": "number"
            },
            "maxItems": 50,
            "type": "array"
          },
          "cash_pct": {
            "description": "Most cash the fund may hold, in percent: 5 means 5%.",
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "comparator": {
            "description": "The comparator relative_weight and tracking_error_budget are held against: \"benchmark\", or the symbol of one peer_funds entry. Leave it out to hold them against the benchmark. The other comparators still appear on the dashboard, without these limits.",
            "minLength": 1,
            "type": "string"
          },
          "irs_5pct_bucket_pct": {
            "description": "Most of the fund allowed in issuers that each weigh more than 5%, in percent: 50 means 50%.",
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "liquidity": {
            "additionalProperties": false,
            "description": "Sell-down defaults to 10% participation over the latest 20 trading observations. Explicit settings override these defaults.",
            "properties": {
              "adtv_window_months": {
                "description": "Calendar-month override for average daily traded value. When unset, use the latest 20 trading observations.",
                "exclusiveMinimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "illiquid_days": {
                "description": "Trading days to sell past which a holding counts as illiquid.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "participation": {
                "description": "Largest share of a day's traded value the fund may sell, as a fraction: 0.3 means 30%. Defaults to 0.1 (10%).",
                "exclusiveMinimum": 0,
                "maximum": 1,
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "metrics": {
            "additionalProperties": {
              "$ref": "#/components/schemas/WatchlistMetricThreshold"
            },
            "description": "Overrides for single rows of this monitor's latest report, keyed by the metric_key that report shows for the row, copied exactly. To move where a whole limit warns, use warnings. A monitor with no report yet has no rows to key.",
            "type": "object"
          },
          "relative_weight": {
            "additionalProperties": false,
            "properties": {
              "country": {
                "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one country, in percentage points either way: 6 means 6 points over or under.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "custom_group": {
                "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one group named in custom.groups, in percentage points either way: 6 means 6 points over or under.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "sector": {
                "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one sector, in percentage points either way: 6 means 6 points over or under.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "single_name": {
                "description": "Largest gap allowed between the fund's weight and the limits comparator's weight in any one holding, in percentage points either way: 6 means 6 points over or under.",
                "minimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "single_issuer_pct": {
            "description": "Most of the fund allowed in any one issuer, in percent: 25 means 25%. Every listing of one issuer counts toward one position.",
            "exclusiveMinimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "tracking_error_budget": {
            "description": "Largest forecast tracking error allowed against the limits comparator, in percent a year: 4 means 4%, not 0.04.",
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "warning_fraction": {
            "description": "Where amber sits as a fraction of each limit: 0.8 turns a row amber at 80% of its limit, and 1 gives no amber band, so a row turns red at its limit. Left out, the engine applies its default buffer.",
            "exclusiveMinimum": 0,
            "maximum": 1,
            "type": "number"
          },
          "warnings": {
            "additionalProperties": false,
            "description": "Where a limit starts to warn, keyed by that limit's own field and in its unit. For example {\"tracking_error_budget\": 6} warns at 6% under an 8% tracking error budget. A warning must sit inside its limit. A limit with no warning here warns at warning_fraction of its value.",
            "properties": {
              "cash_pct": {
                "exclusiveMinimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "irs_5pct_bucket_pct": {
                "exclusiveMinimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "liquidity": {
                "additionalProperties": false,
                "properties": {
                  "illiquid_days": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "relative_weight": {
                "additionalProperties": false,
                "properties": {
                  "country": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "custom_group": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "sector": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "single_name": {
                    "exclusiveMinimum": 0,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "single_issuer_pct": {
                "exclusiveMinimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              },
              "tracking_error_budget": {
                "exclusiveMinimum": 0,
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "WatchlistVersion": {
        "properties": {
          "author_type": {
            "$ref": "#/components/schemas/WatchlistVersionAuthorType"
          },
          "change_description": {
            "type": "string"
          },
          "effective_from": {
            "type": "string"
          },
          "effective_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "mandate": {
            "type": "string"
          },
          "model_key": {
            "enum": [
              "luna",
              "sol",
              "sol61",
              "astra",
              "sonnet55",
              "opus55",
              "terra61",
              "haiku55",
              "fusion_deep",
              "fusion_quick",
              "fusion_light"
            ],
            "type": "string"
          },
          "profile": {
            "$ref": "#/components/schemas/WatchlistProfile"
          },
          "profile_config": {
            "$ref": "#/components/schemas/NullableStoredWatchlistProfileConfig"
          },
          "recurrence": {
            "$ref": "#/components/schemas/WatchlistRecurrence"
          },
          "source_chat_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "symbol_notes": {
            "$ref": "#/components/schemas/WatchlistSymbolNotes"
          },
          "symbols": {
            "items": {
              "example": "AAPL.US",
              "pattern": "^[A-Z0-9][A-Z0-9._/&-]{0,38}\\.[A-Z0-9]{2,10}$",
              "type": "string"
            },
            "type": "array"
          },
          "version_number": {
            "minimum": 1,
            "type": "integer"
          },
          "watchlist_id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "watchlist_id",
          "version_number",
          "mandate",
          "symbols",
          "symbol_notes",
          "recurrence",
          "change_description",
          "effective_from",
          "effective_to",
          "author_type",
          "source_chat_id",
          "profile",
          "profile_config"
        ],
        "type": "object"
      },
      "WatchlistVersionAuthorType": {
        "enum": [
          "user",
          "chat_agent",
          "delegate",
          "migration"
        ],
        "type": "string"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "description": "Itoflow access token issued for the Itoflow API.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "All Itoflow APIs are experimental and may change without notice. Read-only operations marked interactive can be tried from the documentation; the others are reference-only.",
    "title": "Itoflow Developer API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/account/billing-costs": {
      "get": {
        "description": "Agent usage and credits for the current billing period.\n\nOperation ID: get__account_billing_costs.",
        "operationId": "get__account_billing_costs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingCosts"
                }
              }
            },
            "description": "Billing costs"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Internal error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get billing costs",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__account_billing_costs",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get billing costs",
            "title": "Get billing costs"
          }
        }
      }
    },
    "/account/display-currency": {
      "patch": {
        "description": "Operation ID: patch__account_display_currency.",
        "operationId": "patch__account_display_currency",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DisplayCurrencyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisplayCurrencyResponse"
                }
              }
            },
            "description": "Update account display currency"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update account display currency",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/patch__account_display_currency",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Update account display currency",
            "title": "Update account display currency"
          }
        }
      }
    },
    "/account/preferences": {
      "get": {
        "description": "Operation ID: get__account_preferences.",
        "operationId": "get__account_preferences",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountPreferencesResponse"
                }
              }
            },
            "description": "Get account display preferences"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get account display preferences",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__account_preferences",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get account display preferences",
            "title": "Get account display preferences"
          }
        }
      }
    },
    "/artifacts": {
      "post": {
        "description": "Creates a public artifact snapshot from a retained dashboard in the authenticated user's chat. A retained dashboard remains shareable if its run later fails. If the same private chat source was already shared, returns the existing published artifact instead.\n\nOperation ID: post__artifacts.",
        "operationId": "post__artifacts",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateArtifactRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateArtifactResponse"
                }
              }
            },
            "description": "Existing published artifact reused"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateArtifactResponse"
                }
              }
            },
            "description": "Artifact created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat, task, or source locator not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Task not shareable or snapshot source unavailable"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create or reuse a shareable artifact",
        "tags": [
          "Sharing and data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__artifacts",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create or reuse a shareable artifact",
            "title": "Create or reuse a shareable artifact"
          }
        }
      }
    },
    "/artifacts/{slug}": {
      "delete": {
        "description": "Archives an artifact owned by the authenticated user. Archived artifacts disappear from public access immediately.\n\nOperation ID: delete__artifacts_slug_.",
        "operationId": "delete__artifacts_slug_",
        "parameters": [
          {
            "description": "Public artifact slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public artifact slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Artifact archived"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid slug"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Artifact not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Archive a shareable artifact",
        "tags": [
          "Sharing and data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__artifacts_slug_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Archive a shareable artifact",
            "title": "Archive a shareable artifact"
          }
        }
      }
    },
    "/artifacts/public/{slug}": {
      "get": {
        "description": "Returns a public shareable dashboard artifact by slug.\n\nOperation ID: get__artifacts_public_slug_.",
        "operationId": "get__artifacts_public_slug_",
        "parameters": [
          {
            "description": "Public artifact slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public artifact slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicArtifactResponse"
                }
              }
            },
            "description": "Public artifact"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid slug"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Artifact not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Read a public artifact",
        "tags": [
          "Sharing and data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__artifacts_public_slug_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a public artifact",
            "title": "Read a public artifact"
          }
        }
      }
    },
    "/artifacts/public/{slug}/dataframes/{dfId}": {
      "get": {
        "description": "Returns paginated rows for a dataframe snapshot embedded in a public artifact.\n\nOperation ID: get__artifacts_public_slug_dataframes_dfId_.",
        "operationId": "get__artifacts_public_slug_dataframes_dfId_",
        "parameters": [
          {
            "description": "Public artifact slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public artifact slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          },
          {
            "description": "Dashboard dataframe identifier",
            "in": "path",
            "name": "dfId",
            "required": true,
            "schema": {
              "description": "Dashboard dataframe identifier",
              "example": "prices_table",
              "maxLength": 100,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$",
              "type": "string"
            }
          },
          {
            "description": "1-based page number. Invalid values fall back to 1.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "description": "1-based page number. Invalid values fall back to 1.",
              "example": "1",
              "type": "string"
            }
          },
          {
            "description": "Page size capped to the snapshot max row count.",
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "description": "Page size capped to the snapshot max row count.",
              "example": "25",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDataFrameResponse"
                }
              }
            },
            "description": "Artifact dataframe snapshot page"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid path or query parameters"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Artifact or dataframe not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Read a public artifact dataframe snapshot",
        "tags": [
          "Sharing and data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__artifacts_public_slug_dataframes_dfid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a public artifact dataframe snapshot",
            "title": "Read a public artifact dataframe snapshot"
          }
        }
      }
    },
    "/auth/client-config": {
      "get": {
        "description": "Operation ID: getAuthClientConfig.",
        "operationId": "getAuthClientConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthClientConfigResponse"
                }
              }
            },
            "description": "Public sign-in configuration"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Get public sign-in configuration",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getauthclientconfig",
          "metadata": {
            "playground": "interactive",
            "sidebarTitle": "Get public sign-in configuration",
            "title": "Get public sign-in configuration"
          }
        }
      }
    },
    "/auth/user": {
      "get": {
        "description": "Operation ID: getAuthUser.",
        "operationId": "getAuthUser",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthUserResponse"
                }
              }
            },
            "description": "Get authenticated user"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get authenticated user",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getauthuser",
          "metadata": {
            "playground": "interactive",
            "sidebarTitle": "Get authenticated user",
            "title": "Get authenticated user"
          }
        }
      }
    },
    "/benchmarks": {
      "get": {
        "description": "Lists prices and returns over time for the market benchmarks Itoflow tracks, such as the S&P 500 and NASDAQ 100, so you can compare a strategy or portfolio against the market. Returns are measured from the first price in the range.\n\nOperation ID: get__benchmarks.",
        "operationId": "get__benchmarks",
        "parameters": [
          {
            "description": "Time range to return. Ignored when startDate is set.",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "default": "1M",
              "description": "Time range to return. Ignored when startDate is set.",
              "enum": [
                "1D",
                "1W",
                "1M",
                "3M",
                "6M",
                "1Y",
                "YTD",
                "ALL"
              ],
              "example": "1M",
              "type": "string"
            }
          },
          {
            "description": "Start of the range as an ISO date. Overrides period.",
            "in": "query",
            "name": "startDate",
            "required": false,
            "schema": {
              "description": "Start of the range as an ISO date. Overrides period.",
              "example": "2025-01-01",
              "type": "string"
            }
          },
          {
            "description": "End of the range as an ISO date. Defaults to now.",
            "in": "query",
            "name": "endDate",
            "required": false,
            "schema": {
              "description": "End of the range as an ISO date. Defaults to now.",
              "example": "2025-06-30",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated benchmark symbols. Defaults to all: SPY.US (S&P 500), QQQ.US (NASDAQ 100), EFA.US (MSCI EAFE), NIFTYBEES.NSE (Nifty 50 ETF) and ISF.LSE (FTSE 100 ETF).",
            "in": "query",
            "name": "symbols",
            "required": false,
            "schema": {
              "description": "Comma-separated benchmark symbols. Defaults to all: SPY.US (S&P 500), QQQ.US (NASDAQ 100), EFA.US (MSCI EAFE), NIFTYBEES.NSE (Nifty 50 ETF) and ISF.LSE (FTSE 100 ETF).",
              "example": "SPY.US,QQQ.US",
              "type": "string"
            }
          },
          {
            "description": "Set to portfolio to line timestamps up with 15-minute portfolio values.",
            "in": "query",
            "name": "alignTo",
            "required": false,
            "schema": {
              "default": "benchmark",
              "description": "Set to portfolio to line timestamps up with 15-minute portfolio values.",
              "enum": [
                "portfolio",
                "benchmark"
              ],
              "example": "benchmark",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BenchmarkComparisonResponse"
                }
              }
            },
            "description": "List benchmark index prices to compare performance"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List benchmark index prices to compare performance",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__benchmarks",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List benchmark index prices to compare performance",
            "title": "List benchmark index prices to compare performance"
          }
        }
      }
    },
    "/brokers/{connectionId}": {
      "delete": {
        "description": "Operation ID: delete__brokers_connectionId_.",
        "operationId": "delete__brokers_connectionId_",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            },
            "description": "Disconnect broker"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Disconnect broker",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__brokers_connectionid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Disconnect broker",
            "title": "Disconnect broker"
          }
        }
      }
    },
    "/brokers/{connectionId}/holdings": {
      "get": {
        "description": "Operation ID: get__brokers_connectionId_holdings.",
        "operationId": "get__brokers_connectionId_holdings",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerHoldingsResponse"
                }
              }
            },
            "description": "Broker holdings"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerHoldingsResponse"
                }
              }
            },
            "description": "Broker service rate limited the holdings request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerHoldingsResponse"
                }
              }
            },
            "description": "Broker service unavailable or returned an error payload"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get broker holdings",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__brokers_connectionid_holdings",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get broker holdings",
            "title": "Get broker holdings"
          }
        }
      }
    },
    "/brokers/{connectionId}/margins": {
      "get": {
        "description": "Operation ID: get__brokers_connectionId_margins.",
        "operationId": "get__brokers_connectionId_margins",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerMarginsResponse"
                }
              }
            },
            "description": "Broker margins"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerMarginsResponse"
                }
              }
            },
            "description": "Broker service rate limited the margins request"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerMarginsResponse"
                }
              }
            },
            "description": "Broker service returned margins without required currency metadata"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerMarginsResponse"
                }
              }
            },
            "description": "Broker service unavailable or returned an error payload"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get broker margins",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__brokers_connectionid_margins",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get broker margins",
            "title": "Get broker margins"
          }
        }
      }
    },
    "/brokers/{connectionId}/reconnect": {
      "post": {
        "description": "Operation ID: post__brokers_connectionId_reconnect.",
        "operationId": "post__brokers_connectionId_reconnect",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrokerReconnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionResponse"
                }
              }
            },
            "description": "Reconnect broker connection"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Reconnect broker connection",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__brokers_connectionid_reconnect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Reconnect broker connection",
            "title": "Reconnect broker connection"
          }
        }
      }
    },
    "/brokers/{connectionId}/status": {
      "get": {
        "description": "Operation ID: get__brokers_connectionId_status.",
        "operationId": "get__brokers_connectionId_status",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionStatusResponse"
                }
              }
            },
            "description": "Get broker connection status"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get broker connection status",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__brokers_connectionid_status",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get broker connection status",
            "title": "Get broker connection status"
          }
        }
      }
    },
    "/brokers/{connectionId}/trading212/reconnect": {
      "post": {
        "description": "Operation ID: post__brokers_connectionId_trading212_reconnect.",
        "operationId": "post__brokers_connectionId_trading212_reconnect",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Trading212ConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionResponse"
                }
              }
            },
            "description": "Reconnect Trading 212 with supplied credentials"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Reconnect Trading 212 with supplied credentials",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__brokers_connectionid_trading212_reconnect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Reconnect Trading 212 with supplied credentials",
            "title": "Reconnect Trading 212 with supplied credentials"
          }
        }
      }
    },
    "/brokers/{connectionId}/trading212/reconnect-stored": {
      "post": {
        "description": "Operation ID: post__brokers_connectionId_trading212_reconnect_stored.",
        "operationId": "post__brokers_connectionId_trading212_reconnect_stored",
        "parameters": [
          {
            "description": "connectionId path parameter",
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "description": "connectionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionResponse"
                }
              }
            },
            "description": "Reconnect Trading 212 with stored credentials"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Reconnect Trading 212 with stored credentials",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__brokers_connectionid_trading212_reconnect_stored",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Reconnect Trading 212 with stored credentials",
            "title": "Reconnect Trading 212 with stored credentials"
          }
        }
      }
    },
    "/brokers/connect": {
      "post": {
        "description": "Operation ID: post__brokers_connect.",
        "operationId": "post__brokers_connect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrokerConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionResponse"
                }
              }
            },
            "description": "Start broker connection"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Start broker connection",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__brokers_connect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Start broker connection",
            "title": "Start broker connection"
          }
        }
      }
    },
    "/brokers/connections": {
      "get": {
        "description": "Operation ID: get__brokers_connections.",
        "operationId": "get__brokers_connections",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionListResponse"
                }
              }
            },
            "description": "List broker connections"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List broker connections",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__brokers_connections",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List broker connections",
            "title": "List broker connections"
          }
        }
      }
    },
    "/brokers/trading212/connect-manual": {
      "post": {
        "description": "Operation ID: post__brokers_trading212_connect_manual.",
        "operationId": "post__brokers_trading212_connect_manual",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Trading212ConnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerConnectionResponse"
                }
              }
            },
            "description": "Connect Trading 212 manually"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Connect Trading 212 manually",
        "tags": [
          "Brokers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__brokers_trading212_connect_manual",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Connect Trading 212 manually",
            "title": "Connect Trading 212 manually"
          }
        }
      }
    },
    "/chat-runtime/chats/{chatId}": {
      "delete": {
        "description": "Permanently delete one of your chats and the files in its workspace. Account integrations stay connected. If the response is lost, retry the same delete for the same chat ID.\n\nOperation ID: chat_delete.",
        "operationId": "chat_delete",
        "parameters": [
          {
            "description": "ID of the chat to delete.",
            "in": "path",
            "name": "chatId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ok": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "ok"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required."
          },
          "403": {
            "description": "Chat ownership check failed."
          },
          "404": {
            "description": "Chat unavailable."
          },
          "500": {
            "description": "Deletion failed; the chat may still exist. Retry the same delete."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Permanently delete a chat",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/chat_delete",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Permanently delete a chat",
            "title": "Permanently delete a chat"
          }
        }
      }
    },
    "/chat-runtime/chats/{chatId}/downloads/workspace/{relativePath}": {
      "get": {
        "description": "Downloads one file a chat saved in its workspace, such as a report, chart or CSV file. List the chat's workspace first to find the file's path.\n\nOperation ID: downloadChatWorkspaceFile.",
        "operationId": "downloadChatWorkspaceFile",
        "parameters": [
          {
            "in": "path",
            "name": "chatId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Slash-delimited path below the chat workspace root.",
            "in": "path",
            "name": "relativePath",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Streamed file attachment",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "400 error response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "401 error response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "403 error response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "404 error response"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "409 error response"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "410 error response"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "500 error response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "503 error response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Download a file a chat saved in its workspace",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/downloadchatworkspacefile",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Download a file a chat saved in its workspace",
            "title": "Download a file a chat saved in its workspace"
          }
        }
      }
    },
    "/chat-runtime/chats/{chatId}/workspace": {
      "get": {
        "description": "Lists the files and folders a chat saved in its workspace, such as reports, charts and data files. Pass path to list a folder below the workspace root. List your chats to find an earlier chat, then download a file from it.\n\nOperation ID: listChatWorkspaceDirectory.",
        "operationId": "listChatWorkspaceDirectory",
        "parameters": [
          {
            "in": "path",
            "name": "chatId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Folder below the workspace root. Leave empty for the root.",
            "in": "query",
            "name": "path",
            "required": false,
            "schema": {
              "default": "",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 500,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ChatWorkspaceListResponse"
                }
              }
            },
            "description": "JSON response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "400 error response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "401 error response"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "403 error response"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "404 error response"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "409 error response"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "410 error response"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "500 error response"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_ErrorResponse"
                }
              }
            },
            "description": "503 error response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List files a chat saved in its workspace",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/listchatworkspacedirectory",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List files a chat saved in its workspace",
            "title": "List files a chat saved in its workspace"
          }
        }
      }
    },
    "/chat-shares": {
      "post": {
        "description": "Creates a read-only public snapshot of a private chat transcript. If the same chat and message boundary were already shared, returns the existing published share.\n\nOperation ID: post__chat_shares.",
        "operationId": "post__chat_shares",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChatShareRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateChatShareResponse"
                }
              }
            },
            "description": "Existing published chat share reused"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateChatShareResponse"
                }
              }
            },
            "description": "Chat share created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat or message boundary not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat does not have a shareable transcript or copyable dataframe source"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create or reuse a public chat share",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__chat_shares",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create or reuse a public chat share",
            "title": "Create or reuse a public chat share"
          }
        }
      }
    },
    "/chat-shares/public/{slug}": {
      "get": {
        "description": "Returns a read-only public chat transcript snapshot by slug.\n\nOperation ID: get__chat_shares_public_slug_.",
        "operationId": "get__chat_shares_public_slug_",
        "parameters": [
          {
            "description": "Public chat share slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public chat share slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicChatShareResponse"
                }
              }
            },
            "description": "Public chat share"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid slug"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat share not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Read a public chat share",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_shares_public_slug_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a public chat share",
            "title": "Read a public chat share"
          }
        }
      }
    },
    "/chat-shares/public/{slug}/dataframes/{dfId}": {
      "get": {
        "description": "Returns paginated rows for a dataframe snapshot embedded in a public chat share.\n\nOperation ID: get__chat_shares_public_slug_dataframes_dfId_.",
        "operationId": "get__chat_shares_public_slug_dataframes_dfId_",
        "parameters": [
          {
            "description": "Public chat share slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public chat share slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          },
          {
            "description": "Dashboard dataframe identifier",
            "in": "path",
            "name": "dfId",
            "required": true,
            "schema": {
              "description": "Dashboard dataframe identifier",
              "example": "prices_table",
              "maxLength": 100,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$",
              "type": "string"
            }
          },
          {
            "description": "1-based page number. Invalid values fall back to 1.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "description": "1-based page number. Invalid values fall back to 1.",
              "example": "1",
              "type": "string"
            }
          },
          {
            "description": "Page size capped to the snapshot max row count.",
            "in": "query",
            "name": "pageSize",
            "required": false,
            "schema": {
              "description": "Page size capped to the snapshot max row count.",
              "example": "25",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactDataFrameResponse"
                }
              }
            },
            "description": "Chat share dataframe snapshot page"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid path or query parameters"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat share or dataframe not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Read a public chat share dataframe snapshot",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_shares_public_slug_dataframes_dfid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a public chat share dataframe snapshot",
            "title": "Read a public chat share dataframe snapshot"
          }
        }
      }
    },
    "/chat-shares/public/{slug}/plots/{plotId}": {
      "get": {
        "description": "Returns immutable Plotly JSON for a plot snapshot embedded in a public chat share.\n\nOperation ID: get__chat_shares_public_slug_plots_plotId_.",
        "operationId": "get__chat_shares_public_slug_plots_plotId_",
        "parameters": [
          {
            "description": "Public chat share slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public chat share slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          },
          {
            "description": "Dashboard plot identifier",
            "in": "path",
            "name": "plotId",
            "required": true,
            "schema": {
              "description": "Dashboard plot identifier",
              "example": "equity_curve",
              "maxLength": 100,
              "minLength": 1,
              "pattern": "^[a-zA-Z0-9_-]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSharePlotResponse"
                }
              }
            },
            "description": "Chat share plot snapshot"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid path parameters"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat share or plot not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Read a public chat share plot snapshot",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_shares_public_slug_plots_plotid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a public chat share plot snapshot",
            "title": "Read a public chat share plot snapshot"
          }
        }
      }
    },
    "/chat-shares/public/{slug}/runtime-token": {
      "get": {
        "description": "Returns a short-lived read-only token for viewing a public chat share.\n\nOperation ID: get__chat_shares_public_slug_runtime_token.",
        "operationId": "get__chat_shares_public_slug_runtime_token",
        "parameters": [
          {
            "description": "Public chat share slug",
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "description": "Public chat share slug",
              "example": "VufIWcgY0FlG",
              "pattern": "^[A-Za-z0-9_-]{12}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicChatShareRuntimeTokenResponse"
                }
              }
            },
            "description": "Read-only token for viewing the chat share"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat share not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Chat share is not ready to view"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Refresh a public chat share viewing token",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_shares_public_slug_runtime_token",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Refresh a public chat share viewing token",
            "title": "Refresh a public chat share viewing token"
          }
        }
      }
    },
    "/chat/{id}": {
      "get": {
        "description": "Read one of your chats and its saved messages. Saved history can trail a turn that is still running; use MCP agent.getTurn for live turn state.\n\nOperation ID: get__chat_id_.",
        "operationId": "get__chat_id_",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatStateResponse"
                }
              }
            },
            "description": "Get chat"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get chat",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get chat",
            "title": "Get chat"
          }
        }
      }
    },
    "/chat/{id}/events": {
      "get": {
        "description": "Returns the same saved chat history as GET /chat/{id}. This is not a live event stream.\n\nOperation ID: get__chat_id_events.",
        "operationId": "get__chat_id_events",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatStateResponse"
                }
              }
            },
            "description": "Get chat events"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get chat events",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_id_events",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get chat events",
            "title": "Get chat events"
          }
        }
      }
    },
    "/chat/{id}/sync": {
      "get": {
        "description": "Read the saved task count, status and event sequence for one of your chats. This does not resume a live stream.\n\nOperation ID: get__chat_id_sync.",
        "operationId": "get__chat_id_sync",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatSyncResponse"
                }
              }
            },
            "description": "Sync chat state"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Sync chat state",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chat_id_sync",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Sync chat state",
            "title": "Sync chat state"
          }
        }
      }
    },
    "/chats": {
      "get": {
        "description": "Lists your own chats, most recently active first, with the id and title of each chat. Use it to find an earlier chat, then read that chat or its files. Set runtime=cloudflare for current chats or runtime=api for older archived chats; omit runtime to list both.\n\nOperation ID: get__chats.",
        "operationId": "get__chats",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          },
          {
            "in": "query",
            "name": "runtime",
            "required": false,
            "schema": {
              "enum": [
                "api",
                "cloudflare"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatListResponse"
                }
              }
            },
            "description": "List chats"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List chats",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__chats",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List chats",
            "title": "List chats"
          }
        }
      }
    },
    "/codex-subscription": {
      "delete": {
        "description": "Operation ID: delete__codex_subscription.",
        "operationId": "delete__codex_subscription",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodexDisconnectResult"
                }
              }
            },
            "description": "Disconnect the subscription and revoke it at the provider"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Disconnect the subscription and revoke it at the provider",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__codex_subscription",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Disconnect the subscription and revoke it at the provider",
            "title": "Disconnect the subscription and revoke it at the provider"
          }
        }
      },
      "get": {
        "description": "Operation ID: get__codex_subscription.",
        "operationId": "get__codex_subscription",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodexConnectionStatus"
                }
              }
            },
            "description": "Get the current user Codex subscription connection"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get the current user Codex subscription connection",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__codex_subscription",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get the current user Codex subscription connection",
            "title": "Get the current user Codex subscription connection"
          }
        }
      }
    },
    "/codex-subscription/poll": {
      "post": {
        "description": "Operation ID: post__codex_subscription_poll.",
        "operationId": "post__codex_subscription_poll",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodexPollResult"
                }
              }
            },
            "description": "Check whether the user has approved the device authorization"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Check whether the user has approved the device authorization",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__codex_subscription_poll",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Check whether the user has approved the device authorization",
            "title": "Check whether the user has approved the device authorization"
          }
        }
      }
    },
    "/codex-subscription/start": {
      "post": {
        "description": "Operation ID: post__codex_subscription_start.",
        "operationId": "post__codex_subscription_start",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodexStartAuthorization"
                }
              }
            },
            "description": "Start a device authorization the user approves in a browser"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Start a device authorization the user approves in a browser",
        "tags": [
          "Account"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__codex_subscription_start",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Start a device authorization the user approves in a browser",
            "title": "Start a device authorization the user approves in a browser"
          }
        }
      }
    },
    "/dataframes/{chatId}/{dfName}": {
      "get": {
        "description": "Operation ID: get__dataframes_chatId_dfName_.",
        "operationId": "get__dataframes_chatId_dfName_",
        "parameters": [
          {
            "description": "chatId path parameter",
            "in": "path",
            "name": "chatId",
            "required": true,
            "schema": {
              "description": "chatId path parameter",
              "type": "string"
            }
          },
          {
            "description": "dfName path parameter",
            "in": "path",
            "name": "dfName",
            "required": true,
            "schema": {
              "description": "dfName path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataFrameResponse"
                }
              }
            },
            "description": "Get dataframe data"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get dataframe data",
        "tags": [
          "Chat"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__dataframes_chatid_dfname_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get dataframe data",
            "title": "Get dataframe data"
          }
        }
      }
    },
    "/factor-risk/covariance": {
      "post": {
        "description": "Returns the asset covariance matrix for the requested symbols as of a historical date, built from the point-in-time factor model snapshot resolved at or before that date.\n\nOperation ID: post__factor_risk_covariance.",
        "operationId": "post__factor_risk_covariance",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FactorRiskCovarianceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactorRiskCovarianceResponse"
                }
              }
            },
            "description": "Point-in-time asset covariance matrix"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactorRiskError"
                }
              }
            },
            "description": "Invalid factor risk request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactorRiskError"
                }
              }
            },
            "description": "Factor model version or historical snapshot not found"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactorRiskError"
                }
              }
            },
            "description": "Historical factor snapshot is unusable for this request"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FactorRiskError"
                }
              }
            },
            "description": "Factor risk service unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Compute a point-in-time factor risk covariance matrix",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__factor_risk_covariance",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Compute a point-in-time factor risk covariance matrix",
            "title": "Compute a point-in-time factor risk covariance matrix"
          }
        }
      }
    },
    "/fx-rate": {
      "get": {
        "description": "Returns the current exchange rate between two currencies, for example USD to GBP. Multiply an amount in the from currency by rate to convert it to the to currency. Returns 503 when no rate is available.\n\nOperation ID: get__fx_rate.",
        "operationId": "get__fx_rate",
        "parameters": [
          {
            "description": "Currency to convert from, as a 3-letter upper-case ISO 4217 code.",
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "Currency to convert from, as a 3-letter upper-case ISO 4217 code.",
              "example": "USD",
              "type": "string"
            }
          },
          {
            "description": "Currency to convert to, as a 3-letter upper-case ISO 4217 code.",
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "Currency to convert to, as a 3-letter upper-case ISO 4217 code.",
              "example": "GBP",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FxRateResponse"
                }
              }
            },
            "description": "Get the exchange rate between two currencies"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Get the exchange rate between two currencies",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__fx_rate",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get the exchange rate between two currencies",
            "title": "Get the exchange rate between two currencies"
          }
        }
      }
    },
    "/fx-rates": {
      "get": {
        "description": "Returns current exchange rates for every supported currency against the US dollar, for example how many euros or pounds one dollar buys. Use it to convert amounts between currencies. stale is true when the latest refresh failed and older rates are returned.\n\nOperation ID: get__fx_rates.",
        "operationId": "get__fx_rates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FxRatesResponse"
                }
              }
            },
            "description": "Get current exchange rates for all supported currencies"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Get current exchange rates for all supported currencies",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__fx_rates",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get current exchange rates for all supported currencies",
            "title": "Get current exchange rates for all supported currencies"
          }
        }
      }
    },
    "/integrations/github/availability": {
      "get": {
        "description": "Operation ID: githubAvailability.",
        "operationId": "githubAvailability",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_GithubAvailability"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_GithubIntegrationError"
                }
              }
            },
            "description": "Authentication required",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Check whether GitHub integration is enabled, without contacting GitHub",
        "tags": [
          "GitHub"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/githubavailability",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Availability",
            "title": "Availability"
          }
        }
      }
    },
    "/integrations/github/connect": {
      "post": {
        "description": "Acts on the signed-in user’s own GitHub connection. Available only when GitHub integration is enabled; check GET /integrations/github/availability. Request bodies are limited to 128 KiB. Objects passed through from GitHub, such as branches, commits and pull requests, can include more fields than listed.\n\nOperation ID: github_connect.",
        "operationId": "github_connect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_Github_connect_Input"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_Github_connect_Result"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "413": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "422": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_GithubError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Start the current user’s GitHub authorization. Open the returned url for provider consent, then call getConnection again to confirm the connected status. Reconnect uses this same operation.",
        "tags": [
          "GitHub"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/github_connect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Connect",
            "title": "Connect"
          }
        }
      }
    },
    "/integrations/github/disconnect": {
      "post": {
        "description": "Acts on the signed-in user’s own GitHub connection. Available only when GitHub integration is enabled; check GET /integrations/github/availability. Request bodies are limited to 128 KiB. Objects passed through from GitHub, such as branches, commits and pull requests, can include more fields than listed.\n\nOperation ID: github_disconnect.",
        "operationId": "github_disconnect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_Github_disconnect_Input"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_Github_disconnect_Result"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "413": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "422": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_GithubError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Disconnect the current user’s GitHub integration across their Itoflow chats. This removes that user’s connection; it does not uninstall the GitHub App or change repository permissions.",
        "tags": [
          "GitHub"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/github_disconnect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Disconnect",
            "title": "Disconnect"
          }
        }
      }
    },
    "/integrations/github/getConnection": {
      "post": {
        "description": "Acts on the signed-in user’s own GitHub connection. Available only when GitHub integration is enabled; check GET /integrations/github/availability. Request bodies are limited to 128 KiB. Objects passed through from GitHub, such as branches, commits and pull requests, can include more fields than listed.\n\nOperation ID: github_getConnection.",
        "operationId": "github_getConnection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_Github_getConnection_Input"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_Github_getConnection_Result"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "413": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "422": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_GithubError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read the current user’s GitHub connection status. If disconnected or reauthorization is required, call connect for provider consent, then read status again. installUrl manages GitHub App repository access; installing the app alone does not connect the account.",
        "tags": [
          "GitHub"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/github_getconnection",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get Connection",
            "title": "Get Connection"
          }
        }
      }
    },
    "/integrations/github/listRepositories": {
      "post": {
        "description": "Acts on the signed-in user’s own GitHub connection. Available only when GitHub integration is enabled; check GET /integrations/github/availability. Request bodies are limited to 128 KiB. Objects passed through from GitHub, such as branches, commits and pull requests, can include more fields than listed.\n\nOperation ID: github_listRepositories.",
        "operationId": "github_listRepositories",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_Github_listRepositories_Input"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_Github_listRepositories_Result"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "413": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "422": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_GithubError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_GithubError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List repositories accessible through the connected GitHub App. Start at page 1, then follow each response’s nextPage using the same perPage value. Use a returned repositoryId for subsequent operations.",
        "tags": [
          "GitHub"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/github_listrepositories",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List Repositories",
            "title": "List Repositories"
          }
        }
      }
    },
    "/integrations/remote-mcp/add": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_add.",
        "operationId": "remoteMcp_add",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_addRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                    }
                  },
                  "required": [
                    "connection"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Add an owned remote MCP connection without connecting to it.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_add",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Add",
            "title": "Add"
          }
        }
      }
    },
    "/integrations/remote-mcp/availability": {
      "get": {
        "description": "Operation ID: remoteMcpAvailability.",
        "operationId": "remoteMcpAvailability",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RemoteMcpAvailability"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Check whether remote MCP connections are enabled; this does not indicate connection readiness.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcpavailability",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Availability",
            "title": "Availability"
          }
        }
      }
    },
    "/integrations/remote-mcp/connect": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_connect.",
        "operationId": "remoteMcp_connect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_connectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "attemptId": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "authorizationUrl": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "connection": {
                      "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                    }
                  },
                  "required": [
                    "connection",
                    "authorizationUrl",
                    "attemptId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Discover and connect. OAuth may return an authorization URL; anonymous and saved-credential connections need no setup page. Once ready, its tools are available in the owner’s Itoflow chats, not in the calling client.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_connect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Connect",
            "title": "Connect"
          }
        }
      }
    },
    "/integrations/remote-mcp/disconnect": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_disconnect.",
        "operationId": "remoteMcp_disconnect",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_disconnectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "brokerDeleted": {
                      "const": true
                    },
                    "connection": {
                      "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                    },
                    "providerRevocation": {
                      "const": "not_requested"
                    }
                  },
                  "required": [
                    "connection",
                    "brokerDeleted",
                    "providerRevocation"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Invalidate the connection and remove its locally stored credential. Provider-side OAuth revocation is not requested.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_disconnect",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Disconnect",
            "title": "Disconnect"
          }
        }
      }
    },
    "/integrations/remote-mcp/getStatus": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_getStatus.",
        "operationId": "remoteMcp_getStatus",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_getStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                    }
                  },
                  "required": [
                    "connection"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read connection readiness; this may finalize the matching OAuth attempt.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_getstatus",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get Status",
            "title": "Get Status"
          }
        }
      }
    },
    "/integrations/remote-mcp/list": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_list.",
        "operationId": "remoteMcp_list",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_listRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connections": {
                      "items": {
                        "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "connections"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List the current user’s owned remote MCP connections.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_list",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List",
            "title": "List"
          }
        }
      }
    },
    "/integrations/remote-mcp/listTools": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_listTools.",
        "operationId": "remoteMcp_listTools",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_listToolsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                    },
                    "tools": {
                      "items": {
                        "$ref": "#/components/schemas/Gateway_RemoteMcpTool"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "connection",
                    "tools"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List tools discovered for this connection version.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_listtools",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List Tools",
            "title": "List Tools"
          }
        }
      }
    },
    "/integrations/remote-mcp/remove": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_remove.",
        "operationId": "remoteMcp_remove",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_removeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "removed": {
                      "const": true
                    }
                  },
                  "required": [
                    "removed"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Remove a connection and its local credential using the latest version.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_remove",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Remove",
            "title": "Remove"
          }
        }
      }
    },
    "/integrations/remote-mcp/rename": {
      "post": {
        "description": "Manage your remote MCP connections, which all your Itoflow chats share. Send the latest connection version. If a connect response is lost, check status before retrying.\n\nOperation ID: remoteMcp_rename.",
        "operationId": "remoteMcp_rename",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RemoteMcp_renameRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "connection": {
                      "$ref": "#/components/schemas/Gateway_RemoteMcpConnection"
                    }
                  },
                  "required": [
                    "connection"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "enum": [
                    "no-store"
                  ],
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "401": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "403": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "404": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "409": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "429": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "502": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          },
          "503": {
            "$ref": "#/components/responses/Gateway_RemoteMcpError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Rename an owned connection using its latest version.",
        "tags": [
          "Connected MCP servers"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/remotemcp_rename",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Rename",
            "title": "Rename"
          }
        }
      }
    },
    "/leaderboard": {
      "get": {
        "description": "Returns anonymized strategy performance rankings and weekly/monthly champions. Only the requesting user can see which rows are theirs.\n\nOperation ID: get__leaderboard.",
        "operationId": "get__leaderboard",
        "parameters": [
          {
            "description": "Ranking period",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "default": "overall",
              "description": "Ranking period",
              "enum": [
                "overall",
                "weekly",
                "monthly"
              ],
              "example": "overall",
              "type": "string"
            }
          },
          {
            "description": "Maximum entries to return. Clamped between 1 and 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Maximum entries to return. Clamped between 1 and 100.",
              "example": "50",
              "type": "string"
            }
          },
          {
            "description": "1-based page number.",
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "description": "1-based page number.",
              "example": "1",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardResponse"
                }
              }
            },
            "description": "Anonymous leaderboard"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get anonymous strategy leaderboard",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__leaderboard",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get anonymous strategy leaderboard",
            "title": "Get anonymous strategy leaderboard"
          }
        }
      }
    },
    "/news": {
      "get": {
        "description": "Searches the company, market and economic news and SEC filings Itoflow has stored. It selects possible matches by similarity, including items without a vector, then a model judges those candidates by meaning in any language. With `q`, the route returns one row per story, most important first. With `symbols` or `monitor_id`, a model rates matching candidates for each company, counting news about its rivals, customers, suppliers, inputs and market; then the route returns the rated items, newest first. With `monitor_id`, results are limited to that monitor’s current holdings and carry their weights. With `q`, the model judges the most important candidates first and stops once the rest could not change the rows. Judging stops after about 25 seconds; `coverage.complete` says whether the reply is final.\n\nOperation ID: get__news.",
        "operationId": "get__news",
        "parameters": [
          {
            "description": "Comma-separated Itoflow symbols, at most 20. A model first rates the news for each company over the window, then an item matches when it has a rating for one of them. Symbols with no company name are skipped and listed in `unknown_symbols`.",
            "in": "query",
            "name": "symbols",
            "required": false,
            "schema": {
              "description": "Comma-separated Itoflow symbols, at most 20. A model first rates the news for each company over the window, then an item matches when it has a rating for one of them. Symbols with no company name are skipped and listed in `unknown_symbols`.",
              "example": "ASML.AS,NVDA.US",
              "type": "string"
            }
          },
          {
            "description": "What the news should be about, in plain words, up to 200 characters. Itoflow selects possible matches by similarity, then a model judges those candidates by meaning in any language, including items that never name the subject. Each row is then a story, and `match_p` carries the model's chance that it bears on the query. It can't be combined with `symbols` or `monitor_id` (400 `query_with_symbols`).",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "description": "What the news should be about, in plain words, up to 200 characters. Itoflow selects possible matches by similarity, then a model judges those candidates by meaning in any language, including items that never name the subject. Each row is then a story, and `match_p` carries the model's chance that it bears on the query. It can't be combined with `symbols` or `monitor_id` (400 `query_with_symbols`).",
              "example": "chip export rules",
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Search the current holdings of one of your monitors, rated as with `symbols`, with their weights. With `symbols` as well, only the holdings named.",
            "in": "query",
            "name": "monitor_id",
            "required": false,
            "schema": {
              "description": "Search the current holdings of one of your monitors, rated as with `symbols`, with their weights. With `symbols` as well, only the holdings named.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "How many days back to search, by when Itoflow stored the item: 1 to 90, default 7. With `q`, 1 to 3, default 1; more returns 400 `days_exceeds_query_window`.",
            "in": "query",
            "name": "days",
            "required": false,
            "schema": {
              "description": "How many days back to search, by when Itoflow stored the item: 1 to 90, default 7. With `q`, 1 to 3, default 1; more returns 400 `days_exceeds_query_window`.",
              "maximum": 90,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "How to order a read without `q`, `symbols` or `monitor_id`. `newest` lists items newest first by `published_at`. `stories` folds repeats into one row per story and lists stories by the UTC day of their first report, then impact, then `published_at`, newest first. `stories_newest` folds the same stories and orders by the shown row’s `published_at` descending, then `id` descending. Either story order with `q`, `symbols` or `monitor_id` returns 400 `order_with_query`.",
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "default": "newest",
              "description": "How to order a read without `q`, `symbols` or `monitor_id`. `newest` lists items newest first by `published_at`. `stories` folds repeats into one row per story and lists stories by the UTC day of their first report, then impact, then `published_at`, newest first. `stories_newest` folds the same stories and orders by the shown row’s `published_at` descending, then `id` descending. Either story order with `q`, `symbols` or `monitor_id` returns 400 `order_with_query`.",
              "enum": [
                "newest",
                "stories",
                "stories_newest"
              ],
              "type": "string"
            }
          },
          {
            "description": "Hide stories whose shown row has `is_event_p < 0.5`, before applying `limit`. Default false. True requires `order=stories` or `order=stories_newest`; otherwise returns 400 `filter_without_stories`.",
            "in": "query",
            "name": "hide_commentary",
            "required": false,
            "schema": {
              "default": "false",
              "description": "Hide stories whose shown row has `is_event_p < 0.5`, before applying `limit`. Default false. True requires `order=stories` or `order=stories_newest`; otherwise returns 400 `filter_without_stories`.",
              "enum": [
                "true",
                "false"
              ],
              "type": "string"
            }
          },
          {
            "description": "With `order=stories` or `order=stories_newest`, only the stories with an article in the period that names this country, as an ISO 3166-1 alpha-2 code. Without a story order it returns 400 `filter_without_stories`.",
            "in": "query",
            "name": "country",
            "required": false,
            "schema": {
              "description": "With `order=stories` or `order=stories_newest`, only the stories with an article in the period that names this country, as an ISO 3166-1 alpha-2 code. Without a story order it returns 400 `filter_without_stories`.",
              "example": "JP",
              "pattern": "^[A-Z]{2}$",
              "type": "string"
            }
          },
          {
            "description": "With `order=stories` or `order=stories_newest`, only the stories whose shown article has this sector. Combines with `country`. Without a story order it returns 400 `filter_without_stories`.",
            "in": "query",
            "name": "sector",
            "required": false,
            "schema": {
              "description": "With `order=stories` or `order=stories_newest`, only the stories whose shown article has this sector. Combines with `country`. Without a story order it returns 400 `filter_without_stories`.",
              "enum": [
                "economy",
                "energy",
                "materials",
                "industrials",
                "consumer_discretionary",
                "consumer_staples",
                "health_care",
                "financials",
                "information_technology",
                "communication_services",
                "utilities",
                "real_estate"
              ],
              "type": "string"
            }
          },
          {
            "description": "The lowest level to return. It applies to the ratings' materiality when the call names symbols or a monitor, and to the item's impact otherwise.",
            "in": "query",
            "name": "min_level",
            "required": false,
            "schema": {
              "default": "minor",
              "description": "The lowest level to return. It applies to the ratings' materiality when the call names symbols or a monitor, and to the item's impact otherwise.",
              "enum": [
                "minor",
                "notable",
                "material"
              ],
              "type": "string"
            }
          },
          {
            "description": "Most rows to return. With `q`, `order=stories` or `order=stories_newest`, it counts stories.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Most rows to return. With `q`, `order=stories` or `order=stories_newest`, it counts stories.",
              "maximum": 50,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsSearchResponse"
                }
              }
            },
            "description": "With `q`, stories ranked by score. With `order=stories`, stories by first report day, then impact, then publish time. With `order=stories_newest`, the same stories by the shown row’s publish time. Otherwise matching items, newest first."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request. `query_with_symbols`: `q` was combined with `symbols` or `monitor_id`. `order_with_query`: `order=stories` or `order=stories_newest` was combined with `q`, `symbols` or `monitor_id`. `filter_without_stories`: `hide_commentary=true`, `country` or `sector` was sent without a story order. `days_exceeds_query_window`: `q` asked for more days than a query search covers."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Monitor not found"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "`news_judge_unavailable`: a model the search needs failed after its retries. Retry later; no partial result is returned."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Search stored news by query, symbol or monitor",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__news",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Search stored news by query, symbol or monitor",
            "title": "Search stored news by query, symbol or monitor"
          }
        }
      }
    },
    "/notifications/logs": {
      "get": {
        "description": "Operation ID: get__notifications_logs.",
        "operationId": "get__notifications_logs",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationLogsResponse"
                }
              }
            },
            "description": "List notification logs"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List notification logs",
        "tags": [
          "Notifications"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__notifications_logs",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List notification logs",
            "title": "List notification logs"
          }
        }
      }
    },
    "/notifications/preferences": {
      "get": {
        "description": "Operation ID: get__notifications_preferences.",
        "operationId": "get__notifications_preferences",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesResponse"
                }
              }
            },
            "description": "Get notification preferences"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get notification preferences",
        "tags": [
          "Notifications"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__notifications_preferences",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get notification preferences",
            "title": "Get notification preferences"
          }
        }
      },
      "put": {
        "description": "Operation ID: put__notifications_preferences.",
        "operationId": "put__notifications_preferences",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationPreferences"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesResponse"
                }
              }
            },
            "description": "Update notification preferences"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update notification preferences",
        "tags": [
          "Notifications"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/put__notifications_preferences",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Update notification preferences",
            "title": "Update notification preferences"
          }
        }
      }
    },
    "/notifications/unsubscribe": {
      "post": {
        "description": "Operation ID: post__notifications_unsubscribe.",
        "operationId": "post__notifications_unsubscribe",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationUnsubscribeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            },
            "description": "Unsubscribe notification recipient"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Unsubscribe notification recipient",
        "tags": [
          "Notifications"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__notifications_unsubscribe",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Unsubscribe notification recipient",
            "title": "Unsubscribe notification recipient"
          }
        }
      }
    },
    "/paper-trading/{strategyId}/approvals": {
      "get": {
        "description": "Returns historical live approval proposals for a strategy.\n\nOperation ID: get__paper_trading_strategyId_approvals.",
        "operationId": "get__paper_trading_strategyId_approvals",
        "parameters": [
          {
            "description": "Strategy UUID",
            "in": "path",
            "name": "strategyId",
            "required": true,
            "schema": {
              "description": "Strategy UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Max results (1-100, default 20)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Max results (1-100, default 20)",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset (default 0)",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset (default 0)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyApprovalsResponse"
                }
              }
            },
            "description": "Approvals history"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid strategy id"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Strategy not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy approvals history",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__paper_trading_strategyid_approvals",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy approvals history",
            "title": "Get strategy approvals history"
          }
        }
      }
    },
    "/paper-trading/{strategyId}/decisions": {
      "get": {
        "description": "Returns decision history with pagination for a specific strategy.\n\nOperation ID: get__paper_trading_strategyId_decisions.",
        "operationId": "get__paper_trading_strategyId_decisions",
        "parameters": [
          {
            "description": "Strategy UUID",
            "in": "path",
            "name": "strategyId",
            "required": true,
            "schema": {
              "description": "Strategy UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Max results (1-50, default 10)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Max results (1-50, default 10)",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset (default 0)",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset (default 0)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperTradingDecisionsResponse"
                }
              }
            },
            "description": "Strategy decision history"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid strategy id"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Strategy not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy decision history",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__paper_trading_strategyid_decisions",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy decision history",
            "title": "Get strategy decision history"
          }
        }
      }
    },
    "/paper-trading/{strategyId}/pending-trades": {
      "get": {
        "description": "Operation ID: get__paper_trading_strategyId_pending_trades.",
        "operationId": "get__paper_trading_strategyId_pending_trades",
        "parameters": [
          {
            "description": "strategyId path parameter",
            "in": "path",
            "name": "strategyId",
            "required": true,
            "schema": {
              "description": "strategyId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyPendingTradesResponse"
                }
              }
            },
            "description": "Get strategy pending trades"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy pending trades",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__paper_trading_strategyid_pending_trades",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy pending trades",
            "title": "Get strategy pending trades"
          }
        }
      }
    },
    "/paper-trading/{strategyId}/status": {
      "get": {
        "description": "Returns the latest strategy performance, holdings, scorecard, and performance history.\n\nOperation ID: get__paper_trading_strategyId_status.",
        "operationId": "get__paper_trading_strategyId_status",
        "parameters": [
          {
            "description": "Strategy UUID",
            "in": "path",
            "name": "strategyId",
            "required": true,
            "schema": {
              "description": "Strategy UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Performance history window: 1D, 1W, 1M, 3M, 6M, 1Y, or ALL",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "description": "Performance history window: 1D, 1W, 1M, 3M, 6M, 1Y, or ALL",
              "example": "3M",
              "type": "string"
            }
          },
          {
            "description": "Performance history sampling override: intraday, hourly, or daily",
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "description": "Performance history sampling override: intraday, hourly, or daily",
              "example": "daily",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperTradingStatusResponse"
                }
              }
            },
            "description": "Strategy performance snapshot"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid strategy id"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Strategy not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy performance snapshot",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__paper_trading_strategyid_status",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy performance snapshot",
            "title": "Get strategy performance snapshot"
          }
        }
      }
    },
    "/paper-trading/{strategyId}/trades": {
      "get": {
        "description": "Returns executed trade history for a specific strategy.\n\nOperation ID: get__paper_trading_strategyId_trades.",
        "operationId": "get__paper_trading_strategyId_trades",
        "parameters": [
          {
            "description": "Strategy UUID",
            "in": "path",
            "name": "strategyId",
            "required": true,
            "schema": {
              "description": "Strategy UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Max results (1-100, default 20)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Max results (1-100, default 20)",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset (default 0)",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset (default 0)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperTradingTradesResponse"
                }
              }
            },
            "description": "Strategy trade history"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid strategy id"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Strategy not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy trade history",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__paper_trading_strategyid_trades",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy trade history",
            "title": "Get strategy trade history"
          }
        }
      }
    },
    "/paper-trading/summaries": {
      "get": {
        "description": "Returns strategy summaries without trade or decision history.\n\nOperation ID: get__paper_trading_summaries.",
        "operationId": "get__paper_trading_summaries",
        "parameters": [
          {
            "description": "Performance history window: 1D, 1W, 1M, 3M, 6M, 1Y, or ALL",
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "description": "Performance history window: 1D, 1W, 1M, 3M, 6M, 1Y, or ALL",
              "example": "3M",
              "type": "string"
            }
          },
          {
            "description": "Performance history sampling override: intraday, hourly, or daily",
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "description": "Performance history sampling override: intraday, hourly, or daily",
              "example": "daily",
              "type": "string"
            }
          },
          {
            "description": "When true, restrict the collection to portfolios the user owns. The collection is portfolio-rooted, so this includes owned portfolios with no strategy; it excludes Itoflow showcase portfolios the user does not own.",
            "in": "query",
            "name": "mineOnly",
            "required": false,
            "schema": {
              "description": "When true, restrict the collection to portfolios the user owns. The collection is portfolio-rooted, so this includes owned portfolios with no strategy; it excludes Itoflow showcase portfolios the user does not own.",
              "example": "true",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperTradingSummariesResponse"
                }
              }
            },
            "description": "Paper trading portfolio summaries"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get paper trading portfolio summaries",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__paper_trading_summaries",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get paper trading portfolio summaries",
            "title": "Get paper trading portfolio summaries"
          }
        }
      }
    },
    "/portfolios": {
      "get": {
        "description": "Returns all active portfolios for the authenticated user with holdings value, cumulative return, and strategy linking info.\n\nOperation ID: get__portfolios.",
        "operationId": "get__portfolios",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioListResponse"
                }
              }
            },
            "description": "Portfolio list"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List user portfolios",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List user portfolios",
            "title": "List user portfolios"
          }
        }
      },
      "post": {
        "description": "Operation ID: post__portfolios.",
        "operationId": "post__portfolios",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePortfolioRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Portfolio created"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Portfolio created with asynchronous initial sync status"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create portfolio",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create portfolio",
            "title": "Create portfolio"
          }
        }
      }
    },
    "/portfolios/{id}": {
      "delete": {
        "description": "Operation ID: delete__portfolios_id_.",
        "operationId": "delete__portfolios_id_",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            },
            "description": "Delete portfolio"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Delete portfolio",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__portfolios_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Delete portfolio",
            "title": "Delete portfolio"
          }
        }
      },
      "get": {
        "description": "Returns portfolio with full holdings, P&L, linked strategy details, performance metrics, and agent scorecard.\n\nOperation ID: get__portfolios_id_.",
        "operationId": "get__portfolios_id_",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "factor_as_of",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "format": "date-time",
                  "type": "string"
                }
              ]
            }
          },
          {
            "in": "query",
            "name": "factor_model_version",
            "required": false,
            "schema": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioDetailResponse"
                }
              }
            },
            "description": "Portfolio detail with holdings and metrics"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid portfolio ID"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get portfolio detail",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get portfolio detail",
            "title": "Get portfolio detail"
          }
        }
      }
    },
    "/portfolios/{id}/auto-execute": {
      "patch": {
        "description": "Operation ID: patch__portfolios_id_auto_execute.",
        "operationId": "patch__portfolios_id_auto_execute",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoExecuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Update portfolio auto-execute"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update portfolio auto-execute",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/patch__portfolios_id_auto_execute",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Update portfolio auto-execute",
            "title": "Update portfolio auto-execute"
          }
        }
      }
    },
    "/portfolios/{id}/benchmark": {
      "put": {
        "description": "Declares what this portfolio is measured against for benchmark-relative factor risk: another portfolio on the platform, a provider index, or both. Both body keys are required; null clears that side of the comparison.\n\nOperation ID: put__portfolios_id_benchmark.",
        "operationId": "put__portfolios_id_benchmark",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortfolioBenchmarkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioBenchmarkResponse"
                }
              }
            },
            "description": "Comparison basis updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid comparison basis"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Set portfolio benchmark comparison basis",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/put__portfolios_id_benchmark",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Set portfolio benchmark comparison basis",
            "title": "Set portfolio benchmark comparison basis"
          }
        }
      }
    },
    "/portfolios/{id}/broker-status": {
      "get": {
        "description": "Returns live broker connection and portfolio validation status for a live portfolio mirror.\n\nOperation ID: get__portfolios_id_broker_status.",
        "operationId": "get__portfolios_id_broker_status",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrokerStatusResponse"
                }
              }
            },
            "description": "Broker validation status"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid portfolio id or non-live portfolio"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get broker validation status",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_broker_status",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get broker validation status",
            "title": "Get broker validation status"
          }
        }
      }
    },
    "/portfolios/{id}/decisions": {
      "get": {
        "description": "Returns AI trading decisions for the portfolio's linked strategy. Empty array if not linked.\n\nOperation ID: get__portfolios_id_decisions.",
        "operationId": "get__portfolios_id_decisions",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Max results (1-50, default 20)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Max results (1-50, default 20)",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset (default 0)",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset (default 0)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionsResponse"
                }
              }
            },
            "description": "Trading decisions"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid portfolio ID"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get AI trading decisions",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_decisions",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get AI trading decisions",
            "title": "Get AI trading decisions"
          }
        }
      }
    },
    "/portfolios/{id}/go-paper": {
      "post": {
        "description": "Operation ID: post__portfolios_id_go_paper.",
        "operationId": "post__portfolios_id_go_paper",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GoPaperRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Convert portfolio to paper mode"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Convert portfolio to paper mode",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_id_go_paper",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Convert portfolio to paper mode",
            "title": "Convert portfolio to paper mode"
          }
        }
      }
    },
    "/portfolios/{id}/holdings/history": {
      "get": {
        "description": "Returns holdings at a point in time. Requires the \"at\" query parameter (ISO 8601 timestamp).\n\nOperation ID: get__portfolios_id_holdings_history.",
        "operationId": "get__portfolios_id_holdings_history",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ISO 8601 timestamp — get holdings as of this time",
            "in": "query",
            "name": "at",
            "required": true,
            "schema": {
              "description": "ISO 8601 timestamp — get holdings as of this time",
              "example": "2025-01-15T10:30:00Z",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HoldingsHistoryResponse"
                }
              }
            },
            "description": "Historical holdings snapshot"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid parameters"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get historical holdings snapshot",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_holdings_history",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get historical holdings snapshot",
            "title": "Get historical holdings snapshot"
          }
        }
      }
    },
    "/portfolios/{id}/link": {
      "delete": {
        "description": "Removes a removable strategy relationship and cancels any pending trades from the previous strategy.\n\nOperation ID: delete__portfolios_id_link.",
        "operationId": "delete__portfolios_id_link",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnlinkStrategyResponse"
                }
              }
            },
            "description": "Strategy removed"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not linked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Remove strategy from portfolio",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__portfolios_id_link",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Remove strategy from portfolio",
            "title": "Remove strategy from portfolio"
          }
        }
      },
      "put": {
        "description": "Assigns a strategy to a portfolio. Supported live broker portfolios become the strategy primary portfolio.\n\nOperation ID: put__portfolios_id_link.",
        "operationId": "put__portfolios_id_link",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkStrategyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkStrategyResponse"
                }
              }
            },
            "description": "Strategy assigned (no sync needed)"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkStrategyResponse"
                }
              }
            },
            "description": "Strategy assigned, initial sync in progress"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid parameters or already linked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio or strategy not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio already has a fund oversight monitor"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Assign strategy to portfolio",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/put__portfolios_id_link",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Assign strategy to portfolio",
            "title": "Assign strategy to portfolio"
          }
        }
      }
    },
    "/portfolios/{id}/liquidate": {
      "post": {
        "description": "Operation ID: post__portfolios_id_liquidate.",
        "operationId": "post__portfolios_id_liquidate",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LiquidatePortfolioRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Liquidate portfolio"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Liquidate portfolio",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_id_liquidate",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Liquidate portfolio",
            "title": "Liquidate portfolio"
          }
        }
      }
    },
    "/portfolios/{id}/pending-trades": {
      "delete": {
        "description": "Operation ID: delete__portfolios_id_pending_trades.",
        "operationId": "delete__portfolios_id_pending_trades",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelPendingTradesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Cancel pending trades"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Cancel pending trades",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__portfolios_id_pending_trades",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Cancel pending trades",
            "title": "Cancel pending trades"
          }
        }
      },
      "get": {
        "description": "Returns pending trades awaiting approval for a portfolio, with current prices, net change, and auto-execute status.\n\nOperation ID: get__portfolios_id_pending_trades.",
        "operationId": "get__portfolios_id_pending_trades",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingTradesResponse"
                }
              }
            },
            "description": "Pending trades list"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid portfolio ID"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List pending trades",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_pending_trades",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List pending trades",
            "title": "List pending trades"
          }
        }
      }
    },
    "/portfolios/{id}/pending-trades/approve": {
      "post": {
        "description": "Approves trades with status \"awaiting_approval\" and changes their status to \"pending\" so they can execute.\n\nOperation ID: post__portfolios_id_pending_trades_approve.",
        "operationId": "post__portfolios_id_pending_trades_approve",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveTradesRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApproveTradesResponse"
                }
              }
            },
            "description": "Trades approved"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid parameters"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovalConflictResponse"
                }
              }
            },
            "description": "Approval conflict"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Approve pending trades",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_id_pending_trades_approve",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Approve pending trades",
            "title": "Approve pending trades"
          }
        }
      }
    },
    "/portfolios/{id}/performance": {
      "get": {
        "description": "Returns performance history with timestamps, total value, daily/cumulative returns, and strategy attribution periods.\n\nOperation ID: get__portfolios_id_performance.",
        "operationId": "get__portfolios_id_performance",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PerformanceResponse"
                }
              }
            },
            "description": "Performance history"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid portfolio ID"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get portfolio performance history",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_performance",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get portfolio performance history",
            "title": "Get portfolio performance history"
          }
        }
      }
    },
    "/portfolios/{id}/reconcile": {
      "post": {
        "description": "Operation ID: post__portfolios_id_reconcile.",
        "operationId": "post__portfolios_id_reconcile",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconcilePortfolioRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioActionResponse"
                }
              }
            },
            "description": "Reconcile live portfolio"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Reconcile live portfolio",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_id_reconcile",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Reconcile live portfolio",
            "title": "Reconcile live portfolio"
          }
        }
      }
    },
    "/portfolios/{id}/sync-live-state": {
      "post": {
        "description": "Checks a live portfolio against its broker and takes the next recovery step: report that a reconnect is required, prepare approvals, reconcile, or do nothing.\n\nOperation ID: post__portfolios_id_sync_live_state.",
        "operationId": "post__portfolios_id_sync_live_state",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncLiveStateResponse"
                }
              }
            },
            "description": "Live sync routing result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid parameters"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Broker state is not ready for this action"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "502": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Broker service error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Sync live portfolio state",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_id_sync_live_state",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Sync live portfolio state",
            "title": "Sync live portfolio state"
          }
        }
      }
    },
    "/portfolios/{id}/trades": {
      "get": {
        "description": "Returns paginated trade history for a portfolio. Supports paper and live (broker) trades with optional pending trade inclusion.\n\nOperation ID: get__portfolios_id_trades.",
        "operationId": "get__portfolios_id_trades",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Max results (1-100, default 20)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Max results (1-100, default 20)",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset (default 0)",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset (default 0)",
              "type": "string"
            }
          },
          {
            "description": "Include pending trades (true/false)",
            "in": "query",
            "name": "includePending",
            "required": false,
            "schema": {
              "description": "Include pending trades (true/false)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradesResponse"
                }
              }
            },
            "description": "Trade history with pagination metadata"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid parameters"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get trade history",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_trades",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get trade history",
            "title": "Get trade history"
          }
        }
      }
    },
    "/portfolios/{id}/trades/{tradeId}/attempts": {
      "get": {
        "description": "Operation ID: get__portfolios_id_trades_tradeId_attempts.",
        "operationId": "get__portfolios_id_trades_tradeId_attempts",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          },
          {
            "description": "tradeId path parameter",
            "in": "path",
            "name": "tradeId",
            "required": true,
            "schema": {
              "description": "tradeId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeExecutionAttemptsResponse"
                }
              }
            },
            "description": "Get trade execution attempts"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get trade execution attempts",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_id_trades_tradeid_attempts",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get trade execution attempts",
            "title": "Get trade execution attempts"
          }
        }
      }
    },
    "/portfolios/approvals/pending": {
      "get": {
        "description": "Returns one aggregate pending-approval summary across owned portfolios without fetching full per-portfolio trade detail.\n\nOperation ID: get__portfolios_approvals_pending.",
        "operationId": "get__portfolios_approvals_pending",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PendingApprovalsResponse"
                }
              }
            },
            "description": "Pending approval summaries"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List pending approval summaries",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__portfolios_approvals_pending",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List pending approval summaries",
            "title": "List pending approval summaries"
          }
        }
      }
    },
    "/portfolios/import": {
      "post": {
        "description": "Commit the normalized draft returned by preflight only after explicit user approval. Set draft.approved_at, use the reviewed output id with an :approved suffix, and pass the current approval token. If pricing or any material input changed, revalidate and review again.\n\nOperation ID: post__portfolios_import.",
        "operationId": "post__portfolios_import",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "description": "Commit the exact normalized draft returned by preflight after explicit user approval. Add draft.approved_at, use an output_id ending :approved, and pass the current approval_token. Revalidate and obtain renewed approval after a material change.",
                "properties": {
                  "approval_token": {
                    "description": "Current approval_token returned by preflight for the exact normalized draft and allocated amount.",
                    "maxLength": 4000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "draft": {
                    "additionalProperties": false,
                    "properties": {
                      "approved_at": {
                        "anyOf": [
                          {
                            "format": "date-time",
                            "type": "string"
                          },
                          {
                            "format": "date-time",
                            "type": "string"
                          }
                        ],
                        "description": "ISO timestamp set only after the user explicitly approves the complete reviewed draft."
                      },
                      "cash": {
                        "default": [],
                        "description": "Optional parsed cash balances to import alongside holdings.",
                        "items": {
                          "additionalProperties": false,
                          "description": "One parsed cash balance row for the editable portfolio upload review.",
                          "properties": {
                            "amount": {
                              "description": "Cash amount in the row currency; negative for borrowed cash such as a margin loan. Never a security quantity or portfolio total unless explicitly a cash balance.",
                              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            },
                            "currency": {
                              "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                              "enum": [
                                "USD",
                                "EUR",
                                "GBP",
                                "ZAR",
                                "ILS",
                                "JPY",
                                "CAD",
                                "AUD",
                                "CHF",
                                "INR",
                                "HKD",
                                "SEK",
                                "NOK",
                                "DKK",
                                "PLN",
                                "SGD",
                                "KRW",
                                "TWD",
                                "CNY",
                                "SAR",
                                "TRY",
                                "QAR",
                                "AED",
                                "ISK",
                                "NZD"
                              ],
                              "type": "string"
                            },
                            "included": {
                              "default": true,
                              "description": "Whether this cash row should be imported if the user confirms.",
                              "type": "boolean"
                            },
                            "issues": {
                              "default": [],
                              "description": "Cash-row parser or validation issues; error severity blocks confirmation.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Typed validation or parser issue attached to the portfolio draft.",
                                "properties": {
                                  "code": {
                                    "description": "Stable machine-readable issue code.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Draft field path or row control this issue belongs to when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "message": {
                                    "description": "Short user-facing explanation of the issue.",
                                    "maxLength": 500,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Row id this issue belongs to when the issue is row-scoped.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "severity": {
                                    "default": "error",
                                    "description": "Issue severity; error blocks confirmation.",
                                    "enum": [
                                      "info",
                                      "warning",
                                      "error"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "row_id": {
                              "description": "Stable cash row id used for edits, validation errors, and import diagnostics.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "source": {
                              "description": "Short source note for the cash row, such as filename, screenshot area, or sheet name.",
                              "maxLength": 240,
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "row_id"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "draft_id": {
                        "description": "Stable id for this parsed portfolio draft across review revisions.",
                        "maxLength": 120,
                        "minLength": 1,
                        "type": "string"
                      },
                      "execution_mode": {
                        "description": "Always paper for chat portfolio uploads; this import cannot create a live portfolio.",
                        "enum": [
                          "paper"
                        ],
                        "type": "string"
                      },
                      "holdings": {
                        "description": "Parsed holding rows for user review and possible import.",
                        "items": {
                          "additionalProperties": false,
                          "description": "One parsed holding row for the editable portfolio upload review.",
                          "properties": {
                            "cost_basis": {
                              "description": "Optional average entry price per one share/unit in currency and price_unit terms; omit when unknown and never use 0 as a placeholder; never copy total cost, total invested, or current value into this field. A deterministic per-unit value reconciled from quantity, market value, signed unrealized P&L, explicit currency evidence, and available current-price evidence is allowed when the derivation is recorded as a row warning.",
                              "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            },
                            "currency": {
                              "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                              "enum": [
                                "USD",
                                "EUR",
                                "GBP",
                                "ZAR",
                                "ILS",
                                "JPY",
                                "CAD",
                                "AUD",
                                "CHF",
                                "INR",
                                "HKD",
                                "SEK",
                                "NOK",
                                "DKK",
                                "PLN",
                                "SGD",
                                "KRW",
                                "TWD",
                                "CNY",
                                "SAR",
                                "TRY",
                                "QAR",
                                "AED",
                                "ISK",
                                "NZD"
                              ],
                              "type": "string"
                            },
                            "included": {
                              "default": true,
                              "description": "Whether this holding row should be imported if the user confirms.",
                              "type": "boolean"
                            },
                            "issues": {
                              "default": [],
                              "description": "Row-scoped parser or validation issues; error severity blocks confirmation.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Typed validation or parser issue attached to the portfolio draft.",
                                "properties": {
                                  "code": {
                                    "description": "Stable machine-readable issue code.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Draft field path or row control this issue belongs to when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "message": {
                                    "description": "Short user-facing explanation of the issue.",
                                    "maxLength": 500,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Row id this issue belongs to when the issue is row-scoped.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "severity": {
                                    "default": "error",
                                    "description": "Issue severity; error blocks confirmation.",
                                    "enum": [
                                      "info",
                                      "warning",
                                      "error"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "price_unit": {
                              "default": "NATIVE",
                              "description": "Quote denomination for unit_value and cost_basis; use NATIVE unless the source or selected Itoflow symbol metadata explicitly quotes GBX, ZAC, or ILA.",
                              "enum": [
                                "NATIVE",
                                "GBX",
                                "ZAC",
                                "ILA"
                              ],
                              "type": "string"
                            },
                            "quantity": {
                              "description": "Signed number of shares or units held: positive for a long, negative for a short. Never market value, allocation weight, total cost, or cash.",
                              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            },
                            "row_id": {
                              "description": "Stable row id used for edits, validation errors, and import diagnostics.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "side": {
                              "description": "Optional position side copied from a side column: long or L, short or S, in any case. A short side turns a positive quantity negative; omit side when the quantity already carries its sign.",
                              "pattern": "^(?:[Ll][Oo][Nn][Gg]|[Ll]|[Ss][Hh][Oo][Rr][Tt]|[Ss])$",
                              "type": "string"
                            },
                            "source": {
                              "description": "Short source note for the row, such as filename, screenshot area, or sheet name.",
                              "maxLength": 240,
                              "type": "string"
                            },
                            "symbol": {
                              "description": "Fully qualified holding symbol in SYMBOL.EXCHANGE format, matching symbol_resolution.symbol after lookup.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "symbol_resolution": {
                              "additionalProperties": false,
                              "description": "Selected Itoflow symbol lookup result for a holding; this is not free text.",
                              "properties": {
                                "code": {
                                  "description": "Provider ticker code from the selected Itoflow symbol result.",
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "currency": {
                                  "description": "Currency or quote-unit alias returned by the selected Itoflow symbol result.",
                                  "pattern": "^(?:[A-Z]{3}|GBp)$",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "exchange": {
                                  "description": "Exchange code from the selected Itoflow symbol result.",
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Instrument name from the selected Itoflow symbol result.",
                                  "maxLength": 240,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "symbol": {
                                  "description": "Fully qualified Itoflow symbol selected from lookup, e.g. AAPL.US.",
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": {
                                  "description": "Instrument type from the selected Itoflow symbol result when known.",
                                  "maxLength": 120,
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "exchange",
                                "name",
                                "symbol"
                              ],
                              "type": "object"
                            },
                            "unit_scale": {
                              "description": "Required only for supported quote subdivisions GBX, ZAC, or ILA; omit for NATIVE price units.",
                              "enum": [
                                "0.01"
                              ],
                              "type": "string"
                            },
                            "unit_value": {
                              "description": "Optional parsed current market price per one share/unit in currency and price_unit terms; omit when unknown. Import validation ignores this field and resolves provider current prices for display when available; never total row value, market value, account value, invested value, or position value.",
                              "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "quantity",
                            "row_id",
                            "symbol"
                          ],
                          "type": "object"
                        },
                        "maxItems": 3000,
                        "type": "array"
                      },
                      "parser_warnings": {
                        "default": [],
                        "description": "Draft-level parsing warnings from ambiguous or incomplete source evidence.",
                        "items": {
                          "additionalProperties": false,
                          "description": "Typed validation or parser issue attached to the portfolio draft.",
                          "properties": {
                            "code": {
                              "description": "Stable machine-readable issue code.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "field": {
                              "description": "Draft field path or row control this issue belongs to when known.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "message": {
                              "description": "Short user-facing explanation of the issue.",
                              "maxLength": 500,
                              "minLength": 1,
                              "type": "string"
                            },
                            "row_id": {
                              "description": "Row id this issue belongs to when the issue is row-scoped.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "severity": {
                              "default": "error",
                              "description": "Issue severity; error blocks confirmation.",
                              "enum": [
                                "info",
                                "warning",
                                "error"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "portfolio_name": {
                        "description": "User-editable name for the managed paper portfolio to create.",
                        "maxLength": 100,
                        "minLength": 1,
                        "type": "string"
                      },
                      "portfolio_type": {
                        "description": "Always managed for chat portfolio uploads; this import cannot create a reference portfolio.",
                        "enum": [
                          "managed"
                        ],
                        "type": "string"
                      },
                      "portfolio_value": {
                        "additionalProperties": false,
                        "description": "Optional user/source value to reconcile with quantity-bearing holdings. Omit when the current provider-priced mark is the only known value.",
                        "properties": {
                          "amount": {
                            "description": "Decimal string without commas or currency symbols.",
                            "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                            "type": "string"
                          },
                          "as_of_date": {
                            "description": "Date of the user or source portfolio value, not the import timestamp.",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "basis": {
                            "description": "Use portfolio_value for any new portfolio notional, including a fund NAV found at the user's request. fund_total_nav is only for an explicit, user-declared fund-total-NAV statement.",
                            "enum": [
                              "portfolio_value",
                              "fund_total_nav"
                            ],
                            "type": "string"
                          },
                          "currency": {
                            "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                            "enum": [
                              "USD",
                              "EUR",
                              "GBP",
                              "ZAR",
                              "ILS",
                              "JPY",
                              "CAD",
                              "AUD",
                              "CHF",
                              "INR",
                              "HKD",
                              "SEK",
                              "NOK",
                              "DKK",
                              "PLN",
                              "SGD",
                              "KRW",
                              "TWD",
                              "CNY",
                              "SAR",
                              "TRY",
                              "QAR",
                              "AED",
                              "ISK",
                              "NZD"
                            ],
                            "type": "string"
                          },
                          "source": {
                            "description": "Where the one stated portfolio value came from.",
                            "enum": [
                              "user_declared",
                              "source_document"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "as_of_date",
                          "basis",
                          "currency",
                          "source"
                        ],
                        "type": "object"
                      },
                      "revision": {
                        "description": "Draft revision number; it increases each time the draft is reparsed or repaired.",
                        "minimum": 0,
                        "type": "integer"
                      },
                      "schema_version": {
                        "description": "Portfolio upload draft schema version; currently v1.",
                        "enum": [
                          "v1"
                        ],
                        "type": "string"
                      },
                      "source_attachments": {
                        "default": [],
                        "description": "Compact references to the files or screenshots used to parse this draft.",
                        "items": {
                          "additionalProperties": false,
                          "description": "Compact reference to a source attachment used to parse the draft.",
                          "properties": {
                            "attachment_id": {
                              "description": "Stable chat attachment id when available.",
                              "type": "string"
                            },
                            "filename": {
                              "description": "Original uploaded filename or screenshot label.",
                              "maxLength": 240,
                              "minLength": 1,
                              "type": "string"
                            },
                            "media_type": {
                              "description": "Attachment MIME/media type when known.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "sha256": {
                              "description": "Hash of the source attachment when available.",
                              "maxLength": 128,
                              "minLength": 8,
                              "type": "string"
                            },
                            "workspace_path": {
                              "description": "Workspace path for the attachment artifact when available.",
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "filename"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "source_broker": {
                        "description": "Broker or platform the user appears to keep this portfolio in; metadata only, never evidence for row currency or quote unit.",
                        "enum": [
                          "trading212",
                          "robinhood",
                          "zerodha",
                          "alpaca",
                          "ibkr",
                          "other"
                        ],
                        "type": "string"
                      },
                      "validation_issues": {
                        "default": [],
                        "description": "Draft-level validation issues not tied to one holding or cash row.",
                        "items": {
                          "additionalProperties": false,
                          "description": "Typed validation or parser issue attached to the portfolio draft.",
                          "properties": {
                            "code": {
                              "description": "Stable machine-readable issue code.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "field": {
                              "description": "Draft field path or row control this issue belongs to when known.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "message": {
                              "description": "Short user-facing explanation of the issue.",
                              "maxLength": 500,
                              "minLength": 1,
                              "type": "string"
                            },
                            "row_id": {
                              "description": "Row id this issue belongs to when the issue is row-scoped.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "severity": {
                              "default": "error",
                              "description": "Issue severity; error blocks confirmation.",
                              "enum": [
                                "info",
                                "warning",
                                "error"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "draft_id",
                      "execution_mode",
                      "holdings",
                      "portfolio_name",
                      "portfolio_type",
                      "revision",
                      "schema_version",
                      "approved_at"
                    ],
                    "type": "object"
                  },
                  "draft_file": {
                    "additionalProperties": false,
                    "description": "Optional draft.json file reference used for auditability.",
                    "properties": {
                      "path": {
                        "description": "Workspace-relative path to the validated draft JSON file.",
                        "maxLength": 240,
                        "minLength": 1,
                        "type": "string"
                      },
                      "sha256": {
                        "description": "Hash of the draft JSON file when available.",
                        "maxLength": 128,
                        "minLength": 8,
                        "type": "string"
                      },
                      "size_bytes": {
                        "description": "Draft JSON file size in bytes when available.",
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "path"
                    ],
                    "type": "object"
                  },
                  "output_id": {
                    "description": "Stable reviewed output id ending in :approved. Preserve the reviewed id prefix for idempotency.",
                    "maxLength": 240,
                    "minLength": 1,
                    "pattern": ":approved$",
                    "type": "string"
                  }
                },
                "required": [
                  "approval_token",
                  "draft",
                  "output_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "description": "Successful managed paper portfolio import response.",
                      "properties": {
                        "allocated_amount_usd": {
                          "description": "USD capital allocated to the imported managed paper portfolio.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "execution_mode": {
                          "description": "Execution mode of the created portfolio.",
                          "enum": [
                            "paper"
                          ],
                          "type": "string"
                        },
                        "idempotent": {
                          "description": "True when this response came from an idempotent retry of an existing import.",
                          "type": "boolean"
                        },
                        "imported_cash_count": {
                          "description": "Count of cash rows imported.",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "imported_holding_count": {
                          "description": "Count of holding rows imported.",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "ok": {
                          "description": "True when import succeeded.",
                          "enum": [
                            true
                          ],
                          "type": "boolean"
                        },
                        "portfolio_id": {
                          "description": "Id of the created managed paper portfolio.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "portfolio_type": {
                          "description": "Portfolio type of the created portfolio.",
                          "enum": [
                            "managed"
                          ],
                          "type": "string"
                        },
                        "portfolio_url": {
                          "description": "App URL path for the created portfolio.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "portfolio_value": {
                          "additionalProperties": false,
                          "description": "Reviewed value provenance and its difference from the current provider mark, when comparable.",
                          "properties": {
                            "amount_usd": {
                              "description": "Reviewed portfolio value in USD.",
                              "type": "string"
                            },
                            "as_of_date": {
                              "description": "Date of the reviewed value, when known.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "basis": {
                              "description": "Role of the reviewed value.",
                              "enum": [
                                "portfolio_value",
                                "fund_total_nav"
                              ],
                              "type": "string"
                            },
                            "current_mark_as_of_date": {
                              "description": "Date of the provider-priced mark, when known.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "current_mark_usd": {
                              "description": "Current provider-priced mark in USD, when available.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "difference_usd": {
                              "description": "Reviewed value less the current provider mark in USD, when comparable.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "source": {
                              "description": "Provenance of the reviewed value.",
                              "enum": [
                                "provider_derived",
                                "user_declared",
                                "source_document"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount_usd",
                            "as_of_date",
                            "basis",
                            "current_mark_usd",
                            "current_mark_as_of_date",
                            "difference_usd",
                            "source"
                          ],
                          "type": "object"
                        },
                        "presentation_hint": {
                          "description": "Hint about what is attached to the portfolio, based on verified state. A fresh import has nothing attached and keeps any watch-or-manage intent already supplied; an idempotent retry may instead report an existing monitor or strategy, or say the state could not be verified. A failed lookup does not mean nothing is attached.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "row_warnings": {
                          "description": "Per-holding valuation warnings with row_id. Price warnings use field price: price_not_fetched means the vendor did not answer; no_recent_close means no usable close in the last 14 days. holding_fx_unavailable uses field currency and names the missing exchange rate to USD. Warnings do not block confirmation.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                            "properties": {
                              "code": {
                                "description": "Stable machine-readable issue code.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "field": {
                                "description": "Draft field path or row control this issue belongs to when known.",
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              "message": {
                                "description": "Short user-facing explanation of the issue.",
                                "maxLength": 500,
                                "minLength": 1,
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Row id this issue belongs to when the issue is row-scoped.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "severity": {
                                "description": "Issue severity; error blocks confirmation.",
                                "enum": [
                                  "info",
                                  "warning",
                                  "error"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "severity"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "source_broker": {
                          "description": "Broker metadata stored with the created portfolio, or null when absent.",
                          "enum": [
                            "trading212",
                            "robinhood",
                            "zerodha",
                            "alpaca",
                            "ibkr",
                            "other",
                            null
                          ],
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "strategy_id": {
                          "description": "Id of a controlling strategy already linked to this portfolio, when present. Fresh import does not create a strategy; this is set only on an idempotent retry of an older import that already has one.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "strategy_name": {
                          "description": "Name of the already-linked controlling strategy, when present.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "strategy_url": {
                          "description": "App URL path for the already-linked controlling strategy, when present.",
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "ok",
                        "portfolio_id",
                        "portfolio_url"
                      ],
                      "type": "object"
                    },
                    {
                      "additionalProperties": false,
                      "description": "Portfolio import validation or import failure response.",
                      "properties": {
                        "allocated_amount_usd": {
                          "description": "USD capital requested by the draft when calculable.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "available": {
                          "description": "Available value for balance or capacity failures when available.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "error": {
                          "description": "Stable machine-readable import error code.",
                          "maxLength": 120,
                          "minLength": 1,
                          "type": "string"
                        },
                        "message": {
                          "description": "Short user-facing explanation of why validation or import failed.",
                          "maxLength": 500,
                          "minLength": 1,
                          "type": "string"
                        },
                        "ok": {
                          "description": "False when validation or import failed.",
                          "enum": [
                            false
                          ],
                          "type": "boolean"
                        },
                        "requested": {
                          "description": "Requested value for balance or capacity failures when available.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "row_errors": {
                          "description": "Typed row-level errors, for showing beside fields and for fixing rows.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                            "properties": {
                              "code": {
                                "description": "Stable machine-readable issue code.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "field": {
                                "description": "Draft field path or row control this issue belongs to when known.",
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              "message": {
                                "description": "Short user-facing explanation of the issue.",
                                "maxLength": 500,
                                "minLength": 1,
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Row id this issue belongs to when the issue is row-scoped.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "severity": {
                                "description": "Issue severity; error blocks confirmation.",
                                "enum": [
                                  "info",
                                  "warning",
                                  "error"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "severity"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "error",
                        "message",
                        "ok",
                        "row_errors"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Idempotent portfolio import result"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Successful managed paper portfolio import response.",
                  "properties": {
                    "allocated_amount_usd": {
                      "description": "USD capital allocated to the imported managed paper portfolio.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "execution_mode": {
                      "description": "Execution mode of the created portfolio.",
                      "enum": [
                        "paper"
                      ],
                      "type": "string"
                    },
                    "idempotent": {
                      "description": "True when this response came from an idempotent retry of an existing import.",
                      "type": "boolean"
                    },
                    "imported_cash_count": {
                      "description": "Count of cash rows imported.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "imported_holding_count": {
                      "description": "Count of holding rows imported.",
                      "minimum": 0,
                      "type": "integer"
                    },
                    "ok": {
                      "description": "True when import succeeded.",
                      "enum": [
                        true
                      ],
                      "type": "boolean"
                    },
                    "portfolio_id": {
                      "description": "Id of the created managed paper portfolio.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "portfolio_type": {
                      "description": "Portfolio type of the created portfolio.",
                      "enum": [
                        "managed"
                      ],
                      "type": "string"
                    },
                    "portfolio_url": {
                      "description": "App URL path for the created portfolio.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "portfolio_value": {
                      "additionalProperties": false,
                      "description": "Reviewed value provenance and its difference from the current provider mark, when comparable.",
                      "properties": {
                        "amount_usd": {
                          "description": "Reviewed portfolio value in USD.",
                          "type": "string"
                        },
                        "as_of_date": {
                          "description": "Date of the reviewed value, when known.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "basis": {
                          "description": "Role of the reviewed value.",
                          "enum": [
                            "portfolio_value",
                            "fund_total_nav"
                          ],
                          "type": "string"
                        },
                        "current_mark_as_of_date": {
                          "description": "Date of the provider-priced mark, when known.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "current_mark_usd": {
                          "description": "Current provider-priced mark in USD, when available.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "difference_usd": {
                          "description": "Reviewed value less the current provider mark in USD, when comparable.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "source": {
                          "description": "Provenance of the reviewed value.",
                          "enum": [
                            "provider_derived",
                            "user_declared",
                            "source_document"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "amount_usd",
                        "as_of_date",
                        "basis",
                        "current_mark_usd",
                        "current_mark_as_of_date",
                        "difference_usd",
                        "source"
                      ],
                      "type": "object"
                    },
                    "presentation_hint": {
                      "description": "Hint about what is attached to the portfolio, based on verified state. A fresh import has nothing attached and keeps any watch-or-manage intent already supplied; an idempotent retry may instead report an existing monitor or strategy, or say the state could not be verified. A failed lookup does not mean nothing is attached.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "row_warnings": {
                      "description": "Per-holding valuation warnings with row_id. Price warnings use field price: price_not_fetched means the vendor did not answer; no_recent_close means no usable close in the last 14 days. holding_fx_unavailable uses field currency and names the missing exchange rate to USD. Warnings do not block confirmation.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                        "properties": {
                          "code": {
                            "description": "Stable machine-readable issue code.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "field": {
                            "description": "Draft field path or row control this issue belongs to when known.",
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "Short user-facing explanation of the issue.",
                            "maxLength": 500,
                            "minLength": 1,
                            "type": "string"
                          },
                          "row_id": {
                            "description": "Row id this issue belongs to when the issue is row-scoped.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "severity": {
                            "description": "Issue severity; error blocks confirmation.",
                            "enum": [
                              "info",
                              "warning",
                              "error"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "severity"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "source_broker": {
                      "description": "Broker metadata stored with the created portfolio, or null when absent.",
                      "enum": [
                        "trading212",
                        "robinhood",
                        "zerodha",
                        "alpaca",
                        "ibkr",
                        "other",
                        null
                      ],
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "strategy_id": {
                      "description": "Id of a controlling strategy already linked to this portfolio, when present. Fresh import does not create a strategy; this is set only on an idempotent retry of an older import that already has one.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "strategy_name": {
                      "description": "Name of the already-linked controlling strategy, when present.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "strategy_url": {
                      "description": "App URL path for the already-linked controlling strategy, when present.",
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "portfolio_id",
                    "portfolio_url"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Portfolio imported"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Portfolio import validation or import failure response.",
                  "properties": {
                    "allocated_amount_usd": {
                      "description": "USD capital requested by the draft when calculable.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "available": {
                      "description": "Available value for balance or capacity failures when available.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "error": {
                      "description": "Stable machine-readable import error code.",
                      "maxLength": 120,
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "description": "Short user-facing explanation of why validation or import failed.",
                      "maxLength": 500,
                      "minLength": 1,
                      "type": "string"
                    },
                    "ok": {
                      "description": "False when validation or import failed.",
                      "enum": [
                        false
                      ],
                      "type": "boolean"
                    },
                    "requested": {
                      "description": "Requested value for balance or capacity failures when available.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "row_errors": {
                      "description": "Typed row-level errors, for showing beside fields and for fixing rows.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                        "properties": {
                          "code": {
                            "description": "Stable machine-readable issue code.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "field": {
                            "description": "Draft field path or row control this issue belongs to when known.",
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "Short user-facing explanation of the issue.",
                            "maxLength": 500,
                            "minLength": 1,
                            "type": "string"
                          },
                          "row_id": {
                            "description": "Row id this issue belongs to when the issue is row-scoped.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "severity": {
                            "description": "Issue severity; error blocks confirmation.",
                            "enum": [
                              "info",
                              "warning",
                              "error"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "severity"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "error",
                    "message",
                    "ok",
                    "row_errors"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Portfolio import rejected"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Portfolio import validation or import failure response.",
                  "properties": {
                    "allocated_amount_usd": {
                      "description": "USD capital requested by the draft when calculable.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "available": {
                      "description": "Available value for balance or capacity failures when available.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "error": {
                      "description": "Stable machine-readable import error code.",
                      "maxLength": 120,
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "description": "Short user-facing explanation of why validation or import failed.",
                      "maxLength": 500,
                      "minLength": 1,
                      "type": "string"
                    },
                    "ok": {
                      "description": "False when validation or import failed.",
                      "enum": [
                        false
                      ],
                      "type": "boolean"
                    },
                    "requested": {
                      "description": "Requested value for balance or capacity failures when available.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "row_errors": {
                      "description": "Typed row-level errors, for showing beside fields and for fixing rows.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                        "properties": {
                          "code": {
                            "description": "Stable machine-readable issue code.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "field": {
                            "description": "Draft field path or row control this issue belongs to when known.",
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "Short user-facing explanation of the issue.",
                            "maxLength": 500,
                            "minLength": 1,
                            "type": "string"
                          },
                          "row_id": {
                            "description": "Row id this issue belongs to when the issue is row-scoped.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "severity": {
                            "description": "Issue severity; error blocks confirmation.",
                            "enum": [
                              "info",
                              "warning",
                              "error"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "severity"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "error",
                    "message",
                    "ok",
                    "row_errors"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Commit an approved paper portfolio import",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_import",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Commit an approved paper portfolio import",
            "title": "Commit an approved paper portfolio import"
          }
        }
      }
    },
    "/portfolios/import/validate": {
      "post": {
        "description": "Validate holdings and cash for a managed paper-portfolio import. This preflight returns the complete review result and an approval token but does not create a portfolio.\n\nOperation ID: post__portfolios_import_validate.",
        "operationId": "post__portfolios_import_validate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": false,
                "description": "Approved portfolio upload import request for a managed paper portfolio.",
                "properties": {
                  "approval_token": {
                    "description": "Signed approval token returned by import preflight for the approved draft.",
                    "maxLength": 4000,
                    "minLength": 1,
                    "type": "string"
                  },
                  "draft": {
                    "additionalProperties": false,
                    "description": "User-approved edited draft to import as a managed paper portfolio.",
                    "properties": {
                      "approved_at": {
                        "anyOf": [
                          {
                            "format": "date-time",
                            "type": "string"
                          },
                          {
                            "format": "date-time",
                            "type": "string"
                          }
                        ],
                        "description": "ISO timestamp set when the user approved this edited draft."
                      },
                      "cash": {
                        "default": [],
                        "description": "Optional parsed cash balances to import alongside holdings.",
                        "items": {
                          "additionalProperties": false,
                          "description": "One parsed cash balance row for the editable portfolio upload review.",
                          "properties": {
                            "amount": {
                              "description": "Cash amount in the row currency; negative for borrowed cash such as a margin loan. Never a security quantity or portfolio total unless explicitly a cash balance.",
                              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            },
                            "currency": {
                              "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                              "enum": [
                                "USD",
                                "EUR",
                                "GBP",
                                "ZAR",
                                "ILS",
                                "JPY",
                                "CAD",
                                "AUD",
                                "CHF",
                                "INR",
                                "HKD",
                                "SEK",
                                "NOK",
                                "DKK",
                                "PLN",
                                "SGD",
                                "KRW",
                                "TWD",
                                "CNY",
                                "SAR",
                                "TRY",
                                "QAR",
                                "AED",
                                "ISK",
                                "NZD"
                              ],
                              "type": "string"
                            },
                            "included": {
                              "default": true,
                              "description": "Whether this cash row should be imported if the user confirms.",
                              "type": "boolean"
                            },
                            "issues": {
                              "default": [],
                              "description": "Cash-row parser or validation issues; error severity blocks confirmation.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Typed validation or parser issue attached to the portfolio draft.",
                                "properties": {
                                  "code": {
                                    "description": "Stable machine-readable issue code.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Draft field path or row control this issue belongs to when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "message": {
                                    "description": "Short user-facing explanation of the issue.",
                                    "maxLength": 500,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Row id this issue belongs to when the issue is row-scoped.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "severity": {
                                    "default": "error",
                                    "description": "Issue severity; error blocks confirmation.",
                                    "enum": [
                                      "info",
                                      "warning",
                                      "error"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "row_id": {
                              "description": "Stable cash row id used for edits, validation errors, and import diagnostics.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "source": {
                              "description": "Short source note for the cash row, such as filename, screenshot area, or sheet name.",
                              "maxLength": 240,
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount",
                            "row_id"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "draft_id": {
                        "description": "Stable id for this parsed portfolio draft across review revisions.",
                        "maxLength": 120,
                        "minLength": 1,
                        "type": "string"
                      },
                      "execution_mode": {
                        "description": "Always paper for chat portfolio uploads; this import cannot create a live portfolio.",
                        "enum": [
                          "paper"
                        ],
                        "type": "string"
                      },
                      "holdings": {
                        "description": "Parsed holding rows for user review and possible import.",
                        "items": {
                          "additionalProperties": false,
                          "description": "One parsed holding row for the editable portfolio upload review.",
                          "properties": {
                            "cost_basis": {
                              "description": "Optional average entry price per one share/unit in currency and price_unit terms; omit when unknown and never use 0 as a placeholder; never copy total cost, total invested, or current value into this field. A deterministic per-unit value reconciled from quantity, market value, signed unrealized P&L, explicit currency evidence, and available current-price evidence is allowed when the derivation is recorded as a row warning.",
                              "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            },
                            "currency": {
                              "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                              "enum": [
                                "USD",
                                "EUR",
                                "GBP",
                                "ZAR",
                                "ILS",
                                "JPY",
                                "CAD",
                                "AUD",
                                "CHF",
                                "INR",
                                "HKD",
                                "SEK",
                                "NOK",
                                "DKK",
                                "PLN",
                                "SGD",
                                "KRW",
                                "TWD",
                                "CNY",
                                "SAR",
                                "TRY",
                                "QAR",
                                "AED",
                                "ISK",
                                "NZD"
                              ],
                              "type": "string"
                            },
                            "included": {
                              "default": true,
                              "description": "Whether this holding row should be imported if the user confirms.",
                              "type": "boolean"
                            },
                            "issues": {
                              "default": [],
                              "description": "Row-scoped parser or validation issues; error severity blocks confirmation.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Typed validation or parser issue attached to the portfolio draft.",
                                "properties": {
                                  "code": {
                                    "description": "Stable machine-readable issue code.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Draft field path or row control this issue belongs to when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "message": {
                                    "description": "Short user-facing explanation of the issue.",
                                    "maxLength": 500,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Row id this issue belongs to when the issue is row-scoped.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "severity": {
                                    "default": "error",
                                    "description": "Issue severity; error blocks confirmation.",
                                    "enum": [
                                      "info",
                                      "warning",
                                      "error"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "price_unit": {
                              "default": "NATIVE",
                              "description": "Quote denomination for unit_value and cost_basis; use NATIVE unless the source or selected Itoflow symbol metadata explicitly quotes GBX, ZAC, or ILA.",
                              "enum": [
                                "NATIVE",
                                "GBX",
                                "ZAC",
                                "ILA"
                              ],
                              "type": "string"
                            },
                            "quantity": {
                              "description": "Signed number of shares or units held: positive for a long, negative for a short. Never market value, allocation weight, total cost, or cash.",
                              "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            },
                            "row_id": {
                              "description": "Stable row id used for edits, validation errors, and import diagnostics.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "side": {
                              "description": "Optional position side copied from a side column: long or L, short or S, in any case. A short side turns a positive quantity negative; omit side when the quantity already carries its sign.",
                              "pattern": "^(?:[Ll][Oo][Nn][Gg]|[Ll]|[Ss][Hh][Oo][Rr][Tt]|[Ss])$",
                              "type": "string"
                            },
                            "source": {
                              "description": "Short source note for the row, such as filename, screenshot area, or sheet name.",
                              "maxLength": 240,
                              "type": "string"
                            },
                            "symbol": {
                              "description": "Fully qualified holding symbol in SYMBOL.EXCHANGE format, matching symbol_resolution.symbol after lookup.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "symbol_resolution": {
                              "additionalProperties": false,
                              "description": "Selected Itoflow symbol lookup result for a holding; this is not free text.",
                              "properties": {
                                "code": {
                                  "description": "Provider ticker code from the selected Itoflow symbol result.",
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "currency": {
                                  "description": "Currency or quote-unit alias returned by the selected Itoflow symbol result.",
                                  "pattern": "^(?:[A-Z]{3}|GBp)$",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "exchange": {
                                  "description": "Exchange code from the selected Itoflow symbol result.",
                                  "maxLength": 40,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Instrument name from the selected Itoflow symbol result.",
                                  "maxLength": 240,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "symbol": {
                                  "description": "Fully qualified Itoflow symbol selected from lookup, e.g. AAPL.US.",
                                  "maxLength": 80,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "type": {
                                  "description": "Instrument type from the selected Itoflow symbol result when known.",
                                  "maxLength": 120,
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "code",
                                "exchange",
                                "name",
                                "symbol"
                              ],
                              "type": "object"
                            },
                            "unit_scale": {
                              "description": "Required only for supported quote subdivisions GBX, ZAC, or ILA; omit for NATIVE price units.",
                              "enum": [
                                "0.01"
                              ],
                              "type": "string"
                            },
                            "unit_value": {
                              "description": "Optional parsed current market price per one share/unit in currency and price_unit terms; omit when unknown. Import validation ignores this field and resolves provider current prices for display when available; never total row value, market value, account value, invested value, or position value.",
                              "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "quantity",
                            "row_id",
                            "symbol"
                          ],
                          "type": "object"
                        },
                        "maxItems": 3000,
                        "type": "array"
                      },
                      "parser_warnings": {
                        "default": [],
                        "description": "Draft-level parsing warnings from ambiguous or incomplete source evidence.",
                        "items": {
                          "additionalProperties": false,
                          "description": "Typed validation or parser issue attached to the portfolio draft.",
                          "properties": {
                            "code": {
                              "description": "Stable machine-readable issue code.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "field": {
                              "description": "Draft field path or row control this issue belongs to when known.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "message": {
                              "description": "Short user-facing explanation of the issue.",
                              "maxLength": 500,
                              "minLength": 1,
                              "type": "string"
                            },
                            "row_id": {
                              "description": "Row id this issue belongs to when the issue is row-scoped.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "severity": {
                              "default": "error",
                              "description": "Issue severity; error blocks confirmation.",
                              "enum": [
                                "info",
                                "warning",
                                "error"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "portfolio_name": {
                        "description": "User-editable name for the managed paper portfolio to create.",
                        "maxLength": 100,
                        "minLength": 1,
                        "type": "string"
                      },
                      "portfolio_type": {
                        "description": "Always managed for chat portfolio uploads; this import cannot create a reference portfolio.",
                        "enum": [
                          "managed"
                        ],
                        "type": "string"
                      },
                      "portfolio_value": {
                        "additionalProperties": false,
                        "description": "Optional user/source value to reconcile with quantity-bearing holdings. Omit when the current provider-priced mark is the only known value.",
                        "properties": {
                          "amount": {
                            "description": "Decimal string without commas or currency symbols.",
                            "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                            "type": "string"
                          },
                          "as_of_date": {
                            "description": "Date of the user or source portfolio value, not the import timestamp.",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                            "type": "string"
                          },
                          "basis": {
                            "description": "Use portfolio_value for any new portfolio notional, including a fund NAV found at the user's request. fund_total_nav is only for an explicit, user-declared fund-total-NAV statement.",
                            "enum": [
                              "portfolio_value",
                              "fund_total_nav"
                            ],
                            "type": "string"
                          },
                          "currency": {
                            "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                            "enum": [
                              "USD",
                              "EUR",
                              "GBP",
                              "ZAR",
                              "ILS",
                              "JPY",
                              "CAD",
                              "AUD",
                              "CHF",
                              "INR",
                              "HKD",
                              "SEK",
                              "NOK",
                              "DKK",
                              "PLN",
                              "SGD",
                              "KRW",
                              "TWD",
                              "CNY",
                              "SAR",
                              "TRY",
                              "QAR",
                              "AED",
                              "ISK",
                              "NZD"
                            ],
                            "type": "string"
                          },
                          "source": {
                            "description": "Where the one stated portfolio value came from.",
                            "enum": [
                              "user_declared",
                              "source_document"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "amount",
                          "as_of_date",
                          "basis",
                          "currency",
                          "source"
                        ],
                        "type": "object"
                      },
                      "revision": {
                        "description": "Draft revision number; it increases each time the draft is reparsed or repaired.",
                        "minimum": 0,
                        "type": "integer"
                      },
                      "schema_version": {
                        "description": "Portfolio upload draft schema version; currently v1.",
                        "enum": [
                          "v1"
                        ],
                        "type": "string"
                      },
                      "source_attachments": {
                        "default": [],
                        "description": "Compact references to the files or screenshots used to parse this draft.",
                        "items": {
                          "additionalProperties": false,
                          "description": "Compact reference to a source attachment used to parse the draft.",
                          "properties": {
                            "attachment_id": {
                              "description": "Stable chat attachment id when available.",
                              "type": "string"
                            },
                            "filename": {
                              "description": "Original uploaded filename or screenshot label.",
                              "maxLength": 240,
                              "minLength": 1,
                              "type": "string"
                            },
                            "media_type": {
                              "description": "Attachment MIME/media type when known.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "sha256": {
                              "description": "Hash of the source attachment when available.",
                              "maxLength": 128,
                              "minLength": 8,
                              "type": "string"
                            },
                            "workspace_path": {
                              "description": "Workspace path for the attachment artifact when available.",
                              "maxLength": 400,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "filename"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "source_broker": {
                        "description": "Broker or platform the user appears to keep this portfolio in; metadata only, never evidence for row currency or quote unit.",
                        "enum": [
                          "trading212",
                          "robinhood",
                          "zerodha",
                          "alpaca",
                          "ibkr",
                          "other"
                        ],
                        "type": "string"
                      },
                      "validation_issues": {
                        "default": [],
                        "description": "Draft-level validation issues not tied to one holding or cash row.",
                        "items": {
                          "additionalProperties": false,
                          "description": "Typed validation or parser issue attached to the portfolio draft.",
                          "properties": {
                            "code": {
                              "description": "Stable machine-readable issue code.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "field": {
                              "description": "Draft field path or row control this issue belongs to when known.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "message": {
                              "description": "Short user-facing explanation of the issue.",
                              "maxLength": 500,
                              "minLength": 1,
                              "type": "string"
                            },
                            "row_id": {
                              "description": "Row id this issue belongs to when the issue is row-scoped.",
                              "maxLength": 80,
                              "minLength": 1,
                              "type": "string"
                            },
                            "severity": {
                              "default": "error",
                              "description": "Issue severity; error blocks confirmation.",
                              "enum": [
                                "info",
                                "warning",
                                "error"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "code",
                            "message"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "draft_id",
                      "execution_mode",
                      "holdings",
                      "portfolio_name",
                      "portfolio_type",
                      "revision",
                      "schema_version"
                    ],
                    "type": "object"
                  },
                  "draft_file": {
                    "additionalProperties": false,
                    "description": "Optional draft.json file reference used for auditability.",
                    "properties": {
                      "path": {
                        "description": "Workspace-relative path to the validated draft JSON file.",
                        "maxLength": 240,
                        "minLength": 1,
                        "type": "string"
                      },
                      "sha256": {
                        "description": "Hash of the draft JSON file when available.",
                        "maxLength": 128,
                        "minLength": 8,
                        "type": "string"
                      },
                      "size_bytes": {
                        "description": "Draft JSON file size in bytes when available.",
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "path"
                    ],
                    "type": "object"
                  },
                  "output_id": {
                    "description": "Stable portfolio_import output id for idempotency.",
                    "maxLength": 240,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "draft",
                  "output_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "additionalProperties": false,
                      "description": "Successful portfolio import preflight response.",
                      "properties": {
                        "allocated_amount_usd": {
                          "description": "USD capital allocated from cash and holdings with a current USD valuation. If valuation_coverage is partial, this excludes unvalued holdings and is not the complete portfolio market value.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "approval_token": {
                          "description": "Signed token authorizing import of the currently validated draft.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "book_summary": {
                          "additionalProperties": false,
                          "description": "Long, short, gross, and net exposure. Cash counts only in NAV. An unvalued holding makes its leg, gross value, net value, NAV and all weights null, with valuation_unavailable_reason.",
                          "properties": {
                            "gross_value": {
                              "description": "Sum of absolute holding values in USD: long value less short value; null when any holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "gross_weight": {
                              "description": "Gross value over NAV; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "long_value": {
                              "description": "Sum of long holding values in USD; null when a long holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "long_weight": {
                              "description": "Long value over NAV; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "nav": {
                              "description": "Cash plus signed holding values in USD; null when any holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "net_value": {
                              "description": "Sum of signed holding values in USD: long value plus short value; null when any holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "net_weight": {
                              "description": "Net value over NAV; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_value": {
                              "description": "Sum of short holding values in USD; zero or negative, or null when a short holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_weight": {
                              "description": "Short value over NAV, zero or negative; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "valuation_unavailable_reason": {
                              "description": "Why net asset value and weights are unknown when a holding has no current USD value.",
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "long_value",
                            "short_value",
                            "gross_value",
                            "net_value",
                            "nav",
                            "long_weight",
                            "short_weight",
                            "gross_weight",
                            "net_weight"
                          ],
                          "type": "object"
                        },
                        "execution_mode": {
                          "description": "Execution mode that will be used by import.",
                          "enum": [
                            "paper"
                          ],
                          "type": "string"
                        },
                        "holding_prices": {
                          "description": "Provider current prices resolved during preflight for display in the review UI. Inspect valuation_coverage and unvalued_holding_row_ids before treating allocated_amount_usd as a complete value.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Provider current price attached to a holding during import preflight; this is display data, not user input.",
                            "properties": {
                              "currency": {
                                "description": "Ledger currency for the provider price after quote-unit normalization.",
                                "enum": [
                                  "USD",
                                  "EUR",
                                  "GBP",
                                  "ZAR",
                                  "ILS",
                                  "JPY",
                                  "CAD",
                                  "AUD",
                                  "CHF",
                                  "INR",
                                  "HKD",
                                  "SEK",
                                  "NOK",
                                  "DKK",
                                  "PLN",
                                  "SGD",
                                  "KRW",
                                  "TWD",
                                  "CNY",
                                  "SAR",
                                  "TRY",
                                  "QAR",
                                  "AED",
                                  "ISK",
                                  "NZD"
                                ],
                                "type": "string"
                              },
                              "price_date": {
                                "description": "Provider market-data date for this current price when available.",
                                "maxLength": 40,
                                "minLength": 1,
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "price_unit": {
                                "description": "Quote denomination for unit_value as returned for review display.",
                                "enum": [
                                  "NATIVE",
                                  "GBX",
                                  "ZAC",
                                  "ILA"
                                ],
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Holding row id this provider price belongs to.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "symbol": {
                                "description": "Fully qualified Itoflow symbol this provider price belongs to.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "unit_scale": {
                                "description": "Quote-unit subdivision scale when price_unit is GBX, ZAC, or ILA.",
                                "enum": [
                                  "0.01"
                                ],
                                "type": "string"
                              },
                              "unit_value": {
                                "description": "Provider current market price per one share/unit in currency and price_unit terms.",
                                "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "currency",
                              "price_unit",
                              "row_id",
                              "symbol",
                              "unit_value"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "imported_cash_count": {
                          "description": "Count of included cash rows accepted by preflight.",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "imported_holding_count": {
                          "description": "Count of included holding rows accepted by preflight.",
                          "minimum": 0,
                          "type": "integer"
                        },
                        "normalized_draft": {
                          "additionalProperties": false,
                          "description": "Provider-verified draft used to create the approval token, including exact symbol, currency, and quote-unit metadata resolved during preflight.",
                          "properties": {
                            "approved_at": {
                              "anyOf": [
                                {
                                  "format": "date-time",
                                  "type": "string"
                                },
                                {
                                  "format": "date-time",
                                  "type": "string"
                                }
                              ],
                              "description": "ISO timestamp set when the user approved this edited draft."
                            },
                            "cash": {
                              "default": [],
                              "description": "Optional parsed cash balances to import alongside holdings.",
                              "items": {
                                "additionalProperties": false,
                                "description": "One parsed cash balance row for the editable portfolio upload review.",
                                "properties": {
                                  "amount": {
                                    "description": "Cash amount in the row currency; negative for borrowed cash such as a margin loan. Never a security quantity or portfolio total unless explicitly a cash balance.",
                                    "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                    "type": "string"
                                  },
                                  "currency": {
                                    "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                                    "enum": [
                                      "USD",
                                      "EUR",
                                      "GBP",
                                      "ZAR",
                                      "ILS",
                                      "JPY",
                                      "CAD",
                                      "AUD",
                                      "CHF",
                                      "INR",
                                      "HKD",
                                      "SEK",
                                      "NOK",
                                      "DKK",
                                      "PLN",
                                      "SGD",
                                      "KRW",
                                      "TWD",
                                      "CNY",
                                      "SAR",
                                      "TRY",
                                      "QAR",
                                      "AED",
                                      "ISK",
                                      "NZD"
                                    ],
                                    "type": "string"
                                  },
                                  "included": {
                                    "default": true,
                                    "description": "Whether this cash row should be imported if the user confirms.",
                                    "type": "boolean"
                                  },
                                  "issues": {
                                    "default": [],
                                    "description": "Cash-row parser or validation issues; error severity blocks confirmation.",
                                    "items": {
                                      "additionalProperties": false,
                                      "description": "Typed validation or parser issue attached to the portfolio draft.",
                                      "properties": {
                                        "code": {
                                          "description": "Stable machine-readable issue code.",
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "field": {
                                          "description": "Draft field path or row control this issue belongs to when known.",
                                          "maxLength": 120,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "message": {
                                          "description": "Short user-facing explanation of the issue.",
                                          "maxLength": 500,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "row_id": {
                                          "description": "Row id this issue belongs to when the issue is row-scoped.",
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "severity": {
                                          "default": "error",
                                          "description": "Issue severity; error blocks confirmation.",
                                          "enum": [
                                            "info",
                                            "warning",
                                            "error"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "row_id": {
                                    "description": "Stable cash row id used for edits, validation errors, and import diagnostics.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "source": {
                                    "description": "Short source note for the cash row, such as filename, screenshot area, or sheet name.",
                                    "maxLength": 240,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "amount",
                                  "row_id"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "draft_id": {
                              "description": "Stable id for this parsed portfolio draft across review revisions.",
                              "maxLength": 120,
                              "minLength": 1,
                              "type": "string"
                            },
                            "execution_mode": {
                              "description": "Always paper for chat portfolio uploads; this import cannot create a live portfolio.",
                              "enum": [
                                "paper"
                              ],
                              "type": "string"
                            },
                            "holdings": {
                              "description": "Parsed holding rows for user review and possible import.",
                              "items": {
                                "additionalProperties": false,
                                "description": "One parsed holding row for the editable portfolio upload review.",
                                "properties": {
                                  "cost_basis": {
                                    "description": "Optional average entry price per one share/unit in currency and price_unit terms; omit when unknown and never use 0 as a placeholder; never copy total cost, total invested, or current value into this field. A deterministic per-unit value reconciled from quantity, market value, signed unrealized P&L, explicit currency evidence, and available current-price evidence is allowed when the derivation is recorded as a row warning.",
                                    "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                    "type": "string"
                                  },
                                  "currency": {
                                    "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                                    "enum": [
                                      "USD",
                                      "EUR",
                                      "GBP",
                                      "ZAR",
                                      "ILS",
                                      "JPY",
                                      "CAD",
                                      "AUD",
                                      "CHF",
                                      "INR",
                                      "HKD",
                                      "SEK",
                                      "NOK",
                                      "DKK",
                                      "PLN",
                                      "SGD",
                                      "KRW",
                                      "TWD",
                                      "CNY",
                                      "SAR",
                                      "TRY",
                                      "QAR",
                                      "AED",
                                      "ISK",
                                      "NZD"
                                    ],
                                    "type": "string"
                                  },
                                  "included": {
                                    "default": true,
                                    "description": "Whether this holding row should be imported if the user confirms.",
                                    "type": "boolean"
                                  },
                                  "issues": {
                                    "default": [],
                                    "description": "Row-scoped parser or validation issues; error severity blocks confirmation.",
                                    "items": {
                                      "additionalProperties": false,
                                      "description": "Typed validation or parser issue attached to the portfolio draft.",
                                      "properties": {
                                        "code": {
                                          "description": "Stable machine-readable issue code.",
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "field": {
                                          "description": "Draft field path or row control this issue belongs to when known.",
                                          "maxLength": 120,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "message": {
                                          "description": "Short user-facing explanation of the issue.",
                                          "maxLength": 500,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "row_id": {
                                          "description": "Row id this issue belongs to when the issue is row-scoped.",
                                          "maxLength": 80,
                                          "minLength": 1,
                                          "type": "string"
                                        },
                                        "severity": {
                                          "default": "error",
                                          "description": "Issue severity; error blocks confirmation.",
                                          "enum": [
                                            "info",
                                            "warning",
                                            "error"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "code",
                                        "message"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "price_unit": {
                                    "default": "NATIVE",
                                    "description": "Quote denomination for unit_value and cost_basis; use NATIVE unless the source or selected Itoflow symbol metadata explicitly quotes GBX, ZAC, or ILA.",
                                    "enum": [
                                      "NATIVE",
                                      "GBX",
                                      "ZAC",
                                      "ILA"
                                    ],
                                    "type": "string"
                                  },
                                  "quantity": {
                                    "description": "Signed number of shares or units held: positive for a long, negative for a short. Never market value, allocation weight, total cost, or cash.",
                                    "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Stable row id used for edits, validation errors, and import diagnostics.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "side": {
                                    "description": "Optional position side copied from a side column: long or L, short or S, in any case. A short side turns a positive quantity negative; omit side when the quantity already carries its sign.",
                                    "pattern": "^(?:[Ll][Oo][Nn][Gg]|[Ll]|[Ss][Hh][Oo][Rr][Tt]|[Ss])$",
                                    "type": "string"
                                  },
                                  "source": {
                                    "description": "Short source note for the row, such as filename, screenshot area, or sheet name.",
                                    "maxLength": 240,
                                    "type": "string"
                                  },
                                  "symbol": {
                                    "description": "Fully qualified holding symbol in SYMBOL.EXCHANGE format, matching symbol_resolution.symbol after lookup.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "symbol_resolution": {
                                    "additionalProperties": false,
                                    "description": "Selected Itoflow symbol lookup result for a holding; this is not free text.",
                                    "properties": {
                                      "code": {
                                        "description": "Provider ticker code from the selected Itoflow symbol result.",
                                        "maxLength": 40,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "currency": {
                                        "description": "Currency or quote-unit alias returned by the selected Itoflow symbol result.",
                                        "pattern": "^(?:[A-Z]{3}|GBp)$",
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "exchange": {
                                        "description": "Exchange code from the selected Itoflow symbol result.",
                                        "maxLength": 40,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "name": {
                                        "description": "Instrument name from the selected Itoflow symbol result.",
                                        "maxLength": 240,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "symbol": {
                                        "description": "Fully qualified Itoflow symbol selected from lookup, e.g. AAPL.US.",
                                        "maxLength": 80,
                                        "minLength": 1,
                                        "type": "string"
                                      },
                                      "type": {
                                        "description": "Instrument type from the selected Itoflow symbol result when known.",
                                        "maxLength": 120,
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      }
                                    },
                                    "required": [
                                      "code",
                                      "exchange",
                                      "name",
                                      "symbol"
                                    ],
                                    "type": "object"
                                  },
                                  "unit_scale": {
                                    "description": "Required only for supported quote subdivisions GBX, ZAC, or ILA; omit for NATIVE price units.",
                                    "enum": [
                                      "0.01"
                                    ],
                                    "type": "string"
                                  },
                                  "unit_value": {
                                    "description": "Optional parsed current market price per one share/unit in currency and price_unit terms; omit when unknown. Import validation ignores this field and resolves provider current prices for display when available; never total row value, market value, account value, invested value, or position value.",
                                    "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "quantity",
                                  "row_id",
                                  "symbol"
                                ],
                                "type": "object"
                              },
                              "maxItems": 3000,
                              "type": "array"
                            },
                            "parser_warnings": {
                              "default": [],
                              "description": "Draft-level parsing warnings from ambiguous or incomplete source evidence.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Typed validation or parser issue attached to the portfolio draft.",
                                "properties": {
                                  "code": {
                                    "description": "Stable machine-readable issue code.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Draft field path or row control this issue belongs to when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "message": {
                                    "description": "Short user-facing explanation of the issue.",
                                    "maxLength": 500,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Row id this issue belongs to when the issue is row-scoped.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "severity": {
                                    "default": "error",
                                    "description": "Issue severity; error blocks confirmation.",
                                    "enum": [
                                      "info",
                                      "warning",
                                      "error"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "portfolio_name": {
                              "description": "User-editable name for the managed paper portfolio to create.",
                              "maxLength": 100,
                              "minLength": 1,
                              "type": "string"
                            },
                            "portfolio_type": {
                              "description": "Always managed for chat portfolio uploads; this import cannot create a reference portfolio.",
                              "enum": [
                                "managed"
                              ],
                              "type": "string"
                            },
                            "portfolio_value": {
                              "additionalProperties": false,
                              "description": "Optional user/source value to reconcile with quantity-bearing holdings. Omit when the current provider-priced mark is the only known value.",
                              "properties": {
                                "amount": {
                                  "description": "Decimal string without commas or currency symbols.",
                                  "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                  "type": "string"
                                },
                                "as_of_date": {
                                  "description": "Date of the user or source portfolio value, not the import timestamp.",
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "type": "string"
                                },
                                "basis": {
                                  "description": "Use portfolio_value for any new portfolio notional, including a fund NAV found at the user's request. fund_total_nav is only for an explicit, user-declared fund-total-NAV statement.",
                                  "enum": [
                                    "portfolio_value",
                                    "fund_total_nav"
                                  ],
                                  "type": "string"
                                },
                                "currency": {
                                  "description": "Ledger currency established by source or user edit evidence, or by verified Itoflow provider symbol metadata; never infer it from unverified symbol text, exchange, broker, country, or filename.",
                                  "enum": [
                                    "USD",
                                    "EUR",
                                    "GBP",
                                    "ZAR",
                                    "ILS",
                                    "JPY",
                                    "CAD",
                                    "AUD",
                                    "CHF",
                                    "INR",
                                    "HKD",
                                    "SEK",
                                    "NOK",
                                    "DKK",
                                    "PLN",
                                    "SGD",
                                    "KRW",
                                    "TWD",
                                    "CNY",
                                    "SAR",
                                    "TRY",
                                    "QAR",
                                    "AED",
                                    "ISK",
                                    "NZD"
                                  ],
                                  "type": "string"
                                },
                                "source": {
                                  "description": "Where the one stated portfolio value came from.",
                                  "enum": [
                                    "user_declared",
                                    "source_document"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "amount",
                                "as_of_date",
                                "basis",
                                "currency",
                                "source"
                              ],
                              "type": "object"
                            },
                            "revision": {
                              "description": "Draft revision number; it increases each time the draft is reparsed or repaired.",
                              "minimum": 0,
                              "type": "integer"
                            },
                            "schema_version": {
                              "description": "Portfolio upload draft schema version; currently v1.",
                              "enum": [
                                "v1"
                              ],
                              "type": "string"
                            },
                            "source_attachments": {
                              "default": [],
                              "description": "Compact references to the files or screenshots used to parse this draft.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Compact reference to a source attachment used to parse the draft.",
                                "properties": {
                                  "attachment_id": {
                                    "description": "Stable chat attachment id when available.",
                                    "type": "string"
                                  },
                                  "filename": {
                                    "description": "Original uploaded filename or screenshot label.",
                                    "maxLength": 240,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "media_type": {
                                    "description": "Attachment MIME/media type when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "sha256": {
                                    "description": "Hash of the source attachment when available.",
                                    "maxLength": 128,
                                    "minLength": 8,
                                    "type": "string"
                                  },
                                  "workspace_path": {
                                    "description": "Workspace path for the attachment artifact when available.",
                                    "maxLength": 400,
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "filename"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "source_broker": {
                              "description": "Broker or platform the user appears to keep this portfolio in; metadata only, never evidence for row currency or quote unit.",
                              "enum": [
                                "trading212",
                                "robinhood",
                                "zerodha",
                                "alpaca",
                                "ibkr",
                                "other"
                              ],
                              "type": "string"
                            },
                            "validation_issues": {
                              "default": [],
                              "description": "Draft-level validation issues not tied to one holding or cash row.",
                              "items": {
                                "additionalProperties": false,
                                "description": "Typed validation or parser issue attached to the portfolio draft.",
                                "properties": {
                                  "code": {
                                    "description": "Stable machine-readable issue code.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Draft field path or row control this issue belongs to when known.",
                                    "maxLength": 120,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "message": {
                                    "description": "Short user-facing explanation of the issue.",
                                    "maxLength": 500,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "row_id": {
                                    "description": "Row id this issue belongs to when the issue is row-scoped.",
                                    "maxLength": 80,
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "severity": {
                                    "default": "error",
                                    "description": "Issue severity; error blocks confirmation.",
                                    "enum": [
                                      "info",
                                      "warning",
                                      "error"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "draft_id",
                            "execution_mode",
                            "holdings",
                            "portfolio_name",
                            "portfolio_type",
                            "revision",
                            "schema_version"
                          ],
                          "type": "object"
                        },
                        "ok": {
                          "description": "True when preflight succeeded.",
                          "enum": [
                            true
                          ],
                          "type": "boolean"
                        },
                        "portfolio_type": {
                          "description": "Portfolio type that will be created by import.",
                          "enum": [
                            "managed"
                          ],
                          "type": "string"
                        },
                        "portfolio_value": {
                          "additionalProperties": false,
                          "description": "Reviewed value provenance and its difference from the current provider mark, when comparable.",
                          "properties": {
                            "amount_usd": {
                              "description": "Reviewed portfolio value in USD.",
                              "type": "string"
                            },
                            "as_of_date": {
                              "description": "Date of the reviewed value, when known.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "basis": {
                              "description": "Role of the reviewed value.",
                              "enum": [
                                "portfolio_value",
                                "fund_total_nav"
                              ],
                              "type": "string"
                            },
                            "current_mark_as_of_date": {
                              "description": "Date of the provider-priced mark, when known.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "current_mark_usd": {
                              "description": "Current provider-priced mark in USD, when available.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "difference_usd": {
                              "description": "Reviewed value less the current provider mark in USD, when comparable.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "source": {
                              "description": "Provenance of the reviewed value.",
                              "enum": [
                                "provider_derived",
                                "user_declared",
                                "source_document"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "amount_usd",
                            "as_of_date",
                            "basis",
                            "current_mark_usd",
                            "current_mark_as_of_date",
                            "difference_usd",
                            "source"
                          ],
                          "type": "object"
                        },
                        "row_warnings": {
                          "description": "Per-holding valuation warnings with row_id. Price warnings use field price: price_not_fetched means the vendor did not answer; no_recent_close means no usable close in the last 14 days. holding_fx_unavailable uses field currency and names the missing exchange rate to USD. Warnings do not block confirmation.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                            "properties": {
                              "code": {
                                "description": "Stable machine-readable issue code.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "field": {
                                "description": "Draft field path or row control this issue belongs to when known.",
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              "message": {
                                "description": "Short user-facing explanation of the issue.",
                                "maxLength": 500,
                                "minLength": 1,
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Row id this issue belongs to when the issue is row-scoped.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "severity": {
                                "description": "Issue severity; error blocks confirmation.",
                                "enum": [
                                  "info",
                                  "warning",
                                  "error"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "severity"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "source_broker": {
                          "description": "Broker metadata accepted from the draft, or null when absent.",
                          "enum": [
                            "trading212",
                            "robinhood",
                            "zerodha",
                            "alpaca",
                            "ibkr",
                            "other",
                            null
                          ],
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "unvalued_holding_row_ids": {
                          "description": "Included holding row ids without a current USD value. Review these rows before approving a partial valuation. Empty for complete or not_rechecked coverage.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "valuation_coverage": {
                          "description": "complete means every included holding has a current USD value; partial means some included holdings are unvalued; not_rechecked is an idempotent preflight for an already imported portfolio.",
                          "enum": [
                            "complete",
                            "partial",
                            "not_rechecked"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "approval_token",
                        "allocated_amount_usd",
                        "valuation_coverage",
                        "unvalued_holding_row_ids",
                        "holding_prices",
                        "execution_mode",
                        "imported_cash_count",
                        "imported_holding_count",
                        "ok",
                        "portfolio_type",
                        "source_broker"
                      ],
                      "type": "object"
                    },
                    {
                      "additionalProperties": false,
                      "description": "Failed portfolio import preflight with prices and exposure for valid rows when available.",
                      "properties": {
                        "allocated_amount_usd": {
                          "description": "USD capital requested by the draft when calculable.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "available": {
                          "description": "Available value for balance or capacity failures when available.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "book_summary": {
                          "additionalProperties": false,
                          "description": "Long, short, gross, and net exposure. Cash counts only in NAV. An unvalued holding makes its leg, gross value, net value, NAV and all weights null, with valuation_unavailable_reason.",
                          "properties": {
                            "gross_value": {
                              "description": "Sum of absolute holding values in USD: long value less short value; null when any holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "gross_weight": {
                              "description": "Gross value over NAV; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "long_value": {
                              "description": "Sum of long holding values in USD; null when a long holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "long_weight": {
                              "description": "Long value over NAV; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "nav": {
                              "description": "Cash plus signed holding values in USD; null when any holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "net_value": {
                              "description": "Sum of signed holding values in USD: long value plus short value; null when any holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "net_weight": {
                              "description": "Net value over NAV; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_value": {
                              "description": "Sum of short holding values in USD; zero or negative, or null when a short holding has no current USD value.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "short_weight": {
                              "description": "Short value over NAV, zero or negative; null when NAV is unknown or not above zero.",
                              "minLength": 1,
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "valuation_unavailable_reason": {
                              "description": "Why net asset value and weights are unknown when a holding has no current USD value.",
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "long_value",
                            "short_value",
                            "gross_value",
                            "net_value",
                            "nav",
                            "long_weight",
                            "short_weight",
                            "gross_weight",
                            "net_weight"
                          ],
                          "type": "object"
                        },
                        "error": {
                          "description": "Stable machine-readable import error code.",
                          "maxLength": 120,
                          "minLength": 1,
                          "type": "string"
                        },
                        "holding_prices": {
                          "description": "Prices for valid rows while other rows have blocking errors. These prices do not authorize import.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Provider current price attached to a holding during import preflight; this is display data, not user input.",
                            "properties": {
                              "currency": {
                                "description": "Ledger currency for the provider price after quote-unit normalization.",
                                "enum": [
                                  "USD",
                                  "EUR",
                                  "GBP",
                                  "ZAR",
                                  "ILS",
                                  "JPY",
                                  "CAD",
                                  "AUD",
                                  "CHF",
                                  "INR",
                                  "HKD",
                                  "SEK",
                                  "NOK",
                                  "DKK",
                                  "PLN",
                                  "SGD",
                                  "KRW",
                                  "TWD",
                                  "CNY",
                                  "SAR",
                                  "TRY",
                                  "QAR",
                                  "AED",
                                  "ISK",
                                  "NZD"
                                ],
                                "type": "string"
                              },
                              "price_date": {
                                "description": "Provider market-data date for this current price when available.",
                                "maxLength": 40,
                                "minLength": 1,
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "price_unit": {
                                "description": "Quote denomination for unit_value as returned for review display.",
                                "enum": [
                                  "NATIVE",
                                  "GBX",
                                  "ZAC",
                                  "ILA"
                                ],
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Holding row id this provider price belongs to.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "symbol": {
                                "description": "Fully qualified Itoflow symbol this provider price belongs to.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "unit_scale": {
                                "description": "Quote-unit subdivision scale when price_unit is GBX, ZAC, or ILA.",
                                "enum": [
                                  "0.01"
                                ],
                                "type": "string"
                              },
                              "unit_value": {
                                "description": "Provider current market price per one share/unit in currency and price_unit terms.",
                                "pattern": "^(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "currency",
                              "price_unit",
                              "row_id",
                              "symbol",
                              "unit_value"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "message": {
                          "description": "Short user-facing explanation of why validation or import failed.",
                          "maxLength": 500,
                          "minLength": 1,
                          "type": "string"
                        },
                        "ok": {
                          "description": "False when validation or import failed.",
                          "enum": [
                            false
                          ],
                          "type": "boolean"
                        },
                        "requested": {
                          "description": "Requested value for balance or capacity failures when available.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "row_errors": {
                          "description": "Typed row-level errors, for showing beside fields and for fixing rows.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                            "properties": {
                              "code": {
                                "description": "Stable machine-readable issue code.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "field": {
                                "description": "Draft field path or row control this issue belongs to when known.",
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              "message": {
                                "description": "Short user-facing explanation of the issue.",
                                "maxLength": 500,
                                "minLength": 1,
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Row id this issue belongs to when the issue is row-scoped.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "severity": {
                                "description": "Issue severity; error blocks confirmation.",
                                "enum": [
                                  "info",
                                  "warning",
                                  "error"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "severity"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "row_warnings": {
                          "description": "Per-holding valuation warnings with row_id. Price warnings use field price: price_not_fetched means the vendor did not answer; no_recent_close means no usable close in the last 14 days. holding_fx_unavailable uses field currency and names the missing exchange rate to USD. Warnings do not block confirmation.",
                          "items": {
                            "additionalProperties": false,
                            "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                            "properties": {
                              "code": {
                                "description": "Stable machine-readable issue code.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "field": {
                                "description": "Draft field path or row control this issue belongs to when known.",
                                "maxLength": 120,
                                "minLength": 1,
                                "type": "string"
                              },
                              "message": {
                                "description": "Short user-facing explanation of the issue.",
                                "maxLength": 500,
                                "minLength": 1,
                                "type": "string"
                              },
                              "row_id": {
                                "description": "Row id this issue belongs to when the issue is row-scoped.",
                                "maxLength": 80,
                                "minLength": 1,
                                "type": "string"
                              },
                              "severity": {
                                "description": "Issue severity; error blocks confirmation.",
                                "enum": [
                                  "info",
                                  "warning",
                                  "error"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "code",
                              "message",
                              "severity"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "valuation_scope": {
                          "description": "On a failed review, book_summary covers only rows that passed validation; it is not exposure for the full book.",
                          "enum": [
                            "valid_rows"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "error",
                        "message",
                        "ok",
                        "row_errors"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Portfolio import validation result. An unvalued holding makes book_summary NAV and all weights null, with valuation_unavailable_reason."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "description": "Portfolio import validation or import failure response.",
                  "properties": {
                    "allocated_amount_usd": {
                      "description": "USD capital requested by the draft when calculable.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "available": {
                      "description": "Available value for balance or capacity failures when available.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "error": {
                      "description": "Stable machine-readable import error code.",
                      "maxLength": 120,
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "description": "Short user-facing explanation of why validation or import failed.",
                      "maxLength": 500,
                      "minLength": 1,
                      "type": "string"
                    },
                    "ok": {
                      "description": "False when validation or import failed.",
                      "enum": [
                        false
                      ],
                      "type": "boolean"
                    },
                    "requested": {
                      "description": "Requested value for balance or capacity failures when available.",
                      "minLength": 1,
                      "type": "string"
                    },
                    "row_errors": {
                      "description": "Typed row-level errors, for showing beside fields and for fixing rows.",
                      "items": {
                        "additionalProperties": false,
                        "description": "Normalized validation or parser issue returned by portfolio import APIs.",
                        "properties": {
                          "code": {
                            "description": "Stable machine-readable issue code.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "field": {
                            "description": "Draft field path or row control this issue belongs to when known.",
                            "maxLength": 120,
                            "minLength": 1,
                            "type": "string"
                          },
                          "message": {
                            "description": "Short user-facing explanation of the issue.",
                            "maxLength": 500,
                            "minLength": 1,
                            "type": "string"
                          },
                          "row_id": {
                            "description": "Row id this issue belongs to when the issue is row-scoped.",
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "severity": {
                            "description": "Issue severity; error blocks confirmation.",
                            "enum": [
                              "info",
                              "warning",
                              "error"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message",
                          "severity"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "error",
                    "message",
                    "ok",
                    "row_errors"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Validate uploaded paper portfolio import",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__portfolios_import_validate",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Validate uploaded paper portfolio import",
            "title": "Validate uploaded paper portfolio import"
          }
        }
      }
    },
    "/pricing/billing-portal": {
      "post": {
        "description": "Operation ID: post__pricing_billing_portal.",
        "operationId": "post__pricing_billing_portal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingPortalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingPortalResponse"
                }
              }
            },
            "description": "Create billing portal session"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create billing portal session",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_billing_portal",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create billing portal session",
            "title": "Create billing portal session"
          }
        }
      }
    },
    "/pricing/billing-summary": {
      "get": {
        "description": "Operation ID: get__pricing_billing_summary.",
        "operationId": "get__pricing_billing_summary",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingBillingSummaryResponse"
                }
              }
            },
            "description": "Get billing summary"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get billing summary",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_billing_summary",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get billing summary",
            "title": "Get billing summary"
          }
        }
      }
    },
    "/pricing/catalog": {
      "get": {
        "description": "Operation ID: get__pricing_catalog.",
        "operationId": "get__pricing_catalog",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "models": {
                      "items": {
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "key": {
                            "enum": [
                              "luna",
                              "sol",
                              "sol61",
                              "astra",
                              "sonnet55",
                              "opus55",
                              "terra61",
                              "haiku55"
                            ],
                            "type": "string"
                          },
                          "main_agent": {
                            "type": "boolean"
                          },
                          "model_id": {
                            "type": "string"
                          },
                          "requires_paid": {
                            "type": "boolean"
                          },
                          "short_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "model_id",
                          "short_name",
                          "main_agent",
                          "requires_paid",
                          "enabled"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "plans": {
                      "items": {
                        "properties": {
                          "allowance_multiple": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "currency": {
                            "enum": [
                              "usd"
                            ],
                            "type": "string"
                          },
                          "included_usage_discount_percent": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "included_usage_usd": {
                            "type": "string"
                          },
                          "interval": {
                            "enum": [
                              "month"
                            ],
                            "type": "string"
                          },
                          "key": {
                            "enum": [
                              "free",
                              "pro",
                              "max"
                            ],
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "offer_key": {
                            "enum": [
                              "free",
                              "pro100",
                              "pro300",
                              "max1000"
                            ],
                            "type": "string"
                          },
                          "price_cents": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "price_id": {
                            "type": "string"
                          },
                          "subsidy_usd": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "name",
                          "price_id",
                          "price_cents",
                          "currency",
                          "interval",
                          "included_usage_usd",
                          "subsidy_usd",
                          "allowance_multiple",
                          "included_usage_discount_percent"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "usage_multiplier": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "revision",
                    "usage_multiplier",
                    "plans",
                    "models"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Current plan offers"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingUnavailable"
                }
              }
            },
            "description": "Current offers temporarily unavailable"
          }
        },
        "security": [],
        "summary": "Get current public plan prices, usage allowances and model access",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_catalog",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get current public plan prices, usage allowances and model access",
            "title": "Get current public plan prices, usage allowances and model access"
          }
        }
      }
    },
    "/pricing/config": {
      "get": {
        "description": "Operation ID: get__pricing_config.",
        "operationId": "get__pricing_config",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingConfigResponse"
                }
              }
            },
            "description": "Get pricing configuration"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "Get pricing configuration",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_config",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get pricing configuration",
            "title": "Get pricing configuration"
          }
        }
      }
    },
    "/pricing/confirm-payment": {
      "post": {
        "description": "Operation ID: post__pricing_confirm_payment.",
        "operationId": "post__pricing_confirm_payment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmPaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingConfirmPaymentResponse"
                }
              }
            },
            "description": "Confirm payment"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Confirm payment",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_confirm_payment",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Confirm payment",
            "title": "Confirm payment"
          }
        }
      }
    },
    "/pricing/credit-tiers": {
      "get": {
        "description": "Operation ID: get__pricing_credit_tiers.",
        "operationId": "get__pricing_credit_tiers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingCreditTiersResponse"
                }
              }
            },
            "description": "List credit tiers"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List credit tiers",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_credit_tiers",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List credit tiers",
            "title": "List credit tiers"
          }
        }
      }
    },
    "/pricing/customer-balance": {
      "get": {
        "description": "Operation ID: get__pricing_customer_balance.",
        "operationId": "get__pricing_customer_balance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingCustomerBalanceResponse"
                }
              }
            },
            "description": "Get customer balance"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get customer balance",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_customer_balance",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get customer balance",
            "title": "Get customer balance"
          }
        }
      }
    },
    "/pricing/get-plans": {
      "post": {
        "description": "Operation ID: post__pricing_get_plans.",
        "operationId": "post__pricing_get_plans",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingPlansResponse"
                }
              }
            },
            "description": "Get pricing plans"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get pricing plans",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_get_plans",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get pricing plans",
            "title": "Get pricing plans"
          }
        }
      }
    },
    "/pricing/get-subscription": {
      "post": {
        "description": "Operation ID: post__pricing_get_subscription.",
        "operationId": "post__pricing_get_subscription",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingSubscriptionResponse"
                }
              }
            },
            "description": "Get subscription"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get subscription",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_get_subscription",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get subscription",
            "title": "Get subscription"
          }
        }
      }
    },
    "/pricing/invoices": {
      "get": {
        "description": "Operation ID: get__pricing_invoices.",
        "operationId": "get__pricing_invoices",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingInvoicesResponse"
                }
              }
            },
            "description": "List invoices"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List invoices",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_invoices",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List invoices",
            "title": "List invoices"
          }
        }
      }
    },
    "/pricing/model-access": {
      "get": {
        "description": "Operation ID: get__pricing_model_access.",
        "operationId": "get__pricing_model_access",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "codex_subscription_connected": {
                      "description": "A connected ChatGPT subscription funds single OpenAI choices in Chat and Monitors. Fusion modes use plan access and Itoflow keys.",
                      "type": "boolean"
                    },
                    "default_mode": {
                      "enum": [
                        "luna",
                        "sol",
                        "sol61",
                        "astra",
                        "sonnet55",
                        "opus55",
                        "terra61",
                        "haiku55",
                        "fusion_deep",
                        "fusion_quick",
                        "fusion_light"
                      ],
                      "type": "string"
                    },
                    "default_model": {
                      "enum": [
                        "luna",
                        "sol",
                        "sol61",
                        "astra",
                        "sonnet55",
                        "opus55",
                        "terra61",
                        "haiku55",
                        "fusion_deep",
                        "fusion_quick",
                        "fusion_light"
                      ],
                      "type": "string"
                    },
                    "entitlement": {
                      "enum": [
                        "free",
                        "paid"
                      ],
                      "type": "string"
                    },
                    "models": {
                      "items": {
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "key": {
                            "enum": [
                              "luna",
                              "sol",
                              "sol61",
                              "astra",
                              "sonnet55",
                              "opus55",
                              "terra61",
                              "haiku55"
                            ],
                            "type": "string"
                          },
                          "main_agent": {
                            "type": "boolean"
                          },
                          "model_id": {
                            "type": "string"
                          },
                          "requires_paid": {
                            "type": "boolean"
                          },
                          "short_name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "key",
                          "model_id",
                          "short_name",
                          "main_agent",
                          "requires_paid",
                          "enabled"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "modes": {
                      "items": {
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "guardian_model": {
                            "type": "string"
                          },
                          "key": {
                            "enum": [
                              "luna",
                              "sol",
                              "sol61",
                              "astra",
                              "sonnet55",
                              "opus55",
                              "terra61",
                              "haiku55",
                              "fusion_deep",
                              "fusion_quick",
                              "fusion_light"
                            ],
                            "type": "string"
                          },
                          "main_model": {
                            "type": "string"
                          },
                          "requires_paid": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "key",
                          "main_model",
                          "guardian_model",
                          "requires_paid",
                          "enabled"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "revision": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "revision",
                    "default_model",
                    "default_mode",
                    "modes",
                    "entitlement",
                    "codex_subscription_connected",
                    "models"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Configured model access"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelEntitlementUnavailable"
                }
              }
            },
            "description": "Model entitlement temporarily unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get configured agent models and current model access",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_model_access",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get configured agent models and current model access",
            "title": "Get configured agent models and current model access"
          }
        }
      }
    },
    "/pricing/payment-methods": {
      "get": {
        "description": "Operation ID: get__pricing_payment_methods.",
        "operationId": "get__pricing_payment_methods",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingPaymentMethodsResponse"
                }
              }
            },
            "description": "List payment methods"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List payment methods",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__pricing_payment_methods",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List payment methods",
            "title": "List payment methods"
          }
        }
      }
    },
    "/pricing/payment-methods/{paymentMethodId}": {
      "delete": {
        "description": "Operation ID: delete__pricing_payment_methods_paymentMethodId_.",
        "operationId": "delete__pricing_payment_methods_paymentMethodId_",
        "parameters": [
          {
            "description": "paymentMethodId path parameter",
            "in": "path",
            "name": "paymentMethodId",
            "required": true,
            "schema": {
              "description": "paymentMethodId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            },
            "description": "Delete payment method"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Delete payment method",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__pricing_payment_methods_paymentmethodid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Delete payment method",
            "title": "Delete payment method"
          }
        }
      }
    },
    "/pricing/payment-methods/default": {
      "post": {
        "description": "Operation ID: post__pricing_payment_methods_default.",
        "operationId": "post__pricing_payment_methods_default",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetDefaultPaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            },
            "description": "Set default payment method"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Set default payment method",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_payment_methods_default",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Set default payment method",
            "title": "Set default payment method"
          }
        }
      }
    },
    "/pricing/payment-methods/setup-intent": {
      "post": {
        "description": "Operation ID: post__pricing_payment_methods_setup_intent.",
        "operationId": "post__pricing_payment_methods_setup_intent",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentSetupIntentResponse"
                }
              }
            },
            "description": "Create payment method setup intent"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create payment method setup intent",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_payment_methods_setup_intent",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create payment method setup intent",
            "title": "Create payment method setup intent"
          }
        }
      }
    },
    "/pricing/preview-upgrade": {
      "post": {
        "description": "Operation ID: post__pricing_preview_upgrade.",
        "operationId": "post__pricing_preview_upgrade",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PricingPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingPreviewUpgradeResponse"
                }
              }
            },
            "description": "Preview subscription upgrade"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Preview subscription upgrade",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_preview_upgrade",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Preview subscription upgrade",
            "title": "Preview subscription upgrade"
          }
        }
      }
    },
    "/pricing/refund-balance": {
      "post": {
        "description": "Operation ID: post__pricing_refund_balance.",
        "operationId": "post__pricing_refund_balance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingRefundBalanceResponse"
                }
              }
            },
            "description": "Refund customer balance"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Refund customer balance",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_refund_balance",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Refund customer balance",
            "title": "Refund customer balance"
          }
        }
      }
    },
    "/pricing/spending-cap": {
      "post": {
        "description": "Operation ID: post__pricing_spending_cap.",
        "operationId": "post__pricing_spending_cap",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpendingCapRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendingCapResponse"
                }
              }
            },
            "description": "Set spending cap"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Set spending cap",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_spending_cap",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Set spending cap",
            "title": "Set spending cap"
          }
        }
      }
    },
    "/pricing/update-subscription": {
      "post": {
        "description": "Operation ID: post__pricing_update_subscription.",
        "operationId": "post__pricing_update_subscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PricingPlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingSubscriptionResponse"
                }
              }
            },
            "description": "Updated subscription"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanTermsChanged"
                }
              }
            },
            "description": "Plan terms changed, an update is in progress, or an unpaid plan-change invoice blocks the request. Error codes: PLAN_TERMS_CHANGED, SUBSCRIPTION_UPDATE_IN_PROGRESS, SUBSCRIPTION_PAYMENT_PENDING, SUBSCRIPTION_PAYMENT_REQUIRED, SUBSCRIPTION_UPDATE_UNSUPPORTED."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricingUnavailable"
                }
              }
            },
            "description": "Current offers temporarily unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update subscription",
        "tags": [
          "Billing"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__pricing_update_subscription",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Update subscription",
            "title": "Update subscription"
          }
        }
      }
    },
    "/risk/measure": {
      "post": {
        "description": "Start measuring factor risk for 1 to 10 books over 1 to 60 dates of the factor model, on one model version: the one named, or the one live at the start. A book is a saved portfolio or a list of weights. model.as_of measures one date; model.range measures the last day of each month in it and its end (step month_end, the default) or each weekday (step daily); neither measures the newest publication. Each date reads the newest publication on or before it. Before the version's daily publications begin (model.dates.daily_from in an answer), a daily grid reads month-end publications, so use month_end for older history. A saved book without holdings_at follows its snapshots date by date; with holdings_at it stays the same book. Funds in a book, and the benchmark, are read through their stored holdings on or before each publication's model date. Answers 202 with a measure_id: read it until its status is not running. Keep the request_key: the same request with it joins the measure until 24 hours after it ends; another request with it is 409. A measure counts toward the 3 risk runs and measures an owner may have going, and stops if it runs past its time limit, at most 60 minutes; 429 and 503 carry Retry-After. For today's full report, start a risk run instead.\n\nOperation ID: startRiskMeasure.",
        "operationId": "startRiskMeasure",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RiskMeasureStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_startRiskMeasureResponse"
                }
              }
            },
            "description": "Started, or joined the measure with this key and request",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "invalid_request names the field: the shape, a limit, more than 60 dates, from after to, or a date after today in New York.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "No session or API bearer.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "portfolio_not_found: a portfolio that is missing or not yours.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "risk_measure_request_key_conflict: this request_key started a measure of another request.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "risk_engine_busy: 3 risk runs or measures are going.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "risk_engine_unavailable: the risk engine did not answer. Retry the same call; a start with the same request_key joins the measure it may have started.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Start a risk measure",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/startriskmeasure",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Measure",
            "title": "Measure"
          }
        }
      }
    },
    "/risk/measure/{measure_id}": {
      "get": {
        "description": "Read a measure until its status is not running. running gives progress: dates_done of dates_total. ok gives the answer: model (the version, its publications and base currency), units, factors (every factor any date has; each per-factor array follows this order, null where a date's publication lacks one), dates (one per date: ok with publication_date, the benchmark and each book, or missing with nearest_before and nearest_after), and warnings. Volatility and tracking error are annual decimals; shares are percent of variance; modelled_share_of_gross is a share of the book's gross weight, not of net assets. failed gives failure_code and reason: model_version_not_found (leave model.version out), answer_too_large or timed_out (split the books or the range), cancelled, or engine_fault (start again with a new request_key; if it fails again, the measure cannot run). Answers stay 24 hours after the measure ends. Names the model lacks stay out of this result. To add them, run the risk engine on the book: it adds each name it can score to the model's publications from the last two years. Then call this again. A name the run could not add comes back with its reason; not_added_in_time means the run stopped waiting first, so run it again later.\n\nOperation ID: getRiskMeasure.",
        "operationId": "getRiskMeasure",
        "parameters": [
          {
            "in": "path",
            "name": "measure_id",
            "required": true,
            "schema": {
              "pattern": "^measure-[0-9a-f]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_getRiskMeasureResponse"
                }
              }
            },
            "description": "The measure",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "No session or API bearer.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "measure_not_found: no measure of yours has this id, or its answer is past its 24 hours.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "risk_engine_unavailable: the risk engine did not answer. Retry the same call; a start with the same request_key joins the measure it may have started.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read a risk measure",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getriskmeasure",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a risk measure",
            "title": "Read a risk measure"
          }
        }
      }
    },
    "/risk/measure/{measure_id}/cancel": {
      "post": {
        "description": "Stop a measure by its measure_id. cancelled is false when it had already ended.\n\nOperation ID: cancelRiskMeasure.",
        "operationId": "cancelRiskMeasure",
        "parameters": [
          {
            "in": "path",
            "name": "measure_id",
            "required": true,
            "schema": {
              "pattern": "^measure-[0-9a-f]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_cancelRiskMeasureResponse"
                }
              }
            },
            "description": "Whether a measure was stopped",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "No session or API bearer.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "measure_not_found: no measure of yours has this id, or its answer is past its 24 hours.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskMeasureError"
                }
              }
            },
            "description": "risk_engine_unavailable: the risk engine did not answer. Retry the same call; a start with the same request_key joins the measure it may have started.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Stop a risk measure",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/cancelriskmeasure",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Stop a risk measure",
            "title": "Stop a risk measure"
          }
        }
      }
    },
    "/risk/runs": {
      "post": {
        "description": "Measure a saved portfolio or a what-if book against a benchmark and peer funds. Keep the request_key: retrying the same request joins its run for 24 hours after it ends. Another request with that key returns 409. At most three runs may run at once; none runs past 60 minutes. A run whose books hold names the model has not scored first waits up to 10 more minutes while they are scored. Requires itoflow-engine-results.\n\nOperation ID: startRiskRun.",
        "operationId": "startRiskRun",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Gateway_RiskRunStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_startRiskRunResponse"
                }
              }
            },
            "description": "Run accepted",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "The itoflow-engine-results flag is off.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Start a risk run",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/startriskrun",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Runs",
            "title": "Runs"
          }
        }
      }
    },
    "/risk/runs/{run_id}": {
      "get": {
        "description": "Read the run until it ends. A running run may carry progress: waiting_for_coverage while the factor model scores names_asked names (waited_seconds so far, expected_seconds the likely total, at_most_seconds the longest wait before the run measures what it has), then measuring. Finished results stay for 24 hours. A result with figures includes summary, view, component and the verified analytics reference. A failed run returns 200 with failure_code and reason: engine_refused means change the request; rate_limited and provider_unavailable mean the price provider failed, so start again later with a new request_key; timed_out and cancelled also end a run. Requires itoflow-engine-results.\n\nOperation ID: getRiskRun.",
        "operationId": "getRiskRun",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_getRiskRunResponse"
                }
              }
            },
            "description": "Run state",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "The itoflow-engine-results flag is off.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read a risk run",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getriskrun",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read a risk run",
            "title": "Read a risk run"
          }
        }
      }
    },
    "/risk/runs/{run_id}/artifact": {
      "get": {
        "description": "Read the complete schema-version-2 analytics document for a finished run. Default application/json gives raw bytes. Accept application/gzip selects stored bytes; Range requests of at most 4 MiB return 206 with Content-Range. Both representations expose exact Content-Length and SHA-256 ETag. Before ready returns 409; invalid ranges 416; unknown, foreign and expired runs share 404. Output remains available 24 hours after completion, including after the engine container stops. Requires itoflow-engine-results.\n\nOperation ID: getRiskRunArtifact.",
        "operationId": "getRiskRunArtifact",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/gzip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_getRiskRunArtifactResponse"
                }
              }
            },
            "description": "Complete analytics document, or stored gzip representation when Accept selects it",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "206": {
            "content": {
              "application/gzip": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "A gzip byte range of at most 4 MiB",
            "headers": {
              "Content-Length": {
                "schema": {
                  "type": "integer"
                }
              },
              "Content-Range": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "The itoflow-engine-results flag is off.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "416": {
            "description": "Invalid, outside or oversized gzip range"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read the full risk run output",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getriskrunartifact",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read the full risk run output",
            "title": "Read the full risk run output"
          }
        }
      }
    },
    "/risk/runs/{run_id}/cancel": {
      "post": {
        "description": "Stop a run by its run_id. cancelled is false when no run is going. Requires itoflow-engine-results.\n\nOperation ID: cancelRiskRun.",
        "operationId": "cancelRiskRun",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "pattern": "^[0-9a-f]{32}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_cancelRiskRunResponse"
                }
              }
            },
            "description": "Run state",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "The itoflow-engine-results flag is off.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_RiskRunError"
                }
              }
            },
            "description": "Request failed",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "const": "no-store",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Stop a risk run",
        "tags": [
          "Risk runs"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/cancelriskrun",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Stop a risk run",
            "title": "Stop a risk run"
          }
        }
      }
    },
    "/strategies": {
      "get": {
        "description": "Returns Itoflow-created strategies plus user-owned strategies. Supports filtering by active status, Itoflow-only, or user-only.\n\nOperation ID: get__strategies.",
        "operationId": "get__strategies",
        "parameters": [
          {
            "description": "Only Itoflow-created strategies (true/false)",
            "in": "query",
            "name": "siqOnly",
            "required": false,
            "schema": {
              "description": "Only Itoflow-created strategies (true/false)",
              "example": "true",
              "type": "string"
            }
          },
          {
            "description": "Only user-owned strategies (true/false)",
            "in": "query",
            "name": "mineOnly",
            "required": false,
            "schema": {
              "description": "Only user-owned strategies (true/false)",
              "example": "false",
              "type": "string"
            }
          },
          {
            "description": "Only active strategies (true/false)",
            "in": "query",
            "name": "activeOnly",
            "required": false,
            "schema": {
              "description": "Only active strategies (true/false)",
              "example": "true",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyListResponse"
                }
              }
            },
            "description": "Strategy list"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List strategies visible to user",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List strategies visible to user",
            "title": "List strategies visible to user"
          }
        }
      },
      "post": {
        "description": "Creates a paper strategy, optionally linked to an existing managed paper portfolio. Provide constraints.min_position_pct, max_position_pct, and max_positions; select at least one market, asset class, sector, or included symbol through allocationGuidance or universe. Omitted optional controls receive server defaults returned as effectiveConstraints and effectiveRules. activateImmediately=false creates a paused strategy even though isActive=true means it exists.\n\nOperation ID: post__strategies.",
        "operationId": "post__strategies",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StrategyCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateStrategyResponse"
                }
              }
            },
            "description": "Strategy created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Validation error"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create a paper strategy",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__strategies",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create a paper strategy",
            "title": "Create a paper strategy"
          }
        }
      }
    },
    "/strategies/{id}": {
      "get": {
        "description": "Returns a single strategy with full detail. User must own the strategy or it must be an Itoflow-created strategy.\n\nOperation ID: get__strategies_id_.",
        "operationId": "get__strategies_id_",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Include immutable version history for the strategy (true/false)",
            "in": "query",
            "name": "includeVersionHistory",
            "required": false,
            "schema": {
              "description": "Include immutable version history for the strategy (true/false)",
              "example": "true",
              "type": "string"
            }
          },
          {
            "description": "Also return this historical revision's full mandate text (positive version number)",
            "in": "query",
            "name": "mandateVersion",
            "required": false,
            "schema": {
              "description": "Also return this historical revision's full mandate text (positive version number)",
              "example": "2",
              "pattern": "^[1-9]\\d*$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyDetailResponse"
                }
              }
            },
            "description": "Strategy detail"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy detail",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy detail",
            "title": "Get strategy detail"
          }
        }
      },
      "put": {
        "description": "Updates an existing user-owned strategy.\n\nOperation ID: put__strategies_id_.",
        "operationId": "put__strategies_id_",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StrategyUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateStrategyResponse"
                }
              }
            },
            "description": "Strategy updated"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Validation error"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Strategy not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Version conflict"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update a strategy",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/put__strategies_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Update a strategy",
            "title": "Update a strategy"
          }
        }
      }
    },
    "/strategies/{id}/active-execution": {
      "get": {
        "description": "Returns the strategy run that is in progress right now, if any, with its execution_id and status. Returns 204 when no run is in progress. Use the execution_id to stream or read the events of that run.\n\nOperation ID: get__strategies_id_active_execution.",
        "operationId": "get__strategies_id_active_execution",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveStrategyExecutionResponse"
                }
              }
            },
            "description": "Active strategy execution"
          },
          "204": {
            "description": "No active execution"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get the strategy run in progress",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_id_active_execution",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get the strategy run in progress",
            "title": "Get the strategy run in progress"
          }
        }
      }
    },
    "/strategies/{id}/control": {
      "post": {
        "description": "Resume, pause, or deactivate a strategy. Users can only control their own strategies.\n\nOperation ID: post__strategies_id_control.",
        "operationId": "post__strategies_id_control",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StrategyControlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyControlResult"
                }
              }
            },
            "description": "Control result"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid action"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Ownership required"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Control strategy execution",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__strategies_id_control",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Control strategy execution",
            "title": "Control strategy execution"
          }
        }
      }
    },
    "/strategies/{id}/decisions/{decisionId}/events": {
      "get": {
        "description": "Operation ID: get__strategies_id_decisions_decisionId_events.",
        "operationId": "get__strategies_id_decisions_decisionId_events",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          },
          {
            "description": "decisionId path parameter",
            "in": "path",
            "name": "decisionId",
            "required": true,
            "schema": {
              "description": "decisionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyEventsResponse"
                }
              }
            },
            "description": "Get strategy decision events"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy decision events",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_id_decisions_decisionid_events",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy decision events",
            "title": "Get strategy decision events"
          }
        }
      }
    },
    "/strategies/{id}/execute": {
      "post": {
        "description": "Queues a one-off manual strategy rebalance and returns an execution id for tracking.\n\nOperation ID: post__strategies_id_execute.",
        "operationId": "post__strategies_id_execute",
        "parameters": [
          {
            "description": "Resource UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Resource UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StrategyExecuteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyExecuteResponse"
                }
              }
            },
            "description": "Execution queued"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Validation error"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRejectionOrError"
                }
              }
            },
            "description": "Forbidden or blocked by billing limits"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Strategy not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Queue a manual strategy execution",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__strategies_id_execute",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Queue a manual strategy execution",
            "title": "Queue a manual strategy execution"
          }
        }
      }
    },
    "/strategies/{id}/executions": {
      "get": {
        "description": "Operation ID: get__strategies_id_executions.",
        "operationId": "get__strategies_id_executions",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          },
          {
            "description": "Maximum executions to return. Clamped to 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Maximum executions to return. Clamped to 50.",
              "example": "20",
              "type": "string"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset.",
              "example": "0",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyExecutionsResponse"
                }
              }
            },
            "description": "List strategy executions"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List strategy executions",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_id_executions",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List strategy executions",
            "title": "List strategy executions"
          }
        }
      }
    },
    "/strategies/{id}/executions/{executionId}/events": {
      "get": {
        "description": "Operation ID: get__strategies_id_executions_executionId_events.",
        "operationId": "get__strategies_id_executions_executionId_events",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          },
          {
            "description": "executionId path parameter",
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "description": "executionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StrategyEventsResponse"
                }
              }
            },
            "description": "Get strategy execution events"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get strategy execution events",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_id_executions_executionid_events",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get strategy execution events",
            "title": "Get strategy execution events"
          }
        }
      }
    },
    "/strategies/{id}/stream/{executionId}": {
      "get": {
        "description": "Operation ID: get__strategies_id_stream_executionId_.",
        "operationId": "get__strategies_id_stream_executionId_",
        "parameters": [
          {
            "description": "id path parameter",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "id path parameter",
              "type": "string"
            }
          },
          {
            "description": "executionId path parameter",
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "description": "executionId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "AI SDK UI message stream"
          },
          "204": {
            "description": "No active stream"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Stream strategy execution events",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_id_stream_executionid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Stream strategy execution events",
            "title": "Stream strategy execution events"
          }
        }
      }
    },
    "/strategies/eligible": {
      "get": {
        "description": "Lists the strategies you can see that are ready to go live and trade with real money at a broker, such as Trading 212 or Robinhood. Pass broker_connection_id for brokers that check each symbol, such as Trading 212. A strategy is listed when the broker supports every symbol in its latest target allocation and every non-cash holding in its paper portfolio. Books that hold a short are excluded because live short sales are not supported.\n\nOperation ID: get__strategies_eligible.",
        "operationId": "get__strategies_eligible",
        "parameters": [
          {
            "description": "Broker type, such as trading212, robinhood or zerodha",
            "in": "query",
            "name": "broker_type",
            "required": true,
            "schema": {
              "description": "Broker type, such as trading212, robinhood or zerodha",
              "example": "trading212",
              "type": "string"
            }
          },
          {
            "description": "Broker connection ID (required for symbol-level broker eligibility checks)",
            "in": "query",
            "name": "broker_connection_id",
            "required": false,
            "schema": {
              "description": "Broker connection ID (required for symbol-level broker eligibility checks)",
              "example": "433f17fe-7c9e-4e55-bd7f-a90813aa33b1",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EligibleStrategyListResponse"
                }
              }
            },
            "description": "Eligible strategies"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid broker type"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List strategies that can go live at a broker",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_eligible",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List strategies that can go live at a broker",
            "title": "List strategies that can go live at a broker"
          }
        }
      }
    },
    "/strategies/live": {
      "post": {
        "description": "Creates a strategy attached to an existing live portfolio mirror. Provide constraints.min_position_pct, max_position_pct, and max_positions; select at least one market, asset class, sector, or included symbol through allocationGuidance or universe. Omitted optional controls receive server defaults returned as effectiveConstraints and effectiveRules. activateImmediately=false creates a paused strategy even though isActive=true means it exists.\n\nOperation ID: post__strategies_live.",
        "operationId": "post__strategies_live",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StrategyCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateStrategyResponse"
                }
              }
            },
            "description": "Strategy created"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Validation error"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Portfolio not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Conflict"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create a live-linked strategy",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__strategies_live",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create a live-linked strategy",
            "title": "Create a live-linked strategy"
          }
        }
      }
    },
    "/strategies/public": {
      "get": {
        "description": "Operation ID: get__strategies_public.",
        "operationId": "get__strategies_public",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicStrategiesResponse"
                }
              }
            },
            "description": "List public strategy showcase"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [],
        "summary": "List public strategy showcase",
        "tags": [
          "Strategies"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__strategies_public",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List public strategy showcase",
            "title": "List public strategy showcase"
          }
        }
      }
    },
    "/symbols/analytics": {
      "get": {
        "description": "Returns analytics for any 1 to 12 symbols: per-symbol returns, risk, signals and fundamentals, plus analytics for the symbols as one list, such as market regime, breadth and sector mix. Nothing is saved. The server caches results for up to 10 minutes, or 1 minute when some symbols or data sources failed.\n\nOperation ID: get__symbols_analytics.",
        "operationId": "get__symbols_analytics",
        "parameters": [
          {
            "description": "Comma-separated symbols, 1 to 12, such as AAPL.US,MSFT.US. A ticker without an exchange means its US listing.",
            "in": "query",
            "name": "symbols",
            "required": true,
            "schema": {
              "description": "Comma-separated symbols, 1 to 12, such as AAPL.US,MSFT.US. A ticker without an exchange means its US listing.",
              "example": "AAPL.US,MSFT.US",
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SymbolAnalyticsLatestResponse"
                }
              }
            },
            "description": "Latest symbol analytics"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not 1 to 12 symbols"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "None of the symbols had price data"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Analytics could not be computed; retry later"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get latest analytics for a list of symbols",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__symbols_analytics",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get latest analytics for a list of symbols",
            "title": "Get latest analytics for a list of symbols"
          }
        }
      }
    },
    "/symbols/baseline": {
      "get": {
        "description": "Returns the latest symbol cards. The server caches results for up to 10 minutes.\n\nOperation ID: get__symbols_baseline.",
        "operationId": "get__symbols_baseline",
        "parameters": [
          {
            "in": "query",
            "name": "symbols",
            "required": true,
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SymbolBaselineLatestResponse"
                }
              }
            },
            "description": "Latest symbol baseline cards"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "No valid symbol cards were available"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Symbol baseline provider unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get latest symbol baseline cards",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__symbols_baseline",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get latest symbol baseline cards",
            "title": "Get latest symbol baseline cards"
          }
        }
      }
    },
    "/symbols/cache-status": {
      "get": {
        "description": "Operation ID: get__symbols_cache_status.",
        "operationId": "get__symbols_cache_status",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SymbolCacheStatusResponse"
                }
              }
            },
            "description": "Get symbol cache status"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get symbol cache status",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__symbols_cache_status",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get symbol cache status",
            "title": "Get symbol cache status"
          }
        }
      }
    },
    "/symbols/exchanges": {
      "get": {
        "description": "Operation ID: getSymbolsExchanges.",
        "operationId": "getSymbolsExchanges",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SymbolExchangesResponse"
                }
              }
            },
            "description": "List symbol exchanges"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List symbol exchanges",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getsymbolsexchanges",
          "metadata": {
            "playground": "interactive",
            "sidebarTitle": "List symbol exchanges",
            "title": "List symbol exchanges"
          }
        }
      }
    },
    "/symbols/quotes": {
      "post": {
        "description": "Returns cached quotes only; symbols without a cached quote are omitted.\n\nOperation ID: post__symbols_quotes.",
        "operationId": "post__symbols_quotes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SymbolQuotesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistQuotesResponse"
                }
              }
            },
            "description": "Cached live quotes by symbol"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Symbol quote cache unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get cached live quotes for symbols",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__symbols_quotes",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get cached live quotes for symbols",
            "title": "Get cached live quotes for symbols"
          }
        }
      }
    },
    "/symbols/resolve": {
      "get": {
        "description": "Resolve an instrument identifier for portfolio import. This canonical symbol lookup accepts Itoflow symbol, ticker, broker symbol, ISIN, Itoflow exchange code, ISO 10383 MIC, and currency evidence. Conflicting, incomplete or unsupported evidence is rejected rather than guessed.\n\nOperation ID: getSymbolsResolve.",
        "operationId": "getSymbolsResolve",
        "parameters": [
          {
            "in": "query",
            "name": "broker_symbol",
            "required": false,
            "schema": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "company_name",
            "required": false,
            "schema": {
              "maxLength": 500,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "maxLength": 10,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Supported Itoflow exchange code such as US or LSE; do not pass a venue name such as NASDAQ.",
            "in": "query",
            "name": "exchange",
            "required": false,
            "schema": {
              "description": "Supported Itoflow exchange code such as US or LSE; do not pass a venue name such as NASDAQ.",
              "maxLength": 20,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "isin",
            "required": false,
            "schema": {
              "maxLength": 20,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "ISO 10383 market identifier code used as venue evidence, such as XNAS.",
            "in": "query",
            "name": "mic",
            "required": false,
            "schema": {
              "description": "ISO 10383 market identifier code used as venue evidence, such as XNAS.",
              "maxLength": 10,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "siq_symbol",
            "required": false,
            "schema": {
              "maxLength": 70,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Ticker on the supplied exchange or MIC. Letters followed by one dot, slash or space and one or two class letters use the dashed listing when it exists (BRK.B, BRK/B or BRK B becomes BRK-B). BRKB is not guessed. Other evidence must agree.",
            "in": "query",
            "name": "ticker",
            "required": false,
            "schema": {
              "description": "Ticker on the supplied exchange or MIC. Letters followed by one dot, slash or space and one or two class letters use the dashed listing when it exists (BRK.B, BRK/B or BRK B becomes BRK-B). BRKB is not guessed. Other evidence must agree.",
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentResolveSuccessResponse"
                }
              }
            },
            "description": "Canonical Itoflow instrument"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentResolveFailureResponse"
                }
              }
            },
            "description": "Identifier evidence is incomplete, unresolved, or conflicting"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Resolve canonical instrument identifiers",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getsymbolsresolve",
          "metadata": {
            "playground": "interactive",
            "sidebarTitle": "Resolve canonical instrument identifiers",
            "title": "Resolve canonical instrument identifiers"
          }
        }
      }
    },
    "/symbols/resolve/batch": {
      "post": {
        "description": "Resolve up to 3,000 instruments in one call, for example every name in a holdings file before pricing it. Each item takes the evidence `GET /symbols/resolve` takes, and each row answers as that route would, in request order with `index`. A row that cannot be resolved fails alone; the call still answers 200. A row with `resolution_unavailable` was not finished within this call: send those rows again. A fault that sending a row again would not fix, such as a database failure, fails the call.\n\nOperation ID: post__symbols_resolve_batch.",
        "operationId": "post__symbols_resolve_batch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InstrumentResolveBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentResolveBatchResponse"
                }
              }
            },
            "description": "One resolution row per item"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid batch request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "A fault that sending the rows again would not fix, such as a database failure"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Resolve canonical instrument identifiers in bulk",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__symbols_resolve_batch",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Resolve canonical instrument identifiers in bulk",
            "title": "Resolve canonical instrument identifiers in bulk"
          }
        }
      }
    },
    "/symbols/search": {
      "get": {
        "description": "Search symbols by ticker/company with fuzzy matching, or resolve one fully qualified SYMBOL.EXCHANGE with mode=exact.\n\nOperation ID: getSymbolsSearch.",
        "operationId": "getSymbolsSearch",
        "parameters": [
          {
            "description": "Search mode. rank is autocomplete/fuzzy search; exact validates one fully qualified SYMBOL.EXCHANGE.",
            "in": "query",
            "name": "mode",
            "required": false,
            "schema": {
              "description": "Search mode. rank is autocomplete/fuzzy search; exact validates one fully qualified SYMBOL.EXCHANGE.",
              "enum": [
                "rank",
                "exact"
              ],
              "example": "rank",
              "type": "string"
            }
          },
          {
            "description": "Search query. Use SYMBOL.EXCHANGE when mode=exact.",
            "in": "query",
            "name": "q",
            "required": true,
            "schema": {
              "description": "Search query. Use SYMBOL.EXCHANGE when mode=exact.",
              "example": "AAPL",
              "type": "string"
            }
          },
          {
            "description": "Filter by exchange (e.g., US, NSE, LSE, XETRA, BR, SW, PA, AS)",
            "in": "query",
            "name": "exchange",
            "required": false,
            "schema": {
              "description": "Filter by exchange (e.g., US, NSE, LSE, XETRA, BR, SW, PA, AS)",
              "type": "string"
            }
          },
          {
            "description": "Filter by type (e.g., stock, etf)",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "description": "Filter by type (e.g., stock, etf)",
              "type": "string"
            }
          },
          {
            "description": "Max results (1-100, default 20)",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Max results (1-100, default 20)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SymbolSearchResponse"
                }
              }
            },
            "description": "Search results"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid exchange"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Search or resolve symbols",
        "tags": [
          "Market data"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getsymbolssearch",
          "metadata": {
            "playground": "interactive",
            "sidebarTitle": "Search or resolve symbols",
            "title": "Search or resolve symbols"
          }
        }
      }
    },
    "/transition/{taskId}": {
      "get": {
        "description": "Operation ID: get__transition_taskId_.",
        "operationId": "get__transition_taskId_",
        "parameters": [
          {
            "description": "taskId path parameter",
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "description": "taskId path parameter",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransitionResponse"
                }
              }
            },
            "description": "Get portfolio transition status"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Bad request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get portfolio transition status",
        "tags": [
          "Portfolios"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__transition_taskid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get portfolio transition status",
            "title": "Get portfolio transition status"
          }
        }
      }
    },
    "/watchlists": {
      "get": {
        "description": "Operation ID: get__watchlists.",
        "operationId": "get__watchlists",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistListResponse"
                }
              }
            },
            "description": "Monitors"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistLifecycleUnavailableResponse"
                }
              }
            },
            "description": "Monitor state temporarily unavailable; retry"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List monitors",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List monitors",
            "title": "List monitors"
          }
        }
      },
      "post": {
        "description": "Operation ID: post__watchlists.",
        "operationId": "post__watchlists",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWatchlistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistMutationResponse"
                }
              }
            },
            "description": "Created monitor"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Duplicate monitor name, or the subject portfolio already has a strategy"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistLifecycleUnavailableResponse"
                }
              }
            },
            "description": "Monitor state temporarily unavailable; retry"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Create monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__watchlists",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Create monitor",
            "title": "Create monitor"
          }
        }
      }
    },
    "/watchlists/{id}": {
      "delete": {
        "description": "Operation ID: delete__watchlists_id_.",
        "operationId": "delete__watchlists_id_",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistDeletePendingResponse"
                }
              }
            },
            "description": "Monitor deletion committed and cleanup pending"
          },
          "204": {
            "description": "Monitor deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistRuntimeMovePendingResponse"
                }
              }
            },
            "description": "The monitor is moving to the new runtime; try again later"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Delete monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/delete__watchlists_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Delete monitor",
            "title": "Delete monitor"
          }
        }
      },
      "get": {
        "description": "Operation ID: get__watchlists_id_.",
        "operationId": "get__watchlists_id_",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "include_version_history",
            "required": false,
            "schema": {
              "enum": [
                "true",
                "false"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "mandate_version",
            "required": false,
            "schema": {
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Watchlist"
                }
              }
            },
            "description": "Monitor"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistLifecycleUnavailableResponse"
                }
              }
            },
            "description": "Monitor state temporarily unavailable; retry"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get monitor",
            "title": "Get monitor"
          }
        }
      },
      "put": {
        "description": "Operation ID: put__watchlists_id_.",
        "operationId": "put__watchlists_id_",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWatchlistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistMutationResponse"
                }
              }
            },
            "description": "Updated monitor"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "properties": {
                        "code": {
                          "enum": [
                            "DUPLICATE_NAME"
                          ],
                          "type": "string"
                        },
                        "error": {
                          "enum": [
                            "DUPLICATE_NAME"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "error",
                        "code",
                        "message"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "error": {
                          "enum": [
                            "PORTFOLIO_HAS_STRATEGY"
                          ],
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "error",
                        "message"
                      ],
                      "type": "object"
                    },
                    {
                      "$ref": "#/components/schemas/WatchlistDeletePendingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/WatchlistRuntimeMovePendingResponse"
                    }
                  ]
                }
              }
            },
            "description": "Duplicate monitor name, deletion pending, or the monitor is moving to the new runtime"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistLifecycleUnavailableResponse"
                }
              }
            },
            "description": "Monitor state temporarily unavailable; retry"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Update monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/put__watchlists_id_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Update monitor",
            "title": "Update monitor"
          }
        }
      }
    },
    "/watchlists/{id}/active-execution": {
      "get": {
        "description": "Returns the Monitor run that is queued or in progress right now, if any, with its execution_id and status. Returns 204 when no run is in progress.\n\nOperation ID: get__watchlists_id_active_execution.",
        "operationId": "get__watchlists_id_active_execution",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistActiveExecution"
                }
              }
            },
            "description": "Active queued or running monitor execution"
          },
          "204": {
            "description": "No active monitor execution exists"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get the Monitor run in progress",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_active_execution",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get the Monitor run in progress",
            "title": "Get the Monitor run in progress"
          }
        }
      }
    },
    "/watchlists/{id}/analytics/latest": {
      "get": {
        "description": "Operation ID: get__watchlists_id_analytics_latest.",
        "operationId": "get__watchlists_id_analytics_latest",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Optional snapshot date to fetch.",
            "in": "query",
            "name": "date",
            "required": false,
            "schema": {
              "description": "Optional snapshot date to fetch.",
              "example": "2026-07-03",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistAnalyticsSnapshot"
                }
              }
            },
            "description": "Monitor analytics snapshot"
          },
          "204": {
            "description": "No analytics snapshot exists"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get latest monitor analytics snapshot",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_analytics_latest",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get latest monitor analytics snapshot",
            "title": "Get latest monitor analytics snapshot"
          }
        }
      }
    },
    "/watchlists/{id}/control": {
      "post": {
        "description": "Operation ID: post__watchlists_id_control.",
        "operationId": "post__watchlists_id_control",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchlistControlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistMutationResponse"
                }
              }
            },
            "description": "Updated monitor state; without recurrence, reports stay manual-only"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/WatchlistDeletePendingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/WatchlistRuntimeMovePendingResponse"
                    }
                  ]
                }
              }
            },
            "description": "Monitor has no report schedule, deletion is pending, or the monitor is moving to the new runtime"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WatchlistSchedulingUnavailableResponse"
                    },
                    {
                      "$ref": "#/components/schemas/WatchlistLifecycleUnavailableResponse"
                    }
                  ]
                }
              }
            },
            "description": "Monitor lifecycle or report scheduling unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Control monitor agent",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__watchlists_id_control",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Control monitor agent",
            "title": "Control monitor agent"
          }
        }
      }
    },
    "/watchlists/{id}/executions/{executionId}/results": {
      "get": {
        "description": "Returns the engine results (symbol cards, symbol analytics, risk engine panels) that a Monitor run has shown so far, oldest first, so a page can show them while the run is in progress. Runs on the legacy runtime record none and return an empty list.\n\nOperation ID: get__watchlists_id_executions_executionId_results.",
        "operationId": "get__watchlists_id_executions_executionId_results",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Monitor run (execution) UUID",
            "in": "path",
            "name": "executionId",
            "required": true,
            "schema": {
              "description": "Monitor run (execution) UUID",
              "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "How many of the run's results you already have. Results are only ever added, so passing the count you hold returns the new ones. A result can come again when the server skips one it cannot read, so keep each by its view.result_id.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "How many of the run's results you already have. Results are only ever added, so passing the count you hold returns the new ones. A result can come again when the server skips one it cannot read, so keep each by its view.result_id.",
              "example": 0,
              "maximum": 999999,
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistRunResults"
                }
              }
            },
            "description": "Engine results of the run so far"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The after cursor, the Monitor id or the run id is malformed"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "The Monitor runtime is unavailable (MONITOR_LIFECYCLE_UNAVAILABLE); retry shortly"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get the results a Monitor run has shown so far",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_executions_executionid_results",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get the results a Monitor run has shown so far",
            "title": "Get the results a Monitor run has shown so far"
          }
        }
      }
    },
    "/watchlists/{id}/fork": {
      "post": {
        "description": "The fork does not copy row overrides (thresholds.metrics): a new monitor has no report to key them by, so set them after its first report.\n\nOperation ID: post__watchlists_id_fork.",
        "operationId": "post__watchlists_id_fork",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistMutationResponse"
                }
              }
            },
            "description": "Forked monitor"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Source configuration names a portfolio id that is not an id"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Duplicate monitor name, or the subject portfolio already has a strategy"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Fork a readable monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__watchlists_id_fork",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Fork a readable monitor",
            "title": "Fork a readable monitor"
          }
        }
      }
    },
    "/watchlists/{id}/news": {
      "get": {
        "description": "Returns news from the last 24 hours that reaches one monitor's holdings or matches its mandate, and the state of the news reader. Without `since`, items come ranked by materiality and holding size, the top first; with `since`, items with a match judged after that time come newest first. `feed.coverage` says how many of the monitor's subjects are judged through the last 24 hours. When `current` is below `subjects`, call `fetchMonitorNews` once, then call this again every few seconds, passing `judged_through` as `since`, until `current` equals `subjects`. A missing monitor, one you do not own, and one being deleted all return the same 404.\n\nOperation ID: getMonitorNews.",
        "operationId": "getMonitorNews",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Maximum items to return, from 1 to 200.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 200,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Return only items with a holding or mandate match judged after this time, newest first, each with all its matches. The read reaches 5 minutes before this time to catch matches that were saved late, so merge items by `id`. A page that comes back with `limit` items may have left older ones out, so read once without `since` instead. Use ISO 8601 with a zone, such as 2026-09-25T12:00:00Z.",
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_MonitorNewsResponse"
                }
              }
            },
            "description": "News feed"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_MonitorNewsError"
                }
              }
            },
            "description": "Invalid limit or since"
          },
          "401": {
            "description": "Authentication required."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_MonitorNewsError"
                }
              }
            },
            "description": "Monitor not found"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Read news for a monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/getmonitornews",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Read news for a monitor",
            "title": "Read news for a monitor"
          }
        }
      }
    },
    "/watchlists/{id}/news/fetch": {
      "post": {
        "description": "Asks Itoflow to judge the last 24 hours of news for a monitor's subjects that are behind: the companies it holds and its mandate. It returns at once; judging runs in the background, usually within a few minutes. Then call `getMonitorNews` every few seconds until `feed.coverage.current` equals `feed.coverage.subjects`. A paused monitor fetches too. Calling again while judging runs is safe: a subject being judged is skipped, and one judged since is not judged again. A missing monitor, one you do not own, and one being deleted all return the same 404.\n\nOperation ID: fetchMonitorNews.",
        "operationId": "fetchMonitorNews",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_MonitorNewsFetchResponse"
                }
              }
            },
            "description": "Subjects queued"
          },
          "401": {
            "description": "Authentication required."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gateway_MonitorNewsError"
                }
              }
            },
            "description": "Monitor not found"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Fetch news for a monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/fetchmonitornews",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Fetch news for a monitor",
            "title": "Fetch news for a monitor"
          }
        }
      }
    },
    "/watchlists/{id}/quotes": {
      "get": {
        "description": "Operation ID: get__watchlists_id_quotes.",
        "operationId": "get__watchlists_id_quotes",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistQuotesResponse"
                }
              }
            },
            "description": "Cached live quotes by symbol"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get cached live quotes for a monitor",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_quotes",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get cached live quotes for a monitor",
            "title": "Get cached live quotes for a monitor"
          }
        }
      }
    },
    "/watchlists/{id}/reports": {
      "get": {
        "description": "Operation ID: get__watchlists_id_reports.",
        "operationId": "get__watchlists_id_reports",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Maximum reports to return. Clamped to 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Maximum reports to return. Clamped to 50.",
              "example": "20",
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Pagination offset.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "description": "Pagination offset.",
              "example": "0",
              "minimum": 0,
              "type": [
                "integer",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistReportsResponse"
                }
              }
            },
            "description": "Monitor report summaries"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "List monitor reports",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_reports",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "List monitor reports",
            "title": "List monitor reports"
          }
        }
      }
    },
    "/watchlists/{id}/reports/{reportId}": {
      "get": {
        "description": "Operation ID: get__watchlists_id_reports_reportId_.",
        "operationId": "get__watchlists_id_reports_reportId_",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Monitor execution UUID from execution_id in the report summary. This historical parameter name does not accept report_id.",
            "in": "path",
            "name": "reportId",
            "required": true,
            "schema": {
              "description": "Monitor execution UUID from execution_id in the report summary. This historical parameter name does not accept report_id.",
              "example": "550e8400-e29b-41d4-a716-446655440001",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistReport"
                }
              }
            },
            "description": "Monitor report"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get monitor report",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_reports_reportid_",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get monitor report",
            "title": "Get monitor report"
          }
        }
      }
    },
    "/watchlists/{id}/reports/latest": {
      "get": {
        "description": "Returns the most recent completed Monitor report, including its report and dashboard. Returns 204 when the Monitor has no completed report yet.\n\nOperation ID: get__watchlists_id_reports_latest.",
        "operationId": "get__watchlists_id_reports_latest",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistReport"
                }
              }
            },
            "description": "Latest completed monitor report"
          },
          "204": {
            "description": "No completed report exists"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Get the latest completed Monitor report",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/get__watchlists_id_reports_latest",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Get the latest completed Monitor report",
            "title": "Get the latest completed Monitor report"
          }
        }
      }
    },
    "/watchlists/{id}/reports/run": {
      "post": {
        "description": "Operation ID: post__watchlists_id_reports_run.",
        "operationId": "post__watchlists_id_reports_run",
        "parameters": [
          {
            "description": "Monitor UUID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "Monitor UUID",
              "example": "550e8400-e29b-41d4-a716-446655440000",
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchlistRunReportRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchlistReportRunAcceptedResponse"
                }
              }
            },
            "description": "Monitor report regeneration queued, or pending when the trigger did not answer in time"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Invalid request body"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Authentication required"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingRejectionOrError"
                }
              }
            },
            "description": "Forbidden or blocked by billing limits"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Not found"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WatchlistDeletePendingResponse"
                    },
                    {
                      "$ref": "#/components/schemas/WatchlistRuntimeMovePendingResponse"
                    }
                  ]
                }
              }
            },
            "description": "Monitor deletion is pending, or the monitor is moving to the new runtime"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Server error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Report regeneration unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Manually regenerate the current monitor report",
        "tags": [
          "Monitors"
        ],
        "x-mint": {
          "href": "/api-reference/endpoints/post__watchlists_id_reports_run",
          "metadata": {
            "playground": "simple",
            "sidebarTitle": "Manually regenerate the current monitor report",
            "title": "Manually regenerate the current monitor report"
          }
        }
      }
    }
  },
  "servers": [
    {
      "description": "Itoflow API",
      "url": "https://api.itoflow.ai"
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Billing"
    },
    {
      "name": "Brokers"
    },
    {
      "name": "Chat"
    },
    {
      "name": "Connected MCP servers"
    },
    {
      "name": "GitHub"
    },
    {
      "name": "Market data"
    },
    {
      "name": "Monitors"
    },
    {
      "name": "Notifications"
    },
    {
      "name": "Portfolios"
    },
    {
      "name": "Risk runs"
    },
    {
      "name": "Sharing and data"
    },
    {
      "name": "Strategies"
    }
  ]
}
