{
  "openapi": "3.0.1",
  "info": {
    "title": "Financial Datasets API",
    "description": "Stock market API with real-time and historical financial data for 17,000+ tickers over 30+ years. Financial statements, equity prices, insider trades, SEC filings, and more.",
    "version": "1.0.0",
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    },
    "contact": {
      "name": "API Support",
      "url": "mailto:support@financialdatasets.ai",
      "email": "support@financialdatasets.ai"
    },
    "termsOfService": "https://financialdatasets.ai/terms-of-use"
  },
  "servers": [
    {
      "url": "https://api.financialdatasets.ai/",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Financial Statements",
      "description": "Access to income statements, balance sheets, and cash flow statements"
    },
    {
      "name": "Market Data",
      "description": "Real-time and historical price data"
    },
    {
      "name": "Company Information",
      "description": "Company facts like ticker, name, and description"
    },
    {
      "name": "Earnings",
      "description": "Earnings data and related information"
    },
    {
      "name": "Crypto",
      "description": "Cryptocurrency price data and market information"
    },
    {
      "name": "News",
      "description": "Real-time and historical news articles"
    },
    {
      "name": "SEC Filings",
      "description": "SEC filings and regulatory documents"
    },
    {
      "name": "Insider Trades",
      "description": "Insider trading activity and transactions"
    },
    {
      "name": "Institutional Ownership",
      "description": "Equity holdings of investment managers"
    },
    {
      "name": "Financial Metrics",
      "description": "Financial ratios, metrics, and key performance indicators"
    },
    {
      "name": "Macroeconomics",
      "description": "Real-time and historical macroeconomic data like interest rates"
    },
    {
      "name": "KPIs",
      "description": "Sector-specific operational KPIs extracted from earnings releases."
    }
  ],
  "security": [
    {
      "X-API-KEY": []
    }
  ],
  "paths": {
    "/macro/interest-rates": {
      "get": {
        "tags": [
          "Macroeconomics"
        ],
        "operationId": "getInterestRates",
        "summary": "Interest Rates (Historical)",
        "description": "Historical interest rates for all major central banks in the world.",
        "parameters": [
          {
            "name": "bank",
            "in": "query",
            "description": "The bank whose interest rates to return. Use the /macro/interest-rates/banks endpoint to get a list of available banks.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "The start date of the interest rates to return in YYYY-MM-DD format.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "The end date of the interest rates to return in YYYY-MM-DD format.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Interest rates response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InterestRatesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/macro/interest-rates/snapshot": {
      "get": {
        "tags": [
          "Macroeconomics"
        ],
        "operationId": "getInterestRatesSnapshot",
        "summary": "Interest Rates (Real-Time)",
        "description": "Get the current interest rates from all major central banks in the world.",
        "parameters": [
          {
            "name": "bank",
            "in": "query",
            "description": "The central bank code (e.g., FED, ECB, BOJ). Use the /macro/interest-rates/banks endpoint to get a list of available banks.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Interest rates snapshot response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InterestRatesResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/news": {
      "get": {
        "tags": [
          "News"
        ],
        "operationId": "getNews",
        "summary": "Get news articles",
        "description": "Get recent news articles for a specific company or the broad market. Pass a ticker for company-specific news, or omit the ticker for general market news. Articles are sourced from RSS feeds of publishers like The Motley Fool, Investing.com, Reuters, and more.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol of the company. Omit for broad market news.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of news articles to return (default: 5, max: 10).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5,
              "maximum": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "News articles response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/search/screener": {
      "post": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "searchFinancials",
        "summary": "Search financial statements",
        "description": "Search for stocks by filtering across financial metrics from income statements, balance sheets, and cash flow statements.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchFiltersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful search response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialsSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/search/line-items": {
      "post": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "searchLineItems",
        "summary": "Search specific financial metrics",
        "description": "Search for specific financial metrics across income statements, balance sheets, and cash flow statements for a list of tickers.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchLineItemsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful search response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialsSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/insider-trades": {
      "get": {
        "tags": [
          "Insider Trades"
        ],
        "operationId": "getInsiderTrades",
        "summary": "Get insider trades",
        "description": "Get insider trades like buys and sells for a ticker by a company insider.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol of the company.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of transactions to return (default: 10).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filter by insider name (e.g., 'Jen Hsun Huang'). Use the /insider-trades/names endpoint to get available names for a ticker.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transaction_type",
            "in": "query",
            "description": "Filter by transaction type (e.g., 'Open market sale', 'Gift'). Use the /insider-trades/transaction-types endpoint to get available types.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filing_date",
            "in": "query",
            "description": "Filter by exact filing date in YYYY-MM-DD format.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filing_date_gte",
            "in": "query",
            "description": "Filter by filing date greater than or equal to this date (YYYY-MM-DD).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filing_date_lte",
            "in": "query",
            "description": "Filter by filing date less than or equal to this date (YYYY-MM-DD).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filing_date_gt",
            "in": "query",
            "description": "Filter by filing date greater than this date (YYYY-MM-DD).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "filing_date_lt",
            "in": "query",
            "description": "Filter by filing date less than this date (YYYY-MM-DD).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Insider trades response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsiderTradesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/institutional-ownership": {
      "get": {
        "tags": [
          "Institutional Ownership"
        ],
        "operationId": "getInstitutionalOwnership",
        "summary": "Get the equity holdings of an investment manager",
        "description": "Get institutional ownership by investor or ticker. Requires either investor or ticker parameter, but not both.",
        "parameters": [
          {
            "name": "investor",
            "in": "query",
            "description": "The name of the investment manager",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol, if queried by investor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of holdings to return (default: 10).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Institutional ownership response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstitutionalOwnershipResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/company/facts": {
      "get": {
        "tags": [
          "Company Information"
        ],
        "operationId": "getCompanyFacts",
        "summary": "Get company facts",
        "description": "Get company facts for a ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The CIK of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Company facts response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyFactsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/filings": {
      "get": {
        "tags": [
          "SEC Filings"
        ],
        "operationId": "getFilings",
        "summary": "Get SEC filings",
        "description": "Get SEC filings for a company.",
        "parameters": [
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filing_type",
            "in": "query",
            "description": "Filter by one or more filing types. Repeat the query parameter to pass multiple values (e.g. filing_type=10-Q&filing_type=10-K).",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "10-K",
                  "10-Q",
                  "8-K",
                  "20-F",
                  "6-K"
                ]
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of filings to return (default: 10).",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SEC filings response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilingsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/filings/items": {
      "get": {
        "tags": [
          "SEC Filings"
        ],
        "operationId": "getFilingItems",
        "summary": "Get SEC filing items",
        "description": "Get the raw text Items from an SEC filing.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filing_type",
            "in": "query",
            "description": "The type of filing.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "10-K",
                "10-Q",
                "8-K"
              ]
            }
          },
          {
            "name": "year",
            "in": "query",
            "description": "The year of the filing.",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "quarter",
            "in": "query",
            "description": "The quarter of the filing if 10-Q.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "item",
            "in": "query",
            "description": "The item to get.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "Item-1",
                "Item-1A",
                "Item-1B",
                "Item-2",
                "Item-3",
                "Item-4",
                "Item-5",
                "Item-6",
                "Item-7",
                "Item-7A",
                "Item-8",
                "Item-9",
                "Item-9A",
                "Item-9B",
                "Item-10",
                "Item-11",
                "Item-12",
                "Item-13",
                "Item-14",
                "Item-15",
                "Item-16",
                "Item-1.01",
                "Item-1.02",
                "Item-1.03",
                "Item-1.04",
                "Item-2.01",
                "Item-2.02",
                "Item-2.03",
                "Item-2.04",
                "Item-2.05",
                "Item-2.06",
                "Item-3.01",
                "Item-3.02",
                "Item-3.03",
                "Item-4.01",
                "Item-4.02",
                "Item-5.01",
                "Item-5.02",
                "Item-5.03",
                "Item-5.04",
                "Item-5.05",
                "Item-5.06",
                "Item-5.07",
                "Item-5.08",
                "Item-6.01",
                "Item-6.02",
                "Item-6.03",
                "Item-6.04",
                "Item-6.05",
                "Item-7.01",
                "Item-8.01",
                "Item-9.01"
              ]
            }
          },
          {
            "name": "accession_number",
            "in": "query",
            "description": "The accession number of the filing if 8-K.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_exhibits",
            "in": "query",
            "description": "Whether to include the raw text from linked exhibits. Only applicable for 8-K filings. When true, exhibit objects will include the 'text' field containing the full exhibit content.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SEC filing items response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilingItemsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/income-statements/segments": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getIncomeStatementSegments",
        "summary": "Get income statement segments",
        "description": "Get income statement segment breakdowns (revenue, operating income, depreciation) by product and business segment.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of periods to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Income statement segments response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncomeStatementSegmentsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/balance-sheets/segments": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getBalanceSheetSegments",
        "summary": "Get balance sheet segments",
        "description": "Get balance sheet segment breakdowns (assets, goodwill, long-lived assets) by business segment.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of periods to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Balance sheet segments response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceSheetSegmentsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/cash-flow-statements/segments": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getCashFlowStatementSegments",
        "summary": "Get cash flow statement segments",
        "description": "Get cash flow statement segment breakdowns (capital expenditure) by business segment.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of periods to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Cash flow statement segments response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashFlowStatementSegmentsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/segments": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getAllSegmentedFinancials",
        "summary": "Get all segmented financials",
        "description": "Get segment breakdowns from all three financial statement types (income statement, balance sheet, cash flow) in a single API call.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of periods to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "All segmented financials response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentedFinancialsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/segmented-revenues": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getSegmentedRevenues",
        "summary": "Get segmented revenue data (deprecated)",
        "description": "Deprecated. Use /financials/income-statements/segments instead.",
        "deprecated": true,
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The date or time period to which the reported revenue data relates in ISO 8601 format (YYYY-MM-DD).",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of revenue statements to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Segmented revenue response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentedRevenuesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/income-statements": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getIncomeStatements",
        "summary": "Get income statements",
        "description": "Get income statements for a ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the income statements.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly",
                "ttm"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of income statements to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Income statements response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IncomeStatementResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/balance-sheets": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getBalanceSheets",
        "summary": "Get balance sheets",
        "description": "Get balance sheets for a ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the balance sheets.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly",
                "ttm"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of balance sheets to return",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Balance sheets response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceSheetResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials/cash-flow-statements": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getCashFlowStatements",
        "summary": "Get cash flow statements",
        "description": "Get cash flow statements for a ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the cash flow statements.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly",
                "ttm"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of cash flow statements to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Cash flow statements response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CashFlowStatementResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/earnings": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "operationId": "getEarnings",
        "summary": "Get earnings snapshot",
        "description": "Get the most recent earnings snapshot for a ticker. Optional estimate/surprise and change fields are returned only when available.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Earnings response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EarningsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/prices": {
      "get": {
        "tags": [
          "Market Data"
        ],
        "operationId": "getPrices",
        "summary": "Get historical stock price data",
        "description": "Get end-of-day (EOD) historical price data for stocks.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The stock ticker symbol (e.g. AAPL, MSFT).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "The time interval for the price data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "week",
                "month",
                "year"
              ]
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "The start date for the price data (format: YYYY-MM-DD).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "The end date for the price data (format: YYYY-MM-DD).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Price data response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/crypto/prices/snapshot": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "operationId": "getCryptoPriceSnapshot",
        "summary": "Get crypto price snapshot",
        "description": "Get the real-time price snapshot for a cryptocurrency.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The cryptocurrency ticker symbol.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Price snapshot response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CryptoPriceSnapshotResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financials": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getAllFinancialStatements",
        "summary": "Get all financial statements",
        "description": "Get all financial statements for a ticker.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period of the financial statements.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly",
                "ttm"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of financial statements to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "Financial statements response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/crypto/prices": {
      "get": {
        "tags": [
          "Crypto"
        ],
        "operationId": "getCryptoPrices",
        "summary": "Get historical crypto price data",
        "description": "Get ranged price data for a cryptocurrency to power price charts and analyze price movements.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The cryptocurrency ticker symbol.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "interval",
            "in": "query",
            "description": "The time interval for the price data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "day",
                "week",
                "month",
                "year"
              ]
            }
          },
          {
            "name": "interval_multiplier",
            "in": "query",
            "description": "The multiplier for the interval.",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "The start date for the price data (format: YYYY-MM-DD).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "The end date for the price data (format: YYYY-MM-DD).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of price records to return (default: 5000, max: 5000).",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5000,
              "default": 5000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Price data response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CryptoPricesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financial-metrics": {
      "get": {
        "tags": [
          "Financial Metrics"
        ],
        "operationId": "getFinancialMetrics",
        "summary": "Get financial metrics",
        "description": "Get financial metrics for a ticker, including valuation, profitability, efficiency, liquidity, leverage, growth, and per share metrics.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol of the company. Required if cik is not provided.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company. Can be used instead of ticker.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The time period for the financial data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly",
                "ttm"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of results to return.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/ReportPeriod"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLte"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodGt"
          },
          {
            "$ref": "#/components/parameters/ReportPeriodLt"
          }
        ],
        "responses": {
          "200": {
            "description": "The historical financial metrics and ratios for a ticker",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialMetricsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/prices/snapshot": {
      "get": {
        "tags": [
          "Market Data"
        ],
        "operationId": "getPriceSnapshot",
        "summary": "Price Snapshot (Real-Time)",
        "description": "Get the real-time price snapshot for a stock, including the current price, day change, and day change percent.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The stock ticker symbol (e.g. AAPL, MSFT).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Price snapshot response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceSnapshotResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/prices/snapshot/tickers": {
      "get": {
        "tags": [
          "Market Data"
        ],
        "operationId": "getPriceSnapshotTickers",
        "summary": "Available tickers for price snapshots",
        "description": "Returns a list of available tickers for the price snapshot endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/prices/snapshot/market": {
      "get": {
        "tags": [
          "Market Data"
        ],
        "operationId": "getPriceSnapshotMarket",
        "summary": "Market Snapshot (Real-Time)",
        "description": "Get the real-time price snapshot for the entire market. Requires an active subscription.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Market snapshot response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceSnapshotMarketResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financial-metrics/snapshot": {
      "get": {
        "tags": [
          "Financial Metrics"
        ],
        "operationId": "getFinancialMetricsSnapshot",
        "summary": "Financial Metrics Snapshot (Real-Time)",
        "description": "Get the real-time financial metrics snapshot for a stock, including valuation ratios, profitability, efficiency, liquidity, leverage, growth, and per share metrics.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol of the company.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cik",
            "in": "query",
            "description": "The Central Index Key (CIK) of the company. Can be used instead of ticker.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Financial metrics snapshot response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinancialMetricSnapshotResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/financial-metrics/snapshot/tickers": {
      "get": {
        "tags": [
          "Financial Metrics"
        ],
        "operationId": "getFinancialMetricsSnapshotTickers",
        "summary": "Available tickers for financial metrics snapshots",
        "description": "Returns a list of available tickers for the financial metrics snapshot endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/analyst-estimates": {
      "get": {
        "tags": [
          "Analyst Estimates"
        ],
        "operationId": "getAnalystEstimates",
        "summary": "Analyst Estimates",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker to get analyst estimates for.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "The period to get analyst estimates for. Use the /analyst-estimates/periods endpoint to get a list of available periods. Defaults to 'annual'.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "annual",
                "quarterly"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of estimates to return (max 3 for annual, 12 for quarterly).",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Analyst estimates response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalystEstimatesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          }
        }
      }
    },
    "/analyst-estimates/tickers": {
      "get": {
        "tags": [
          "Analyst Estimates"
        ],
        "operationId": "getAnalystEstimatesTickers",
        "summary": "Available tickers for analyst estimates",
        "description": "Returns a list of available tickers for the analyst estimates endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/company/facts/tickers": {
      "get": {
        "tags": [
          "Company Information"
        ],
        "operationId": "getCompanyFactsTickers",
        "summary": "Available tickers for company facts",
        "description": "Returns a list of available tickers for the company facts endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/company/facts/ciks": {
      "get": {
        "tags": [
          "Company Information"
        ],
        "operationId": "getCompanyFactsCiks",
        "summary": "Available CIKs for company facts",
        "description": "Returns a list of available CIKs for the company facts endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "CIKs response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiksResponse"
                }
              }
            }
          }
        }
      }
    },
    "/earnings/tickers": {
      "get": {
        "tags": [
          "Earnings"
        ],
        "operationId": "getEarningsTickers",
        "summary": "Available tickers for earnings",
        "description": "Returns a list of available tickers for the earnings endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/filings/tickers": {
      "get": {
        "tags": [
          "SEC Filings"
        ],
        "operationId": "getFilingsTickers",
        "summary": "Available tickers for SEC filings",
        "description": "Returns a list of available tickers for the filings endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/filings/ciks": {
      "get": {
        "tags": [
          "SEC Filings"
        ],
        "operationId": "getFilingsCiks",
        "summary": "Available CIKs for SEC filings",
        "description": "Returns a list of available CIKs for the filings endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "CIKs response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CiksResponse"
                }
              }
            }
          }
        }
      }
    },
    "/filings/types": {
      "get": {
        "tags": [
          "SEC Filings"
        ],
        "operationId": "getFilingsTypes",
        "summary": "Available SEC filing types",
        "description": "Returns a sorted list of valid SEC filing types (e.g., 10-K, 10-Q, 8-K). This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Filing types response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "filing_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/filings/items/types": {
      "get": {
        "tags": [
          "SEC Filings"
        ],
        "operationId": "getFilingsItemsTypes",
        "summary": "Available filing item types",
        "description": "Returns a list of extractable item sections for 10-K, 10-Q, and 8-K filings. This endpoint is free and does not require authentication.",
        "parameters": [
          {
            "name": "filing_type",
            "in": "query",
            "description": "Optional filter by filing type (e.g., 10-K, 10-Q).",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Filing item types response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/prices/tickers": {
      "get": {
        "tags": [
          "Market Data"
        ],
        "operationId": "getPricesTickers",
        "summary": "Available tickers for price history",
        "description": "Returns a list of available tickers for the prices endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Tickers response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TickersResponse"
                }
              }
            }
          }
        }
      }
    },
    "/macro/interest-rates/banks": {
      "get": {
        "tags": [
          "Macroeconomics"
        ],
        "operationId": "getInterestRatesBanks",
        "summary": "Available central banks",
        "description": "Returns a list of available central bank codes for the interest rates endpoints. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Banks response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resource": {
                      "type": "string"
                    },
                    "banks": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/financials/search/screener/filters": {
      "get": {
        "tags": [
          "Financial Statements"
        ],
        "operationId": "getScreenerFilters",
        "summary": "Available screener filter fields",
        "description": "Returns a list of available filter fields, valid values, and operators for the stock screener endpoint. This endpoint is free and does not require authentication.",
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Metrics response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "metrics": {
                      "type": "object"
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/kpi/metrics": {
      "get": {
        "tags": [
          "KPIs"
        ],
        "operationId": "getKPIMetrics",
        "summary": "Get KPI metrics",
        "description": "Get sector-specific operational KPIs for a ticker. Includes metrics like load factor, CET1 ratio, same-store sales, FFO per share, and more. Sourced from SEC 8-K earnings releases.",
        "parameters": [
          {
            "name": "ticker",
            "in": "query",
            "description": "The ticker symbol.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric_name",
            "in": "query",
            "description": "Filter to a specific metric (e.g., load_factor, cet1_ratio).",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Filter by period type: quarterly or annual.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "quarterly",
                "annual"
              ],
              "default": "quarterly"
            }
          },
          {
            "name": "report_period_gte",
            "in": "query",
            "description": "Only return metrics on or after this date (YYYY-MM-DD).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "report_period_lte",
            "in": "query",
            "description": "Only return metrics on or before this date (YYYY-MM-DD).",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of periods to return. Returns all metrics for the N most recent periods.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 4,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "KPI metrics response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KPIMetricsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequiredError"
          },
          "403": {
            "description": "Enterprise access required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Early access"
                    },
                    "message": {
                      "type": "string",
                      "example": "KPI endpoints are in early access. Contact support@financialdatasets.ai for access."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/kpi/metrics/tickers": {
      "get": {
        "tags": [
          "KPIs"
        ],
        "operationId": "getKPIMetricsTickers",
        "summary": "Get available KPI tickers",
        "description": "Returns a list of tickers that have KPI metrics available.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available tickers",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resource": {
                      "type": "string",
                      "example": "kpi_metrics"
                    },
                    "tickers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "AAPL",
                        "DAL",
                        "JPM",
                        "NVDA"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/kpi/metrics/sectors": {
      "get": {
        "tags": [
          "KPIs"
        ],
        "operationId": "getKPIMetricsSectors",
        "summary": "Get available KPI sectors",
        "description": "Returns a list of sectors that have KPI metrics available.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Available sectors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resource": {
                      "type": "string",
                      "example": "kpi_metrics"
                    },
                    "sectors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "airlines",
                        "banks",
                        "reits",
                        "semiconductors"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/kpi/guidance": {
      "get": {
        "tags": ["KPIs"],
        "operationId": "getKPIGuidance",
        "summary": "Get forward guidance",
        "description": "Get structured forward guidance from earnings releases. Returns ranges, point estimates, and directional signals.",
        "parameters": [
          {"name": "ticker", "in": "query", "description": "The ticker symbol.", "required": true, "schema": {"type": "string"}},
          {"name": "metric_name", "in": "query", "description": "Filter to a specific metric.", "required": false, "schema": {"type": "string"}},
          {"name": "period", "in": "query", "description": "Filter by period type: quarterly or annual.", "required": false, "schema": {"type": "string", "enum": ["quarterly", "annual"], "default": "quarterly"}},
          {"name": "report_period_gte", "in": "query", "description": "Only return guidance on or after this date (YYYY-MM-DD).", "required": false, "schema": {"type": "string", "format": "date"}},
          {"name": "report_period_lte", "in": "query", "description": "Only return guidance on or before this date (YYYY-MM-DD).", "required": false, "schema": {"type": "string", "format": "date"}},
          {"name": "limit", "in": "query", "description": "Number of periods to return.", "required": false, "schema": {"type": "integer", "default": 4, "maximum": 50}}
        ],
        "responses": {
          "200": {
            "description": "Guidance response",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KPIGuidanceResponse"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequestError"},
          "401": {"$ref": "#/components/responses/UnauthorizedError"},
          "403": {"description": "Pro subscription required"}
        }
      }
    },
    "/kpi/non-gaap": {
      "get": {
        "tags": ["KPIs"],
        "operationId": "getKPINonGAAP",
        "summary": "Get non-GAAP metrics",
        "description": "Get non-GAAP financial metrics with GAAP equivalents and key adjustments.",
        "parameters": [
          {"name": "ticker", "in": "query", "description": "The ticker symbol.", "required": true, "schema": {"type": "string"}},
          {"name": "metric_name", "in": "query", "description": "Filter to a specific metric.", "required": false, "schema": {"type": "string"}},
          {"name": "period", "in": "query", "description": "Filter by period type: quarterly or annual.", "required": false, "schema": {"type": "string", "enum": ["quarterly", "annual"], "default": "quarterly"}},
          {"name": "report_period_gte", "in": "query", "description": "Only return metrics on or after this date (YYYY-MM-DD).", "required": false, "schema": {"type": "string", "format": "date"}},
          {"name": "report_period_lte", "in": "query", "description": "Only return metrics on or before this date (YYYY-MM-DD).", "required": false, "schema": {"type": "string", "format": "date"}},
          {"name": "limit", "in": "query", "description": "Number of periods to return.", "required": false, "schema": {"type": "integer", "default": 4, "maximum": 50}}
        ],
        "responses": {
          "200": {
            "description": "Non-GAAP metrics response",
            "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KPINonGAAPResponse"}}}
          },
          "400": {"$ref": "#/components/responses/BadRequestError"},
          "401": {"$ref": "#/components/responses/UnauthorizedError"},
          "403": {"description": "Pro subscription required"}
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-API-KEY": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "description": "API key for authentication.",
        "in": "header"
      }
    },
    "parameters": {
      "ReportPeriod": {
        "name": "report_period",
        "in": "query",
        "description": "Filter by exact report period date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ReportPeriodGte": {
        "name": "report_period_gte",
        "in": "query",
        "description": "Filter by report period greater than or equal to date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ReportPeriodLte": {
        "name": "report_period_lte",
        "in": "query",
        "description": "Filter by report period less than or equal to date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ReportPeriodGt": {
        "name": "report_period_gt",
        "in": "query",
        "description": "Filter by report period greater than date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "ReportPeriodLt": {
        "name": "report_period_lt",
        "in": "query",
        "description": "Filter by report period less than date in YYYY-MM-DD format.",
        "required": false,
        "schema": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "schemas": {
      "AnalystEstimatesResponse": {
        "type": "object",
        "properties": {
          "analyst_estimates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalystEstimate"
            }
          }
        }
      },
      "AnalystEstimate": {
        "type": "object",
        "properties": {
          "fiscal_period": {
            "type": "string",
            "format": "date",
            "description": "The fiscal period of the analyst estimate."
          },
          "period": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly"
            ],
            "description": "The period of the analyst estimate."
          },
          "revenue": {
            "type": "integer",
            "description": "The estimated revenue."
          },
          "earnings_per_share": {
            "type": "number",
            "description": "The estimated earnings per share."
          }
        }
      },
      "SearchFiltersRequest": {
        "type": "object",
        "required": [
          "filters"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "default": 10,
            "description": "The maximum number of results to return."
          },
          "filters": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "operator",
                "value"
              ],
              "properties": {
                "field": {
                  "type": "string",
                  "description": "The criteria to filter on.  For financial metric fields, use 'gt', 'lt', 'gte', 'lte', 'eq' operators.  For 'ticker' and 'cik' fields, use the 'in' operator to filter against multiple values."
                },
                "operator": {
                  "type": "string",
                  "enum": [
                    "gt",
                    "lt",
                    "gte",
                    "lte",
                    "eq",
                    "in"
                  ],
                  "description": "The comparison operator. The 'in' operator can only be used with a field value of 'ticker' or 'cik' and lets you filter against multiple values."
                },
                "value": {
                  "oneOf": [
                    {
                      "type": "number",
                      "description": "The value to compare against for single-value operators (gt, lt, gte, lte, eq)"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Array of ticker or cik values to compare against when using the 'in' operator"
                    }
                  ]
                }
              }
            },
            "minItems": 1,
            "description": "An array of filter objects to apply to the search."
          }
        }
      },
      "SearchLineItemsRequest": {
        "type": "object",
        "required": [
          "line_items",
          "tickers"
        ],
        "properties": {
          "line_items": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "The financial metric to search for."
            },
            "minItems": 1,
            "description": "An array of line items to apply to the search."
          },
          "tickers": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "The tickers to search for."
            },
            "minItems": 1,
            "description": "An array of tickers to apply to the search."
          },
          "period": {
            "type": "string",
            "enum": [
              "annual",
              "quarterly",
              "ttm"
            ],
            "default": "ttm",
            "description": "The time period for the financial data."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "default": 1,
            "description": "The maximum number of results to return."
          }
        }
      },
      "FinancialsSearchResponse": {
        "type": "object",
        "properties": {
          "search_results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string",
                  "description": "The ticker symbol of the company."
                },
                "report_period": {
                  "type": "string",
                  "format": "date",
                  "description": "The reporting period of the financial data."
                },
                "period": {
                  "type": "string",
                  "enum": [
                    "annual",
                    "quarterly",
                    "ttm"
                  ],
                  "description": "The time period of the financial data."
                },
                "currency": {
                  "type": "string",
                  "description": "The currency of the financial data."
                }
              },
              "additionalProperties": {
                "type": "string",
                "description": "Additional financial metrics based on the search criteria."
              }
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "A short error message."
          },
          "message": {
            "type": "string",
            "description": "A more detailed error message."
          }
        }
      },
      "InsiderTradesResponse": {
        "type": "object",
        "properties": {
          "insider_trades": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InsiderTrade"
            }
          }
        }
      },
      "NewsResponse": {
        "type": "object",
        "properties": {
          "news": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/News"
            }
          }
        }
      },
      "InstitutionalOwnershipResponse": {
        "type": "object",
        "properties": {
          "institutional-ownership": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InstitutionalOwnership"
            }
          }
        }
      },
      "FinancialsResponse": {
        "type": "object",
        "properties": {
          "financials": {
            "type": "object",
            "properties": {
              "income_statements": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/IncomeStatement"
                }
              },
              "balance_sheets": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BalanceSheet"
                }
              },
              "cash_flow_statements": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CashFlowStatement"
                }
              }
            }
          }
        }
      },
      "SegmentedRevenuesResponse": {
        "type": "object",
        "properties": {
          "segmented_revenues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SegmentedRevenues"
            }
          }
        }
      },
      "IncomeStatementResponse": {
        "type": "object",
        "properties": {
          "income_statements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncomeStatement"
            }
          }
        }
      },
      "BalanceSheetResponse": {
        "type": "object",
        "properties": {
          "balance_sheets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheet"
            }
          }
        }
      },
      "CashFlowStatementResponse": {
        "type": "object",
        "properties": {
          "cash_flow_statements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CashFlowStatement"
            }
          }
        }
      },
      "CompanyFactsResponse": {
        "type": "object",
        "properties": {
          "company_facts": {
            "$ref": "#/components/schemas/CompanyFacts"
          }
        }
      },
      "FilingsResponse": {
        "type": "object",
        "properties": {
          "filings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Filing"
            }
          }
        }
      },
      "FilingItemsResponse": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "description": "The resource type identifier."
          },
          "ticker": {
            "type": "string",
            "description": "The ticker symbol of the company."
          },
          "cik": {
            "type": "string",
            "description": "The Central Index Key (CIK) of the company."
          },
          "filing_type": {
            "type": "string",
            "description": "The type of filing."
          },
          "accession_number": {
            "type": "string",
            "description": "The accession number of the filing."
          },
          "year": {
            "type": "integer",
            "description": "The year of the filing."
          },
          "quarter": {
            "type": "integer",
            "description": "The quarter of the filing."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilingItem"
            }
          }
        }
      },
      "EarningsTimeDimension": {
        "type": "object",
        "properties": {
          "fiscal_period": {
            "type": "string",
            "nullable": true,
            "description": "Fiscal period label (e.g. 2025-Q4 or 2025-FY)."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO currency code (e.g. USD)."
          },
          "revenue": {
            "type": "number",
            "nullable": true
          },
          "estimated_revenue": {
            "type": "number",
            "description": "Estimated revenue. Returned only when available."
          },
          "revenue_surprise": {
            "type": "string",
            "description": "Revenue surprise classification versus estimate. Returned only when available.",
            "enum": [
              "BEAT",
              "MISS",
              "MEET"
            ]
          },
          "earnings_per_share": {
            "type": "number",
            "nullable": true
          },
          "estimated_earnings_per_share": {
            "type": "number",
            "description": "Estimated earnings per share. Returned only when available."
          },
          "eps_surprise": {
            "type": "string",
            "description": "EPS surprise classification versus estimate. Returned only when available.",
            "enum": [
              "BEAT",
              "MISS",
              "MEET"
            ]
          },
          "net_income": {
            "type": "number",
            "nullable": true
          },
          "gross_profit": {
            "type": "number",
            "nullable": true
          },
          "operating_income": {
            "type": "number",
            "nullable": true
          },
          "weighted_average_shares": {
            "type": "number",
            "nullable": true
          },
          "weighted_average_shares_diluted": {
            "type": "number",
            "nullable": true
          },
          "cash_and_equivalents": {
            "type": "number",
            "nullable": true
          },
          "total_debt": {
            "type": "number",
            "nullable": true
          },
          "total_assets": {
            "type": "number",
            "nullable": true
          },
          "total_liabilities": {
            "type": "number",
            "nullable": true
          },
          "shareholders_equity": {
            "type": "number",
            "nullable": true
          },
          "net_cash_flow_from_operations": {
            "type": "number",
            "nullable": true
          },
          "capital_expenditure": {
            "type": "number",
            "nullable": true
          },
          "net_cash_flow_from_investing": {
            "type": "number",
            "nullable": true
          },
          "net_cash_flow_from_financing": {
            "type": "number",
            "nullable": true
          },
          "change_in_cash_and_equivalents": {
            "type": "number",
            "nullable": true
          },
          "free_cash_flow": {
            "type": "number",
            "nullable": true
          },
          "revenue_chg": {
            "type": "number",
            "description": "Percentage change in revenue. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "net_income_chg": {
            "type": "number",
            "description": "Percentage change in net income. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "operating_income_chg": {
            "type": "number",
            "description": "Percentage change in operating income. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "gross_profit_chg": {
            "type": "number",
            "description": "Percentage change in gross profit. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "net_cash_flow_from_operations_chg": {
            "type": "number",
            "description": "Percentage change in net cash flow from operations. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "net_cash_flow_from_investing_chg": {
            "type": "number",
            "description": "Percentage change in net cash flow from investing. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "net_cash_flow_from_financing_chg": {
            "type": "number",
            "description": "Percentage change in net cash flow from financing. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          },
          "free_cash_flow_chg": {
            "type": "number",
            "description": "Percentage change in free cash flow. QoQ in quarterly payload and YoY in annual payload. Returned only when calculable."
          }
        }
      },
      "Earnings": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The requested ticker symbol."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "Most recent report period found for the ticker."
          },
          "fiscal_period": {
            "type": "string",
            "nullable": true,
            "description": "Fiscal period label (e.g. 2025-Q4 or 2025-FY)."
          },
          "currency": {
            "type": "string",
            "nullable": true,
            "description": "ISO currency code (e.g. USD)."
          },
          "quarterly": {
            "$ref": "#/components/schemas/EarningsTimeDimension"
          },
          "annual": {
            "$ref": "#/components/schemas/EarningsTimeDimension"
          }
        }
      },
      "EarningsResponse": {
        "type": "object",
        "properties": {
          "earnings": {
            "$ref": "#/components/schemas/Earnings"
          }
        }
      },
      "Beta": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "nullable": true,
            "description": "Beta coefficient of stock monthly returns vs benchmark monthly returns."
          },
          "ticker": {
            "type": "string",
            "description": "The requested ticker symbol."
          },
          "benchmark": {
            "type": "string",
            "description": "Benchmark ticker used for beta calculation."
          },
          "requested_lookback": {
            "type": "string",
            "description": "Requested lookback window."
          },
          "interval": {
            "type": "string",
            "description": "Interval used for returns alignment."
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "First aligned month-end date used."
          },
          "end_date": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Last aligned month-end date used."
          },
          "n_observations": {
            "type": "integer",
            "description": "Number of overlapping monthly observations used."
          },
          "r_squared": {
            "type": "number",
            "nullable": true,
            "description": "Coefficient of determination for the OLS fit."
          },
          "method": {
            "type": "string",
            "description": "Computation method used."
          },
          "price_type": {
            "type": "string",
            "description": "Price type used to compute returns."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "Present when value is null due to insufficient or invalid input data."
          }
        }
      },
      "BetaResponse": {
        "type": "object",
        "properties": {
          "beta": {
            "$ref": "#/components/schemas/Beta"
          }
        }
      },
      "CryptoPriceSnapshotResponse": {
        "type": "object",
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/CryptoPriceSnapshot"
          }
        }
      },
      "PriceSnapshotResponse": {
        "type": "object",
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/PriceSnapshot"
          }
        }
      },
      "PriceSnapshotMarketResponse": {
        "type": "object",
        "properties": {
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceSnapshot"
            }
          }
        }
      },
      "TickersResponse": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "description": "The resource type identifier."
          },
          "tickers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of available ticker symbols."
          }
        }
      },
      "CiksResponse": {
        "type": "object",
        "properties": {
          "resource": {
            "type": "string",
            "description": "The resource type identifier."
          },
          "ciks": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of available CIK codes."
          }
        }
      },
      "FinancialMetricSnapshotResponse": {
        "type": "object",
        "properties": {
          "snapshot": {
            "$ref": "#/components/schemas/FinancialMetricSnapshot"
          }
        }
      },
      "FinancialMetricSnapshot": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol of the company."
          },
          "market_cap": {
            "type": "number",
            "nullable": true,
            "description": "The total market capitalization (stock price \u00d7 shares outstanding)."
          },
          "enterprise_value": {
            "type": "number",
            "nullable": true,
            "description": "The total value of the company (market cap + debt - cash)."
          },
          "price_to_earnings_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Price to earnings ratio."
          },
          "price_to_book_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Price to book ratio."
          },
          "price_to_sales_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Price to sales ratio."
          },
          "enterprise_value_to_ebitda_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Enterprise value to EBITDA ratio."
          },
          "enterprise_value_to_revenue_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Enterprise value to revenue ratio."
          },
          "free_cash_flow_yield": {
            "type": "number",
            "nullable": true,
            "description": "Free cash flow yield."
          },
          "peg_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Price to earnings growth ratio."
          },
          "gross_margin": {
            "type": "number",
            "nullable": true,
            "description": "Gross profit as a percentage of revenue."
          },
          "operating_margin": {
            "type": "number",
            "nullable": true,
            "description": "Operating income as a percentage of revenue."
          },
          "net_margin": {
            "type": "number",
            "nullable": true,
            "description": "Net income as a percentage of revenue."
          },
          "return_on_equity": {
            "type": "number",
            "nullable": true,
            "description": "Net income as a percentage of shareholders' equity."
          },
          "return_on_assets": {
            "type": "number",
            "nullable": true,
            "description": "Net income as a percentage of total assets."
          },
          "return_on_invested_capital": {
            "type": "number",
            "nullable": true,
            "description": "Net operating profit after taxes as a percentage of invested capital."
          },
          "asset_turnover": {
            "type": "number",
            "nullable": true,
            "description": "Revenue divided by average total assets."
          },
          "inventory_turnover": {
            "type": "number",
            "nullable": true,
            "description": "Cost of goods sold divided by average inventory."
          },
          "receivables_turnover": {
            "type": "number",
            "nullable": true,
            "description": "Revenue divided by average accounts receivable."
          },
          "days_sales_outstanding": {
            "type": "number",
            "nullable": true,
            "description": "Average accounts receivable divided by revenue over the period."
          },
          "operating_cycle": {
            "type": "number",
            "nullable": true,
            "description": "Inventory turnover + receivables turnover."
          },
          "working_capital_turnover": {
            "type": "number",
            "nullable": true,
            "description": "Revenue divided by average working capital."
          },
          "current_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Current assets divided by current liabilities."
          },
          "quick_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Quick assets divided by current liabilities."
          },
          "cash_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Cash and cash equivalents divided by current liabilities."
          },
          "operating_cash_flow_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Operating cash flow divided by current liabilities."
          },
          "debt_to_equity": {
            "type": "number",
            "nullable": true,
            "description": "Total debt divided by shareholders' equity."
          },
          "debt_to_assets": {
            "type": "number",
            "nullable": true,
            "description": "Total debt divided by total assets."
          },
          "interest_coverage": {
            "type": "number",
            "nullable": true,
            "description": "EBIT divided by interest expense."
          },
          "revenue_growth": {
            "type": "number",
            "nullable": true,
            "description": "Year-over-year growth in revenue."
          },
          "earnings_growth": {
            "type": "number",
            "nullable": true,
            "description": "Year-over-year growth in earnings."
          },
          "book_value_growth": {
            "type": "number",
            "nullable": true,
            "description": "Year-over-year growth in book value."
          },
          "earnings_per_share_growth": {
            "type": "number",
            "nullable": true,
            "description": "Growth in earnings per share over the period."
          },
          "free_cash_flow_growth": {
            "type": "number",
            "nullable": true,
            "description": "Growth in free cash flow over the period."
          },
          "operating_income_growth": {
            "type": "number",
            "nullable": true,
            "description": "Growth in operating income over the period."
          },
          "ebitda_growth": {
            "type": "number",
            "nullable": true,
            "description": "Growth in EBITDA over the period."
          },
          "payout_ratio": {
            "type": "number",
            "nullable": true,
            "description": "Dividends paid as a percentage of net income."
          },
          "earnings_per_share": {
            "type": "number",
            "nullable": true,
            "description": "Net income divided by weighted average shares outstanding."
          },
          "book_value_per_share": {
            "type": "number",
            "nullable": true,
            "description": "Shareholders' equity divided by shares outstanding."
          },
          "free_cash_flow_per_share": {
            "type": "number",
            "nullable": true,
            "description": "Free cash flow divided by shares outstanding."
          }
        }
      },
      "InterestRatesResponse": {
        "type": "object",
        "properties": {
          "interest_rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InterestRate"
            }
          }
        }
      },
      "PricesResponse": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          }
        }
      },
      "CryptoPricesResponse": {
        "type": "object",
        "properties": {
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          }
        }
      },
      "InsiderTrade": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol of the company."
          },
          "issuer": {
            "type": "string",
            "description": "The name of the issuing company."
          },
          "name": {
            "type": "string",
            "description": "The name of the insider."
          },
          "title": {
            "type": "string",
            "description": "The title of the insider."
          },
          "is_board_director": {
            "type": "boolean",
            "description": "Whether the insider is a board director."
          },
          "transaction_date": {
            "type": "string",
            "format": "date",
            "description": "The date of the transaction."
          },
          "transaction_shares": {
            "type": "number",
            "description": "The number of shares involved in the transaction."
          },
          "transaction_price_per_share": {
            "type": "number",
            "description": "The price per share in the transaction."
          },
          "transaction_value": {
            "type": "number",
            "description": "The total value of the transaction."
          },
          "shares_owned_before_transaction": {
            "type": "number",
            "description": "The number of shares owned before the transaction."
          },
          "shares_owned_after_transaction": {
            "type": "number",
            "description": "The number of shares owned after the transaction."
          },
          "security_title": {
            "type": "string",
            "description": "The title of the security involved in the transaction."
          },
          "transaction_type": {
            "type": "string",
            "description": "A human-readable description of the transaction type."
          },
          "filing_date": {
            "type": "string",
            "format": "date",
            "description": "The date the transaction was filed."
          }
        }
      },
      "InstitutionalOwnership": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol, if queried by investor."
          },
          "investor": {
            "type": "string",
            "description": "The investor name, if queried by ticker."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period of the institutional ownership."
          },
          "security_type": {
            "type": "string",
            "enum": [
              "common_stock",
              "put_option",
              "call_option",
              "warrant",
              "preferred_stock",
              "debt",
              "fund",
              "other"
            ],
            "description": "The type of security held by the investment manager."
          },
          "price": {
            "type": "number",
            "description": "The estimated purchase price of the equity position."
          },
          "shares": {
            "type": "number",
            "description": "The number of shares held by the investment manager."
          },
          "market_value": {
            "type": "number",
            "description": "The market value of the equity position."
          }
        }
      },
      "SegmentedRevenues": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period of the revenue."
          },
          "period": {
            "type": "string",
            "enum": [
              "quarterly",
              "annual"
            ],
            "description": "The time period of the revenue."
          },
          "items": {
            "type": "array",
            "description": "An array of revenue segments from SEC filings (10-Ks and 10-Qs) in XBRL format",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The name of the revenue segment."
                },
                "amount": {
                  "type": "number",
                  "description": "The numerical amount reported for the specified financial metric, expressed in the company's reporting currency; default is USD."
                },
                "end_period": {
                  "type": "string",
                  "format": "date",
                  "nullable": true,
                  "description": "The end period of the revenue segment.  Only provided for quarterly data."
                },
                "start_period": {
                  "type": "string",
                  "format": "date",
                  "nullable": true,
                  "description": "The start period of the revenue segment.  Only provided for quarterly data."
                },
                "segments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "description": "The label for the revenue segment."
                      },
                      "type": {
                        "type": "string",
                        "description": "The type of revenue segment."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "SegmentBreakdown": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "The label for the segment (e.g., 'iPhone', 'Americas')."
          },
          "value": {
            "type": "number",
            "description": "The value for the segment."
          }
        }
      },
      "SegmentCategory": {
        "type": "object",
        "description": "Segment breakdowns grouped by category.",
        "properties": {
          "product": {
            "type": "array",
            "description": "Breakdowns by product line.",
            "items": {
              "$ref": "#/components/schemas/SegmentBreakdown"
            }
          },
          "segment": {
            "type": "array",
            "description": "Breakdowns by business or operating segment.",
            "items": {
              "$ref": "#/components/schemas/SegmentBreakdown"
            }
          }
        }
      },
      "SegmentMetadata": {
        "type": "object",
        "description": "Common metadata fields for all segment responses.",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period."
          },
          "fiscal_period": {
            "type": "string",
            "description": "The fiscal period (e.g., Q1, Q2, Q3, Q4, FY)."
          },
          "period": {
            "type": "string",
            "enum": ["quarterly", "annual"],
            "description": "The time period."
          },
          "currency": {
            "type": "string",
            "description": "The reporting currency (e.g., USD, EUR, GBP)."
          },
          "accession_number": {
            "type": "string",
            "description": "The SEC filing accession number."
          },
          "filing_url": {
            "type": "string",
            "description": "URL to the SEC filing."
          }
        }
      },
      "IncomeStatementSegments": {
        "allOf": [
          {"$ref": "#/components/schemas/SegmentMetadata"},
          {
            "type": "object",
            "properties": {
              "revenue": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Revenue broken down by product and/or segment."
              },
              "operating_income": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Operating income broken down by segment."
              },
              "depreciation": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Depreciation broken down by segment."
              }
            }
          }
        ]
      },
      "BalanceSheetSegments": {
        "allOf": [
          {"$ref": "#/components/schemas/SegmentMetadata"},
          {
            "type": "object",
            "properties": {
              "assets": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Assets broken down by segment."
              },
              "goodwill": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Goodwill broken down by segment."
              },
              "long_lived_assets": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Long-lived assets broken down by segment."
              }
            }
          }
        ]
      },
      "CashFlowStatementSegments": {
        "allOf": [
          {"$ref": "#/components/schemas/SegmentMetadata"},
          {
            "type": "object",
            "properties": {
              "capital_expenditure": {
                "nullable": true,
                "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}],
                "description": "Capital expenditure broken down by segment."
              }
            }
          }
        ]
      },
      "IncomeStatementSegmentsResponse": {
        "type": "object",
        "properties": {
          "segmented_financials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IncomeStatementSegments"
            }
          }
        }
      },
      "BalanceSheetSegmentsResponse": {
        "type": "object",
        "properties": {
          "segmented_financials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BalanceSheetSegments"
            }
          }
        }
      },
      "CashFlowStatementSegmentsResponse": {
        "type": "object",
        "properties": {
          "segmented_financials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CashFlowStatementSegments"
            }
          }
        }
      },
      "SegmentedFinancialsResponse": {
        "type": "object",
        "properties": {
          "segmented_financials": {
            "type": "array",
            "items": {
              "allOf": [
                {"$ref": "#/components/schemas/SegmentMetadata"},
                {
                  "type": "object",
                  "properties": {
                    "income_statement": {
                      "type": "object",
                      "nullable": true,
                      "description": "Income statement segment breakdowns for this period.",
                      "properties": {
                        "revenue": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        },
                        "operating_income": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        },
                        "depreciation": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        }
                      }
                    },
                    "balance_sheet": {
                      "type": "object",
                      "nullable": true,
                      "description": "Balance sheet segment breakdowns for this period.",
                      "properties": {
                        "assets": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        },
                        "goodwill": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        },
                        "long_lived_assets": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        }
                      }
                    },
                    "cash_flow_statement": {
                      "type": "object",
                      "nullable": true,
                      "description": "Cash flow statement segment breakdowns for this period.",
                      "properties": {
                        "capital_expenditure": {
                          "nullable": true,
                          "allOf": [{"$ref": "#/components/schemas/SegmentCategory"}]
                        }
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "IncomeStatement": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period of the income statement."
          },
          "fiscal_period": {
            "type": "string",
            "description": "The fiscal period of the income statement."
          },
          "period": {
            "type": "string",
            "enum": [
              "quarterly",
              "ttm",
              "annual"
            ],
            "description": "The time period of the income statement."
          },
          "currency": {
            "type": "string",
            "description": "The currency in which the financial data is reported."
          },
          "accession_number": {
            "type": "string",
            "nullable": true,
            "description": "The SEC accession number of the filing."
          },
          "filing_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "URL to the SEC filing."
          },
          "revenue": {
            "type": "number",
            "nullable": false,
            "description": "The total revenue of the company."
          },
          "cost_of_revenue": {
            "type": "number",
            "nullable": false,
            "description": "The cost of revenue of the company."
          },
          "gross_profit": {
            "type": "number",
            "nullable": false,
            "description": "The gross profit of the company."
          },
          "operating_expense": {
            "type": "number",
            "nullable": false,
            "description": "The operating expenses of the company."
          },
          "selling_general_and_administrative_expenses": {
            "type": "number",
            "nullable": false,
            "description": "The selling, general, and administrative expenses of the company."
          },
          "research_and_development": {
            "type": "number",
            "nullable": false,
            "description": "The research and development expenses of the company."
          },
          "operating_income": {
            "type": "number",
            "nullable": false,
            "description": "The operating income of the company."
          },
          "interest_expense": {
            "type": "number",
            "nullable": false,
            "description": "The interest expenses of the company."
          },
          "ebit": {
            "type": "number",
            "nullable": false,
            "description": "The earnings before interest and taxes of the company."
          },
          "income_tax_expense": {
            "type": "number",
            "nullable": false,
            "description": "The income tax expenses of the company."
          },
          "net_income_discontinued_operations": {
            "type": "number",
            "nullable": false,
            "description": "The net income from discontinued operations of the company."
          },
          "net_income_non_controlling_interests": {
            "type": "number",
            "nullable": false,
            "description": "The net income from non-controlling interests of the company."
          },
          "net_income": {
            "type": "number",
            "nullable": false,
            "description": "The net income of the company."
          },
          "net_income_common_stock": {
            "type": "number",
            "nullable": false,
            "description": "The net income available to common stockholders of the company."
          },
          "preferred_dividends_impact": {
            "type": "number",
            "nullable": false,
            "description": "The impact of preferred dividends on the net income of the company."
          },
          "consolidated_income": {
            "type": "number",
            "nullable": false,
            "description": "The consolidated income of the company."
          },
          "earnings_per_share": {
            "type": "number",
            "nullable": false,
            "description": "The earnings per share of the company."
          },
          "earnings_per_share_diluted": {
            "type": "number",
            "nullable": false,
            "description": "The diluted earnings per share of the company."
          },
          "dividends_per_common_share": {
            "type": "number",
            "nullable": false,
            "description": "The dividends per common share of the company."
          },
          "weighted_average_shares": {
            "type": "number",
            "nullable": false,
            "description": "The weighted average shares of the company."
          },
          "weighted_average_shares_diluted": {
            "type": "number",
            "nullable": false,
            "description": "The diluted weighted average shares of the company."
          }
        }
      },
      "BalanceSheet": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period of the balance sheet."
          },
          "fiscal_period": {
            "type": "string",
            "description": "The fiscal period of the balance sheet."
          },
          "period": {
            "type": "string",
            "enum": [
              "quarterly",
              "ttm",
              "annual"
            ],
            "description": "The time period of the balance sheet."
          },
          "currency": {
            "type": "string",
            "description": "The currency in which the financial data is reported."
          },
          "accession_number": {
            "type": "string",
            "nullable": true,
            "description": "The SEC accession number of the filing."
          },
          "filing_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "URL to the SEC filing."
          },
          "total_assets": {
            "type": "number",
            "nullable": false,
            "description": "The total assets of the company."
          },
          "current_assets": {
            "type": "number",
            "nullable": false,
            "description": "The current assets of the company."
          },
          "cash_and_equivalents": {
            "type": "number",
            "nullable": false,
            "description": "The cash and equivalents of the company."
          },
          "inventory": {
            "type": "number",
            "nullable": false,
            "description": "The inventory of the company."
          },
          "current_investments": {
            "type": "number",
            "nullable": false,
            "description": "The current investments of the company."
          },
          "trade_and_non_trade_receivables": {
            "type": "number",
            "nullable": false,
            "description": "The trade and non-trade receivables of the company."
          },
          "non_current_assets": {
            "type": "number",
            "nullable": false,
            "description": "The non-current assets of the company."
          },
          "property_plant_and_equipment": {
            "type": "number",
            "nullable": false,
            "description": "The property, plant, and equipment of the company."
          },
          "goodwill_and_intangible_assets": {
            "type": "number",
            "nullable": false,
            "description": "The goodwill and intangible assets of the company."
          },
          "investments": {
            "type": "number",
            "nullable": false,
            "description": "The investments of the company."
          },
          "non_current_investments": {
            "type": "number",
            "nullable": false,
            "description": "The non-current investments of the company."
          },
          "outstanding_shares": {
            "type": "number",
            "nullable": false,
            "description": "The outstanding shares of the company."
          },
          "tax_assets": {
            "type": "number",
            "nullable": false,
            "description": "The tax assets of the company."
          },
          "total_liabilities": {
            "type": "number",
            "nullable": false,
            "description": "The total liabilities of the company."
          },
          "current_liabilities": {
            "type": "number",
            "nullable": false,
            "description": "The current liabilities of the company."
          },
          "current_debt": {
            "type": "number",
            "nullable": false,
            "description": "The current debt of the company."
          },
          "trade_and_non_trade_payables": {
            "type": "number",
            "nullable": false,
            "description": "The trade and non-trade payables of the company."
          },
          "deferred_revenue": {
            "type": "number",
            "nullable": false,
            "description": "The deferred revenue of the company."
          },
          "deposit_liabilities": {
            "type": "number",
            "nullable": false,
            "description": "The deposit liabilities of the company."
          },
          "non_current_liabilities": {
            "type": "number",
            "nullable": false,
            "description": "The non-current liabilities of the company."
          },
          "non_current_debt": {
            "type": "number",
            "nullable": false,
            "description": "The non-current debt of the company."
          },
          "tax_liabilities": {
            "type": "number",
            "nullable": false,
            "description": "The tax liabilities of the company."
          },
          "shareholders_equity": {
            "type": "number",
            "nullable": false,
            "description": "The shareholders' equity of the company."
          },
          "retained_earnings": {
            "type": "number",
            "nullable": false,
            "description": "The retained earnings of the company."
          },
          "accumulated_other_comprehensive_income": {
            "type": "number",
            "nullable": false,
            "description": "The accumulated other comprehensive income of the company."
          },
          "total_debt": {
            "type": "number",
            "nullable": false,
            "description": "The total debt of the company."
          }
        }
      },
      "CashFlowStatement": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period of the cash flow statement."
          },
          "fiscal_period": {
            "type": "string",
            "description": "The fiscal period of the cash flow statement."
          },
          "period": {
            "type": "string",
            "enum": [
              "quarterly",
              "ttm",
              "annual"
            ],
            "description": "The time period of the cash flow statement."
          },
          "currency": {
            "type": "string",
            "description": "The currency in which the financial data is reported."
          },
          "accession_number": {
            "type": "string",
            "nullable": true,
            "description": "The SEC accession number of the filing."
          },
          "filing_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "URL to the SEC filing."
          },
          "net_income": {
            "type": "number",
            "nullable": false,
            "description": "The net income of the company."
          },
          "depreciation_and_amortization": {
            "type": "number",
            "nullable": false,
            "description": "The depreciation and amortization of the company."
          },
          "share_based_compensation": {
            "type": "number",
            "nullable": false,
            "description": "The share-based compensation of the company."
          },
          "net_cash_flow_from_operations": {
            "type": "number",
            "nullable": false,
            "description": "The net cash flow from operations of the company."
          },
          "capital_expenditure": {
            "type": "number",
            "nullable": false,
            "description": "The capital expenditure of the company."
          },
          "business_acquisitions_and_disposals": {
            "type": "number",
            "nullable": false,
            "description": "The business acquisitions and disposals of the company."
          },
          "investment_acquisitions_and_disposals": {
            "type": "number",
            "nullable": false,
            "description": "The investment acquisitions and disposals of the company."
          },
          "net_cash_flow_from_investing": {
            "type": "number",
            "nullable": false,
            "description": "The net cash flow from investing of the company."
          },
          "issuance_or_repayment_of_debt_securities": {
            "type": "number",
            "nullable": false,
            "description": "The issuance or repayment of debt securities of the company."
          },
          "issuance_or_purchase_of_equity_shares": {
            "type": "number",
            "nullable": false,
            "description": "The issuance or purchase of equity shares of the company."
          },
          "dividends_and_other_cash_distributions": {
            "type": "number",
            "nullable": false,
            "description": "The dividends and other cash distributions of the company."
          },
          "net_cash_flow_from_financing": {
            "type": "number",
            "nullable": false,
            "description": "The net cash flow from financing of the company."
          },
          "change_in_cash_and_equivalents": {
            "type": "number",
            "nullable": false,
            "description": "The change in cash and equivalents of the company."
          },
          "effect_of_exchange_rate_changes": {
            "type": "number",
            "nullable": false,
            "description": "The effect of exchange rate changes of the company."
          },
          "ending_cash_balance": {
            "type": "number",
            "nullable": false,
            "description": "The ending cash balance of the company."
          },
          "free_cash_flow": {
            "type": "number",
            "nullable": false,
            "description": "The free cash flow of the company."
          }
        }
      },
      "CompanyFacts": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol of the company."
          },
          "name": {
            "type": "string",
            "description": "The name of the company."
          },
          "cik": {
            "type": "string",
            "description": "The Central Index Key (CIK) of the company."
          },
          "industry": {
            "type": "string",
            "description": "The industry of the company."
          },
          "sector": {
            "type": "string",
            "description": "The sector of the company."
          },
          "category": {
            "type": "string",
            "description": "The category of the company."
          },
          "exchange": {
            "type": "string",
            "description": "The exchange of the company."
          },
          "is_active": {
            "type": "boolean",
            "description": "Whether the company is currently active."
          },
          "location": {
            "type": "string",
            "description": "The location of the company."
          },
          "sec_filings_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the company's SEC filings."
          },
          "sic_code": {
            "type": "string",
            "description": "The Standard Industrial Classification (SIC) code of the company."
          },
          "sic_industry": {
            "type": "string",
            "description": "The industry of the company based on the SIC code."
          },
          "sic_sector": {
            "type": "string",
            "description": "The sector of the company based on the SIC code."
          }
        }
      },
      "Filing": {
        "type": "object",
        "properties": {
          "cik": {
            "type": "integer",
            "description": "The Central Index Key (CIK) of the company."
          },
          "accession_number": {
            "type": "string",
            "description": "The accession number of the filing."
          },
          "filing_type": {
            "type": "string",
            "description": "The type of the SEC filing (e.g., 10-Q, 8-K)."
          },
          "report_date": {
            "type": "string",
            "format": "date",
            "description": "The date of the report."
          },
          "filing_date": {
            "type": "string",
            "format": "date",
            "description": "The date the filing was submitted to the SEC."
          },
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the SEC filing."
          }
        }
      },
      "FilingItem": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "The item number."
          },
          "name": {
            "type": "string",
            "description": "The item name."
          },
          "text": {
            "type": "string",
            "description": "The item text."
          },
          "exhibits": {
            "type": "array",
            "description": "An array of exhibits linked to this item. Only present for 8-K filings when exhibits exist.",
            "items": {
              "$ref": "#/components/schemas/Exhibit"
            }
          }
        }
      },
      "Exhibit": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "The exhibit number (e.g., '99.1')."
          },
          "description": {
            "type": "string",
            "description": "The description of the exhibit."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL to the exhibit document on the SEC website."
          },
          "text": {
            "type": "string",
            "description": "The raw text content of the exhibit. Only included when 'include_exhibits' parameter is set to true."
          }
        }
      },
      "PriceSnapshot": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number",
            "description": "The current price of the stock."
          },
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "day_change": {
            "type": "number",
            "description": "The price change since the previous trading day's close."
          },
          "day_change_percent": {
            "type": "number",
            "description": "The percentage price change since the previous trading day's close."
          },
          "time": {
            "type": "string",
            "description": "The timestamp of the price snapshot in human-readable format in UTC."
          },
          "time_milliseconds": {
            "type": "number",
            "description": "The timestamp of the price snapshot in milliseconds since epoch."
          }
        }
      },
      "CryptoPriceSnapshot": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number",
            "description": "The current price of the cryptocurrency."
          },
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "day_change": {
            "type": "number",
            "description": "The price change over the last 24 hours."
          },
          "day_change_percent": {
            "type": "number",
            "description": "The percentage price change over the last 24 hours."
          },
          "time": {
            "type": "string",
            "description": "The timestamp of the price snapshot in human-readable format in UTC."
          }
        }
      },
      "News": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol."
          },
          "title": {
            "type": "string",
            "description": "The title of the news article."
          },
          "source": {
            "type": "string",
            "description": "The source of the news article."
          },
          "date": {
            "type": "string",
            "format": "date",
            "description": "The date the news article was published."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the news article."
          }
        }
      },
      "Price": {
        "type": "object",
        "properties": {
          "open": {
            "type": "number",
            "description": "The open price of the ticker in the given time period."
          },
          "close": {
            "type": "number",
            "description": "The close price of the ticker in the given time period."
          },
          "high": {
            "type": "number",
            "description": "The high price of the ticker in the given time period."
          },
          "low": {
            "type": "number",
            "description": "The low price of the ticker in the given time period."
          },
          "volume": {
            "type": "integer",
            "nullable": true,
            "description": "The trading volume of the ticker in the given time period."
          },
          "time": {
            "type": "string",
            "description": "The human-readable time format of the price in UTC."
          }
        }
      },
      "FinancialMetricsResponse": {
        "type": "object",
        "properties": {
          "ticker": {
            "type": "string",
            "description": "The ticker symbol of the company."
          },
          "report_period": {
            "type": "string",
            "format": "date",
            "description": "The reporting period of the financial metrics."
          },
          "fiscal_period": {
            "type": "string",
            "description": "The fiscal period of the financial metrics."
          },
          "period": {
            "type": "string",
            "enum": [
              "quarterly",
              "ttm",
              "annual"
            ],
            "description": "The time period of the financial metrics."
          },
          "currency": {
            "type": "string",
            "description": "The currency in which the financial data is reported."
          },
          "accession_number": {
            "type": "string",
            "nullable": true,
            "description": "The SEC accession number of the filing."
          },
          "filing_url": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "description": "URL to the SEC filing."
          },
          "enterprise_value": {
            "type": "number",
            "description": "The total value of the company (market cap + debt - cash)."
          },
          "price_to_earnings_ratio": {
            "type": "number",
            "description": "Price to earnings ratio."
          },
          "price_to_book_ratio": {
            "type": "number",
            "description": "Price to book ratio."
          },
          "price_to_sales_ratio": {
            "type": "number",
            "description": "Price to sales ratio."
          },
          "enterprise_value_to_ebitda_ratio": {
            "type": "number",
            "description": "Enterprise value to EBITDA ratio."
          },
          "enterprise_value_to_revenue_ratio": {
            "type": "number",
            "description": "Enterprise value to revenue ratio."
          },
          "free_cash_flow_yield": {
            "type": "number",
            "description": "Free cash flow yield."
          },
          "peg_ratio": {
            "type": "number",
            "description": "Price to earnings growth ratio."
          },
          "gross_margin": {
            "type": "number",
            "description": "Gross profit as a percentage of revenue."
          },
          "operating_margin": {
            "type": "number",
            "description": "Operating income as a percentage of revenue."
          },
          "net_margin": {
            "type": "number",
            "description": "Net income as a percentage of revenue."
          },
          "return_on_equity": {
            "type": "number",
            "description": "Net income as a percentage of shareholders' equity."
          },
          "return_on_assets": {
            "type": "number",
            "description": "Net income as a percentage of total assets."
          },
          "return_on_invested_capital": {
            "type": "number",
            "description": "Net operating profit after taxes as a percentage of invested capital."
          },
          "asset_turnover": {
            "type": "number",
            "description": "Revenue divided by average total assets."
          },
          "inventory_turnover": {
            "type": "number",
            "description": "Cost of goods sold divided by average inventory."
          },
          "receivables_turnover": {
            "type": "number",
            "description": "Revenue divided by average accounts receivable."
          },
          "days_sales_outstanding": {
            "type": "number",
            "description": "Average accounts receivable divided by revenue over the period."
          },
          "operating_cycle": {
            "type": "number",
            "description": "Inventory turnover + receivables turnover."
          },
          "working_capital_turnover": {
            "type": "number",
            "description": "Revenue divided by average working capital."
          },
          "current_ratio": {
            "type": "number",
            "description": "Current assets divided by current liabilities."
          },
          "quick_ratio": {
            "type": "number",
            "description": "Quick assets divided by current liabilities."
          },
          "cash_ratio": {
            "type": "number",
            "description": "Cash and cash equivalents divided by current liabilities."
          },
          "operating_cash_flow_ratio": {
            "type": "number",
            "description": "Operating cash flow divided by current liabilities."
          },
          "debt_to_equity": {
            "type": "number",
            "description": "Total debt divided by shareholders' equity."
          },
          "debt_to_assets": {
            "type": "number",
            "description": "Total debt divided by total assets."
          },
          "interest_coverage": {
            "type": "number",
            "description": "EBIT divided by interest expense."
          },
          "revenue_growth": {
            "type": "number",
            "description": "Year-over-year growth in revenue."
          },
          "earnings_growth": {
            "type": "number",
            "description": "Year-over-year growth in earnings."
          },
          "book_value_growth": {
            "type": "number",
            "description": "Year-over-year growth in book value."
          },
          "earnings_per_share_growth": {
            "type": "number",
            "description": "Growth in earnings per share over the period."
          },
          "free_cash_flow_growth": {
            "type": "number",
            "description": "Growth in free cash flow over the period."
          },
          "operating_income_growth": {
            "type": "number",
            "description": "Growth in operating income over the period."
          },
          "ebitda_growth": {
            "type": "number",
            "description": "Growth in EBITDA over the period."
          },
          "payout_ratio": {
            "type": "number",
            "description": "Dividends paid as a percentage of net income."
          },
          "earnings_per_share": {
            "type": "number",
            "description": "Net income divided by weighted average shares outstanding."
          },
          "book_value_per_share": {
            "type": "number",
            "description": "Shareholders' equity divided by shares outstanding."
          },
          "free_cash_flow_per_share": {
            "type": "number",
            "description": "Free cash flow divided by shares outstanding."
          }
        }
      },
      "InterestRate": {
        "type": "object",
        "properties": {
          "bank": {
            "type": "string",
            "description": "The symbol of the central bank."
          },
          "name": {
            "type": "string",
            "description": "The name of the central bank."
          },
          "rate": {
            "type": "number",
            "description": "The interest rate of the central bank."
          },
          "date": {
            "type": "string",
            "description": "The date of the interest rate in YYYY-MM-DD format."
          }
        }
      },
      "KPIMetricsResponse": {
        "type": "object",
        "properties": {
          "kpi_metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KPIMetric"
            }
          }
        }
      },
      "KPIMetric": {
        "type": "object",
        "required": [
          "ticker",
          "metric_name",
          "value",
          "unit",
          "period",
          "period_type"
        ],
        "properties": {
          "ticker": {
            "type": "string",
            "description": "Stock ticker symbol.",
            "example": "DAL"
          },
          "metric_name": {
            "type": "string",
            "description": "Canonical metric name.",
            "example": "load_factor"
          },
          "value": {
            "type": "number",
            "nullable": true,
            "description": "Extracted numeric value.",
            "example": 82.0
          },
          "unit": {
            "type": "string",
            "description": "Unit of measure (e.g., %, cents, dollars, miles, count).",
            "example": "%"
          },
          "period": {
            "type": "string",
            "description": "Reporting period (e.g., Q4 2025, FY 2025, or a date like 2025-04-30 for non-standard fiscal years).",
            "example": "Q4 2025"
          },
          "period_type": {
            "type": "string",
            "enum": [
              "quarterly",
              "annual"
            ],
            "description": "Whether this is a quarterly or annual figure.",
            "example": "quarterly"
          },
          "segment": {
            "type": "string",
            "nullable": true,
            "description": "Business segment, geography, or sub-category. Only present when the metric is reported for a sub-unit rather than the consolidated entity.",
            "example": "Commercial Engines & Services"
          },
          "yoy_value": {
            "type": "number",
            "nullable": true,
            "description": "Year-over-year comparison value from the prior period.",
            "example": 84.0
          },
          "yoy_change_pct": {
            "type": "number",
            "nullable": true,
            "description": "Year-over-year percentage change.",
            "example": -2.381
          },
          "source_text": {
            "type": "string",
            "nullable": true,
            "description": "The source text span from the filing where this value was found.",
            "example": "Passenger load factor"
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "description": "Direct link to the SEC filing. When available, includes a text fragment that highlights the source in the browser.",
            "example": "https://www.sec.gov/Archives/edgar/data/27904/000002790426000008/deltaairlinesannouncesdece.htm"
          }
        }
      },
      "KPIGuidanceResponse": {
        "type": "object",
        "properties": {
          "kpi_guidance": {
            "type": "array",
            "items": {"$ref": "#/components/schemas/KPIGuidanceItem"}
          }
        }
      },
      "KPIGuidanceItem": {
        "type": "object",
        "required": ["ticker", "metric_name", "period", "period_type"],
        "properties": {
          "ticker": {"type": "string", "example": "DAL"},
          "metric_name": {"type": "string", "example": "Operating Margin"},
          "value": {"type": "number", "nullable": true},
          "unit": {"type": "string", "example": "%"},
          "period": {"type": "string", "example": "Q2 2026"},
          "period_type": {"type": "string", "enum": ["quarterly", "annual"]},
          "segment": {"type": "string", "nullable": true},
          "low": {"type": "number", "nullable": true, "description": "Low end of guidance range.", "example": 6.0},
          "high": {"type": "number", "nullable": true, "description": "High end of guidance range.", "example": 8.0},
          "point_estimate": {"type": "number", "nullable": true, "description": "Single-point guidance when no range is given."},
          "prior_value": {"type": "number", "nullable": true, "description": "Prior guidance value for revisions."},
          "raw_text": {"type": "string", "nullable": true, "description": "Original guidance text from the filing."},
          "change_direction": {"type": "string", "nullable": true, "description": "Direction: raised, lowered, maintained, initiated, withdrawn.", "example": "initiated"},
          "source_text": {"type": "string", "nullable": true},
          "source_url": {"type": "string", "format": "uri", "nullable": true}
        }
      },
      "KPINonGAAPResponse": {
        "type": "object",
        "properties": {
          "kpi_non_gaap": {
            "type": "array",
            "items": {"$ref": "#/components/schemas/KPINonGAAPMetric"}
          }
        }
      },
      "KPINonGAAPMetric": {
        "type": "object",
        "required": ["ticker", "metric_name", "value", "unit", "period", "period_type"],
        "properties": {
          "ticker": {"type": "string", "example": "DAL"},
          "metric_name": {"type": "string", "example": "Adjusted Diluted EPS"},
          "value": {"type": "number", "nullable": true, "example": 0.64},
          "unit": {"type": "string", "example": "USD per share"},
          "period": {"type": "string", "example": "Q1 2026"},
          "period_type": {"type": "string", "enum": ["quarterly", "annual"]},
          "gaap_equivalent": {"type": "string", "nullable": true, "description": "The GAAP line item this metric adjusts.", "example": "Diluted earnings per share"},
          "key_adjustments": {"type": "string", "nullable": true, "description": "Description of adjustments made.", "example": "Excludes restructuring charges of $150M"},
          "source_text": {"type": "string", "nullable": true},
          "source_url": {"type": "string", "format": "uri", "nullable": true}
        }
      }
    },
    "responses": {
      "BadRequestError": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "Bad Request",
              "message": "Invalid request parameters"
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "Unauthorized",
              "message": "Invalid API key provided"
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The specified resource was not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "Not Found",
              "message": "Ticker XXXX not found"
            }
          }
        }
      },
      "PaymentRequiredError": {
        "description": "The request requires a paid subscription",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "Payment Required",
              "message": "This endpoint requires a paid subscription. Please upgrade your plan."
            }
          }
        }
      }
    }
  }
}