### Example cURL Request for Insider Trades Source: https://docs.ainvest.com/reference/ownership/insider Demonstrates how to make a GET request to the AInvest API to retrieve insider trading data using cURL. It includes the necessary URL and authorization header. ```curl curl --request GET \ --url https://openapi.ainvest.com/open/ownership/insider \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Get Company Financials - cURL Example Source: https://docs.ainvest.com/reference/securities/stock-financials Example of how to fetch financial metrics for a specific stock using the AInvest API via cURL. Requires an Authorization header with a Bearer token. ```curl curl --request GET \ --url https://openapi.ainvest.com/open/securities/stock/financials \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Example Security Data Response Source: https://docs.ainvest.com/reference An example JSON response structure containing a list of security data, including ticker, name, security tag, and exchange. ```json { "data": { "securities": [ { "ticker": "BACpP", "name": "Bank Of America Pref PP ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpS", "name": "Bank Of America Pref SS ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpL", "name": "Bank Of America Pref 5 ADR", "security_tag": "stock", "exchange": "NYSE" } ] }, "status_code": 0, "status_msg": "success" } ``` -------------------------------- ### Example Security Data Response Source: https://docs.ainvest.com/reference/securities/search An example JSON response structure containing a list of security data, including ticker, name, security tag, and exchange. ```json { "data": { "securities": [ { "ticker": "BACpP", "name": "Bank Of America Pref PP ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpS", "name": "Bank Of America Pref SS ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpL", "name": "Bank Of America Pref 5 ADR", "security_tag": "stock", "exchange": "NYSE" } ] }, "status_code": 0, "status_msg": "success" } ``` -------------------------------- ### Configure Claude Desktop with Local MCP Server Source: https://docs.ainvest.com/docs/mcp-servers Provides a JSON configuration snippet for Claude Desktop to connect to a remote Ainvest MCP server via a local mcp-remote instance. This requires Node.js and npx to be installed. ```json { "remote ainvest": { "command": "npx", "args": [ "mcp-remote", "https://docsmcp.ainvest.com", "--header", "Authorization: Bearer ${AUTH_TOKEN}" ], "env": { "AUTH_TOKEN": "your token goes here" } } } ``` -------------------------------- ### cURL Request for Securities Search Source: https://docs.ainvest.com/reference Example cURL command to perform a securities search using the API. Requires an Authorization token. ```cURL curl --request GET \ --url https://openapi.ainvest.com/open/securities/search \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Search US Stocks using cURL Source: https://docs.ainvest.com/reference An example demonstrating how to use the cURL command-line tool to query the AInvest Securities Search API. This request requires an authorization token in the header. ```cURL curl --request GET \ --url https://openapi.ainvest.com/open/securities/search \ --header 'Authorization: Bearer ' ``` -------------------------------- ### cURL Request for Securities Search Source: https://docs.ainvest.com/reference/securities/search Example cURL command to perform a securities search using the API. Requires an Authorization token. ```cURL curl --request GET \ --url https://openapi.ainvest.com/open/securities/search \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Search US Stocks using cURL Source: https://docs.ainvest.com/reference/securities/search An example demonstrating how to use the cURL command-line tool to query the AInvest Securities Search API. This request requires an authorization token in the header. ```cURL curl --request GET \ --url https://openapi.ainvest.com/open/securities/search \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Example JSON Response for Insider Trades Source: https://docs.ainvest.com/reference/ownership/insider Illustrates the structure of a successful JSON response when querying the insider trades endpoint. It shows the format of the data array, including details like name, trade date, shares changed, and price. ```json { "data": { "data": [ { "name": "", "position": "", "trade_date": "", "filing_date": "", "reporting_gap": "", "trade_type": "", "shares_chg": 123, "shares_chg_percent": 123, "shares_held": 123, "price": 123 } ] }, "status_code": 123, "status_msg": "" } ``` -------------------------------- ### Get Insider Trades API Reference Source: https://docs.ainvest.com/reference/ownership/insider This section details the API endpoint for fetching insider trades as filed with the SEC. It includes the HTTP method, URL path, authorization requirements, query parameters, and the structure of successful and error responses. ```APIDOC GET /ownership/insider Description: Get insider trades as filed with SEC, including date, type of trade, number of shares and price. Authorization: Bearer authentication header of the form `Bearer `, where `` is your key. [Get the key here](https://www.ainvest.com/business/developer-manage/) Query Parameters: ticker (string, required): US stock market ticker symbol, e.g. AAPL, TSLA, etc. page (integer, optional, default:1): Page number for pagination. Required range: `x >= 1`. size (integer, optional, default:10): Number of items per page. Required range: `x >= 1`. Responses: 200 (Successful Response): Description: Successful response in standard envelope. Content Type: application/json Schema: { "data": { "data": [ { "name": "", "position": "", "trade_date": "", "filing_date": "", "reporting_gap": "", "trade_type": "", "shares_chg": 123, "shares_chg_percent": 123, "shares_held": 123, "price": 123 } ] }, "status_code": 123, "status_msg": "" } 400 (Bad Request): Description: Error response for invalid requests. Content Type: application/json Schema: { "data": null, "status_code": 123, "status_msg": "" } Related Endpoints: - [Get latest headlines](/reference/news/headlines/page) - [Get US Congress trades](/reference/ownership/congress) ``` -------------------------------- ### AInvest Securities Search API Reference Source: https://docs.ainvest.com/reference Details the GET request to search for US stocks by ticker or company name. It specifies the endpoint, required headers, and the structure of the returned JSON data. ```APIDOC Securities Search API: GET /open/securities/search - Searches for US stocks by ticker or company name. - Parameters: - query: The ticker or company name to search for (e.g., "Bank of America"). - Headers: - Authorization: Bearer - Returns: A JSON object containing search results. ``` -------------------------------- ### Get Average Analyst Rating and Target Price Source: https://docs.ainvest.com/reference/analysis-ratings/consensus Retrieves the current average analyst rating and target price for a given stock ticker. Requires an API key for authorization. ```shell curl --request GET \ --url https://openapi.ainvest.com/open/analysis-ratings/consensus \ --header 'Authorization: Bearer ' ``` ```APIDOC GET /open/analysis-ratings/consensus Description: Get current rating and target price averaged across all analysts opinions. Authorization: - Type: Bearer authentication - Header: Authorization - Format: Bearer - Details: Obtain your key from https://www.ainvest.com/business/developer-manage/ Query Parameters: - ticker (string, required): US stock market ticker symbol, e.g. AAPL, TSLA. Response (200 OK): Content-Type: application/json Body: { "data": { "analysts_ratings": { "count": "integer", "buy": "integer", "hold": "integer", "sell": "integer", "average_rating": "string" }, "target_price": { "count": "integer", "high": "float", "average": "float", "low": "float" } } } Example Response for AAPL: { "data": { "analysts_ratings": { "count": 50, "buy": 32, "hold": 14, "sell": 4, "average_rating": "Buy" }, "target_price": { "count": 16, "high": 300.0, "average": 226.97625, "low": 170.0 } } } Related API Endpoints: - GET /open/analysis-ratings/history: Get ratings history. ``` -------------------------------- ### Securities Search API Response Example Source: https://docs.ainvest.com/reference/securities/search Illustrates the typical JSON response structure received from the AInvest Securities Search API when querying for a company like 'Bank of America'. It includes data fields such as ticker, name, security_tag, and exchange. ```JSON { "data": { "data": [ { "ticker": "BAC", "name": "Bank Of America", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpN", "name": "Bank of America Pref LL ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpJ", "name": "Bank of America Pref 4 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpB", "name": "Bank of America Pref GG ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpQ", "name": "Bank of America Pref QQ ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpG", "name": "Bank of America Pref 1 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpO", "name": "Bank of America Pref NN ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpL", "name": "Bank of America Pref L", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpP", "name": "Bank of America Pref PP ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpS", "name": "Bank of America Pref SS ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpL", "name": "Bank of America Pref 5 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpM", "name": "Bank of America Pref KK ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpE", "name": "Bank of America Pref E ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpH", "name": "Bank of America Pref 2 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpK", "name": "Bank of America Pref HH ADR", "security_tag": "stock", "exchange": "NYSE" } ] }, "status_code": 0, "status_msg": "success" } ``` -------------------------------- ### Securities Search API Response Example Source: https://docs.ainvest.com/reference Illustrates the typical JSON response structure received from the AInvest Securities Search API when querying for a company like 'Bank of America'. It includes data fields such as ticker, name, security_tag, and exchange. ```JSON { "data": { "data": [ { "ticker": "BAC", "name": "Bank Of America", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpN", "name": "Bank of America Pref LL ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpJ", "name": "Bank of America Pref 4 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpB", "name": "Bank of America Pref GG ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpQ", "name": "Bank of America Pref QQ ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpG", "name": "Bank of America Pref 1 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpO", "name": "Bank of America Pref NN ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpL", "name": "Bank of America Pref L", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpP", "name": "Bank of America Pref PP ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpS", "name": "Bank of America Pref SS ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpL", "name": "Bank of America Pref 5 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpM", "name": "Bank of America Pref KK ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpE", "name": "Bank of America Pref E ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BMLpH", "name": "Bank of America Pref 2 ADR", "security_tag": "stock", "exchange": "NYSE" }, { "ticker": "BACpK", "name": "Bank of America Pref HH ADR", "security_tag": "stock", "exchange": "NYSE" } ] }, "status_code": 0, "status_msg": "success" } ``` -------------------------------- ### AInvest API - Get latest headlines Source: https://docs.ainvest.com/reference/news/headlines/page Fetches the latest news headlines, ordered by time. Supports pagination and filtering. The news feed is curated by financial professionals and enhanced by AI, including cover image generation and ticker tagging. ```APIDOC GET /open/news/v1/wire/page Description: Returns latest news headlines ordered by time, supports pagination and filtering options. Parameters: - Authorization: string (header, required) - Bearer authentication header of the form `Bearer `, where `` is your key. Get the key here: https://www.ainvest.com/business/developer-manage/ Returns: - 200 OK: JSON object containing news data. - data.startId: string - data.size: integer - data.data: array of news items - news_id: string - news_important: integer - publish_time: integer (timestamp) - title: string - content: string - source: string - cover_image: object - src: string - type: string - source_url: string - tag_list: array of tag objects - code: string - market: string - name_en: string - status_code: integer - status_msg: string Notes: The news headlines are sourced from public news outlets and enhanced by AI. The data is pushed frequently. The endpoint supports filtering by stock symbol, industry, or category. ``` ```curl curl --request GET \ --url https://openapi.ainvest.com/open/news/v1/wire/page \ --header 'Authorization: Bearer ' ``` ```json { "data": { "startId": "", "size": 123, "data": [ { "news_id": "", "news_important": 123, "publish_time": 123, "title": "", "content": "", "source": "", "cover_image": { "src": "", "type": "" }, "source_url": "", "tag_list": [ { "code": "", "market": "", "name_en": "" } ] } ] }, "status_code": 123, "status_msg": "" } ``` -------------------------------- ### Get US Congress Trades Source: https://docs.ainvest.com/reference/ownership/congress Fetches trading data for US politicians. Requires Bearer token authentication. Supports pagination and filtering via query parameters. ```APIDOC # US Congress trades Get trades by US politicians, including date, type of trade, approximate dollar value. **Endpoint:** GET /ownership/congress **Description:** Retrieves financial transaction data for members of Congress as required by the STOCK Act. Data includes trade details, filing dates, and transaction types. **Authorization:** Bearer authentication header of the form `Bearer `, where `` is your API key. [Get the key here](https://www.ainvest.com/business/developer-manage/) **Query Parameters:** * `ticker` (string, required): US stock market ticker symbol, e.g. AAPL, TSLA. * `page` (integer, optional, default: 1): Page number for pagination. Must be >= 1. * `size` (integer, optional, default: 10): Number of items per page. Must be >= 1. **Responses:** * **200 OK**: Successful response in standard envelope. * `data` (object): * `data` (array): Array of trade objects. * `name` (string): Name of the politician. * `party` (string): Political party. * `state` (string): State represented. * `trade_date` (string): Date of the trade. * `filing_date` (string): Date the transaction was filed. * `reporting_gap` (string): Reporting gap information. * `trade_type` (string): Type of trade (e.g., buy, sell). * `size` (string): Approximate dollar value of the trade. * `status_code` (integer): API status code (e.g., 123). * `status_msg` (string): Status message. * **400 Bad Request**: Invalid request parameters or missing authentication. **Related Endpoints:** * [Insider trades](/reference/ownership/insider) * [Analyst ratings basics](/reference/analysis-ratings) ``` ```bash curl --request GET \ --url https://openapi.ainvest.com/open/ownership/congress \ --header 'Authorization: Bearer ' ``` ```json { "data": { "data": [ { "name": "", "party": "", "state": "", "trade_date": "", "filing_date": "", "reporting_gap": "", "trade_type": "", "size": "" } ] }, "status_code": 123, "status_msg": "" } ``` -------------------------------- ### AInvest Securities Search API Reference Source: https://docs.ainvest.com/reference/securities/search Details the GET request to search for US stocks by ticker or company name. It specifies the endpoint, required headers, and the structure of the returned JSON data. ```APIDOC Securities Search API: GET /open/securities/search - Searches for US stocks by ticker or company name. - Parameters: - query: The ticker or company name to search for (e.g., "Bank of America"). - Headers: - Authorization: Bearer - Returns: A JSON object containing search results. ``` -------------------------------- ### AInvest API - Get latest headlines Source: https://docs.ainvest.com/reference/news/headlines Fetches the latest news headlines, ordered by time. Supports pagination and filtering. The news feed is curated by financial professionals and enhanced by AI, including cover image generation and ticker tagging. ```APIDOC GET /open/news/v1/wire/page Description: Returns latest news headlines ordered by time, supports pagination and filtering options. Parameters: - Authorization: string (header, required) - Bearer authentication header of the form `Bearer `, where `` is your key. Get the key here: https://www.ainvest.com/business/developer-manage/ Returns: - 200 OK: JSON object containing news data. - data.startId: string - data.size: integer - data.data: array of news items - news_id: string - news_important: integer - publish_time: integer (timestamp) - title: string - content: string - source: string - cover_image: object - src: string - type: string - source_url: string - tag_list: array of tag objects - code: string - market: string - name_en: string - status_code: integer - status_msg: string Notes: The news headlines are sourced from public news outlets and enhanced by AI. The data is pushed frequently. The endpoint supports filtering by stock symbol, industry, or category. ``` ```curl curl --request GET \ --url https://openapi.ainvest.com/open/news/v1/wire/page \ --header 'Authorization: Bearer ' ``` ```json { "data": { "startId": "", "size": 123, "data": [ { "news_id": "", "news_important": 123, "publish_time": 123, "title": "", "content": "", "source": "", "cover_image": { "src": "", "type": "" }, "source_url": "", "tag_list": [ { "code": "", "market": "", "name_en": "" } ] } ] }, "status_code": 123, "status_msg": "" } ``` -------------------------------- ### GET Analyst Ratings History Source: https://docs.ainvest.com/reference/analysis-ratings/history Retrieves a history of analyst ratings, including target prices, firm names, and publication dates for a given stock ticker. Requires bearer token authentication. ```APIDOC Endpoint: GET /open/analysis-ratings/history Description: Get all ratings along with target prices, firm names and dates of the research publication. Authorization: Bearer authentication header of the form `Bearer `, where `` is your key. Get the key here: https://www.ainvest.com/business/developer-manage/ Query Parameters: - ticker: string (required) - US stock market ticker symbol, e.g. AAPL, TSLA, etc. Response Example: "data": { "data": [ { "date": "2025-06-26", "firm": "JP Morgan", "action": "Maintained", "rating_previous": null, "rating": "Overweight", "target_price_previous": 240.0, "price_target": 230.0 }, { "date": "2025-06-10", "firm": "Needham", "action": "Maintained", "rating_previous": null, "rating": "Hold", "target_price_previous": null, "price_target": null }, { "date": "2025-06-10", "firm": "B of A Securities", "action": "Maintained", "rating_previous": null, "rating": "Buy", "target_price_previous": null, "price_target": 235.0 } ] } ``` ```shell curl --request GET \ --url https://openapi.ainvest.com/open/analysis-ratings/history \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Ainvest API Base URL and Authentication Source: https://docs.ainvest.com/docs/quickstart Details on how to authenticate and the base URL for making API requests to Ainvest. This includes information on where to obtain API keys and how to include them in the request headers. ```APIDOC Production Base URL: https://openapi.ainvest.com/open Authentication: Include your API key in the 'Authorization' header field. Example: Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Ainvest API Categories Source: https://docs.ainvest.com/docs/quickstart An overview of the main data categories available through the Ainvest API. These categories represent the different types of financial data that can be accessed. ```APIDOC API Categories: - Securities - News - Ownership - Analyst Ratings ``` -------------------------------- ### Ainvest API Base URL and Authentication Source: https://docs.ainvest.com/index Details on how to authenticate and the base URL for making API requests to Ainvest. This includes information on where to obtain API keys and how to include them in the request headers. ```APIDOC Production Base URL: https://openapi.ainvest.com/open Authentication: Include your API key in the 'Authorization' header field. Example: Authorization: Bearer YOUR_API_KEY ``` -------------------------------- ### Ainvest API Categories Source: https://docs.ainvest.com/index An overview of the main data categories available through the Ainvest API. These categories represent the different types of financial data that can be accessed. ```APIDOC API Categories: - Securities - News - Ownership - Analyst Ratings ``` -------------------------------- ### AInvest API - Securities Financials Endpoint Source: https://docs.ainvest.com/reference/securities/stock-financials Provides detailed financial metrics for a given stock ticker. Includes parameters for authentication and querying, and specifies the structure of successful and error responses. ```APIDOC Endpoint: GET /open/securities/stock/financials Description: Get financial metrics of a stock, including earnings per share, net profit, operating income, etc. Authorization: - Type: Bearer Token - Header: Authorization: Bearer - Details: Obtain your key from https://www.ainvest.com/business/developer-manage/ Query Parameters: - ticker (string, required): US stock market ticker symbol, e.g. AAPL, TSLA. Responses: - 200 OK: Content-Type: application/json Description: Successful response in standard envelope. Schema: { "data": { "assets_debt_ratio": 123, "eps_ttm": 123, "gross_profit_ttm": 123, "gross_profit_ratio_ttm": 123, "net_profit": 123, "net_profit_ttm": 123, "net_profit_ratio_ttm": 123, "net_profit_yoy": 123, "operating_income_total": 123, "operating_income_total_ttm": 123, "operating_income_total_yoy": 123, "parent_holder_net_profit_ttm": 123, "balanced_net_assets": 123, "roe_ttm": 123, "pay_out_ratio": 123, "dividend_yield_ratio_ttm": 123, "pb": 123, "pe_ttm": 123 }, "status_code": 123, "status_msg": "" } - 400 Bad Request: Content-Type: application/json Description: Error response. Schema: { "status_code": 123, "status_msg": "" } Related Endpoints: - GET /reference/securities/search - GET /reference/news/headlines/page ``` -------------------------------- ### AInvest API: MCP Server Integration Source: https://docs.ainvest.com/docs/changelog Information regarding MCP Servers used to connect with AI models, as mentioned in the documentation. ```APIDOC MCP Server: - Description: Used to connect with AI models. - Documentation Link: /docs/mcp-servers ``` -------------------------------- ### News API Query Parameters Source: https://docs.ainvest.com/reference/news/headlines/page Defines the available query parameters for filtering and retrieving news articles. Supports filtering by category, stock tickers, industry, and pagination. ```APIDOC API Endpoint: /news Query Parameters: - tab: string Description: Filter by news category. Default: "all" Allowed Values: - all: All content (default value) - manual: Picks curated by human editors - important: Only the important news - movers: News related to stocks on the move today - earnings: Earning reports and related news - insider_trades: Insider transactions - technical: Real-time signals by technical indicators - "8k": Form 8-K filings. SEC requires publicly traded companies to report material events that occur between their regular financial reports. Examples include significant acquisitions, dispositions, changes in directors or officers, material contract terminations, and changes in accounting practices. Generally, companies must file an 8-K within four business days of the event. - twitter: News sourced from other media outlets - tickers: string Description: US stock market ticker symbols, e.g. AAPL, TSLA, etc. You can specify multiple ticker symbols separated by commas. If not specified, return all news headlines. - industry: string Description: Filter by industry. Allowed Values: - software: Software - tech_hardware: Technology and hardware - chips: Semiconductor and electronics - healthcare_equipment: Healthcare equipment - pharma: Pharmaceuticals - banks: Banking - defense: Defense - industrials: Industrials - consumer_durables: Consumer durables - autos: Automotive - staples_retail: Retail and consumer staples - energy_equip_serv: Energy - reits: Real estate - media: Media and entertainment - start_id: string Description: Used for paging. If specified, return the latest items from this id. If not specified, return the latest items from now. Example: "US_FLASH786892" - size: integer Description: Number of items to return. Default: 10 Constraints: 1 <= x <= 50 Response: 200 - application/json: An array of news headline structures. ``` -------------------------------- ### Remote Ainvest MCP Server URL and Authorization Source: https://docs.ainvest.com/docs/mcp-servers Details the server URL for remote Ainvest MCP connections and the required Authorization header format for API calls. ```APIDOC Server URL: https://docsmcp.ainvest.com Authorization Header: Authorization: Bearer {TOKEN} ``` -------------------------------- ### News API Query Parameters Source: https://docs.ainvest.com/reference/news/headlines Defines the available query parameters for filtering and retrieving news articles. Supports filtering by category, stock tickers, industry, and pagination. ```APIDOC API Endpoint: /news Query Parameters: - tab: string Description: Filter by news category. Default: "all" Allowed Values: - all: All content (default value) - manual: Picks curated by human editors - important: Only the important news - movers: News related to stocks on the move today - earnings: Earning reports and related news - insider_trades: Insider transactions - technical: Real-time signals by technical indicators - "8k": Form 8-K filings. SEC requires publicly traded companies to report material events that occur between their regular financial reports. Examples include significant acquisitions, dispositions, changes in directors or officers, material contract terminations, and changes in accounting practices. Generally, companies must file an 8-K within four business days of the event. - twitter: News sourced from other media outlets - tickers: string Description: US stock market ticker symbols, e.g. AAPL, TSLA, etc. You can specify multiple ticker symbols separated by commas. If not specified, return all news headlines. - industry: string Description: Filter by industry. Allowed Values: - software: Software - tech_hardware: Technology and hardware - chips: Semiconductor and electronics - healthcare_equipment: Healthcare equipment - pharma: Pharmaceuticals - banks: Banking - defense: Defense - industrials: Industrials - consumer_durables: Consumer durables - autos: Automotive - staples_retail: Retail and consumer staples - energy_equip_serv: Energy - reits: Real estate - media: Media and entertainment - start_id: string Description: Used for paging. If specified, return the latest items from this id. If not specified, return the latest items from now. Example: "US_FLASH786892" - size: integer Description: Number of items to return. Default: 10 Constraints: 1 <= x <= 50 Response: 200 - application/json: An array of news headline structures. ``` -------------------------------- ### Analyst Ratings API Reference Source: https://docs.ainvest.com/reference/analysis-ratings Provides access to analyst rating data. Includes endpoints for retrieving the consensus average rating for a stock and its historical rating data. ```APIDOC AnalystRatingsAPI: # Get average rating GET /reference/analysis-ratings/consensus Description: Retrieves the average analyst rating and consensus for a given stock. Parameters: - (Query) symbol: The stock ticker symbol (e.g., AAPL). Returns: - status: HTTP status code. - data: Object containing average rating, consensus details, and potentially price targets. Example: GET /reference/analysis-ratings/consensus?symbol=MSFT # Get ratings history GET /reference/analysis-ratings/history Description: Retrieves the historical analyst ratings for a given stock over time. Parameters: - (Query) symbol: The stock ticker symbol (e.g., GOOG). - (Query) startDate: The start date for the history (YYYY-MM-DD). - (Query) endDate: The end date for the history (YYYY-MM-DD). Returns: - status: HTTP status code. - data: Array of historical rating objects, each including date, rating, and analyst firm. Example: GET /reference/analysis-ratings/history?symbol=AMZN&startDate=2023-01-01&endDate=2023-12-31 ``` -------------------------------- ### Ainvest API Reference Source: https://docs.ainvest.com/reference Details the authentication method, required query parameters, and expected response structure for the Ainvest API. Supports searching by ticker or company name. ```APIDOC Authorization: type: Bearer header: Authorization description: Bearer authentication header of the form `Bearer `, where `` is your key. [Get the key here](https://www.ainvest.com/business/developer-manage/) ``` ```APIDOC Query Parameters: query: type: string required: true description: Search query, can be a stock ticker symbol or part of the company name ``` ```APIDOC Response: 200: description: Successful response in standard envelope. content: application/json: schema: type: object 400: description: Bad Request ``` -------------------------------- ### Ainvest API Reference Source: https://docs.ainvest.com/reference/securities/search Details the authentication method, required query parameters, and expected response structure for the Ainvest API. Supports searching by ticker or company name. ```APIDOC Authorization: type: Bearer header: Authorization description: Bearer authentication header of the form `Bearer `, where `` is your key. [Get the key here](https://www.ainvest.com/business/developer-manage/) ``` ```APIDOC Query Parameters: query: type: string required: true description: Search query, can be a stock ticker symbol or part of the company name ``` ```APIDOC Response: 200: description: Successful response in standard envelope. content: application/json: schema: type: object 400: description: Bad Request ``` -------------------------------- ### Securities Search API Source: https://docs.ainvest.com/reference Endpoint to search for US stocks by ticker symbol or company name. It returns a list of matching securities ordered by relevance. Requires an Authorization token. ```APIDOC GET /open/securities/search Description: Searches for US stocks by ticker symbol or company name. Returns a list of matching securities ordered by relevance. Parameters: query (string, required): The ticker symbol or company name to search for. Headers: Authorization (string, required): Bearer token for authentication. Response (200 OK): { "data": { "data": [ { "ticker": "string", "name": "string", "security_tag": "string", "exchange": "string" } ] }, "status_code": 0, "status_msg": "string" } Response Example: { "data": { "data": [ { "ticker": "BAC", "name": "Bank Of America", "security_tag": "stock", "exchange": "NYSE" } ] }, "status_code": 0, "status_msg": "success" } ``` -------------------------------- ### Securities Search API Source: https://docs.ainvest.com/reference/securities/search Endpoint to search for US stocks by ticker symbol or company name. It returns a list of matching securities ordered by relevance. Requires an Authorization token. ```APIDOC GET /open/securities/search Description: Searches for US stocks by ticker symbol or company name. Returns a list of matching securities ordered by relevance. Parameters: query (string, required): The ticker symbol or company name to search for. Headers: Authorization (string, required): Bearer token for authentication. Response (200 OK): { "data": { "data": [ { "ticker": "string", "name": "string", "security_tag": "string", "exchange": "string" } ] }, "status_code": 0, "status_msg": "string" } Response Example: { "data": { "data": [ { "ticker": "BAC", "name": "Bank Of America", "security_tag": "stock", "exchange": "NYSE" } ] }, "status_code": 0, "status_msg": "success" } ``` -------------------------------- ### AInvest API: News Feed Source: https://docs.ainvest.com/docs/changelog Endpoint for accessing near-realtime aggregated news headlines, enriched by AI models and curated by financial professionals. ```APIDOC News Feed: /reference/news/headlines - Description: Provides a near-realtime aggregated news feed curated by human financial professionals and enriched by AI models. - Returns: A feed of financial news headlines. ``` -------------------------------- ### Analyst Rating Categories Source: https://docs.ainvest.com/reference/analysis-ratings Defines the standard categories used by financial analysts to rate stocks, indicating their outlook on future performance. These categories are crucial for understanding investment recommendations. ```APIDOC AnalystRatingCategory: - strong_buy: The analyst believes the stock is undervalued and has potential for significant growth. - buy: The stock is expected to outperform its benchmark index. - hold: Good enough to keep in a portfolio but not worthy of additional investment. - sell: The stock is expected to underperform its benchmark index. - strong_sell: The analyst believes the stock is overvalued and likely to decline in price. ``` -------------------------------- ### AInvest API: Analyst Ratings Source: https://docs.ainvest.com/docs/changelog Provides access to analyst ratings data, including historical ratings and consensus recommendations for stocks. ```APIDOC Analyst Ratings: Analyst Ratings History: /reference/analysis-ratings/history - Description: Provides a dataset of analyst ratings, allowing drill-down to firm and date level to see rating history. - Returns: Historical analyst rating data. Average Analysts Rating (Consensus): /reference/analysis-ratings/consensus - Description: Retrieves the average analyst recommendation given to a stock. - Returns: Consensus analyst ratings for securities. ``` -------------------------------- ### AInvest API: Securities Search Source: https://docs.ainvest.com/docs/changelog Endpoint to search for securities using their ticker symbol or security name. Provides access to financial market data. ```APIDOC Securities Search: /reference/securities/search - Description: Search for securities by ticker or security name. - Parameters: - ticker: The ticker symbol of the security (optional). - securityName: The name of the security (optional). - Returns: A list of matching securities with their details. ``` -------------------------------- ### AInvest API: Ownership Data Source: https://docs.ainvest.com/docs/changelog API endpoints for accessing ownership information, including trades made by US Congress members and insider transactions. ```APIDOC Ownership Data: US Congress Trades: /reference/ownership/congress - Description: Retrieves purchases and sales made by members of the US Congress. - Returns: A dataset of congressional trading activities. Insider Trades: /reference/ownership/insider - Description: Retrieves purchases and sales made by company officers, directors, and major shareholders (holders of >10% of a class of securities). - Example: Insider transactions of AAPL as of June 2025. - Returns: A dataset of insider trading activities. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.