{
  "openapi": "3.0.3",
  "info": {
    "title": "Axion Quant API",
    "description": "Financial data API providing stock, crypto, forex, futures, indices, ETF prices, and comprehensive fundamental data including profiles, earnings, filings, financials, insiders, supply chain, credit ratings, ESG scores, sentiment analysis, web traffic, economic data, and news.",
    "version": "1.0.0",
    "contact": {
      "name": "Axion Quant",
      "url": "https://axionquant.com"
    }
  },
  "servers": [
    {
      "url": "https://api.axionquant.com",
      "description": "Production server"
    },
    {
      "url": "http://localhost:3001",
      "description": "Local development"
    }
  ],
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "Mover": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string"
          },
          "pctchange": {
            "type": "number"
          }
        }
      },
      "Quote": {
        "type": "object",
        "properties": {
          "latestClose": {
            "type": "number"
          },
          "latestOpen": {
            "type": "number"
          },
          "latestHigh": {
            "type": "number"
          },
          "latestLow": {
            "type": "number"
          },
          "previousClose": {
            "type": "number"
          },
          "week52Range": {
            "type": "object",
            "properties": {
              "high": {
                "type": "number"
              },
              "low": {
                "type": "number"
              }
            }
          },
          "week52AvgClose": {
            "type": "number"
          },
          "ema30": {
            "type": "number"
          },
          "ema60": {
            "type": "number"
          },
          "ema90": {
            "type": "number"
          },
          "ema120": {
            "type": "number"
          },
          "ytdClosePctChange": {
            "type": "number"
          },
          "volume": {
            "type": "number"
          },
          "avgVolumeLifetime": {
            "type": "number"
          },
          "nav": {
            "type": "number"
          },
          "expense": {
            "type": "number"
          }
        }
      },
      "PriceBar": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "format": "date-time"
          },
          "ticker": {
            "type": "string"
          },
          "open": {
            "type": "string"
          },
          "high": {
            "type": "string"
          },
          "low": {
            "type": "string"
          },
          "close": {
            "type": "string"
          },
          "volume": {
            "type": "string"
          }
        }
      },
      "TickerInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "ticker": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "exchange": {
            "type": "string"
          },
          "market": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "lastClose": {
            "type": "number"
          },
          "sector": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "changePct": {
            "type": "number"
          },
          "issuer": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inception": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SentimentResult": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "enum": [
              "POSITIVE",
              "NEGATIVE",
              "NEUTRAL"
            ]
          },
          "score": {
            "type": "number"
          },
          "breakdown": {
            "type": "object",
            "properties": {
              "positive": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "avgScore": {
                    "type": "number"
                  }
                }
              },
              "negative": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer"
                  },
                  "avgScore": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      },
      "SupplyChainCompany": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "marketCap": {
            "type": "string"
          },
          "revenues": {
            "type": "string"
          },
          "income": {
            "type": "string"
          },
          "employees": {
            "type": "string"
          }
        }
      },
      "SupplyChainPeer": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "ticker": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        }
      },
      "CreditSearchItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sectorCode": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "CreditRating": {
        "type": "object",
        "properties": {
          "orgDebtTypeDesc": {
            "type": "string"
          },
          "rating": {
            "type": "string"
          },
          "ratingDate": {
            "type": "string"
          },
          "currentCwOl": {
            "type": "string"
          },
          "ratingDebtTypeCode": {
            "type": "string"
          },
          "lastReviewDate": {
            "type": "string"
          },
          "coreOrgId": {
            "type": "string"
          },
          "ratingTypeCode": {
            "type": "string"
          },
          "ratingTypeCodeDesc": {
            "type": "string"
          },
          "pcrFlag": {
            "type": "boolean"
          },
          "id": {
            "type": "integer"
          }
        }
      },
      "EsgItem": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "esg",
              "social",
              "governance",
              "controversy",
              "environment"
            ]
          },
          "score": {
            "type": "number"
          },
          "grade": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "WebTrafficData": {
        "type": "object",
        "properties": {
          "traffic": {
            "type": "object",
            "properties": {
              "visits": {
                "type": "string"
              },
              "change": {
                "type": "string"
              },
              "pagesPerVisit": {
                "type": "number"
              },
              "avgVisitDuration": {
                "type": "string"
              },
              "bounceRate": {
                "type": "string"
              },
              "organicSearchTraffic": {
                "type": "string"
              },
              "organicSearchTrafficChange": {
                "type": "string",
                "nullable": true
              },
              "paidSearchTraffic": {
                "type": "string"
              },
              "paidSearchTrafficChange": {
                "type": "string"
              },
              "globalRank": {
                "type": "integer"
              },
              "globalRankLocation": {
                "type": "string"
              },
              "countryRank": {
                "type": "integer"
              },
              "countryRankLocation": {
                "type": "string"
              },
              "visitsInt": {
                "type": "integer"
              },
              "changeNum": {
                "type": "integer"
              },
              "bounceRateNum": {
                "type": "number"
              },
              "organicSearchTrafficInt": {
                "type": "integer"
              },
              "paidSearchTrafficInt": {
                "type": "integer"
              },
              "paidSearchTrafficChangeNum": {
                "type": "integer"
              }
            }
          },
          "last3Months": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "displayValue": {
                  "type": "string"
                },
                "rawValue": {
                  "type": "integer"
                }
              }
            }
          },
          "trafficByCountry": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "country": {
                  "type": "string"
                },
                "trafficShare": {
                  "type": "string"
                },
                "traffic": {
                  "type": "string"
                },
                "desktopShare": {
                  "type": "string"
                },
                "mobileShare": {
                  "type": "string"
                },
                "trafficShareNum": {
                  "type": "number"
                },
                "trafficInt": {
                  "type": "integer"
                },
                "desktopShareNum": {
                  "type": "number"
                },
                "mobileShareNum": {
                  "type": "number"
                }
              }
            }
          },
          "trafficJourney": {
            "type": "object",
            "properties": {
              "sources": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "share": {
                      "type": "string"
                    },
                    "change": {
                      "type": "string"
                    },
                    "shareNum": {
                      "type": "number"
                    },
                    "changeNum": {
                      "type": "number"
                    }
                  }
                }
              },
              "destinations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "share": {
                      "type": "string"
                    },
                    "change": {
                      "type": "string"
                    },
                    "shareNum": {
                      "type": "number"
                    },
                    "changeNum": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "topKeywords": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "keyword": {
                  "type": "string"
                },
                "intent": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                },
                "volume": {
                  "type": "integer"
                },
                "cpc": {
                  "type": "number"
                },
                "trafficPercent": {
                  "type": "string"
                },
                "trafficPercentNum": {
                  "type": "number"
                }
              }
            }
          },
          "backlinks": {
            "type": "object",
            "properties": {
              "authorityScore": {
                "type": "integer"
              },
              "referringDomains": {
                "type": "string"
              },
              "referringDomainsChange": {
                "type": "string"
              },
              "backlinks": {
                "type": "string"
              },
              "backlinksChange": {
                "type": "string",
                "nullable": true
              },
              "referringDomainsInt": {
                "type": "integer"
              },
              "referringDomainsChangeNum": {
                "type": "integer"
              },
              "backlinksInt": {
                "type": "integer"
              }
            }
          },
          "site": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "_id": {
            "type": "string"
          }
        }
      },
      "NewsArticle": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "published": {
            "type": "string"
          }
        }
      },
      "EconSeriesResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "frequency": {
            "type": "string"
          },
          "units": {
            "type": "string"
          },
          "seasonalAdjustment": {
            "type": "string"
          },
          "popularity": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "EconObservation": {
        "type": "object",
        "properties": {
          "realtimeStart": {
            "type": "string",
            "format": "date-time"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          },
          "value": {
            "type": "number"
          }
        }
      },
      "EconCalendarEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "indicator": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "actual": {
            "type": "string"
          },
          "previous": {
            "type": "string"
          },
          "forecast": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "importance": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "EarningsTranscript": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string"
          },
          "year": {
            "type": "integer"
          },
          "quarter": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "transcript": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "paragraphNumber": {
                  "type": "integer"
                },
                "speaker": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "FinancialStatement": {
        "type": "object",
        "properties": {
          "accountsPayable": {
            "type": "number"
          },
          "accountsReceivable": {
            "type": "number"
          },
          "cash": {
            "type": "number"
          },
          "totalAssets": {
            "type": "number"
          },
          "totalDebt": {
            "type": "number"
          },
          "totalRevenue": {
            "type": "number"
          },
          "grossProfit": {
            "type": "number"
          },
          "operatingIncome": {
            "type": "number"
          },
          "netIncome": {
            "type": "number"
          },
          "eps": {
            "type": "number"
          },
          "operatingCashFlow": {
            "type": "number"
          },
          "capitalExpenditure": {
            "type": "number"
          },
          "freeCashFlow": {
            "type": "number"
          },
          "year": {
            "type": "integer"
          },
          "quarter": {
            "type": "integer"
          }
        }
      },
      "DcfValue": {
        "type": "object",
        "properties": {
          "enterpriseValue": {
            "type": "number"
          },
          "cash": {
            "type": "number"
          },
          "totalDebt": {
            "type": "number"
          },
          "equityValue": {
            "type": "number"
          },
          "sharesOutstanding": {
            "type": "number"
          },
          "fairPrice": {
            "type": "number"
          },
          "currentPrice": {
            "type": "number"
          },
          "marginOfSafety": {
            "type": "number"
          },
          "recommendation": {
            "type": "string",
            "enum": ["Buy", "Sell"]
          }
        }
      },
      "DcfRate": {
        "type": "object",
        "properties": {
          "marketCap": {
            "type": "number"
          },
          "beta5y": {
            "type": "number"
          },
          "totalDebt": {
            "type": "number"
          },
          "interestExpense": {
            "type": "number"
          },
          "pretaxIncome": {
            "type": "number"
          },
          "taxProvision": {
            "type": "number"
          },
          "riskFreeRate": {
            "type": "number"
          },
          "weightOfDebt": {
            "type": "number"
          },
          "weightOfEquity": {
            "type": "number"
          },
          "costOfDebt": {
            "type": "number"
          },
          "costOfEquity": {
            "type": "number"
          },
          "taxRate": {
            "type": "number"
          },
          "wacc": {
            "type": "number"
          }
        }
      }
    }
  },
  "paths": {
    "/credit/ratings/{id}": {
      "get": {
        "tags": [
          "Credit"
        ],
        "summary": "S&P credit ratings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Credit ratings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CreditRating"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/credit/search": {
      "get": {
        "tags": [
          "Credit"
        ],
        "summary": "Search S&P entities",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CreditSearchItem"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/gainers": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Top crypto gainers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top gainers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/list/category": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Unique crypto category values",
        "description": "Returns all unique category values available in the crypto database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/list/rating": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Unique crypto rating values",
        "description": "Returns all unique rating values available in the crypto database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/list/type": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Unique crypto type values",
        "description": "Returns all unique type values available in the crypto database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/losers": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Top crypto losers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top losers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/tickers": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "List crypto tickers",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "ticker": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "category": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/{ticker}": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Single crypto ticker",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Crypto metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "ticker": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "rating": {
                      "type": "string"
                    },
                    "cap": {
                      "type": "string"
                    },
                    "supply": {
                      "type": "string"
                    },
                    "lastClose": {
                      "type": "number"
                    },
                    "changePct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/{ticker}/prices": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Historical crypto prices",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "frame",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "daily",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly",
                "day",
                "week",
                "month",
                "quarter",
                "year",
                "d",
                "w",
                "m",
                "q",
                "y"
              ]
            },
            "description": "Time frame for price aggregation"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceBar"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/crypto/{ticker}/quote": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "summary": "Crypto quote",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Crypto quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/transcript/sentiment": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "summary": "Earnings transcript sentiment",
        "description": "Sentiment analysis of an earnings call transcript identified by a base64-encoded JSON containing ticker, year, and quarter.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded JSON object with ticker, year, and quarter"
          }
        ],
        "responses": {
          "200": {
            "description": "Sentiment analysis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentimentResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/{ticker}/history": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "summary": "Earnings history",
        "description": "Historical EPS actual vs estimate.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Earnings history",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "epsActual": {
                        "type": "number"
                      },
                      "epsEstimate": {
                        "type": "number"
                      },
                      "epsDifference": {
                        "type": "number"
                      },
                      "surprisePercent": {
                        "type": "number"
                      },
                      "quarter": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "period": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/{ticker}/index": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "summary": "Index earnings trend",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Index earnings trend",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "estimates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "period": {
                            "type": "string"
                          },
                          "growth": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/{ticker}/report": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "summary": "Earnings 8-K report",
        "description": "Financial tables from earnings 8-K filing.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "quarter",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Financial tables",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "dataframe": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      },
                      "scale": {
                        "type": "integer"
                      },
                      "title": {
                        "type": "string"
                      },
                      "statementType": {
                        "type": "string",
                        "enum": [
                          "balance_sheet",
                          "income_statement",
                          "cash_flow"
                        ]
                      },
                      "periods": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "rawIndex": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/{ticker}/transcript": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "summary": "Earnings call transcript",
        "description": "Full earnings call transcript for a given ticker, year, and quarter.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal year"
          },
          {
            "name": "quarter",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal quarter"
          }
        ],
        "responses": {
          "200": {
            "description": "Transcript",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EarningsTranscript"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/{ticker}/trend": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "summary": "Earnings trend",
        "description": "EPS and revenue estimate trends.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Earnings trend",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "period": {
                        "type": "string"
                      },
                      "endDate": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "growth": {
                        "type": "number"
                      },
                      "earningsEstimate": {
                        "type": "object",
                        "properties": {
                          "avg": {
                            "type": "number"
                          },
                          "low": {
                            "type": "number"
                          },
                          "high": {
                            "type": "number"
                          },
                          "yearAgoEps": {
                            "type": "number"
                          },
                          "numberOfAnalysts": {
                            "type": "integer"
                          },
                          "growth": {
                            "type": "number"
                          }
                        }
                      },
                      "revenueEstimate": {
                        "type": "object",
                        "properties": {
                          "avg": {
                            "type": "number"
                          },
                          "low": {
                            "type": "number"
                          },
                          "high": {
                            "type": "number"
                          },
                          "numberOfAnalysts": {
                            "type": "integer"
                          },
                          "yearAgoRevenue": {
                            "type": "number"
                          },
                          "growth": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/econ/calendar": {
      "get": {
        "tags": [
          "Economic Data"
        ],
        "summary": "Economic calendar",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "minImportance",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EconCalendarEvent"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/econ/dataset/{id}": {
      "get": {
        "tags": [
          "Economic Data"
        ],
        "summary": "FRED dataset observations",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Observations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EconObservation"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/econ/find": {
      "get": {
        "tags": [
          "Economic Data"
        ],
        "summary": "Find FRED series (AI)",
        "description": "Natural language search for FRED economic data series using AI-powered query transformation.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Natural language search query"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EconSeriesResult"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/econ/search": {
      "get": {
        "tags": [
          "Economic Data"
        ],
        "summary": "Search FRED series",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EconSeriesResult"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/esg/{ticker}": {
      "get": {
        "tags": [
          "ESG"
        ],
        "summary": "ESG scores",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "ESG scores",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EsgItem"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/gainers": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Top ETF gainers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top gainers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/country": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF country values",
        "description": "Returns all unique country values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/currency": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF currency values",
        "description": "Returns all unique currency values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/industry": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF industry values",
        "description": "Returns all unique industry values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/market": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF market values",
        "description": "Returns all unique market values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/sector": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF sector values",
        "description": "Returns all unique sector values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/type": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF type values",
        "description": "Returns all unique type values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/list/exchange": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Unique ETF exchange values",
        "description": "Returns all unique exchange values available in the ETF database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/losers": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Top ETF losers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top losers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/tickers": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "List ETF tickers",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TickerInfo"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Single ETF ticker",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "ETF metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickerInfo"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/exposure": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "ETF exposure",
        "description": "Which ETFs hold the given ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Exposure list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "ticker": {
                        "type": "string"
                      },
                      "fundName": {
                        "type": "string"
                      },
                      "segment": {
                        "type": "string"
                      },
                      "allocation": {
                        "type": "string"
                      },
                      "marketValue": {
                        "type": "string"
                      },
                      "rawAllocation": {
                        "type": "number"
                      },
                      "rawMarketValue": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/fund": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "ETF fund profile",
        "description": "Fund profile including asset class, category, scores, rating.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Fund profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ticker": {
                      "type": "string"
                    },
                    "fund": {
                      "type": "string"
                    },
                    "assetclass": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "focus": {
                      "type": "string"
                    },
                    "niche": {
                      "type": "string"
                    },
                    "region": {
                      "type": "string"
                    },
                    "geography": {
                      "type": "string"
                    },
                    "segment": {
                      "type": "string"
                    },
                    "lettergrade": {
                      "type": "string"
                    },
                    "efficiencyscore": {
                      "type": "number"
                    },
                    "tradabilityscore": {
                      "type": "number"
                    },
                    "overallratingscore": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/holdings": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "ETF top holdings",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Holdings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "ticker": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "weight": {
                        "type": "string"
                      },
                      "shares": {
                        "type": "number"
                      },
                      "marketValue": {
                        "type": "number"
                      },
                      "rawWeight": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/holdings/all": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "ETF all holdings",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "All Holdings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "ticker": {
                        "type": "string"
                      },
                      "weight": {
                        "type": "string"
                      },
                      "rawWeight": {
                        "type": "number"
                      },
                      "since": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/prices": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "Historical ETF prices",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "frame",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "daily",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly",
                "day",
                "week",
                "month",
                "quarter",
                "year",
                "d",
                "w",
                "m",
                "q",
                "y"
              ]
            },
            "description": "Time frame for price aggregation"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceBar"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/quote": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "ETF quote",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "ETF quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/etfs/{ticker}/weights": {
      "get": {
        "tags": [
          "ETFs"
        ],
        "summary": "ETF sector/region weights",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Sector and region weights",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sector": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "weight": {
                            "type": "string"
                          },
                          "rawWeight": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "weight": {
                            "type": "string"
                          },
                          "benchmarkWeight": {
                            "type": "string"
                          },
                          "rawWeight": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/filings/list/forms": {
      "get": {
        "tags": [
          "Filings"
        ],
        "summary": "List SEC form types",
        "responses": {
          "200": {
            "description": "Form types",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/filings/search": {
      "get": {
        "tags": [
          "Filings"
        ],
        "summary": "Search SEC filings",
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "quarter",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "form",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticker",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "company": {
                        "type": "string"
                      },
                      "cik": {
                        "type": "integer"
                      },
                      "form": {
                        "type": "string"
                      },
                      "filingDate": {
                        "type": "string",
                        "format": "date"
                      },
                      "accessionNumber": {
                        "type": "string"
                      },
                      "documentId": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/filings/{ticker}": {
      "get": {
        "tags": [
          "Filings"
        ],
        "summary": "Recent SEC filings",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "form",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Recent filings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "cik": {
                        "type": "integer"
                      },
                      "form": {
                        "type": "string"
                      },
                      "filingDate": {
                        "type": "string",
                        "format": "date"
                      },
                      "accessionNumber": {
                        "type": "string"
                      },
                      "documentId": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/filings/{ticker}/{formType}": {
      "get": {
        "tags": [
          "Filings"
        ],
        "summary": "Filings by form type and date range",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "formType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD), defaults to today"
          }
        ],
        "responses": {
          "200": {
            "description": "Filings by form and date range",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "company": {
                        "type": "string"
                      },
                      "cik": {
                        "type": "integer"
                      },
                      "form": {
                        "type": "string"
                      },
                      "filingDate": {
                        "type": "string",
                        "format": "date"
                      },
                      "reportDate": {
                        "type": "string",
                        "format": "date"
                      },
                      "accessionNumber": {
                        "type": "string"
                      },
                      "documentId": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/filings/document/sentiment": {
      "get": {
        "tags": [
          "Filings"
        ],
        "summary": "Filing document sentiment",
        "description": "Sentiment analysis of an SEC filing document using a base64-encoded document ID.",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded SEC document URL from a filing record"
          }
        ],
        "responses": {
          "200": {
            "description": "Sentiment analysis",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentimentResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/filings/document/text": {
      "get": {
        "tags": [
          "Filings"
        ],
        "summary": "Get filing document text",
        "description": "Fetch the raw text content of an SEC filing document using a base64-encoded document ID.",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded SEC document URL from a filing record"
          }
        ],
        "responses": {
          "200": {
            "description": "JSON object with source URL and text content of the filing document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "src": {
                      "type": "string",
                      "description": "Decoded source URL of the filing document"
                    },
                    "text": {
                      "type": "string",
                      "description": "Plain text content of the filing document"
                    }
                  },
                  "required": ["src", "text"]
                }
              }
            }
          },
          "400": {
            "description": "Invalid document link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Failed to fetch document",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/capitalexpenditures": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Capitalexpenditures",
        "description": "Historical capitalexpenditures from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Capitalexpenditures values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/cashflow/free": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Cashflow Free",
        "description": "Historical cashflow/free from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cashflow Free values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/cashflow/operating": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Cashflow Operating",
        "description": "Historical cashflow/operating from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cashflow Operating values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/current/assets": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Current Assets",
        "description": "Historical current/assets from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current Assets values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/current/liabilities": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Current Liabilities",
        "description": "Historical current/liabilities from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current Liabilities values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/metrics": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Financial metrics snapshot",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Financial metrics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revenue": {
                      "type": "number"
                    },
                    "netIncome": {
                      "type": "number"
                    },
                    "totalAssets": {
                      "type": "number"
                    },
                    "totalLiabilities": {
                      "type": "number"
                    },
                    "stockholdersEquity": {
                      "type": "number"
                    },
                    "currentAssets": {
                      "type": "number"
                    },
                    "currentLiabilities": {
                      "type": "number"
                    },
                    "operatingCashFlow": {
                      "type": "number"
                    },
                    "capitalExpenditures": {
                      "type": "number"
                    },
                    "freeCashFlow": {
                      "type": "number"
                    },
                    "sharesOutstandingBasic": {
                      "type": "number"
                    },
                    "sharesOutstandingDiluted": {
                      "type": "number"
                    },
                    "currentRatio": {
                      "type": "number"
                    },
                    "debtToAssets": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/netincome": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Netincome",
        "description": "Historical netincome from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Netincome values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/revenue": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Revenue",
        "description": "Historical revenue from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revenue values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/sharesoutstanding/basic": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Sharesoutstanding Basic",
        "description": "Historical sharesoutstanding/basic from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sharesoutstanding Basic values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/sharesoutstanding/diluted": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Sharesoutstanding Diluted",
        "description": "Historical sharesoutstanding/diluted from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sharesoutstanding Diluted values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/snapshot": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Financial data snapshot",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "currentPrice": {
                      "type": "number"
                    },
                    "targetHighPrice": {
                      "type": "number"
                    },
                    "targetLowPrice": {
                      "type": "number"
                    },
                    "targetMeanPrice": {
                      "type": "number"
                    },
                    "targetMedianPrice": {
                      "type": "number"
                    },
                    "recommendationMean": {
                      "type": "number"
                    },
                    "recommendationKey": {
                      "type": "string"
                    },
                    "numberOfAnalystOpinions": {
                      "type": "integer"
                    },
                    "totalCash": {
                      "type": "number"
                    },
                    "totalDebt": {
                      "type": "number"
                    },
                    "quickRatio": {
                      "type": "number"
                    },
                    "currentRatio": {
                      "type": "number"
                    },
                    "totalRevenue": {
                      "type": "number"
                    },
                    "debtToEquity": {
                      "type": "number"
                    },
                    "revenuePerShare": {
                      "type": "number"
                    },
                    "returnOnAssets": {
                      "type": "number"
                    },
                    "returnOnEquity": {
                      "type": "number"
                    },
                    "grossMargins": {
                      "type": "number"
                    },
                    "ebitdaMargins": {
                      "type": "number"
                    },
                    "operatingMargins": {
                      "type": "number"
                    },
                    "profitMargins": {
                      "type": "number"
                    },
                    "earningsGrowth": {
                      "type": "number"
                    },
                    "revenueGrowth": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/statements/{ticker}/balance": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Balance sheet",
        "description": "Balance sheet statement from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal year"
          },
          {
            "name": "quarter",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal quarter"
          }
        ],
        "responses": {
          "200": {
            "description": "Balance sheet data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialStatement"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/statements/{ticker}/income": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Income statement",
        "description": "Income statement from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal year"
          },
          {
            "name": "quarter",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal quarter"
          }
        ],
        "responses": {
          "200": {
            "description": "Income statement data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialStatement"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/statements/{ticker}/cashflow": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Cash flow statement",
        "description": "Cash flow statement from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal year"
          },
          {
            "name": "quarter",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Fiscal quarter"
          }
        ],
        "responses": {
          "200": {
            "description": "Cash flow data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialStatement"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/stockholdersequity": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Stockholdersequity",
        "description": "Historical stockholdersequity from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stockholdersequity values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/total/assets": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Total Assets",
        "description": "Historical total/assets from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Total Assets values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/total/liabilities": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Total Liabilities",
        "description": "Historical total/liabilities from SEC filings.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "periods",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Total Liabilities values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/dcf/{ticker}/value": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "DCF Valuation",
        "description": "Discounted cash flow valuation including enterprise value, fair price, margin of safety, and buy/sell recommendation.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "DCF valuation data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DcfValue"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/dcf/{ticker}/rate": {
      "get": {
        "tags": [
          "Financials"
        ],
        "summary": "Discount Rate / WACC",
        "description": "Weighted average cost of capital (WACC) calculation including cost of equity, cost of debt, and capital structure weights.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Discount rate / WACC data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DcfRate"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/financials/{ticker}/eps": {
      "get": {
        "tags": ["Financials"],
        "summary": "EPS (Historical)",
        "description": "Trailing twelve-month earnings per share with report dates.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date (YYYY-MM-DD)" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date (YYYY-MM-DD)" }
        ],
        "responses": {
          "200": {
            "description": "EPS historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "tailingEps": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/financials/{ticker}/pe": {
      "get": {
        "tags": ["Financials"],
        "summary": "P/E Ratio (Historical)",
        "description": "Daily price-to-earnings ratio from TTM EPS and daily close prices.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date" },
          { "name": "frame", "in": "query", "schema": { "type": "string", "enum": ["daily", "weekly", "monthly"], "default": "daily" }, "description": "Resampling frequency" }
        ],
        "responses": {
          "200": {
            "description": "P/E historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "epsReportDate": { "type": "string" },
                      "closePrice": { "type": "number" },
                      "ttmEps": { "type": "number" },
                      "ttmPe": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/financials/{ticker}/marketcap": {
      "get": {
        "tags": ["Financials"],
        "summary": "Market Cap (Historical)",
        "description": "Daily market capitalization from closing price and shares outstanding.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date" },
          { "name": "frame", "in": "query", "schema": { "type": "string", "enum": ["daily", "weekly", "monthly"], "default": "daily" }, "description": "Resampling frequency" }
        ],
        "responses": {
          "200": {
            "description": "Market cap historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "sharesReportDate": { "type": "string" },
                      "closePrice": { "type": "number" },
                      "sharesOutstanding": { "type": "number" },
                      "marketCapitalization": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/financials/{ticker}/roe": {
      "get": {
        "tags": ["Financials"],
        "summary": "ROE (Historical)",
        "description": "Quarterly return on equity from net income and average equity.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date" }
        ],
        "responses": {
          "200": {
            "description": "ROE historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "netIncomeCommonStockholders": { "type": "number" },
                      "roe": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/financials/{ticker}/ev": {
      "get": {
        "tags": ["Financials"],
        "summary": "Enterprise Value (Historical)",
        "description": "Daily enterprise value from market cap, total debt, and cash.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date" },
          { "name": "frame", "in": "query", "schema": { "type": "string", "enum": ["daily", "weekly", "monthly"], "default": "daily" }, "description": "Resampling frequency" }
        ],
        "responses": {
          "200": {
            "description": "Enterprise value historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "marketCapitalization": { "type": "number" },
                      "totalDebt": { "type": "number" },
                      "cashAndCashEquivalents": { "type": "number" },
                      "enterpriseValue": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/financials/{ticker}/ebitda": {
      "get": {
        "tags": ["Financials"],
        "summary": "EBITDA (Historical)",
        "description": "Trailing twelve-month EBITDA with report dates.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date" }
        ],
        "responses": {
          "200": {
            "description": "EBITDA historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "ebitda": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/financials/{ticker}/de": {
      "get": {
        "tags": ["Financials"],
        "summary": "Debt-to-Equity (Historical)",
        "description": "Quarterly debt-to-equity ratio from total debt and stockholders equity.",
        "parameters": [
          { "name": "ticker", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Ticker symbol" },
          { "name": "from", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "Start date" },
          { "name": "to", "in": "query", "schema": { "type": "string", "format": "date" }, "description": "End date" }
        ],
        "responses": {
          "200": {
            "description": "Debt-to-equity historical time series",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": { "type": "string" },
                      "totalDebt": { "type": "number" },
                      "stockholdersEquity": { "type": "number" },
                      "debtToEquity": { "type": "number" }
                    }
                  }
                }
              }
            }
          },
          "500": { "description": "Server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/forex/gainers": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Top forex gainers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top gainers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/list/country": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Unique forex country values",
        "description": "Returns all unique country values available in the forex database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/list/exchange": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Unique forex exchange values",
        "description": "Returns all unique exchange values available in the forex database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/list/rating": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Unique forex rating values",
        "description": "Returns all unique rating values available in the forex database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/losers": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Top forex losers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top losers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/tickers": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "List forex tickers",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "ticker": {
                        "type": "string"
                      },
                      "detail": {
                        "type": "string"
                      },
                      "exchange": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/{ticker}": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Single forex pair",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Forex metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "ticker": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "exchange": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "rating": {
                      "type": "string"
                    },
                    "lastClose": {
                      "type": "number"
                    },
                    "changePct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/{ticker}/prices": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Historical forex prices",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "frame",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "daily",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly",
                "day",
                "week",
                "month",
                "quarter",
                "year",
                "d",
                "w",
                "m",
                "q",
                "y"
              ]
            },
            "description": "Time frame for price aggregation"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceBar"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/forex/{ticker}/quote": {
      "get": {
        "tags": [
          "Forex"
        ],
        "summary": "Forex quote",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Forex quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/gainers": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Top futures gainers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top gainers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/list/country": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Unique futures country values",
        "description": "Returns all unique country values available in the futures database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/list/currency": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Unique futures currency values",
        "description": "Returns all unique currency values available in the futures database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/list/exchange": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Unique futures exchange values",
        "description": "Returns all unique exchange values available in the futures database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/list/timezone": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Unique futures timezone values",
        "description": "Returns all unique timezone values available in the futures database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/losers": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Top futures losers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top losers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/tickers": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "List futures tickers",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "ticker": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "exchange": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/{ticker}": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Single futures contract",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Futures metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "ticker": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "exchange": {
                      "type": "string"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "list": {
                      "type": "string"
                    },
                    "expiration": {
                      "type": "string"
                    },
                    "lastClose": {
                      "type": "number"
                    },
                    "changePct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/{ticker}/prices": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Historical futures prices",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "frame",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "daily",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly",
                "day",
                "week",
                "month",
                "quarter",
                "year",
                "d",
                "w",
                "m",
                "q",
                "y"
              ]
            },
            "description": "Time frame for price aggregation"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceBar"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/futures/{ticker}/quote": {
      "get": {
        "tags": [
          "Futures"
        ],
        "summary": "Futures quote",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Futures quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/gainers": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Top index gainers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top gainers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/list/country": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Unique index country values",
        "description": "Returns all unique country values available in the index database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/list/exchange": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Unique index exchange values",
        "description": "Returns all unique exchange values available in the index database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/list/timezone": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Unique index timezone values",
        "description": "Returns all unique timezone values available in the index database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/losers": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Top index losers",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top losers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/tickers": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "List index tickers",
        "parameters": [
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer"
                      },
                      "ticker": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "exchange": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/{ticker}": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Single index",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Index metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "ticker": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "exchange": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "lastClose": {
                      "type": "number"
                    },
                    "changePct": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/{ticker}/components": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Index components",
        "description": "Constituent tickers of a market index.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Index components",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "components": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/{ticker}/exposure": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Index exposure",
        "description": "All indices containing the given ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Index exposure",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "type": "string"
                      },
                      "components": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/{ticker}/prices": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Historical index prices",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "frame",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "daily",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly",
                "day",
                "week",
                "month",
                "quarter",
                "year",
                "d",
                "w",
                "m",
                "q",
                "y"
              ]
            },
            "description": "Time frame for price aggregation"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceBar"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/indices/{ticker}/quote": {
      "get": {
        "tags": [
          "Indices"
        ],
        "summary": "Index quote",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Index quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/insiders/{ticker}/activity": {
      "get": {
        "tags": [
          "Insiders"
        ],
        "summary": "Activity",
        "description": "Insider activity data.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Activity data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "string"
                    },
                    "buyInfoCount": {
                      "type": "integer"
                    },
                    "buyInfoShares": {
                      "type": "integer"
                    },
                    "sellInfoCount": {
                      "type": "integer"
                    },
                    "sellInfoShares": {
                      "type": "integer"
                    },
                    "netInfoCount": {
                      "type": "integer"
                    },
                    "netInfoShares": {
                      "type": "integer"
                    },
                    "totalInsiderShares": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/insiders/{ticker}/funds": {
      "get": {
        "tags": [
          "Insiders"
        ],
        "summary": "Funds",
        "description": "Insider funds data.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Funds data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": {
                        "type": "string"
                      },
                      "organization": {
                        "type": "string"
                      },
                      "pctHeld": {
                        "type": "number"
                      },
                      "position": {
                        "type": "integer"
                      },
                      "value": {
                        "type": "number"
                      },
                      "pctChange": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/insiders/{ticker}/individuals": {
      "get": {
        "tags": [
          "Insiders"
        ],
        "summary": "Individuals",
        "description": "Insider individuals data.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Individuals data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "relation": {
                        "type": "string"
                      },
                      "transactionDescription": {
                        "type": "string"
                      },
                      "latestTransDate": {
                        "type": "string"
                      },
                      "positionDirect": {
                        "type": "integer"
                      },
                      "positionDirectDate": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/insiders/{ticker}/institutions": {
      "get": {
        "tags": [
          "Insiders"
        ],
        "summary": "Institutions",
        "description": "Insider institutions data.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Institutions data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "reportDate": {
                        "type": "string"
                      },
                      "organization": {
                        "type": "string"
                      },
                      "pctHeld": {
                        "type": "number"
                      },
                      "position": {
                        "type": "integer"
                      },
                      "value": {
                        "type": "number"
                      },
                      "pctChange": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/insiders/{ticker}/ownership": {
      "get": {
        "tags": [
          "Insiders"
        ],
        "summary": "Ownership",
        "description": "Insider ownership data.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Ownership data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "insidersPercentHeld": {
                      "type": "number"
                    },
                    "institutionsPercentHeld": {
                      "type": "number"
                    },
                    "institutionsFloatPercentHeld": {
                      "type": "number"
                    },
                    "institutionsCount": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/insiders/{ticker}/transactions": {
      "get": {
        "tags": [
          "Insiders"
        ],
        "summary": "Transactions",
        "description": "Insider transactions data.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Transactions data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "shares": {
                        "type": "integer"
                      },
                      "value": {
                        "type": "number"
                      },
                      "transactionText": {
                        "type": "string"
                      },
                      "filerName": {
                        "type": "string"
                      },
                      "filerRelation": {
                        "type": "string"
                      },
                      "startDate": {
                        "type": "string"
                      },
                      "ownership": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/news": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "Top financial news",
        "responses": {
          "200": {
            "description": "News articles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NewsArticle"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/news/article/{id}": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "Article redirect",
        "description": "Decodes base64 ID and redirects.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to article"
          }
        }
      }
    },
    "/news/category/{category}": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "News by category",
        "parameters": [
          {
            "name": "category",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category news",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NewsArticle"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/news/country/{country}": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "News by country",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Country news",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NewsArticle"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/news/{ticker}": {
      "get": {
        "tags": [
          "News"
        ],
        "summary": "Company news",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Company news",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/NewsArticle"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{ticker}": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Company asset profile",
        "description": "Company profile with officers, governance, ESG risk.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Asset profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address1": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "website": {
                      "type": "string"
                    },
                    "industry": {
                      "type": "string"
                    },
                    "sector": {
                      "type": "string"
                    },
                    "longBusinessSummary": {
                      "type": "string"
                    },
                    "fullTimeEmployees": {
                      "type": "integer"
                    },
                    "companyOfficers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "age": {
                            "type": "integer"
                          },
                          "title": {
                            "type": "string"
                          },
                          "totalPay": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "auditRisk": {
                      "type": "integer"
                    },
                    "boardRisk": {
                      "type": "integer"
                    },
                    "compensationRisk": {
                      "type": "integer"
                    },
                    "shareHolderRightsRisk": {
                      "type": "integer"
                    },
                    "overallRisk": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{ticker}/calendar": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Calendar events",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "earnings": {
                      "type": "object",
                      "properties": {
                        "earningsDate": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "date-time"
                          }
                        },
                        "earningsAverage": {
                          "type": "number"
                        },
                        "earningsLow": {
                          "type": "number"
                        },
                        "earningsHigh": {
                          "type": "number"
                        },
                        "revenueAverage": {
                          "type": "number"
                        },
                        "revenueLow": {
                          "type": "number"
                        },
                        "revenueHigh": {
                          "type": "number"
                        }
                      }
                    },
                    "exDividendDate": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "dividendDate": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{ticker}/info": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Company info",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Company info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address1": {
                      "type": "string"
                    },
                    "city": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "phone": {
                      "type": "string"
                    },
                    "website": {
                      "type": "string"
                    },
                    "industry": {
                      "type": "string"
                    },
                    "sector": {
                      "type": "string"
                    },
                    "longBusinessSummary": {
                      "type": "string"
                    },
                    "fullTimeEmployees": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{ticker}/recommendation": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Analyst recommendation trend",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Recommendation trend",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "period": {
                        "type": "string"
                      },
                      "strongBuy": {
                        "type": "integer"
                      },
                      "buy": {
                        "type": "integer"
                      },
                      "hold": {
                        "type": "integer"
                      },
                      "sell": {
                        "type": "integer"
                      },
                      "strongSell": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{ticker}/statistics": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Key statistics",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Key statistics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "enterpriseValue": {
                      "type": "number"
                    },
                    "forwardPE": {
                      "type": "number"
                    },
                    "profitMargins": {
                      "type": "number"
                    },
                    "floatShares": {
                      "type": "number"
                    },
                    "sharesOutstanding": {
                      "type": "number"
                    },
                    "sharesShort": {
                      "type": "number"
                    },
                    "heldPercentInsiders": {
                      "type": "number"
                    },
                    "heldPercentInstitutions": {
                      "type": "number"
                    },
                    "shortRatio": {
                      "type": "number"
                    },
                    "beta": {
                      "type": "number"
                    },
                    "bookValue": {
                      "type": "number"
                    },
                    "priceToBook": {
                      "type": "number"
                    },
                    "earningsQuarterlyGrowth": {
                      "type": "number"
                    },
                    "netIncomeToCommon": {
                      "type": "number"
                    },
                    "trailingEps": {
                      "type": "number"
                    },
                    "forwardEps": {
                      "type": "number"
                    },
                    "enterpriseToRevenue": {
                      "type": "number"
                    },
                    "enterpriseToEbitda": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/profiles/{ticker}/summary": {
      "get": {
        "tags": [
          "Profiles"
        ],
        "summary": "Summary detail",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary detail",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "previousClose": {
                      "type": "number"
                    },
                    "open": {
                      "type": "number"
                    },
                    "dayLow": {
                      "type": "number"
                    },
                    "dayHigh": {
                      "type": "number"
                    },
                    "dividendRate": {
                      "type": "number"
                    },
                    "dividendYield": {
                      "type": "number"
                    },
                    "beta": {
                      "type": "number"
                    },
                    "trailingPE": {
                      "type": "number"
                    },
                    "forwardPE": {
                      "type": "number"
                    },
                    "volume": {
                      "type": "number"
                    },
                    "averageVolume": {
                      "type": "number"
                    },
                    "marketCap": {
                      "type": "number"
                    },
                    "fiftyTwoWeekLow": {
                      "type": "number"
                    },
                    "fiftyTwoWeekHigh": {
                      "type": "number"
                    },
                    "fiftyDayAverage": {
                      "type": "number"
                    },
                    "twoHundredDayAverage": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sentiment/{ticker}/all": {
      "get": {
        "tags": [
          "Sentiment"
        ],
        "summary": "All sentiment",
        "description": "Combined social, news, and AI sentiment.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Aggregated sentiment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "socialSentiment": {
                      "$ref": "#/components/schemas/SentimentResult"
                    },
                    "newsSentiment": {
                      "$ref": "#/components/schemas/SentimentResult"
                    },
                    "analystSentiment": {
                      "type": "object",
                      "properties": {
                        "sentiment": {
                          "type": "string"
                        },
                        "score": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sentiment/{ticker}/analyst": {
      "get": {
        "tags": [
          "Sentiment"
        ],
        "summary": "AI analyst sentiment",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Analyst sentiment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sentiment": {
                      "type": "string"
                    },
                    "score": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sentiment/{ticker}/news": {
      "get": {
        "tags": [
          "Sentiment"
        ],
        "summary": "News sentiment",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "News sentiment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentimentResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sentiment/{ticker}/social": {
      "get": {
        "tags": [
          "Sentiment"
        ],
        "summary": "Social sentiment",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Social sentiment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SentimentResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/gainers": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Top stock gainers",
        "description": "Top gaining stocks over a specified period.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            },
            "description": "Lookback days"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            },
            "description": "Max results"
          },
          {
            "name": "market",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "america"
            },
            "description": "Market filter"
          }
        ],
        "responses": {
          "200": {
            "description": "Top gainers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/country": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock country values",
        "description": "Returns all unique country values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/currency": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock currency values",
        "description": "Returns all unique currency values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/industry": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock industry values",
        "description": "Returns all unique industry values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/market": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock market values",
        "description": "Returns all unique market values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/sector": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock sector values",
        "description": "Returns all unique sector values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/type": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock type values",
        "description": "Returns all unique type values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/list/exchange": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Unique stock exchange values",
        "description": "Returns all unique exchange values available in the stock database.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Unique values",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/losers": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Top stock losers",
        "description": "Top losing stocks over a specified period.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            },
            "description": "Lookback days"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 10
            },
            "description": "Max results"
          },
          {
            "name": "market",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "america"
            },
            "description": "Market filter"
          }
        ],
        "responses": {
          "200": {
            "description": "Top losers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Mover"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/tickers": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "List stock tickers",
        "description": "All stock tickers with optional filtering.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Country filter"
          },
          {
            "name": "exchange",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exchange filter"
          }
        ],
        "responses": {
          "200": {
            "description": "Tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TickerInfo"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/{ticker}": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Single stock ticker",
        "description": "Stock metadata including last close.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Stock metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickerInfo"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/{ticker}/prices": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Historical stock prices",
        "description": "OHLCV price history.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "name": "frame",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "daily",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly",
                "yearly",
                "day",
                "week",
                "month",
                "quarter",
                "year",
                "d",
                "w",
                "m",
                "q",
                "y"
              ]
            },
            "description": "Time frame for price aggregation"
          }
        ],
        "responses": {
          "200": {
            "description": "Historical prices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PriceBar"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/stocks/{ticker}/quote": {
      "get": {
        "tags": [
          "Stocks"
        ],
        "summary": "Stock quote",
        "description": "Comprehensive quote with OHLC, EMAs, 52-week range.",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Stock quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supply-chain/{ticker}/customers": {
      "get": {
        "tags": [
          "Supply Chain"
        ],
        "summary": "Company customers",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "customers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SupplyChainCompany"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supply-chain/{ticker}/peers": {
      "get": {
        "tags": [
          "Supply Chain"
        ],
        "summary": "Company peers",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "peers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SupplyChainPeer"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/supply-chain/{ticker}/suppliers": {
      "get": {
        "tags": [
          "Supply Chain"
        ],
        "summary": "Company suppliers",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "suppliers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SupplyChainCompany"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/web-traffic/{ticker}/traffic": {
      "get": {
        "tags": [
          "Web Traffic"
        ],
        "summary": "Web traffic data",
        "parameters": [
          {
            "name": "ticker",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Ticker symbol"
          }
        ],
        "responses": {
          "200": {
            "description": "Traffic data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebTrafficData"
                }
              }
            }
          },
          "404": {
            "description": "Ticker not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  }
}
