Fmp-Py
stable

Contents:

  • Getting Started With Chart Data
  • API Reference
    • quote
    • fmp_py
      • Submodules
        • fmp_py.fmp_base
        • fmp_py.fmp_chart_data
        • fmp_py.fmp_company_information
        • fmp_py.fmp_company_search
        • fmp_py.fmp_crypto
        • fmp_py.fmp_dividends
        • fmp_py.fmp_earnings
        • fmp_py.fmp_financial_statements
        • fmp_py.fmp_forex
        • fmp_py.fmp_historical_data
        • fmp_py.fmp_ipo_calendar
        • fmp_py.fmp_mergers_and_aquisitions
        • fmp_py.fmp_price_targets
        • fmp_py.fmp_quote
        • fmp_py.fmp_splits
        • fmp_py.fmp_statement_analysis
        • fmp_py.fmp_stock_list
        • fmp_py.fmp_upgrades_downgrades
        • fmp_py.fmp_valuation
    • valuation
    • price_targets
    • statement_analysis
    • upgrades_downgrades
    • company_information
Fmp-Py
  • API Reference
  • fmp_py
  • fmp_py.fmp_company_search
  • Edit on GitHub

fmp_py.fmp_company_search

Classes

FmpCompanySearch

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

Previous Next

© Copyright 2024, TexasCoding. Revision b8c700d6.

Built with Sphinx using a theme provided by Read the Docs.