fmp_py.fmp_company_search
Classes
Module Contents
- class fmp_py.fmp_company_search.FmpCompanySearch(api_key: str = os.getenv('FMP_API_KEY'))
Bases:
fmp_py.fmp_base.FmpBase- isin_search(isin: str) pandas.DataFrame
Searches for a company using its ISIN (International Securities Identification Number).
- Parameters:
isin (str) – The ISIN of the company to search for.
- Returns:
A DataFrame containing the company information.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found for the specified parameters.
- cusip_search(cusip: str) pandas.DataFrame
Search for a company using its CUSIP identifier.
Parameters: cusip (str): The CUSIP identifier of the company to search for.
Returns: pd.DataFrame: A DataFrame containing the response data.
Raises: ValueError: If no data is found for the specified parameters.
- cik_search(cik: str) pandas.DataFrame
Retrieves company information based on the specified CIK (Central Index Key).
- Parameters:
cik (str) – The CIK of the company.
- Returns:
A DataFrame containing the company information.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found for the specified parameters.
- cik_name_search(company_name: str) pandas.DataFrame
Searches for a company’s CIK (Central Index Key) based on its name.
- Parameters:
company_name (str) – The name of the company to search for.
- Returns:
A DataFrame containing the response data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found for the specified parameters.
- name_search(query: str, limit: int = None, exchange: str = None) pandas.DataFrame
Search for company names based on the specified query.
- Parameters:
query (str) – The search query.
limit (int, optional) – The maximum number of results to return. Defaults to None.
exchange (str, optional) – The exchange to search within. Defaults to None.
- Returns:
- A DataFrame containing the search results with columns:
symbol: The company symbol.
name: The company name.
currency: The currency in which the company operates.
stock_exchange: The stock exchange where the company is listed.
exchange_short_name: The short name of the exchange.
- Return type:
pd.DataFrame
- Raises:
ValueError – If an invalid exchange is provided.
ValueError – If no data is found for the specified parameters.
- ticker_search(query: str, limit: int = None, exchange: str = None) pandas.DataFrame
Search for tickers based on the specified query, limit, and exchange.
- Parameters:
query (str) – The search query.
limit (int, optional) – The maximum number of results to return. Defaults to None.
exchange (str, optional) – The exchange to search for tickers. Defaults to None.
- Returns:
- A DataFrame containing the search results with columns:
symbol: The ticker symbol.
name: The company name.
currency: The currency in which the stock is traded.
stock_exchange: The stock exchange where the stock is listed.
exchange_short_name: The short name of the exchange.
- Return type:
pd.DataFrame
- Raises:
ValueError – If an invalid exchange is provided.
ValueError – If no data is found for the specified parameters.
- general_search(query: str, exchange: str = None, limit: int = None) pandas.DataFrame
Perform a general search for companies based on the specified query.
- Parameters:
query (str) – The search query.
exchange (str, optional) – The exchange to filter the search results. Defaults to None.
limit (int, optional) – The maximum number of search results to return. Defaults to None.
- Returns:
- A DataFrame containing the search results with the following columns:
symbol: The company symbol.
name: The company name.
currency: The currency in which the company is traded.
stock_exchange: The stock exchange where the company is listed.
exchange_short_name: The short name of the exchange.
- Return type:
pd.DataFrame
- Raises:
ValueError – If an invalid exchange is provided.
ValueError – If no data is found for the specified parameters.
- _process_search_data(url: str, query: str, exchange: str, limit: int) pandas.DataFrame
- static _available_exchanges() list
Returns a list of available exchanges.
- Returns:
A list of available exchanges.
- Return type:
list