fmp_py.fmp_stock_list
Classes
Module Contents
- class fmp_py.fmp_stock_list.FmpStockList(api_key: str = os.getenv('FMP_API_KEY'))
Bases:
fmp_py.fmp_base.FmpBase- available_indexes() pandas.DataFrame
Retrieves a DataFrame of available indexes from the API.
- Returns:
- A DataFrame containing the available indexes.
The DataFrame columns include ‘symbol’, ‘name’, ‘currency’, ‘stock_exchange’, and ‘exchange_short_name’.
- Return type:
pd.DataFrame
- exchange_symbols(exchange: str) pandas.DataFrame
Retrieves a DataFrame of stock symbols for a specific exchange.
- Parameters:
exchange (str) – The exchange for which to retrieve stock symbols.
- Returns:
A DataFrame containing the stock symbols and their corresponding data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found in the API response.
- symbol_changes() pandas.DataFrame
Retrieves the symbol changes from the API and returns them as a pandas DataFrame.
- Returns:
A DataFrame containing the symbol changes, with columns for date, name, old symbol, and new symbol.
- Return type:
pd.DataFrame
- euronext_symbols() pandas.DataFrame
Retrieves a DataFrame of available symbols on the Euronext stock exchange.
- Returns:
A DataFrame containing the available symbols on the Euronext stock exchange.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found in the API response.
- cik_list() pandas.DataFrame
Retrieves the CIK (Central Index Key) list from the API.
- Returns:
A DataFrame containing the CIK list.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found in the API response.
- commitment_of_traders_report() pandas.DataFrame
Retrieves the commitment of traders report from the API and returns it as a pandas DataFrame.
- Returns:
The commitment of traders report data.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found in the API response.
- tradable_stocks_search() pandas.DataFrame
- statement_symbols_list() List[str]
Retrieves a list of financial statement symbols.
- Returns:
A list of financial statement symbols.
- Raises:
ValueError – If no data is found in the API response.
- exchange_traded_fund_search() pandas.DataFrame
Retrieves a list of exchange-traded funds (ETFs) from the API.
- Returns:
A DataFrame containing the ETF data, with columns for symbol, name, price, exchange, exchange_short_name, and type. The DataFrame is sorted by symbol in ascending order and has its index reset.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is found in the API response.
- stock_list() pandas.DataFrame
Retrieves a list of stocks from the API.
- Returns:
- A DataFrame containing the stock information with the following columns:
symbol: The stock symbol.
name: The name of the stock.
exchange: The stock exchange where the stock is traded.
price: The current price of the stock.
exchange_short_name: The short name of the stock exchange.
type: The type of the stock.
- Return type:
pd.DataFrame
- _process_data(url: str) pandas.DataFrame
Process the data returned from the API.
- Parameters:
url (str) – The URL to make the API request.
- Returns:
Processed data as a pandas DataFrame.
- Return type:
pd.DataFrame
- Raises:
ValueError – If no data is returned from the API.