endpoints: - code_examples: curl: "curl -X POST https://api.prixe.io/api/last_sold \\\n -H \"Authorization:\ \ Bearer YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d\ \ '{\"ticker\": \"TSLA\"}'" javascript: "fetch('https://api.prixe.io/api/last_sold', {\n method: 'POST',\n\ \ headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({\n ticker: 'TSLA'\n \ \ })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n\ .catch(error => console.error('Error:', error));" python: "import requests\n\nurl = \"https://api.prixe.io/api/last_sold\"\nheaders\ \ = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\npayload = {\n \"ticker\": \"TSLA\"\n}\n\nresponse\ \ = requests.post(url, headers=headers, json=payload)\ndata = response.json()\n\ print(data)" description: Get the last sold price data for a specified stock ticker including bid/ask prices, volume, and other market data errors: - description: The ticker parameter is missing from the request message: 'Missing required parameter: ticker' status: 400 - description: Invalid API key or API key not provided message: Authentication failed status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: An error occurred on the server message: Internal server error status: 500 example_request: ticker: TSLA example_response: lastSalePrice: $58.79 lastTradeTimestamp: Jul 10, 2025 6:48 PM ET ticker: W method: POST name: Last Sold Price path: /api/last_sold request_fields: callback_url: description: Optional URL to which the API response will be forwarded as a webhook example: https://your-server.com/webhooks/price-callback required: false type: string ticker: description: The stock ticker symbol (e.g., AAPL, MSFT, GOOGL) example: W required: true type: string response_fields: 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 - code_examples: curl: "# Single ticker\ncurl -X POST https://api.prixe.io/api/price \\\n -H \"\ Authorization: Bearer YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\"\ \ \\\n -d '{\"ticker\": \"MSFT\", \"start_date\": \"2024-10-01\", \"end_date\"\ : \"2024-10-30\", \"interval\": \"1d\"}'\n\n# Multiple tickers (Pro+ only)\n\ curl -X POST https://api.prixe.io/api/price \\\n -H \"Authorization: Bearer\ \ YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"tickers\"\ : [\"MSFT\", \"AAPL\", \"GOOGL\"], \"start_date\": \"2024-10-01\", \"end_date\"\ : \"2024-10-30\", \"interval\": \"1d\"}'" javascript: "// Single ticker\nfetch('https://api.prixe.io/api/price', {\n method:\ \ 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({\n ticker: 'MSFT',\n\ \ start_date: '2024-10-01',\n end_date: '2024-10-30',\n interval: '1d'\n\ \ })\n})\n.then(response => response.json())\n.then(data => console.log(data));\n\ \n// Multiple tickers (Pro+ only, up to 20)\nfetch('https://api.prixe.io/api/price',\ \ {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n\ \ 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n \ \ tickers: ['MSFT', 'AAPL', 'GOOGL'],\n start_date: '2024-10-01',\n end_date:\ \ '2024-10-30',\n interval: '1d'\n })\n})\n.then(response => response.json())\n\ .then(data => console.log(data));" python: "import requests\n\nurl = \"https://api.prixe.io/api/price\"\nheaders\ \ = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\n\n# Single ticker\npayload_single = {\n \"ticker\"\ : \"MSFT\",\n \"start_date\": \"2024-10-01\",\n \"end_date\": \"2024-10-30\"\ ,\n \"interval\": \"1d\"\n}\n\n# Multiple tickers (Pro+ only, up to 20)\n\ payload_multi = {\n \"tickers\": [\"MSFT\", \"AAPL\", \"GOOGL\"],\n \"\ start_date\": \"2024-10-01\",\n \"end_date\": \"2024-10-30\",\n \"interval\"\ : \"1d\"\n}\n\nresponse = requests.post(url, headers=headers, json=payload_multi)\n\ data = response.json()\nprint(data)" 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.' errors: - description: A required parameter is missing from the request message: Missing required parameter status: 400 - description: When using multiple tickers, the maximum allowed is 20 per request message: Maximum of 20 tickers allowed per request status: 400 - description: When using the '1m' interval, the start_date must be within the last 30 days. message: 1m interval is only available for the last 30 days. status: 400 - description: When using intraday intervals (2m, 5m, 15m, 30m, 90m), the start_date must be within the last 60 days message: Intraday interval requires data within the last 60 days status: 400 - description: Invalid API key or API key not provided message: Authentication failed status: 401 - description: The 'tickers' array parameter is only available for Pro+ subscribers message: Multiple tickers feature requires a Pro+ subscription status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: An error occurred on the server message: Internal server error status: 500 example_request: end_date: 1752186964 interval: 1d start_date: 1752108881 ticker: W example_response: 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 method: POST name: Historical Price path: /api/price request_fields: callback_url: description: Optional URL to which the API response will be forwarded as a webhook example: https://your-server.com/webhooks/price-callback required: false type: string end_date: description: End date for historical data. Accepts Unix timestamp (integer) or YYYY-MM-DD format (string). examples: date_string: '2024-10-30' unix_timestamp: 1745328600 required: true type: integer or string full_data: description: If true, the response includes a 'full_data' object with company info and analyst price targets. Default false. example: true required: false type: boolean interval: allowed_values: - 1m - 2m - 5m - 15m - 30m - 60m - 90m - 1h - 1d - 5d - 1wk - 1mo - 3mo description: Time interval for the data points. Note specific date range limitations for intraday intervals. example: 1d required: true restrictions: 1m_based_intervals: 1m, 2m, 5m, 15m, 30m, 90m are derived from 1-minute data, available for approximately the last 7 days. daily_and_above: 1d, 5d, 1wk, 1mo, 3mo have full historical data available. hourly_intervals: 60m, 1h are available for approximately the last 2 years. type: string start_date: description: Start date for historical data. Accepts Unix timestamp (integer) or YYYY-MM-DD format (string). examples: date_string: '2024-10-01' unix_timestamp: 1735828200 required: true type: integer or string ticker: description: Single stock ticker symbol (e.g., AAPL, MSFT, GOOGL) example: MSFT required: Required if 'tickers' not provided type: string tickers: description: Array of stock ticker symbols (up to 20). Requires Pro+ subscription. example: - AAPL - MSFT - GOOGL max_items: 20 required: Required if 'ticker' not provided (Pro+ only) type: array response_fields: 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. fields: close: description: Array of closing prices for each time period type: array high: description: Array of highest prices for each time period type: array low: description: Array of lowest prices for each time period type: array open: description: Array of opening prices for each time period 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 type: array volume: description: Array of trading volumes for each time period type: array type: object full_data: description: 'Present when request included full_data: true. Contains company info and analyst price targets.' fields: company_info: Company details (address, officers, financials, etc.) price_target: 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 - code_examples: curl: "curl -X POST https://api.prixe.io/api/news \\\n -H \"Authorization: Bearer\ \ YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"ticker\"\ : \"AAPL\", \"ai_summary\": true}'" javascript: "// Example with /api/forms\nfetch('https://api.prixe.io/api/forms',\ \ {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n\ \ 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n \ \ ticker: 'AAPL',\n form: '10-K',\n year: '2024',\n ai_summary: true\n\ \ })\n})\n.then(response => response.json())\n.then(data => {\n // Each filing\ \ will include 'ai_title' and 'ai_summary' fields\n data.filings.data.forEach(filing\ \ => {\n console.log('AI Title:', filing.ai_title);\n console.log('AI\ \ Summary:', filing.ai_summary);\n });\n})\n.catch(error => console.error('Error:',\ \ error));" python: "import requests\n\n# Example with /api/news\nurl = \"https://api.prixe.io/api/news\"\ \nheaders = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\npayload = {\n \"ticker\": \"AAPL\",\n \"ai_summary\"\ : True\n}\n\nresponse = requests.post(url, headers=headers, json=payload)\n\ data = response.json()\n\n# Each article will include a 'summary' field\nfor\ \ article in data.get('news_data', {}).get('data', []):\n print(f\"Title:\ \ {article.get('title')}\")\n print(f\"Summary: {article.get('summary')}\"\ )" description: Optional AI-powered summarization available on supported endpoints. When enabled, uses Google Gemini to generate concise 3-4 sentence summaries of content. Available on /api/news, /api/forms (POST), and /api/board_members endpoints. errors: - description: The request was not properly formatted message: Invalid request format status: 400 - description: Invalid API key or API key not provided message: Authentication failed status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: An error occurred on the server or AI service is temporarily unavailable message: Internal server error status: 500 method: POST name: AI Summary notes: - AI summaries may add latency to responses - Summaries are generated using AI - Rate limits apply - the API will gracefully fall back to lighter models if needed path: /api/news, /api/forms, /api/board_members request_fields: ai_summary: default: false description: Set to true to enable AI-generated summaries in the response. Works with /api/news, /api/forms, and /api/board_members endpoints. example: true required: false type: boolean response_fields: ai_summary: description: AI-generated 3-4 sentence summary (returned in /api/forms responses) type: string ai_title: description: AI-generated title (returned in /api/forms responses only) type: string summary: description: AI-generated 3-4 sentence summary (returned in /api/news and /api/board_members responses) type: string supported_endpoints: /api/board_members: Returns an AI biographical summary in the 'summary' field for each officer found in the SEC DEF 14A proxy statement. Officers not in the proxy will not have a summary. /api/forms: Returns an AI-generated title ('ai_title') and 3-4 sentence summary ('ai_summary') for each SEC filing /api/news: Returns a 3-4 sentence summary of each news article in the 'summary' field - code_examples: curl: "curl -X POST https://api.prixe.io/api/news \\\n -H \"Authorization: Bearer\ \ YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"ticker\"\ : \"TSLA\"}'" javascript: "fetch('https://api.prixe.io/api/news', {\n method: 'POST',\n headers:\ \ {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type': 'application/json'\n\ \ },\n body: JSON.stringify({\n ticker: 'TSLA'\n })\n})\n.then(response\ \ => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:',\ \ error));" python: "import requests\n\nurl = \"https://api.prixe.io/api/news\"\nheaders =\ \ {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\":\ \ \"application/json\"\n}\npayload = {\n \"ticker\": \"TSLA\"\n}\n\nresponse\ \ = requests.post(url, headers=headers, json=payload)\ndata = response.json()\n\ print(data)" 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." errors: - description: The request was not properly formatted or 'ticker' is missing. message: Invalid request format status: 400 - description: Invalid API key or API key not provided or this feature requires a Pro+ subscription. message: Authentication failed status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: The server was unable to communicate with the tab creation service. message: Failed to communicate with external service status: 503 - description: An error occurred on the server message: Internal server error status: 500 example_request: ticker: TSLA example_response: 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 method: POST name: Fetch News path: /api/news request_fields: ai_summary: default: false description: If true, generates a 3-4 sentence AI summary for each article. example: true required: false 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 required: false 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 required: false type: boolean ticker: description: The ticker to use for fetching news data. Must be a valid ticker from the SEC list. example: TSLA required: true type: string validation_source: https://www.sec.gov/files/company_tickers.json response_fields: news_data: description: The news data retrieved for the search term. fields: count: description: Number of news articles found type: integer data: description: Array of news articles items: fields: 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 - code_examples: curl: "# Get all available forms for a ticker\ncurl -X GET \"https://api.prixe.io/api/forms?ticker=TSLA\"\ \ \\\n -H \"Authorization: Bearer YOUR_API_KEY\"\n\n# Get forms for a specific\ \ year\ncurl -X GET \"https://api.prixe.io/api/forms?ticker=TSLA&year=2024\"\ \ \\\n -H \"Authorization: Bearer YOUR_API_KEY\"" javascript: "fetch('https://api.prixe.io/api/forms?ticker=TSLA&year=2024', {\n\ \ method: 'GET',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY'\n\ \ }\n})\n.then(response => response.json())\n.then(data => console.log(data))\n\ .catch(error => console.error('Error:', error));" python: "import requests\n\nurl = \"https://api.prixe.io/api/forms\"\nheaders\ \ = {\n \"Authorization\": \"Bearer YOUR_API_KEY\"\n}\nparams = {\n \"\ ticker\": \"TSLA\",\n \"year\": 2024\n}\n\nresponse = requests.get(url, headers=headers,\ \ params=params)\ndata = response.json()\nprint(data)" 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. errors: '400': Invalid request - missing ticker or invalid year '401': Unauthorized - invalid API key or insufficient plan (requires Pro+) '500': Internal server error method: GET name: Available SEC Forms path: /api/forms request_fields: ticker: description: The stock ticker symbol to retrieve available forms for. example: TSLA required: true type: string year: 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 required: false type: integer response_fields: company_name: description: The full name of the company from SEC EDGAR. type: string filing_date_range: description: The date range of filings found. fields: 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: fields: 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 nullable: true type: array 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 nullable: true type: array 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. nullable: true type: integer - code_examples: curl: "# Get 10-K filings for full year (with optional AI summary)\ncurl -X POST\ \ https://api.prixe.io/api/forms \\\n -H \"Authorization: Bearer YOUR_API_KEY\"\ \ \\\n -H \"Content-Type: application/json\" \\\n -d '{\"ticker\": \"MSFT\"\ , \"form\": \"10-K\", \"year\": 2024, \"ai_summary\": true}'\n\n# Get Form 4\ \ insider trading for a specific date range\ncurl -X POST https://api.prixe.io/api/forms\ \ \\\n -H \"Authorization: Bearer YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\"\ \ \\\n -d '{\"ticker\": \"AAPL\", \"form\": \"4\", \"year\": 2024, \"start_date\"\ : \"2024-07-01\", \"end_date\": \"2024-09-30\"}'" javascript: "// Get 10-K filings for full year with AI summary\nfetch('https://api.prixe.io/api/forms',\ \ {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n\ \ 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n \ \ ticker: 'MSFT',\n form: '10-K',\n year: 2024,\n ai_summary: true\n\ \ })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n\ .catch(error => console.error('Error:', error));\n\n// Get Form 4 insider trading\ \ for a specific date range\nfetch('https://api.prixe.io/api/forms', {\n method:\ \ 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({\n ticker: 'AAPL',\n\ \ form: '4',\n year: 2024,\n start_date: '2024-07-01',\n end_date:\ \ '2024-09-30'\n })\n})\n.then(response => response.json())\n.then(data =>\ \ console.log(data));" python: "import requests\n\nurl = \"https://api.prixe.io/api/forms\"\nheaders\ \ = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\n\n# Get 10-K filings for full year with AI summary\n\ payload_annual = {\n \"ticker\": \"MSFT\",\n \"form\": \"10-K\",\n \ \ \"year\": 2024,\n \"ai_summary\": True\n}\n\n# Get Form 4 insider trading\ \ for a specific date range\npayload_date_range = {\n \"ticker\": \"AAPL\"\ ,\n \"form\": \"4\",\n \"year\": 2024,\n \"start_date\": \"2024-07-01\"\ ,\n \"end_date\": \"2024-09-30\"\n}\n\nresponse = requests.post(url, headers=headers,\ \ json=payload_annual)\ndata = response.json()\nprint(data)" 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. errors: - description: The request was not properly formatted, 'ticker', 'form', or 'year' is missing or invalid. message: Invalid request format status: 400 - description: Invalid API key, API key not provided, or this feature requires a Pro+ subscription. message: Unauthorized status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: An error occurred on the server message: Internal server error status: 500 method: POST name: SEC Form Data path: /api/forms request_fields: ai_summary: default: false description: If true, generates a title and 3-4 sentence AI summary for each filing. example: true required: false 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' required: false 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 required: true type: string limit: default: 10 description: Maximum number of filings to return per request. Defaults to 10, maximum is 100. example: 10 required: false type: integer offset: default: 0 description: Number of filings to skip for pagination. Defaults to 0. example: 0 required: false 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' required: false type: string ticker: description: The stock ticker symbol to retrieve SEC filings for. example: MSFT required: true 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 required: true type: integer response_fields: 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. fields: 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 fields: count: description: Number of filings type: integer data: description: Array of filing records items: fields: accession_number: description: SEC accession number for the filing type: string ai_summary: description: AI-generated summary (only if ai_summary=true) nullable: true type: string ai_title: description: AI-generated short title (only if ai_summary=true) nullable: true type: string attachments: description: List of attachments with document name, description, and type nullable: true type: array description: description: Description of the filing nullable: true type: string 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) nullable: true type: object form: description: The SEC form type type: string holdings: description: For 13F-HR filings, array of institutional holdings nullable: true type: array items: description: For 8-K filings, the item numbers reported nullable: true type: array 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. nullable: true type: string text_content: description: For text-only forms (CORRESP, 425, etc.), the extracted text content (limited to 50000 characters) nullable: true type: string text_truncated: description: True if the text_content was truncated due to length nullable: true type: boolean transactions: description: For Form 4/3/5 filings, array of insider transactions nullable: true type: array 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. fields: 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 supported_forms: - 10-K - 10-K/A - 10-Q - 10-Q/A - 13F-HR - 13F-HR/A - '144' - 144/A - '3' - 3/A - '4' - 4/A - '5' - 5/A - 424B2 - 424B3 - 424B5 - 424B7 - 424B8 - '425' - 8-A12B - 8-A12G - 8-K - 8-K/A - CORRESP - D - D/A - EFFECT - FWP - SC TO-C - SC TO-I - SC TO-I/A - SC TO-T - SC TO-T/A - SD - code_examples: curl: "# Get all board members\ncurl -X POST https://api.prixe.io/api/board_members\ \ \\\n -H 'Authorization: Bearer YOUR_API_KEY' \\\n -H 'Content-Type: application/json'\ \ \\\n -d '{\"ticker\": \"TSLA\"}'\n\n# Get board members with AI biographical\ \ summaries\ncurl -X POST https://api.prixe.io/api/board_members \\\n -H 'Authorization:\ \ Bearer YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"\ ticker\": \"TSLA\", \"ai_summary\": true}'" javascript: "fetch('https://api.prixe.io/api/board_members', {\n method: 'POST',\n\ \ headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({\n ticker: 'TSLA',\n\ \ ai_summary: true\n })\n})\n.then(response => response.json())\n.then(data\ \ => {\n data.board_members.data.forEach(member => {\n console.log(`${member.name}\ \ - ${member.title}`);\n if (member.summary) console.log(` ${member.summary}`);\n\ \ });\n})\n.catch(error => console.error('Error:', error));" python: "import requests\n\nurl = \"https://api.prixe.io/api/board_members\"\n\ headers = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\n\n# Get all board members\npayload = {\"ticker\"\ : \"TSLA\"}\n\n# With AI biographical summaries\npayload_ai = {\"ticker\": \"\ TSLA\", \"ai_summary\": True}\n\nresponse = requests.post(url, headers=headers,\ \ json=payload_ai)\ndata = response.json()\nfor member in data['board_members']['data']:\n\ \ print(f\"{member['name']} - {member.get('title', '')}\")\n if member.get('summary'):\n\ \ print(f\" {member['summary']}\")" 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. errors: - description: The request was not properly formatted or 'ticker' is missing or invalid. message: Invalid request format status: 400 - description: Invalid API key, API key not provided, or this feature requires a Pro+ subscription. message: Unauthorized status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: An error occurred on the server message: Internal server error status: 500 method: POST name: Board Members & Company Officers path: /api/board_members request_fields: 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 required: false type: boolean ticker: description: The stock ticker symbol to retrieve board members for. example: TSLA required: true type: string response_fields: board_members: description: Board members and company officers data fields: count: description: Number of board members/officers returned type: integer data: description: Array of board member/officer records items: fields: age: description: Age of the person nullable: true type: integer 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. nullable: true type: string title: description: Title/position of the person (e.g., 'Chief Executive Officer', 'Director') type: string totalPay: description: Total compensation paid nullable: true type: number unexercisedValue: description: Value of unexercised stock options type: number yearBorn: description: Year the person was born nullable: true type: integer 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 - code_examples: curl: "curl -X POST https://api.prixe.io/api/search \\\n -H \"Authorization:\ \ Bearer YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d\ \ '{\"query\": \"Tesla\"}'" javascript: "fetch('https://api.prixe.io/api/search', {\n method: 'POST',\n \ \ headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({\n query: 'Tesla'\n \ \ })\n})\n.then(response => response.json())\n.then(data => console.log(data))\n\ .catch(error => console.error('Error:', error));" python: "import requests\n\nurl = \"https://api.prixe.io/api/search\"\nheaders\ \ = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\npayload = {\n \"query\": \"Tesla\"\n}\n\nresponse\ \ = requests.post(url, headers=headers, json=payload)\ndata = response.json()\n\ print(data)" description: Search for tickers, company names, or CUSIPs errors: - description: The request was not properly formatted message: Invalid request format status: 400 - description: Invalid API key or API key not provided message: Authentication failed status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: An error occurred on the server message: Internal server error status: 500 example_request: query: Tesla example_response: - cusip: 88160R101 industry: Motor Vehicles & Passenger Car Bodies main_category: Automotive stockName: Tesla, Inc. ticker: TSLA method: POST name: Search path: /api/search request_fields: callback_url: description: Optional URL to which the API response will be forwarded as a webhook example: https://your-server.com/webhooks/search-callback required: false type: string cik: description: Search by specific CIK number example: '884394' required: false type: string cusip: description: Search by specific CUSIP number example: 88160R101 required: false type: string query: description: General search term for stock names, tickers, etc. example: Tesla required: false type: string ticker: description: Search by specific ticker symbol example: TSLA required: false type: string response_fields: description: Array of matching securities items: fields: 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') nullable: true type: string main_category: description: High-level sector category derived from SIC code (e.g. 'Technology', 'Healthcare', 'Energy', 'Financial Services', 'Automotive') nullable: true type: string stockName: description: The name of the stock/company type: string ticker: description: The ticker symbol type: string type: object type: array - code_examples: curl: "curl -X POST https://api.prixe.io/api/stats \\\n -H \"Authorization: Bearer\ \ YOUR_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"data_type\"\ : \"gainers\"}'" javascript: "fetch('https://api.prixe.io/api/stats', {\n method: 'POST',\n headers:\ \ {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type': 'application/json'\n\ \ },\n body: JSON.stringify({\n data_type: 'gainers'\n })\n})\n.then(response\ \ => response.json())\n.then(data => console.log(data))\n.catch(error => console.error('Error:',\ \ error));" python: "import requests\n\nurl = \"https://api.prixe.io/api/stats\"\nheaders\ \ = {\n \"Authorization\": \"Bearer YOUR_API_KEY\",\n \"Content-Type\"\ : \"application/json\"\n}\npayload = {\n \"data_type\": \"gainers\"\n}\n\n\ response = requests.post(url, headers=headers, json=payload)\ndata = response.json()\n\ print(data)" description: Get market statistics including top gainers, losers, most active stocks, and top mutual funds. errors: - description: The request was not properly formatted or 'data_type' is missing or invalid. message: Invalid request format status: 400 - description: Invalid API key or API key not provided. message: Authentication failed status: 401 - description: You have exceeded the allowed number of requests message: Rate limit exceeded status: 429 - description: The server was unable to retrieve market data. message: Failed to fetch market data status: 503 - description: An error occurred on the server message: Internal server error status: 500 example_request: data_type: gainers example_response: 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 method: POST name: Market Statistics path: /api/stats request_fields: data_type: description: 'The type of market data to retrieve. Valid options: gainers, losers, active, mutual_funds' example: gainers required: true type: string valid_options: - gainers - losers - active - mutual_funds response_fields: count: description: Number of items returned. type: integer data: description: Array of stock/fund data items: fields: 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 - code_examples: curl: "curl -X POST https://api.prixe.io/api/politicians \\\n -H 'Authorization:\ \ Bearer YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"\ year\": 2024, \"ticker\": \"AAPL\", \"transaction_type\": \"purchase\"}'" javascript: "fetch('https://api.prixe.io/api/politicians', {\n method: 'POST',\n\ \ headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({ year: 2024, ticker: 'AAPL',\ \ transaction_type: 'purchase' })\n})\n.then(r => r.json())\n.then(console.log);" python: "import requests\n\nurl = 'https://api.prixe.io/api/politicians'\nheaders\ \ = {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type': 'application/json'\n\ }\npayload = {'year': 2024, 'ticker': 'AAPL', 'transaction_type': 'purchase'}\n\ \nresponse = requests.post(url, headers=headers, json=payload)\nprint(response.json())" 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.**" errors: - description: Bad year, missing JSON body, or invalid parameters. message: Invalid request format status: 400 - description: Invalid or missing API key. message: Authentication failed status: 401 - description: You have exceeded the allowed number of requests. message: Rate limit exceeded status: 429 - description: The scraper is still populating this year's data. Retry shortly. message: Data not ready status: 503 - description: An error occurred on the server. message: Internal server error status: 500 example_request: limit: 10 ticker: AAPL transaction_type: purchase year: 2024 example_response: 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 method: POST name: Congressional Stock Transactions path: /api/politicians request_fields: callback_url: description: Optional URL to forward the response to as a webhook. required: false type: string chamber: description: 'Filter by chamber: ''house'' or ''senate''. When omitted, both are returned.' example: senate required: false 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 required: false type: boolean end_date: description: Inclusive transaction-date upper bound (YYYY-MM-DD). example: '2024-12-31' required: false type: string limit: description: Max transactions per response (default 50, max 500). example: 50 required: false type: integer offset: description: Pagination offset (default 0). example: 0 required: false 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 required: false type: string start_date: description: Inclusive transaction-date lower bound (YYYY-MM-DD). example: '2024-01-01' required: false 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 required: false type: string ticker: description: Filter to a single ticker symbol. example: AAPL required: false type: string transaction_type: description: '''purchase'', ''sale'', or ''all'' (default ''all''). ''sale'' includes partial sales.' example: purchase required: false type: string year: description: 'Disclosure year (defaults to current year). Valid range: 2008 to current year.' example: 2024 required: false type: integer response_fields: 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." type: array chambers_requested: description: Chambers the request asked for (derived from the `chamber` filter; defaults to both house and senate when omitted). type: array chambers_returned: description: Chambers that successfully returned data for this request. 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`.' type: array year: description: Disclosure year covered by the response. type: integer - code_examples: curl: "curl -X POST https://api.prixe.io/api/politicians/list \\\n -H 'Authorization:\ \ Bearer YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"\ year\": 2024, \"chamber\": \"senate\"}'" javascript: "fetch('https://api.prixe.io/api/politicians/list', {\n method: 'POST',\n\ \ headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({ year: 2024, chamber: 'senate'\ \ })\n})\n.then(r => r.json())\n.then(console.log);" python: "import requests\n\nurl = 'https://api.prixe.io/api/politicians/list'\n\ headers = {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n}\npayload = {'year': 2024, 'chamber': 'senate'}\n\nresponse\ \ = requests.post(url, headers=headers, json=payload)\nprint(response.json())" 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.** errors: - description: Bad year or body. message: Invalid request format status: 400 - description: Invalid or missing API key. message: Authentication failed status: 401 - description: Too many requests. message: Rate limit exceeded status: 429 - description: The scraper is still populating this year's data. message: Data not ready status: 503 example_request: year: 2024 example_response: count: 1 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 year: 2024 method: POST name: Politicians List path: /api/politicians/list request_fields: callback_url: description: Optional webhook URL. required: false type: string chamber: description: 'Filter to one chamber: ''house'' or ''senate''. When omitted, both are returned.' example: senate required: false type: string 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 required: false type: string year: description: Disclosure year (default current year). Senate data is available from 2012 onward; House data from 2008. example: 2024 required: false type: integer response_fields: chambers_missing: description: "Chambers that were requested but didn't return data \u2014 retry\ \ shortly." type: array chambers_requested: description: Chambers the request asked for. type: array chambers_returned: description: Chambers that successfully returned data. type: array 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. type: array - code_examples: curl: "curl -X POST https://api.prixe.io/api/politicians/holdings \\\n -H 'Authorization:\ \ Bearer YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"\ politician\": \"Pelosi\", \"year\": 2024}'" javascript: "fetch('https://api.prixe.io/api/politicians/holdings', {\n method:\ \ 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n },\n body: JSON.stringify({ politician: 'Pelosi', year:\ \ 2024 })\n})\n.then(r => r.json())\n.then(console.log);" python: "import requests\n\nurl = 'https://api.prixe.io/api/politicians/holdings'\n\ headers = {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type':\ \ 'application/json'\n}\npayload = {'politician': 'Pelosi', 'year': 2024}\n\n\ response = requests.post(url, headers=headers, json=payload)\nprint(response.json())" 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.**" errors: - description: Missing politician filter. message: '''politician'' is required' status: 400 - description: Invalid or missing API key. message: Authentication failed status: 401 - description: Too many requests. message: Rate limit exceeded status: 429 - description: The scraper is still populating this year's data. message: Data not ready status: 503 example_request: politician: Pelosi year: 2024 example_response: 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 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." politician: Pelosi success: true year: 2024 method: POST name: Politician Net Trading Activity path: /api/politicians/holdings request_fields: callback_url: description: Optional webhook URL. required: false type: string end_date: description: Transaction-date upper bound (YYYY-MM-DD). required: false type: string 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 required: true type: string start_date: description: Transaction-date lower bound (YYYY-MM-DD). required: false type: string ticker: description: Restrict output to a single ticker. required: false type: string year: description: Disclosure year (default current year). example: 2024 required: false type: integer response_fields: 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. type: array chambers_missing: description: "Chambers that were requested but didn't return data \u2014 retry\ \ shortly." type: array chambers_requested: description: Chambers the request asked for (always both for /holdings since this endpoint has no chamber filter). type: array chambers_returned: description: Chambers that successfully returned data. type: array 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. type: array partial: description: True when only one chamber's data was available for this request. type: boolean - code_examples: javascript: "// Connect to the WebSocket\nconst socket = new WebSocket('wss://ws.prixe.io/ws?api_key=YOUR_API_KEY');\n\ \n// Handle connection open\nsocket.onopen = function(e) {\n console.log('Connection\ \ established');\n \n // Subscribe to a ticker to receive updated data\n \ \ socket.send(JSON.stringify({\n 'event': 'subscribe',\n 'data': {\n \ \ 'ticker': 'AAPL'\n }\n }));\n};\n\n// Handle incoming messages\nsocket.onmessage\ \ = function(event) {\n const data = JSON.parse(event.data);\n \n // Handle\ \ different event types\n switch(data.event) {\n case 'connect_status':\n\ \ console.log('Connected with ID:', data.data.connection_id);\n break;\n\ \ case 'subscription_status':\n console.log('Subscription status:',\ \ data.data.status);\n // After successful subscription, you will receive\ \ updated data\n // Send subscribe again to get the latest price update\n\ \ if (data.data.status === 'subscribed') {\n socket.send(JSON.stringify({\n\ \ 'event': 'subscribe',\n 'data': {\n 'ticker':\ \ data.data.ticker\n }\n }));\n }\n break;\n case\ \ 'error':\n console.error('Error:', data.data.message);\n break;\n\ \ }\n};\n\n// Handle errors\nsocket.onerror = function(error) {\n console.error('WebSocket\ \ Error:', error);\n};\n\n// Handle connection close\nsocket.onclose = function(event)\ \ {\n console.log('Connection closed:', event.code, event.reason);\n};\n\n\ // To unsubscribe\nfunction unsubscribe() {\n socket.send(JSON.stringify({\n\ \ 'event': 'unsubscribe'\n }));\n}\n\n// To disconnect\nfunction disconnect()\ \ {\n socket.close();\n}" python: "import websocket\nimport json\nimport threading\nimport time\nfrom datetime\ \ import datetime\nimport ssl, certifi\n\n# Add api.prixe.io certs to trust\ \ store\n# To get certs: openssl s_client -connect api.prixe.io:443 -servername\ \ api.prixe.io -showcerts\n# get location of cert store: python3 -c \"import\ \ certifi; print(certifi.where())\"\n\n# SSL context for secure connections\n\ ssl_context = ssl.create_default_context()\nssl_context.load_verify_locations(cafile=certifi.where())\n\ \ndef get_timestamp():\n \"\"\"Get current timestamp for logging\"\"\"\n\ \ return datetime.now().strftime(\"%Y-%m-%d %H:%M:%S.%f\")[:-3]\n\n# Define\ \ WebSocket callback functions\ndef on_message(ws, message):\n print(f\"\ [{get_timestamp()}] RAW MESSAGE RECEIVED: {message}\")\n \n try:\n \ \ data = json.loads(message)\n print(f\"[{get_timestamp()}] PARSED\ \ JSON DATA: {json.dumps(data, indent=2)}\")\n \n event_type =\ \ data.get('event')\n print(f\"[{get_timestamp()}] EVENT TYPE: {event_type}\"\ )\n \n if event_type == 'connect_status':\n connection_id\ \ = data.get('data', {}).get('connection_id', 'Unknown')\n print(f\"\ [{get_timestamp()}] \u2705 CONNECTED with ID: {connection_id}\")\n elif\ \ event_type == 'subscription_status':\n status = data.get('data',\ \ {}).get('status', 'Unknown')\n ticker = data.get('data', {}).get('ticker',\ \ 'Unknown')\n print(f\"[{get_timestamp()}] \U0001F4CA SUBSCRIPTION\ \ STATUS: {status} for {ticker}\")\n # After successful subscription,\ \ send subscribe again to get updated data\n if status == 'subscribed':\n\ \ subscribe_message = {\n 'event': 'subscribe',\n\ \ 'data': {\n 'ticker': ticker\n \ \ }\n }\n ws.send(json.dumps(subscribe_message))\n\ \ print(f\"[{get_timestamp()}] \U0001F4E4 REQUESTING UPDATED\ \ DATA for {ticker}\")\n elif event_type == 'error':\n error_msg\ \ = data.get('data', {}).get('message', 'Unknown error')\n print(f\"\ [{get_timestamp()}] \u274C SERVER ERROR: {error_msg}\")\n else:\n \ \ print(f\"[{get_timestamp()}] \u2753 UNKNOWN EVENT TYPE: {event_type}\"\ )\n \n except json.JSONDecodeError as e:\n print(f\"[{get_timestamp()}]\ \ \u26A0\uFE0F JSON DECODE ERROR: {e}\")\n print(f\"[{get_timestamp()}]\ \ RAW MESSAGE WAS: {message}\")\n except Exception as e:\n print(f\"\ [{get_timestamp()}] \u26A0\uFE0F UNEXPECTED ERROR in on_message: {e}\")\n\n\ def on_error(ws, error):\n print(f\"[{get_timestamp()}] \U0001F6A8 WEBSOCKET\ \ ERROR: {error}\")\n print(f\"[{get_timestamp()}] ERROR TYPE: {type(error)}\"\ )\n\ndef on_close(ws, close_status_code, close_msg):\n print(f\"[{get_timestamp()}]\ \ \U0001F50C CONNECTION CLOSED\")\n print(f\"[{get_timestamp()}] CLOSE STATUS\ \ CODE: {close_status_code}\")\n print(f\"[{get_timestamp()}] CLOSE MESSAGE:\ \ {close_msg}\")\n\ndef on_open(ws):\n print(f\"[{get_timestamp()}] \U0001F517\ \ CONNECTION ESTABLISHED SUCCESSFULLY\")\n \n # Subscribe to a ticker\n\ \ subscribe_message = {\n 'event': 'subscribe',\n 'data': {\n\ \ 'ticker': 'AAPL'\n }\n }\n \n print(f\"[{get_timestamp()}]\ \ \U0001F4E4 SENDING SUBSCRIPTION MESSAGE: {json.dumps(subscribe_message, indent=2)}\"\ )\n \n try:\n ws.send(json.dumps(subscribe_message))\n print(f\"\ [{get_timestamp()}] \u2705 SUBSCRIPTION MESSAGE SENT SUCCESSFULLY\")\n except\ \ Exception as e:\n print(f\"[{get_timestamp()}] \u274C FAILED TO SEND\ \ SUBSCRIPTION MESSAGE: {e}\")\n\n# Connect to WebSocket\nws_url = \"wss://ws.prixe.io/ws?api_key=YOUR_API_KEY\"\ \n\nprint(f\"[{get_timestamp()}] \U0001F680 STARTING WEBSOCKET CLIENT\")\nprint(f\"\ [{get_timestamp()}] \U0001F310 CONNECTING TO: {ws_url}\")\n\nws = websocket.WebSocketApp(ws_url,\n\ \ on_open=on_open,\n on_message=on_message,\n\ \ on_error=on_error,\n on_close=on_close)\n\ \nprint(f\"[{get_timestamp()}] \U0001F4CB WEBSOCKET APP CREATED SUCCESSFULLY\"\ )\n\n# Start WebSocket connection in a separate thread\nprint(f\"[{get_timestamp()}]\ \ \U0001F9F5 STARTING WEBSOCKET THREAD\")\nwst = threading.Thread(target=lambda:\ \ ws.run_forever(sslopt={\"context\": ssl_context}))\nwst.daemon = True\nwst.start()\n\ \nprint(f\"[{get_timestamp()}] \u2705 WEBSOCKET THREAD STARTED\")\nprint(f\"\ [{get_timestamp()}] \U0001F504 ENTERING MAIN LOOP (Press Ctrl+C to exit)\")\n\ \n# Keep the main thread running\ncounter = 0\ntry:\n while True:\n \ \ time.sleep(5) # Heartbeat every 5 seconds\n counter += 1\n \ \ print(f\"[{get_timestamp()}] \U0001F493 HEARTBEAT #{counter} - WebSocket\ \ thread alive: {wst.is_alive()}\")\nexcept KeyboardInterrupt:\n print(f\"\ [{get_timestamp()}] \U0001F6D1 KEYBOARD INTERRUPT RECEIVED\")\n print(f\"\ [{get_timestamp()}] \U0001F4E4 SENDING UNSUBSCRIBE MESSAGE\")\n \n # To\ \ unsubscribe before disconnecting\n try:\n unsubscribe_message =\ \ {'event': 'unsubscribe'}\n ws.send(json.dumps(unsubscribe_message))\n\ \ print(f\"[{get_timestamp()}] \u2705 UNSUBSCRIBE MESSAGE SENT: {json.dumps(unsubscribe_message)}\"\ )\n except Exception as e:\n print(f\"[{get_timestamp()}] \u274C FAILED\ \ TO SEND UNSUBSCRIBE MESSAGE: {e}\")\n \n # Close the connection\n \ \ try:\n print(f\"[{get_timestamp()}] \U0001F50C CLOSING WEBSOCKET CONNECTION\"\ )\n ws.close()\n print(f\"[{get_timestamp()}] \u2705 WEBSOCKET\ \ CONNECTION CLOSED\")\n except Exception as e:\n print(f\"[{get_timestamp()}]\ \ \u274C ERROR CLOSING WEBSOCKET: {e}\")\n \n print(f\"[{get_timestamp()}]\ \ \U0001F44B WEBSOCKET CLIENT TERMINATED\")" connection: description: Connect to this WebSocket URL with your API key as a query parameter. Alternative path /live is also supported. url: wss://ws.prixe.io/ws?api_key=YOUR_API_KEY description: WebSocket connection for receiving real-time price updates for a specified stock ticker events: client_to_server: - data: ticker: description: The stock ticker symbol to subscribe to (e.g., AAPL, MSFT) example: AAPL required: true type: string description: Subscribe to real-time updates for a ticker. You must send a subscribe message each time you want updated data for the ticker. name: subscribe - data: null description: Unsubscribe from the current ticker updates name: unsubscribe server_to_client: - data: connection_id: description: Unique identifier for this connection example: abcd1234 type: string status: description: Connection status example: connected type: string description: Sent when a connection is established name: connect_status - data: status: description: Subscription status example: subscribed type: string ticker: description: The ticker symbol that was subscribed to example: AAPL type: string description: Sent in response to subscribe/unsubscribe events name: subscription_status - data: message: description: Error message example: 'Error fetching price data: Connection timeout' type: string description: Sent when an error occurs name: error method: WEBSOCKET name: Live Price Data (WebSocket) path: wss://ws.prixe.io/ws overview: authentication: traditional: Bearer token required in Authorization header for /api/* endpoints base_url: https://api.prixe.io description: Real-time and historical stock market data API with Bearer token authentication title: Stock Data API version: 1.0.0 websocket: Real-time data streaming available via WebSocket connections privacy_and_data_logging: data_retention: API logs are retained for 90 days for security and debugging purposes. description: Our API logs certain information for security, debugging, and analytics purposes logged_data: - description: We log the IP address of each API request for security and rate limiting purposes. We support proxy headers (X-Forwarded-For, X-Real-IP, CF-Connecting-IP, True-Client-IP) to capture the real client IP when behind proxies or load balancers. type: IP Addresses - description: We log the endpoint accessed, HTTP method, request body, response status code, and response time for each API call. type: Request/Response Details - description: We track which API key was used for each request to enforce rate limits and monitor usage patterns. type: API Key Usage - description: We record the exact time of each API request for audit trails and debugging. type: Timestamps privacy_notice: By using this API, you acknowledge that the above data will be collected and stored as described. rate_limiting: description: Rate limits are enforced both per-user and per-IP address to ensure fair usage include_limits: description: Pass include_limits=true on any /api/ endpoint to see your current usage and plan limits in the response. For POST requests, include it in the JSON body; for GET requests, use it as a query parameter. example_response: rate_limit: daily_limit: 10000 daily_usage: 312 hourly_limit: 1000 hourly_usage: 45 ip_limits: daily: Rate limited per subscription plan description: To prevent abuse through multiple accounts, we also enforce IP-based rate limits hourly: Rate limited per subscription plan monthly: Rate limited per subscription plan note: These IP limits apply regardless of how many accounts are using the same IP address user_limits: Each user's rate limits are determined by their subscription plan (Free, Pro, or Enterprise)