Get data

This section contains functions to retrieve specific datasets related to financial instruments transparency and regulation:

FITRS: Fetches the most recent aggregated trading data for various financial instruments, covering trading volumes, average trade sizes, and transaction numbers under the Financial Instruments Transparency System (FITRS).

SSR: Retrieves data on shares that are exempt from Short Selling Regulations (SSR), providing insights into the list of securities that are excluded from SSR restrictions.

Get last available FITRS data

esma_data_py.EsmaDataLoader.load_latest_files(self, file_type: str = 'Full', vcap: bool = False, isin: Optional[List[str]] = [], cfi: str = 'E', eqt=True, update: bool = False)

Retrieves the latest full files from the ‘fitrs’ dataset, filtered by instrument type and optionally by CFI codes and ISINs.

Args:

file_type (str): Type of the file to retrieve (e.g., ‘Full’). Defaults to ‘Full’. vcap (bool): A flag to filter by VCAP (default is False). isin (list of str, optional): A list of ISIN(s) to filter the files. If provided, only files containing these ISINs are included. cfi (str): CFI code(s) to filter the files. Must be one of ‘C’, ‘D’, ‘E’, ‘F’, ‘H’, ‘I’, ‘J’, ‘O’, ‘R’, ‘S’. Defaults to ‘E’. eqt (bool): Whether to consider only equity instruments (True) or non-equity instruments (False). Defaults to True. update (bool): Whether to force re-downloading the files. If True, it always fetches the latest version. Defaults to False.

Returns:

pd.DataFrame: A DataFrame containing the concatenated data from all files that meet the specified criteria.

Examples:
>>> # Example to get the latest full files for equity instruments with specific CFI codes:
>>> files_df = EsmaDataLoader().load_latest_files()

Get SSR (Short Selling Regulation) exempted shares data

esma_data_py.EsmaDataLoader.load_ssr_exempted_shares(self, today: bool = True)

Retrieves SSR (Short Selling Regulation) exempted shares data from the European Securities and Markets Authority register for all European countries including Norway and Great Britain. Optionally filters the results to include only records relevant to the current date.

Args:

today (bool): If True, the function filters the data to show only records where the modification date, start date of exemption, or both are relevant for today’s date. Defaults to True.

Returns:

pd.DataFrame: A DataFrame containing the SSR exempted shares data, filtered based on the ‘today’ parameter. This data includes fields such as country code, ISIN, modification dates, and exemption start dates.

Examples:
>>> # Retrieve all SSR exempted shares data without any date filtering
>>> exempted_shares = EsmaDataLoader().load_ssr_exempted_shares(today=False)
>>> # Retrieve SSR exempted shares data relevant for today's date
>>> exempted_shares_today = EsmaDataLoader().load_ssr_exempted_shares()