{
  "openapi": "3.1.0",
  "info": {
    "title": "PortfolioRisk",
    "version": "2.0.0",
    "x-guidance": "Portfolio risk analysis - VaR, correlation, drawdown, sector exposure. $0.10/query via x402 USDC on Base.  |  Also from LoneStarOracle: EquityScope (equity.lonestaroracle.xyz)  |  OptionsFlow (options.lonestaroracle.xyz)  |  MacroPulse (macro.lonestaroracle.xyz)  |  Full catalog: lonestaroracle.xyz",
    "contact": {
      "email": "jay@lonestaroracle.xyz"
    },
    "description": "Risk, volatility, drawdown and correlation breakdown for a portfolio of tickers. Pass ?tickers=.",
    "x-x402-proof": "https://portfolio.lonestaroracle.xyz/.well-known/x402-proof"
  },
  "externalDocs": {
    "url": "https://docs.lonestaroracle.xyz",
    "description": "LoneStarOracle API & integration docs"
  },
  "paths": {
    "/": {
      "get": {
        "summary": "Root",
        "operationId": "root__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-payment-info": {
          "authMode": "free"
        }
      }
    },
    "/analyze": {
      "get": {
        "summary": "Portfolio risk for up to 20 tickers",
        "description": "Portfolio risk for up to 20 tickers: weighted returns (1m/3m/1y), annualized volatility, portfolio beta, 1-day 95% VaR, average correlation, diversification score (0-10), sector concentration, top correlated pairs and risk flags. Pass ?tickers= as one comma-separated list of stock or ETF symbols (for example ?tickers=SPY,TLT for a stock/bond mix); weights is optional and defaults to equal-weight. Use this to see how a specific set of holdings is exposed. For the US macro regime or recession signal itself use GET https://macro.lonestaroracle.xyz/macro, GET https://rates.lonestaroracle.xyz/rates (yield-curve inversion and recession flag) or GET https://liquidity.lonestaroracle.xyz/liquidity.",
        "operationId": "analyze_analyze_get",
        "parameters": [
          {
            "name": "tickers",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Tickers"
            }
          },
          {
            "name": "weights",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Weights"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Service response data"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required"
          }
        },
        "x-payment-info": {
          "authMode": "payment",
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.100000"
          },
          "protocols": [
            {
              "x402": {}
            },
            {
              "mpp": {
                "method": "stripe",
                "intent": "charge",
                "currency": "usd"
              }
            }
          ],
          "inputSchema": {
            "type": "object",
            "properties": {
              "tickers": {
                "type": "string",
                "title": "Tickers"
              },
              "weights": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Weights"
              }
            },
            "required": [
              "tickers"
            ]
          },
          "outputSchema": {
            "type": "object",
            "description": "Service response data"
          }
        },
        "tags": [
          "portfolio",
          "risk",
          "volatility",
          "correlation",
          "stocks"
        ]
      }
    },
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "x-payment-info": {
          "authMode": "free"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    }
  }
}