{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "description": "API key as a Bearer token. Generate one in your dashboard.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "",
    "title": "Prixe API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/board_members": {
      "post": {
        "description": "Get board members and company officers for a stock ticker. Returns all board members with their compensation data. Use ai_summary=true to generate AI biographical summaries sourced from SEC DEF 14A proxy statements. Summaries are only included for officers found in the proxy filing. Requires Pro+ subscription.",
        "operationId": "post_board_members",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ai_summary": {
                    "default": false,
                    "description": "If true, generates AI biographical summaries for board members found in the company's SEC DEF 14A proxy statement. Summaries cover the person's role, career history, education, and board memberships. Officers not found in the proxy filing will not have a summary field.",
                    "example": true,
                    "type": "boolean"
                  },
                  "ticker": {
                    "description": "The stock ticker symbol to retrieve board members for.",
                    "example": "TSLA",
                    "type": "string"
                  }
                },
                "required": [
                  "ticker"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "board_members": {
                      "description": "Board members and company officers data",
                      "properties": {
                        "count": {
                          "description": "Number of board members/officers returned",
                          "type": "integer"
                        },
                        "data": {
                          "description": "Array of board member/officer records",
                          "items": {
                            "properties": {
                              "age": {
                                "description": "Age of the person",
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "exercisedValue": {
                                "description": "Value of exercised stock options",
                                "type": "number"
                              },
                              "fiscalYear": {
                                "description": "Fiscal year for compensation data",
                                "type": "integer"
                              },
                              "name": {
                                "description": "Name of the board member/officer",
                                "type": "string"
                              },
                              "summary": {
                                "description": "AI-generated biographical summary sourced from SEC DEF 14A proxy statement. Only present when ai_summary=true and the officer was found in the proxy filing.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "description": "Title/position of the person (e.g., 'Chief Executive Officer', 'Director')",
                                "type": "string"
                              },
                              "totalPay": {
                                "description": "Total compensation paid",
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "unexercisedValue": {
                                "description": "Value of unexercised stock options",
                                "type": "number"
                              },
                              "yearBorn": {
                                "description": "Year the person was born",
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "company_name": {
                      "description": "The full name of the company.",
                      "type": "string"
                    },
                    "success": {
                      "description": "Indicates if the request was successfully processed.",
                      "type": "boolean"
                    },
                    "ticker": {
                      "description": "The stock ticker symbol.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Board Members & Company Officers"
      }
    },
    "/api/forms": {
      "get": {
        "description": "Get a list of available SEC form types for a stock ticker. Returns unique form types with filing counts within a specific year or all time. Only returns supported form types (see POST /api/forms for the full list). Useful for discovering what SEC filings are available before requesting specific form data. Requires Pro+ subscription.",
        "operationId": "get_forms_get",
        "parameters": [
          {
            "description": "The stock ticker symbol to retrieve available forms for.",
            "in": "query",
            "name": "ticker",
            "required": true,
            "schema": {
              "description": "The stock ticker symbol to retrieve available forms for.",
              "example": "TSLA",
              "type": "string"
            }
          },
          {
            "description": "Optional year to filter forms by filing_date (last 6 years only). If not provided, returns all available forms. Note: This filters by when the form was filed with the SEC, not the fiscal period it covers.",
            "in": "query",
            "name": "year",
            "required": false,
            "schema": {
              "description": "Optional year to filter forms by filing_date (last 6 years only). If not provided, returns all available forms. Note: This filters by when the form was filed with the SEC, not the fiscal period it covers.",
              "example": 2024,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "company_name": {
                      "description": "The full name of the company from SEC EDGAR.",
                      "type": "string"
                    },
                    "filing_date_range": {
                      "description": "The date range of filings found.",
                      "properties": {
                        "end": {
                          "description": "Latest filing date (YYYY-MM-DD format)",
                          "type": "string"
                        },
                        "start": {
                          "description": "Earliest filing date (YYYY-MM-DD format)",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "forms": {
                      "description": "Array of available form types with counts",
                      "items": {
                        "properties": {
                          "count": {
                            "description": "Number of filings of this form type",
                            "type": "integer"
                          },
                          "filing_dates": {
                            "description": "List of filing_date values (when filed with SEC) for each filing of this form type. Length matches 'count'.",
                            "items": {
                              "type": "string"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "form": {
                            "description": "The SEC form type (e.g., '10-K', '8-K', '4')",
                            "type": "string"
                          },
                          "report_dates": {
                            "description": "List of period_of_report dates (fiscal periods covered) for each filing of this form type. Length matches 'count'. For example, a 10-K filed in 2024 might have report_date 2023-12-31.",
                            "items": {
                              "type": "string"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "note": {
                      "description": "Explanation that the year parameter and filing_date_range filter by filing_date. Each form includes both filing_dates and report_dates.",
                      "type": "string"
                    },
                    "success": {
                      "description": "Indicates if the request was successfully processed.",
                      "type": "boolean"
                    },
                    "ticker": {
                      "description": "The stock ticker symbol.",
                      "type": "string"
                    },
                    "total_filings": {
                      "description": "Total number of filings across all form types.",
                      "type": "integer"
                    },
                    "total_form_types": {
                      "description": "Total number of unique form types found.",
                      "type": "integer"
                    },
                    "year": {
                      "description": "The year for which forms were retrieved (by filing_date). Only present if year was provided.",
                      "type": [
                        "integer",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Available SEC Forms"
      },
      "post": {
        "description": "Get SEC filing data for a stock ticker. Returns filings within a date range (last 6 years) from SEC EDGAR. Use year for full year, or specify start_date/end_date for custom ranges. Filters by filing_date (when filed with SEC). Each filing includes both filing_date and period_of_report so you can see the fiscal period covered. Requires Pro+ subscription.",
        "operationId": "post_forms_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "ai_summary": {
                    "default": false,
                    "description": "If true, generates a title and 3-4 sentence AI summary for each filing.",
                    "example": true,
                    "type": "boolean"
                  },
                  "end_date": {
                    "description": "End date for filtering filings by filing_date (YYYY-MM-DD format). Defaults to December 31st of the year if not provided.",
                    "example": "2024-12-31",
                    "type": "string"
                  },
                  "form": {
                    "description": "The SEC form type to retrieve. See 'supported_forms' field for the complete list of supported form types. Categories include: Annual/Quarterly Reports (10-K, 10-Q), Insider Transactions (3, 4, 5), Institutional Holdings (13F-HR), Current Reports (8-K), Prospectuses (424B2-8), Tender Offers (SC TO-C/I/T), and more.",
                    "example": "10-K",
                    "type": "string"
                  },
                  "limit": {
                    "default": 10,
                    "description": "Maximum number of filings to return per request. Defaults to 10, maximum is 100.",
                    "example": 10,
                    "type": "integer"
                  },
                  "offset": {
                    "default": 0,
                    "description": "Number of filings to skip for pagination. Defaults to 0.",
                    "example": 0,
                    "type": "integer"
                  },
                  "start_date": {
                    "description": "Start date for filtering filings by filing_date (YYYY-MM-DD format). Defaults to January 1st of the year if not provided.",
                    "example": "2024-01-01",
                    "type": "string"
                  },
                  "ticker": {
                    "description": "The stock ticker symbol to retrieve SEC filings for.",
                    "example": "MSFT",
                    "type": "string"
                  },
                  "year": {
                    "description": "The year to retrieve filings for (last 6 years only). Used as default date range if start_date/end_date not provided.",
                    "example": 2024,
                    "type": "integer"
                  }
                },
                "required": [
                  "form",
                  "ticker",
                  "year"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "company_name": {
                      "description": "The full name of the company from SEC EDGAR.",
                      "type": "string"
                    },
                    "filing_date_range": {
                      "description": "The date range used to filter filings by filing_date.",
                      "properties": {
                        "end": {
                          "description": "End date of the period (YYYY-MM-DD format)",
                          "type": "string"
                        },
                        "start": {
                          "description": "Start date of the period (YYYY-MM-DD format)",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "filings": {
                      "description": "SEC filings data",
                      "properties": {
                        "count": {
                          "description": "Number of filings",
                          "type": "integer"
                        },
                        "data": {
                          "description": "Array of filing records",
                          "items": {
                            "properties": {
                              "accession_number": {
                                "description": "SEC accession number for the filing",
                                "type": "string"
                              },
                              "ai_summary": {
                                "description": "AI-generated summary (only if ai_summary=true)",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "ai_title": {
                                "description": "AI-generated short title (only if ai_summary=true)",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "attachments": {
                                "description": "List of attachments with document name, description, and type",
                                "items": {},
                                "type": [
                                  "array",
                                  "null"
                                ]
                              },
                              "description": {
                                "description": "Description of the filing",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "filing_date": {
                                "description": "Date the form was filed with SEC (ISO format). This is what the 'year' parameter filters on.",
                                "type": "string"
                              },
                              "financials": {
                                "description": "For 10-K/10-Q filings, XBRL financial statements (income_statement, balance_sheet, cash_flow_statement, statement_of_equity, comprehensive_income)",
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "form": {
                                "description": "The SEC form type",
                                "type": "string"
                              },
                              "holdings": {
                                "description": "For 13F-HR filings, array of institutional holdings",
                                "items": {},
                                "type": [
                                  "array",
                                  "null"
                                ]
                              },
                              "items": {
                                "description": "For 8-K filings, the item numbers reported",
                                "items": {},
                                "type": [
                                  "array",
                                  "null"
                                ]
                              },
                              "period_of_report": {
                                "description": "The fiscal period the filing covers (ISO format). For example, a 10-K filed 2024-02-15 might have period_of_report 2023-12-31. Also known as 'report_date' in some contexts.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "text_content": {
                                "description": "For text-only forms (CORRESP, 425, etc.), the extracted text content (limited to 50000 characters)",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "text_truncated": {
                                "description": "True if the text_content was truncated due to length",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "transactions": {
                                "description": "For Form 4/3/5 filings, array of insider transactions",
                                "items": {},
                                "type": [
                                  "array",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "filings_processed": {
                      "description": "Number of filings processed.",
                      "type": "integer"
                    },
                    "form_type": {
                      "description": "The SEC form type requested.",
                      "type": "string"
                    },
                    "pagination": {
                      "description": "Pagination information for the results.",
                      "properties": {
                        "has_more": {
                          "description": "Whether there are more filings available",
                          "type": "boolean"
                        },
                        "limit": {
                          "description": "Maximum filings per page (default 10, max 100)",
                          "type": "integer"
                        },
                        "offset": {
                          "description": "Number of filings skipped",
                          "type": "integer"
                        },
                        "returned": {
                          "description": "Number of filings returned in this response",
                          "type": "integer"
                        },
                        "total": {
                          "description": "Total number of filings matching the query",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "description": "Indicates if the request was successfully processed.",
                      "type": "boolean"
                    },
                    "ticker": {
                      "description": "The stock ticker symbol.",
                      "type": "string"
                    },
                    "year": {
                      "description": "The year used for the query.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Unauthorized"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "SEC Form Data"
      }
    },
    "/api/last_sold": {
      "post": {
        "description": "Get the last sold price data for a specified stock ticker including bid/ask prices, volume, and other market data",
        "operationId": "post_last_sold",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "ticker": "TSLA"
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional URL to which the API response will be forwarded as a webhook",
                    "example": "https://your-server.com/webhooks/price-callback",
                    "type": "string"
                  },
                  "ticker": {
                    "description": "The stock ticker symbol (e.g., AAPL, MSFT, GOOGL)",
                    "example": "W",
                    "type": "string"
                  }
                },
                "required": [
                  "ticker"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "lastSalePrice": "$58.79",
                  "lastTradeTimestamp": "Jul 10, 2025 6:48 PM ET",
                  "ticker": "W"
                },
                "schema": {
                  "properties": {
                    "lastSalePrice": {
                      "description": "Price of the last executed trade with currency symbol",
                      "type": "string"
                    },
                    "lastTradeTimestamp": {
                      "description": "Timestamp of the last trade",
                      "type": "string"
                    },
                    "ticker": {
                      "description": "Stock ticker symbol",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Missing required parameter: ticker"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Last Sold Price"
      }
    },
    "/api/news": {
      "post": {
        "description": "Fetches news data based on a search text. This endpoint communicates with a separate service to perform the action and retrieve news articles. \n\n Please note: Non cached responses can take up to 10 seconds as we are fetching the news in real time.",
        "operationId": "post_news",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "ticker": "TSLA"
              },
              "schema": {
                "properties": {
                  "ai_summary": {
                    "default": false,
                    "description": "If true, generates a 3-4 sentence AI summary for each article.",
                    "example": true,
                    "type": "boolean"
                  },
                  "callback_url": {
                    "description": "Optional URL to which the API response will be forwarded as a webhook",
                    "example": "https://your-server.com/webhooks/news-callback",
                    "type": "string"
                  },
                  "published_date": {
                    "default": false,
                    "description": "If true, attempts to extract the published date and time for each article. Dates are extracted from article metadata and may not always be available or accurate. We recommend verifying dates independently for time-sensitive use cases.",
                    "example": true,
                    "type": "boolean"
                  },
                  "ticker": {
                    "description": "The ticker to use for fetching news data. Must be a valid ticker from the SEC list.",
                    "example": "TSLA",
                    "type": "string"
                  }
                },
                "required": [
                  "ticker"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "news_data": {
                    "count": 2,
                    "data": [
                      {
                        "body": "The big driver for Q3 deliveries is the Sept. 30 expiration of the $7,500 U.S. tax credit, pulling forward demand. Buyers can take delivery later and still get the EV tax credit as long as they make a firm order by Sept. 30 with at least a nominal payment......",
                        "title": "Tesla Deliveries Due, But This Is The Big News For TSLA Bulls",
                        "url": "https://www.investors.com/news/tesla-deliveries-due-fsd-v14-tsla-bulls/"
                      },
                      {
                        "body": "It seems to me that fewer and fewer people realize that Tesla (NASDAQ:TSLA) is still primarily a car manufacturer. Sales in Q2 2025 fell by 12% YoY, and CEO Elon Musk himself spoke of a few tough quarters ahead. Two months have passed, and something has changed, so suddenly the next few quarters are looking bright? I don't think so. The company is still not in a position to justify its premium valuation multiples.",
                        "title": "Tesla Board Prints Billions In Pay As Musk Buys $1B, And I'm Shorting The Signal",
                        "url": "https://seekingalpha.com/article/4826258-tesla-board-prints-billions-in-pay-as-musk-buys-1b-and-im-shorting-the-signal"
                      }
                    ],
                    "status": "success",
                    "ticker": "TSLA"
                  },
                  "success": true
                },
                "schema": {
                  "properties": {
                    "news_data": {
                      "description": "The news data retrieved for the search term.",
                      "properties": {
                        "count": {
                          "description": "Number of news articles found",
                          "type": "integer"
                        },
                        "data": {
                          "description": "Array of news articles",
                          "items": {
                            "properties": {
                              "body": {
                                "description": "Article content/excerpt",
                                "type": "string"
                              },
                              "published_date": {
                                "description": "ISO 8601 published date/time of the article (only if published_date=true). Extracted from article metadata using best-effort methods. May not always be available or accurate \u2014 verify independently for time-sensitive use cases.",
                                "example": "2026-04-04T18:27:41+00:00",
                                "type": "string"
                              },
                              "summary": {
                                "description": "AI-generated summary of the article (only if ai_summary=true)",
                                "type": "string"
                              },
                              "title": {
                                "description": "The article title",
                                "type": "string"
                              },
                              "url": {
                                "description": "URL to the full article",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "status": {
                          "description": "Status of the news fetch operation",
                          "type": "string"
                        },
                        "ticker": {
                          "description": "The search term used",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "description": "Indicates if the request was successfully processed.",
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Failed to communicate with external service"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Fetch News"
      }
    },
    "/api/politicians": {
      "post": {
        "description": "Returns U.S. Congressional stock transactions (purchases and sales) \u2014 both U.S. House (parsed from Periodic Transaction Report PDFs on https://disclosures-clerk.house.gov) and U.S. Senate (parsed from electronic PTR filings on https://efdsearch.senate.gov). When `chamber` is omitted, both are returned. Amounts are disclosed as ranges \u2014 the response includes the raw range string plus parsed min/max. Supports filtering by ticker, politician name, chamber, transaction type, and date range. Note: Senate paper-format PTRs (~11-13% of Senate filings) are scanned image scans and are skipped \u2014 they contribute zero transactions. **Requires Pro+ subscription.**",
        "operationId": "post_politicians",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 10,
                "ticker": "AAPL",
                "transaction_type": "purchase",
                "year": 2024
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional URL to forward the response to as a webhook.",
                    "type": "string"
                  },
                  "chamber": {
                    "description": "Filter by chamber: 'house' or 'senate'. When omitted, both are returned.",
                    "example": "senate",
                    "type": "string"
                  },
                  "description": {
                    "description": "When true, include the filer's free-text DESCRIPTION for each transaction (e.g. 'Advisor-driven quarterly rebalancing', 'Exercised 50 call options...'). Off by default because descriptions can be long multi-sentence notes and most callers don't need them. Many filings have empty descriptions \u2014 the field will be null for those.",
                    "example": true,
                    "type": "boolean"
                  },
                  "end_date": {
                    "description": "Inclusive transaction-date upper bound (YYYY-MM-DD).",
                    "example": "2024-12-31",
                    "type": "string"
                  },
                  "limit": {
                    "description": "Max transactions per response (default 50, max 500).",
                    "example": 50,
                    "type": "integer"
                  },
                  "offset": {
                    "description": "Pagination offset (default 0).",
                    "example": 0,
                    "type": "integer"
                  },
                  "politician": {
                    "description": "Accepts either an exact politician_slug from /api/politicians/list (e.g. 'hon_nancy_pelosi') or a case-insensitive substring of the full name (e.g. 'pelosi').",
                    "example": "hon_nancy_pelosi",
                    "type": "string"
                  },
                  "start_date": {
                    "description": "Inclusive transaction-date lower bound (YYYY-MM-DD).",
                    "example": "2024-01-01",
                    "type": "string"
                  },
                  "state": {
                    "description": "Filter by 2-letter US state postal code (e.g. 'CA', 'NY', 'DC', 'PR'). 400 on invalid codes. Case-insensitive. Note: state metadata is only available for House transactions, so applying this filter implicitly excludes all Senate rows.",
                    "example": "CA",
                    "type": "string"
                  },
                  "ticker": {
                    "description": "Filter to a single ticker symbol.",
                    "example": "AAPL",
                    "type": "string"
                  },
                  "transaction_type": {
                    "description": "'purchase', 'sale', or 'all' (default 'all'). 'sale' includes partial sales.",
                    "example": "purchase",
                    "type": "string"
                  },
                  "year": {
                    "description": "Disclosure year (defaults to current year). Valid range: 2008 to current year.",
                    "example": 2024,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "count": 1,
                  "success": true,
                  "total": 1,
                  "transactions": [
                    {
                      "amount_max": 15000,
                      "amount_min": 1001,
                      "amount_range": "$1,001 - $15,000",
                      "asset_name": "Apple Inc.",
                      "asset_type": "ST",
                      "chamber": "house",
                      "filing_date": "04/01/2024",
                      "filing_doc_id": "20020938",
                      "politician": "Hon. Jane Smith",
                      "state_district": "CA12",
                      "ticker": "AAPL",
                      "transaction_date": "03/15/2024",
                      "transaction_type": "purchase"
                    }
                  ],
                  "year": 2024
                },
                "schema": {
                  "properties": {
                    "chambers_missing": {
                      "description": "Chambers that were requested but didn't return data \u2014 typically still scraping, locked, or temporarily unavailable. Retry shortly to pick them up.",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_requested": {
                      "description": "Chambers the request asked for (derived from the `chamber` filter; defaults to both house and senate when omitted).",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_returned": {
                      "description": "Chambers that successfully returned data for this request.",
                      "items": {},
                      "type": "array"
                    },
                    "count": {
                      "description": "Number of transactions in this page.",
                      "type": "integer"
                    },
                    "partial": {
                      "description": "True when the caller asked for multiple chambers but only some answered. When true, the response is a partial view; chambers_missing names the chambers to retry.",
                      "type": "boolean"
                    },
                    "total": {
                      "description": "Total matching transactions across all pages.",
                      "type": "integer"
                    },
                    "transactions": {
                      "description": "Array of transaction objects with politician, ticker, transaction_type ('purchase' | 'sale' | 'sale_partial' | 'exchange'), transaction_date, amount_range, amount_min, amount_max, and filing metadata. Each object also carries a `description` field (filer's free-text note) when the request sets `description: true`.",
                      "items": {},
                      "type": "array"
                    },
                    "year": {
                      "description": "Disclosure year covered by the response.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Data not ready"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Congressional Stock Transactions"
      }
    },
    "/api/politicians/executive_disclosures": {
      "post": {
        "description": "Returns OGE Form 278e annual public financial disclosures for senior White House personnel. Source: https://www.whitehouse.gov/disclosures/ \u2014 only programmatically-downloadable executive-branch 278e filings (cabinet officials and other agencies require Form 201 mail-request and are out of scope). Each disclosure has up to 9 schedules: positions held, employment assets & income, employment agreements, compensation sources >$5,000, spouse's employment assets, other assets and income, transactions, liabilities, and gifts/travel reimbursements. Each schedule row carries a parse_quality field ('ok' / 'partial') so callers can filter low-confidence rows. Most filings are 'New Entrant Report' for newly-appointed staff; 'Annual' reports surface holdings as of Dec 31. Trump and Vance use a presidential annual layout the standard parser can't decompose \u2014 those two filers are auto-OCR'd via AWS Textract (cached after the first scrape). When even Textract can't structure the form, parse_status='layout_unsupported' and pdf_url is returned so callers can render the original PDF directly. **Requires Pro+ subscription.**",
        "operationId": "post_executive_disclosures",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 10,
                "ticker": "TSLA"
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional URL to forward the response to as a webhook.",
                    "type": "string"
                  },
                  "limit": {
                    "description": "Max filings per response (default 50, max 500).",
                    "example": 50,
                    "type": "integer"
                  },
                  "offset": {
                    "description": "Pagination offset (default 0).",
                    "example": 0,
                    "type": "integer"
                  },
                  "politician": {
                    "description": "Accepts either an exact filer_slug (e.g. 'president_donald_j_trump', 'vice_president_jd_vance', 'wiles_susie') OR a case-insensitive substring of the full filer name (e.g. 'trump', 'Vance', 'Sacks'). When set, the upstream scrape is narrowed to just the matching filer so requests don't wait on the full ~258-PDF scrape. Same matching pattern as the politician param on /api/politicians/holdings.",
                    "example": "president_donald_j_trump",
                    "type": "string"
                  },
                  "report_type": {
                    "description": "Filter by report type: 'Annual Report', 'New Entrant Report', 'Termination Report', or 'Annual/Final Report'.",
                    "example": "New Entrant Report",
                    "type": "string"
                  },
                  "ticker": {
                    "description": "Filter to filers who hold this ticker in any of their asset schedules. Tickers are extracted from parenthesized symbols like 'Apple Inc. (AAPL)' in the filing.",
                    "example": "TSLA",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "count": 1,
                  "filings": [
                    {
                      "filer_name": "Adolphsen, Samuel",
                      "filer_slug": "adolphsen_samuel",
                      "header": {
                        "appointment_type": "Non-Career",
                        "date_of_appointment": "01/2025",
                        "filer_information": {
                          "name_line": "Adolphsen, Samuel",
                          "position_line": "Deputy Assistant to the President for Domestic Policy"
                        },
                        "report_type": "New Entrant Report"
                      },
                      "parse_status": "ok",
                      "pdf_url": "https://www.whitehouse.gov/wp-content/uploads/2025/06/Adolphsen-Samuel.pdf",
                      "schedules": {
                        "other_assets": [
                          {
                            "description": "Tesla, Inc. (TSLA)",
                            "eif": "N/A",
                            "income_amount": "$1,001 - $2,500",
                            "parse_quality": "ok",
                            "row": "1.6",
                            "schedule": "other_assets",
                            "ticker": "TSLA",
                            "value": "$1,001 - $15,000"
                          }
                        ],
                        "positions": [
                          {
                            "description": "The Foundation for Government Accountability Naples, Florida Non-Profit Vice President",
                            "from": "8/2018",
                            "parse_quality": "ok",
                            "row": 1,
                            "to": "1/2025"
                          }
                        ]
                      },
                      "tickers": [
                        "AAPL",
                        "MSFT",
                        "SPY",
                        "TSLA"
                      ],
                      "upload_year": 2025
                    }
                  ],
                  "success": true,
                  "total": 1
                },
                "schema": {
                  "properties": {
                    "count": {
                      "description": "Number of filings in this page.",
                      "type": "integer"
                    },
                    "filings": {
                      "description": "Array of filing objects. Each filing includes filer_name, filer_slug, pdf_url, upload_year, parse_status ('ok' / 'layout_unsupported' / 'scanned_no_text' / 'download_failed'), header (report_type / annual_year / dates / appointment_type / filer_information), tickers (sorted unique list extracted from asset schedules), and schedules (positions, employment_assets, employment_agreements, compensation_sources, spouse_employment_assets, other_assets, transactions, liabilities, gifts_travel). Each schedule row carries `parse_quality: 'ok' | 'partial'` \u2014 'partial' means structured fields like value/amount/date weren't recovered (description is still present). Trump and Vice President annual reports surface with parse_status='layout_unsupported' \u2014 render the pdf_url directly for those.",
                      "items": {},
                      "type": "array"
                    },
                    "total": {
                      "description": "Total filings matching the filter across all pages.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Data temporarily unavailable"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Executive Branch Disclosures"
      }
    },
    "/api/politicians/holdings": {
      "post": {
        "description": "Returns per-ticker NET DISCLOSED TRADING ACTIVITY for a specific politician (House or Senate) in the requested year/range \u2014 computed as purchases minus sales using the midpoint of each disclosed amount range. This is NOT a current portfolio balance: PTRs disclose dollar ranges and we do not ingest Annual FD asset schedules, so starting positions are unknown. Response sets `is_true_holding: false` for clarity. **Requires Pro+ subscription.**",
        "operationId": "post_holdings",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 50,
                "politician": "Pelosi",
                "year": 2024
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional webhook URL.",
                    "type": "string"
                  },
                  "end_date": {
                    "description": "Transaction-date upper bound (YYYY-MM-DD).",
                    "type": "string"
                  },
                  "limit": {
                    "description": "Max activity rows per response (default 50, max 500).",
                    "example": 50,
                    "type": "integer"
                  },
                  "offset": {
                    "description": "Pagination offset (default 0).",
                    "example": 0,
                    "type": "integer"
                  },
                  "politician": {
                    "description": "Accepts either an exact politician_slug from /api/politicians/list (e.g. 'hon_nancy_pelosi') or a case-insensitive substring of the full name (e.g. 'pelosi').",
                    "example": "hon_nancy_pelosi",
                    "type": "string"
                  },
                  "start_date": {
                    "description": "Transaction-date lower bound (YYYY-MM-DD).",
                    "type": "string"
                  },
                  "ticker": {
                    "description": "Restrict output to a single ticker.",
                    "type": "string"
                  },
                  "year": {
                    "description": "Disclosure year (default current year).",
                    "example": 2024,
                    "type": "integer"
                  }
                },
                "required": [
                  "politician"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "activity": [
                    {
                      "asset_name": "NVIDIA Corp",
                      "asset_type": "ST",
                      "chamber": "house",
                      "gross_purchased_midpoint": 2750000,
                      "gross_sold_midpoint": 0,
                      "net_activity_midpoint": 2750000,
                      "politician": "Hon. Nancy Pelosi",
                      "politician_slug": "hon_nancy_pelosi",
                      "purchase_count": 2,
                      "sale_count": 0,
                      "ticker": "NVDA"
                    }
                  ],
                  "count": 1,
                  "is_true_holding": false,
                  "limit": 50,
                  "matched_politicians": [
                    {
                      "chamber": "house",
                      "politician": "Hon. Nancy Pelosi",
                      "politician_slug": "hon_nancy_pelosi",
                      "transaction_count": 2
                    }
                  ],
                  "note": "Values are NET DISCLOSED TRADING ACTIVITY \u2014 not a current portfolio balance.",
                  "offset": 0,
                  "politician": "Pelosi",
                  "success": true,
                  "total": 1,
                  "year": 2024
                },
                "schema": {
                  "properties": {
                    "activity": {
                      "description": "Array of {politician, politician_slug, chamber, ticker, asset_name, asset_type, purchase_count, sale_count, gross_purchased_midpoint, gross_sold_midpoint, net_activity_midpoint}. Rows are grouped by (politician_slug, ticker), so when multiple politicians matched, each person's activity stays separate. Sorted with same-politician rows adjacent and biggest |net_activity_midpoint| first within a politician.",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_missing": {
                      "description": "Chambers that were requested but didn't return data \u2014 retry shortly.",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_requested": {
                      "description": "Chambers the request asked for (always both for /holdings since this endpoint has no chamber filter).",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_returned": {
                      "description": "Chambers that successfully returned data.",
                      "items": {},
                      "type": "array"
                    },
                    "count": {
                      "description": "Number of activity rows in this page.",
                      "type": "integer"
                    },
                    "is_true_holding": {
                      "description": "Always false \u2014 the figures represent net disclosed activity, not portfolio balances.",
                      "type": "boolean"
                    },
                    "matched_politicians": {
                      "description": "Politicians whose names matched the politician filter, with their per-person transaction count. Useful when a substring match returned more than one person (e.g. 'Scott' matches both Tim Scott and Rick Scott). Pass an exact politician_slug from this list to narrow to one person.",
                      "items": {},
                      "type": "array"
                    },
                    "partial": {
                      "description": "True when only one chamber's data was available for this request.",
                      "type": "boolean"
                    },
                    "total": {
                      "description": "Total activity rows matching the filter across all pages.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "'politician' is required"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Data not ready"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Politician Net Trading Activity"
      }
    },
    "/api/politicians/list": {
      "post": {
        "description": "Returns the set of politicians (House Representatives and U.S. Senators) that filed PTRs in the requested year, along with aggregate counts (total transactions, purchases, sales, distinct tickers traded, and midpoint notional total). Useful as an index view before drilling into /api/politicians or /api/politicians/holdings. Each row includes a `politician_slug` that can be passed back as the `politician` param on the other two endpoints for an exact match. **Requires Pro+ subscription.**",
        "operationId": "post_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 50,
                "year": 2024
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional webhook URL.",
                    "type": "string"
                  },
                  "chamber": {
                    "description": "Filter to one chamber: 'house' or 'senate'. When omitted, both are returned.",
                    "example": "senate",
                    "type": "string"
                  },
                  "limit": {
                    "description": "Max politicians per response (default 50, max 500).",
                    "example": 50,
                    "type": "integer"
                  },
                  "offset": {
                    "description": "Pagination offset (default 0).",
                    "example": 0,
                    "type": "integer"
                  },
                  "state": {
                    "description": "Filter by 2-letter US state postal code (e.g. 'CA', 'NY', 'DC', 'PR'). 400 on invalid codes. Note: state metadata is only available for House politicians \u2014 applying this filter excludes all Senate rows.",
                    "example": "CA",
                    "type": "string"
                  },
                  "year": {
                    "description": "Disclosure year (default current year). Senate data is available from 2012 onward; House data from 2008.",
                    "example": 2024,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "count": 1,
                  "limit": 50,
                  "offset": 0,
                  "politicians": [
                    {
                      "chamber": "house",
                      "notional_midpoint": 2350000,
                      "politician": "Hon. Jane Smith",
                      "politician_slug": "hon_jane_smith",
                      "purchases": 30,
                      "sales": 12,
                      "state_district": "CA12",
                      "tickers": [
                        "AAPL",
                        "MSFT",
                        "NVDA"
                      ],
                      "transactions": 42
                    }
                  ],
                  "success": true,
                  "total": 1,
                  "year": 2024
                },
                "schema": {
                  "properties": {
                    "chambers_missing": {
                      "description": "Chambers that were requested but didn't return data \u2014 retry shortly.",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_requested": {
                      "description": "Chambers the request asked for.",
                      "items": {},
                      "type": "array"
                    },
                    "chambers_returned": {
                      "description": "Chambers that successfully returned data.",
                      "items": {},
                      "type": "array"
                    },
                    "count": {
                      "description": "Number of politicians in this page.",
                      "type": "integer"
                    },
                    "partial": {
                      "description": "True when only some of the requested chambers returned data.",
                      "type": "boolean"
                    },
                    "politicians": {
                      "description": "Array of {politician, politician_slug, state_district, chamber, transactions, purchases, sales, tickers, notional_midpoint} sorted by transaction count desc.",
                      "items": {},
                      "type": "array"
                    },
                    "total": {
                      "description": "Total politicians matching the filter across all pages.",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Data not ready"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Politicians List"
      }
    },
    "/api/price": {
      "post": {
        "description": "Get historical price data for a specified stock ticker and time range. Supports both Unix timestamp and YYYY-MM-DD string formats for date inputs. **Pro+ Feature**: Multiple tickers (up to 20) can be requested at once using the 'tickers' array parameter. Derived intervals (2m, 5m, 15m, 30m, 90m) are resampled from 1-minute data; 5d, 1wk, 1mo, 3mo are resampled from daily data. **Important**: 1-minute based intervals (1m, 2m, 5m, 15m, 30m, 90m) are limited to approximately the last 5 days of data. Hourly data (60m, 1h) is available for approximately the last 2 years. Daily and above (1d, 5d, 1wk, 1mo, 3mo) have full historical data.",
        "operationId": "post_price",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "end_date": 1752186964,
                "interval": "1d",
                "start_date": 1752108881,
                "ticker": "W"
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional URL to which the API response will be forwarded as a webhook",
                    "example": "https://your-server.com/webhooks/price-callback",
                    "type": "string"
                  },
                  "end_date": {
                    "description": "End date for historical data. Accepts Unix timestamp (integer) or YYYY-MM-DD format (string)."
                  },
                  "full_data": {
                    "description": "If true, the response includes a 'full_data' object with company info and analyst price targets. Default false.",
                    "example": true,
                    "type": "boolean"
                  },
                  "interval": {
                    "description": "Time interval for the data points. Note specific date range limitations for intraday intervals.",
                    "enum": [
                      "1m",
                      "2m",
                      "5m",
                      "15m",
                      "30m",
                      "60m",
                      "90m",
                      "1h",
                      "1d",
                      "5d",
                      "1wk",
                      "1mo",
                      "3mo"
                    ],
                    "example": "1d",
                    "type": "string"
                  },
                  "start_date": {
                    "description": "Start date for historical data. Accepts Unix timestamp (integer) or YYYY-MM-DD format (string)."
                  },
                  "ticker": {
                    "description": "Single stock ticker symbol (e.g., AAPL, MSFT, GOOGL)",
                    "example": "MSFT",
                    "type": "string"
                  },
                  "tickers": {
                    "description": "Array of stock ticker symbols (up to 20). Requires Pro+ subscription.",
                    "example": [
                      "AAPL",
                      "MSFT",
                      "GOOGL"
                    ],
                    "items": {},
                    "type": "array"
                  }
                },
                "required": [
                  "end_date",
                  "interval",
                  "start_date",
                  "ticker",
                  "tickers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "close": [
                      56.62,
                      56.62,
                      56.57,
                      56.99,
                      56.99,
                      57.459999084472656,
                      58.5099983215332,
                      58.849998474121094,
                      59.154998779296875,
                      59.34000015258789,
                      59.255001068115234,
                      58.83000183105469,
                      58.83,
                      58.95,
                      58.79,
                      58.85
                    ],
                    "high": [
                      56.62,
                      56.62,
                      56.78,
                      57.3852,
                      56.99,
                      57.630001068115234,
                      58.959999084472656,
                      58.90999984741211,
                      59.31999969482422,
                      59.47999954223633,
                      59.5099983215332,
                      59.400001525878906,
                      59.0,
                      59.0,
                      58.83,
                      58.85
                    ],
                    "low": [
                      56.62,
                      56.62,
                      56.57,
                      55.77,
                      56.99,
                      56.525001525878906,
                      57.40999984741211,
                      58.23809814453125,
                      58.650001525878906,
                      58.9900016784668,
                      58.86000061035156,
                      58.77000045776367,
                      58.5001,
                      58.57,
                      58.79,
                      58.85
                    ],
                    "open": [
                      56.62,
                      56.62,
                      56.75,
                      56.79,
                      56.99,
                      56.959999084472656,
                      57.45000076293945,
                      58.5099983215332,
                      58.849998474121094,
                      59.18000030517578,
                      59.34000015258789,
                      59.27000045776367,
                      58.83,
                      58.57,
                      58.83,
                      58.85
                    ],
                    "price": 58.83,
                    "ticker": "W",
                    "timestamp": [
                      1752134400,
                      1752138000,
                      1752145200,
                      1752148800,
                      1752152400,
                      1752154200,
                      1752157800,
                      1752161400,
                      1752165000,
                      1752168600,
                      1752172200,
                      1752175800,
                      1752177600,
                      1752181200,
                      1752184800,
                      1752185539
                    ],
                    "volume": [
                      0,
                      0,
                      0,
                      0,
                      0,
                      505383,
                      1556023,
                      357222,
                      336612,
                      437100,
                      798095,
                      1142203,
                      365533,
                      0,
                      0,
                      0
                    ]
                  },
                  "success": true
                },
                "schema": {
                  "properties": {
                    "count": {
                      "description": "Number of tickers requested (only present for multi-ticker requests)",
                      "type": "integer"
                    },
                    "data": {
                      "description": "Container for the filtered price data. For multi-ticker requests, this is an object where each key is a ticker symbol containing the price data.",
                      "properties": {
                        "close": {
                          "description": "Array of closing prices for each time period",
                          "items": {},
                          "type": "array"
                        },
                        "high": {
                          "description": "Array of highest prices for each time period",
                          "items": {},
                          "type": "array"
                        },
                        "low": {
                          "description": "Array of lowest prices for each time period",
                          "items": {},
                          "type": "array"
                        },
                        "open": {
                          "description": "Array of opening prices for each time period",
                          "items": {},
                          "type": "array"
                        },
                        "price": {
                          "description": "Current/regular market price",
                          "type": "number"
                        },
                        "ticker": {
                          "description": "Stock ticker symbol",
                          "type": "string"
                        },
                        "timestamp": {
                          "description": "Array of Unix timestamps for each data point",
                          "items": {},
                          "type": "array"
                        },
                        "volume": {
                          "description": "Array of trading volumes for each time period",
                          "items": {},
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "full_data": {
                      "description": "Present when request included full_data: true. Contains company info and analyst price targets.",
                      "properties": {
                        "company_info": {
                          "description": "Company details (address, officers, financials, etc.)"
                        },
                        "price_target": {
                          "description": "Analyst price targets (current, high, low, mean, median)"
                        }
                      },
                      "type": "object"
                    },
                    "multi_ticker": {
                      "description": "Present and true when multiple tickers were requested. When true, 'data' is an object keyed by ticker symbol.",
                      "type": "boolean"
                    },
                    "success": {
                      "description": "Indicates if the request was successful",
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Intraday interval requires data within the last 60 days"
          },
          "401": {
            "description": "Multiple tickers feature requires a Pro+ subscription"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Historical Price"
      }
    },
    "/api/search": {
      "post": {
        "description": "Search for tickers, company names, or CUSIPs",
        "operationId": "post_search",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "query": "Tesla"
              },
              "schema": {
                "properties": {
                  "callback_url": {
                    "description": "Optional URL to which the API response will be forwarded as a webhook",
                    "example": "https://your-server.com/webhooks/search-callback",
                    "type": "string"
                  },
                  "cik": {
                    "description": "Search by specific CIK number",
                    "example": "884394",
                    "type": "string"
                  },
                  "cusip": {
                    "description": "Search by specific CUSIP number",
                    "example": "88160R101",
                    "type": "string"
                  },
                  "query": {
                    "description": "General search term for stock names, tickers, etc.",
                    "example": "Tesla",
                    "type": "string"
                  },
                  "ticker": {
                    "description": "Search by specific ticker symbol",
                    "example": "TSLA",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": [
                  {
                    "cusip": "88160R101",
                    "industry": "Motor Vehicles & Passenger Car Bodies",
                    "main_category": "Automotive",
                    "stockName": "Tesla, Inc.",
                    "ticker": "TSLA"
                  }
                ],
                "schema": {
                  "properties": {
                    "description": {
                      "description": "Array of matching securities"
                    },
                    "items": {
                      "properties": {
                        "cik": {
                          "description": "The CIK identifier",
                          "type": "string"
                        },
                        "cusip": {
                          "description": "The CUSIP identifier",
                          "type": "string"
                        },
                        "industry": {
                          "description": "SEC SIC industry classification (e.g. 'Motor Vehicles & Passenger Car Bodies')",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "main_category": {
                          "description": "High-level sector category derived from SIC code (e.g. 'Technology', 'Healthcare', 'Energy', 'Financial Services', 'Automotive')",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "stockName": {
                          "description": "The name of the stock/company",
                          "type": "string"
                        },
                        "ticker": {
                          "description": "The ticker symbol",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": {
                      "description": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Search"
      }
    },
    "/api/stats": {
      "post": {
        "description": "Get market statistics including top gainers, losers, most active stocks, and top mutual funds.",
        "operationId": "post_stats",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "data_type": "gainers"
              },
              "schema": {
                "properties": {
                  "data_type": {
                    "description": "The type of market data to retrieve. Valid options: gainers, losers, active, mutual_funds",
                    "example": "gainers",
                    "type": "string"
                  }
                },
                "required": [
                  "data_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "count": 25,
                  "data": [
                    {
                      "averageDailyVolume10Day": 1408700,
                      "averageDailyVolume3Month": 2023929,
                      "displayName": "Beam Therapeutics",
                      "longName": "Beam Therapeutics Inc.",
                      "marketCap": 3418690816,
                      "regularMarketChange": 33.69,
                      "regularMarketChangePercent": 22.2868,
                      "regularMarketDayHigh": 36.44,
                      "regularMarketDayLow": 29.16,
                      "regularMarketDayRange": "29.16 - 36.44",
                      "regularMarketOpen": 29.41,
                      "regularMarketPreviousClose": 27.55,
                      "regularMarketPrice": 33.69,
                      "regularMarketTime": 1768251601,
                      "regularMarketVolume": 7044582,
                      "sharesOutstanding": 101474944,
                      "shortName": "Beam Therapeutics Inc.",
                      "ticker": "BEAM"
                    }
                  ],
                  "data_type": "gainers",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "count": {
                      "description": "Number of items returned.",
                      "type": "integer"
                    },
                    "data": {
                      "description": "Array of stock/fund data",
                      "items": {
                        "properties": {
                          "averageDailyVolume10Day": {
                            "description": "10-day average daily volume",
                            "type": "number"
                          },
                          "averageDailyVolume3Month": {
                            "description": "3-month average daily volume",
                            "type": "number"
                          },
                          "displayName": {
                            "description": "Display name of the company (may not be present for all items)",
                            "type": "string"
                          },
                          "longName": {
                            "description": "Full company name",
                            "type": "string"
                          },
                          "marketCap": {
                            "description": "Market capitalization",
                            "type": "number"
                          },
                          "regularMarketChange": {
                            "description": "Price change",
                            "type": "number"
                          },
                          "regularMarketChangePercent": {
                            "description": "Price change percentage",
                            "type": "number"
                          },
                          "regularMarketDayHigh": {
                            "description": "Day high price",
                            "type": "number"
                          },
                          "regularMarketDayLow": {
                            "description": "Day low price",
                            "type": "number"
                          },
                          "regularMarketDayRange": {
                            "description": "Day price range",
                            "type": "string"
                          },
                          "regularMarketOpen": {
                            "description": "Market open price",
                            "type": "number"
                          },
                          "regularMarketPreviousClose": {
                            "description": "Previous close price",
                            "type": "number"
                          },
                          "regularMarketPrice": {
                            "description": "Current market price",
                            "type": "number"
                          },
                          "regularMarketTime": {
                            "description": "Unix timestamp of last update",
                            "type": "integer"
                          },
                          "regularMarketVolume": {
                            "description": "Trading volume",
                            "type": "number"
                          },
                          "sharesOutstanding": {
                            "description": "Number of shares outstanding",
                            "type": "number"
                          },
                          "shortName": {
                            "description": "Short company name",
                            "type": "string"
                          },
                          "ticker": {
                            "description": "Stock ticker symbol",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "data_type": {
                      "description": "The type of market data returned.",
                      "type": "string"
                    },
                    "success": {
                      "description": "Indicates if the request was successfully processed.",
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Successful response"
          },
          "400": {
            "description": "Invalid request format"
          },
          "401": {
            "description": "Authentication failed"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Failed to fetch market data"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Market Statistics"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.prixe.io"
    }
  ]
}
