macrosynergy.download.dataquery_file_api#

class DataQueryFileAPIClient(client_id=None, client_secret=None, out_dir=None, base_url='https://api-dataquery.jpmchase.com/research/dataquery-authe/api/v2', scope='JPMC:URI:RS-06785-DataQueryExternalApi-PROD', proxies=None, verify_ssl=True, api_delay=0.04, api_delay_margin=1.05)[source]#

Bases: RateLimitedRequester

A client for accessing JPMaQS product files via the JPMorgan DataQuery File API.

This client provides an alternative distribution channel to the Fusion API for JPMaQS data. It is designed to list and download JPMaQS data files, which are available as full snapshots, daily deltas, and metadata files. The client handles authentication, API requests, and file downloads, including large file downloads using a segmented, concurrent approach.

Parameters:
  • client_id (Optional[str]) – Client ID for authentication. If not provided, it will be sourced from environment variables (DQ_CLIENT_ID or DATAQUERY_CLIENT_ID).

  • client_secret (Optional[str]) – Client Secret for authentication. If not provided, it will be sourced from environment variables (DQ_CLIENT_SECRET or DATAQUERY_CLIENT_SECRET).

  • out_dir (Optional[str]) – Base output directory for downloads. The effective cache directory is always a folder named jpmaqs-download (either out_dir itself, or <out_dir>/jpmaqs-download). A client instance is bound to this directory.

  • base_url (str) – The base URL for the DataQuery File API. Defaults to DQ_FILE_API_BASE_URL.

  • scope (str) – The API scope for authentication. Defaults to DQ_FILE_API_SCOPE.

  • proxies (Optional[Dict[str, str]]) – Optional proxies to use for HTTP requests. Defaults to None.

  • verify_ssl (bool) – If True, verifies SSL certificates for all requests. Defaults to True.

property file_selector: FileSelector#

Cached FileSelector instance for this client.

Notes

This property is intentionally designed so it does not fetch the API file inventory when first accessed. Download operations (e.g. download_full_snapshot) refresh the selector with the latest unfiltered API inventory as needed.

Return type:

FileSelector

list_groups()[source]#

Lists all available data provider groups.

Returns:

A DataFrame containing details of available groups.

Return type:

pd.DataFrame

search_groups(keywords)[source]#

Searches for data provider groups that match the given keywords.

Parameters:

keywords (str) – Keywords to search for in group names and descriptions.

Returns:

A DataFrame of groups matching the search criteria.

Return type:

pd.DataFrame

list_group_files(group_id='JPMAQS', include_full_snapshots=True, include_delta=True, include_metadata=True)[source]#

Lists all file groups (datasets) for a specific data provider.

Parameters:
  • group_id (str) – The identifier for the data provider group, defaults to the JPMaQS group.

  • include_full_snapshots (bool) – If True, include full snapshot file groups in the result.

  • include_delta (bool) – If True, include delta file groups in the result.

  • include_metadata (bool) – If True, include metadata file groups in the result.

Returns:

A DataFrame listing the available file groups.

Return type:

pd.DataFrame

list_available_files(file_group_id=None, group_id='JPMAQS', start_date='20220101', end_date=None, convert_metadata_timestamps=True, include_unavailable=False)[source]#

Lists all available files for a specific file group within a date range.

Parameters:
  • file_group_id (Optional[str]) – The identifier for the file group (e.g. “JPMAQS_MACROECONOMIC_BALANCE_SHEETS”). If None, returns all files for the group_id. Defaults to None.

  • group_id (str) – The identifier for the data provider group.

  • start_date (str) – The start date for the search in “YYYYMMDD” format.

  • end_date (str) – The end date for the search in “YYYYMMDD” format. Defaults to today.

  • convert_metadata_timestamps (bool) – If True, convert timestamp columns to datetime objects.

  • include_unavailable (bool) – If True, includes files that are listed but not currently available.

Returns:

A DataFrame of available files with their details.

Return type:

pd.DataFrame

list_available_files_for_all_file_groups(group_id='JPMAQS', start_date='20220101', end_date=None, include_full_snapshots=True, include_delta=True, include_metadata=True, convert_metadata_timestamps=True, include_unavailable=False)[source]#

Fetches and consolidates available files for all relevant file groups. This method is simply a convenience wrapper for list_available_files.

Parameters:
  • group_id (str) – The identifier for the data provider group.

  • start_date (str) – The start date for the search in “YYYYMMDD” format.

  • end_date (str) – The end date for the search in “YYYYMMDD” format. Defaults to today.

  • include_full_snapshots (bool) – If True, query for full snapshot file groups.

  • include_delta (bool) – If True, query for delta file groups.

  • include_metadata (bool) – If True, query for metadata file groups.

  • convert_metadata_timestamps (bool) – If True, convert timestamp columns to datetime objects.

  • include_unavailable (bool) – If True, include files that are listed but not currently available.

Returns:

A consolidated DataFrame of all available files.

Return type:

pd.DataFrame

filter_available_files_by_datetime(since_datetime=None, to_datetime=None, include_full_snapshots=True, include_delta=True, include_metadata=True, include_unavailable=False)[source]#

Retrieve files whose file timestamp (file-datetime) falls within a datetime window.

Notes

Despite the wording in older docs, this method filters on file-datetime (file-vintage timestamp), not last-modified.

Parameters:
  • since_datetime (Optional[str]) – The start of the time window (inclusive). Format “YYYYMMDD”, “YYYYMMDDTHHMMSS”, or an ISO 8601 datetime string (for example “YYYY-MM-DDTHH:MM:SSZ”). Defaults to the start of the current day (UTC).

  • to_datetime (Optional[str]) – The end of the time window (inclusive). Uses the same formats as since_datetime. Defaults to the current timestamp (UTC).

  • include_full_snapshots (bool) – If True, include full snapshot files in the search.

  • include_delta (bool) – If True, include delta files in the search.

  • include_metadata (bool) – If True, include metadata files in the search.

  • include_unavailable (bool) – If True, include files that are not currently available for download.

Returns:

A DataFrame of files whose file-datetime falls in the specified window.

Return type:

pd.DataFrame

check_file_availability(file_group_id=None, file_datetime=None, filename=None)[source]#

Checks if a specific file is available for download.

Provide either (file_group_id and file_datetime) or filename.

Parameters:
  • file_group_id (str) – The identifier for the file group.

  • file_datetime (str) – The file’s timestamp identifier.

  • filename (Optional[str]) – The full name of the file (e.g., “JPMAQS_GENERIC_RETURNS_20250501.parquet”).

Returns:

A DataFrame with the file’s availability status.

Return type:

pd.DataFrame

download_file(file_group_id=None, file_datetime=None, filename=None, overwrite=False, chunk_size=None, timeout=300.0, max_retries=3)[source]#

Download a single DataQuery file to the client’s output directory.

This method can be called with either (file_group_id and file_datetime) or a filename.

  • Snapshot/delta datasets are typically .parquet.

  • Some metadata file groups publish .json files (pass filename=…).

For large snapshot files, it automatically uses the SegmentedFileDownloader for a robust, multi-part download.

Parameters:
  • file_group_id (str) – The identifier of the file group to download from.

  • file_datetime (str) – The timestamp of the file to download.

  • filename (Optional[str]) – The full filename to download. Overrides file_group_id and file_datetime.

  • overwrite (bool) – If True, overwrites the file if it already exists. Default is False.

  • chunk_size (Optional[int]) – The chunk size for streaming downloads (in bytes).

  • timeout (Optional[float]) – The timeout for the download request in seconds.

  • max_retries (int) – The number of retries for the entire file download.

Returns:

The full path to the downloaded file.

Return type:

str

delete_corrupt_files(files=None, delete=True)[source]#

Check downloaded files for corruption and optionally delete them.

Parameters:
  • files (Optional[List[str]]) – A list of file names (as in list_downloaded_files()[“file-name”]) to check for corruption. If None, scans all downloaded files in the client’s output directory.

  • delete (bool) – If True, corrupt files are deleted from disk. If False, corrupt files are only logged as warnings (no files are removed). Default is True.

Returns:

A list of file paths that were identified as corrupt (and deleted if delete=True).

Return type:

List[str]

cleanup_old_files(days_to_keep=5)[source]#

Deletes files older than the specified number of days from the output directory.

Parameters:

days_to_keep (int) – The number of days to retain files. This is measured from the latest file date within each file group. Files older than this threshold will be deleted.

Returns:

A list of file paths that were deleted.

Return type:

List[str]

download_multiple_files(filenames, overwrite=False, max_retries=3, n_jobs=None, chunk_size=None, timeout=300.0, show_progress=True, delete_corrupt_files=False)[source]#

Downloads a list of files concurrently with progress indication.

Parameters:
  • filenames (List[str]) – A list of full filenames to be downloaded.

  • overwrite (bool) – If True, overwrites files if they already exist. Default is False.

  • max_retries (int) – The number of times to retry downloading the entire list of failed files.

  • n_jobs (int) – The number of concurrent download jobs. If -1, it uses all available cores.

  • chunk_size (Optional[int]) – The chunk size for streaming downloads (in bytes).

  • timeout (Optional[float]) – The timeout for each download request in seconds.

  • show_progress (bool) – If True, displays a progress bar for the downloads.

  • delete_corrupt_files (bool) – If True, corrupt files are deleted after download and retried. If False (default), corrupt files are only logged as warnings. Users can run delete_corrupt_files() separately after verifying the logs.

Return type:

None

download_catalog_file(overwrite=False, timeout=300.0)[source]#

Download (or resolve) the most recent JPMaQS catalog parquet file.

The catalog is used for ticker validation and mapping tickers to underlying JPMaQS datasets.

Notes

  • The “latest” catalog is determined by an API call to list_available_files(self.catalog_file_group_id).

  • If the latest catalog already exists locally and overwrite=False, this method returns the local path (no download required).

  • If the latest catalog cannot be downloaded, this method raises an error (no fallback to older local catalogs).

Return type:

str

get_datasets_for_indicators(tickers=None, cids=None, xcats=None, case_sensitive=False, catalog_file=None)[source]#

Return the list of JPMaQS datasets that contain the requested tickers.

This loads the JPMaQS catalog parquet and maps the catalog Theme column to DataQuery file-group-ids via JPMAQS_DATASET_THEME_MAPPING.

Notes

  • Unknown themes are mapped to “UnknownTheme” (to avoid NaN propagation and sorting issues) and logged as a warning.

Return type:

List[str]

filter_to_valid_tickers(tickers, case_sensitive=False, catalog_file=None)[source]#

Filters a list of tickers to only those that are valid according to the catalog.

Parameters:
  • tickers (List[str]) – A list of tickers to validate.

  • case_sensitive (bool) – If True, performs case-sensitive matching. Default is False.

Return type:

List[str]

list_downloaded_files(include_last_modified_columns=False)[source]#
Return type:

DataFrame

get_revisions_notifications(date=None, normalize_headers=True)[source]#

Return “Changed historical values” notifications for a given date.

This loads daily JPMaQS metadata notification JSON(s) for the requested date and returns the table describing historical revisions. If no matching notification file(s) are found, an empty DataFrame is returned.

Parameters:
  • date (Optional[Union[pd.Timestamp, str]]) – Target date (UTC). Strings can be “YYYY-MM-DD”, “YYYYMMDD”, or ISO 8601. Defaults to today (UTC).

  • normalize_headers (bool) – If True, normalizes column names to lowercase snake_case and converts “(%)” to “pct”. Defaults to True.

Returns:

A DataFrame of revision notifications. Empty if none are found.

Return type:

pd.DataFrame

get_missing_data_notifications(date=None, normalize_headers=True)[source]#

Return missing-update notifications (with optional additional information).

This loads daily JPMaQS metadata notification JSON(s) for the requested date. It returns:

  • “Missing Updates” rows

  • left-joined with “Additional information on missing updates” when available

If only one of the two tables is available, that table is returned. If neither is available, an empty DataFrame is returned.

Parameters:
  • date (Optional[Union[pd.Timestamp, str]]) – Target date (UTC). Strings can be “YYYY-MM-DD”, “YYYYMMDD”, or ISO 8601. Defaults to today (UTC).

  • normalize_headers (bool) – If True, normalizes column names to lowercase snake_case and converts “(%)” to “pct”. Defaults to True.

Returns:

A DataFrame of missing-update notifications (optionally enriched).

Return type:

pd.DataFrame

download_full_snapshot(since_datetime=None, to_datetime=None, overwrite=False, chunk_size=None, timeout=300.0, include_full_snapshots=True, include_delta=True, include_metadata=True, file_group_ids=None, show_progress=True, delete_corrupt_files=False, _selection_since_datetime=None, _selection_to_datetime=None, _selection_min_last_updated=None, _selection_max_last_updated=None)[source]#

Downloads a complete snapshot of files based on specified criteria.

This method fetches the full available-file inventory from the API (unbounded by since_datetime / to_datetime) and delegates vintage-aware selection to FileSelector. The vintage window (since_datetime, to_datetime) controls which files are selected for download, not which files are listed from the API.

Parameters:
  • since_datetime (Optional[str]) – Vintage window start (inclusive) used for file selection. Defaults to the start of the current day (UTC).

  • to_datetime (Optional[str]) – Vintage window end (inclusive) used for file selection. Note: loading uses all locally available cached snapshot/delta files.

  • overwrite (bool) – If True, overwrites files if they already exist. Default is False.

  • chunk_size (Optional[int]) – The chunk size for streaming downloads (in bytes).

  • timeout (Optional[float]) – The timeout for each download request in seconds.

  • include_full_snapshots (bool) – If True, download full snapshot files.

  • include_delta (bool) – If True, download delta files.

  • include_metadata (bool) – If True, download metadata files.

  • file_group_ids (Optional[List[str]]) – A specific list of file groups to download from. If provided, only files from these groups will be downloaded.

  • show_progress (bool) – If True, displays a progress bar for downloads.

Notes

Internal parameters _selection_since_datetime, _selection_to_datetime, _selection_min_last_updated, and _selection_max_last_updated are used by higher-level helpers (such as download()) to pass selection intent that differs from the raw since_datetime/to_datetime window (for example, when row- vintage cutoffs via max_last_updated affect delta coverage decisions).

Return type:

None

download_delta_files(since_datetime=None, to_datetime=None, overwrite=False, chunk_size=None, timeout=300.0, include_delta=True, include_metadata=True, file_group_ids=None, show_progress=True, delete_corrupt_files=False)[source]#

A convenience function to allow downloading only delta files within a given window. This is a wrapper around download_full_snapshot() with include_full_snapshots=False.

load_data(tickers=None, cids=None, xcats=None, metrics=None, start_date=None, end_date=None, min_last_updated=None, max_last_updated=None, include_file_column=False, dataframe_format='qdf', dataframe_type='pandas', categorical_dataframe=True, include_delta_files=True, delta_treatment='latest', since_datetime=None, to_datetime=None, catalog_file=None, datasets=None)[source]#

Load JPMaQS timeseries from the local cache for the requested selection.

This method performs the “load” part of download(): it resolves tickers to the underlying JPMaQS datasets (using the catalog file) and returns the filtered data from locally cached snapshot/delta parquet files.

Unlike download(), this method does not download snapshot/delta/metadata files. It assumes the relevant files are already present in out_dir. The catalog file is still downloaded/validated unless catalog_file is provided.

Parameters:
  • tickers (Optional[List[str]]) – A list of tickers to filter datasets. Each ticker must be in the standard format “CID_XCAT” used in JPMaQS.

  • cids (Optional[List[str]]) – A list of cross-sectional identifiers (CIDs) to filter datasets.

  • xcats (Optional[List[str]]) – A list of extended categories (XCATS) to filter datasets.

  • metrics (Optional[List[str]]) – A list of JPMaQS metrics to filter the data. Available metrics are “value”, “grading”, “eop_lag”, “mop_lag”, and “last_updated”. The available metrics are also defined in macrosynergy.management.constants.JPMAQS_METRICS. The default is None, in which case all metrics are returned.

  • start_date (Optional[str]) – The start date for the returned data in “YYYY-MM-DD” (or “YYYYMMDD”) format. If None, data is returned from the earliest available date.

  • end_date (Optional[str]) – The end date for the returned data in “YYYY-MM-DD” (or “YYYYMMDD”) format. If None, data is returned up to the latest available date.

  • min_last_updated (Optional[Union[str, pd.Timestamp]]) – If provided, only data points with last_updated on or after this timestamp are returned. Strings can be “YYYY-MM-DDThh:mm:ss”, “YYYYMMDDhhmmss”, or ISO 8601 format.

  • max_last_updated (Optional[Union[str, pd.Timestamp]]) – If provided, only data points with last_updated on or before this timestamp are returned. Strings can be “YYYY-MM-DDThh:mm:ss”, “YYYYMMDDhhmmss”, or ISO 8601 format.

  • include_file_column (bool) – If True, includes a column indicating the source file for each data point. Default is False.

  • dataframe_format (str) –

    The output schema. Options are:

    • ”qdf”: quantamental schema with cid and xcat columns.

    • ”tickers”: ticker schema with a single ticker column (instead of cid/xcat).

    Note: if you want a wide matrix (date x ticker), pivot the returned data using pandas/Polars. Default is “qdf”.

  • dataframe_type (str) – The type of DataFrame to return. Options are “pandas” for a pandas DataFrame, “polars” for a polars DataFrame, or “polars-lazy” for a polars LazyFrame. Default is “pandas”.

  • categorical_dataframe (bool) – If True and dataframe_type is “pandas” (or “polars”/”polars-lazy” with compatible Polars versions), converts selected string columns to categorical dtype. Default is True.

  • include_delta_files (bool) – If True, includes delta files in the load process (recommended). Default is True.

  • delta_treatment (str) –

    Determines how to treat duplicate values between snapshots and deltas. Options are:

    • ”latest”: keep the latest value per series/date.

    • ”earliest”: keep the earliest value per series/date.

    • ”all”: keep all entries.

    Default is “latest”.

  • since_datetime (Optional[str]) – Restrict which locally available snapshot/delta files are considered to those with file timestamps on/after this cutoff (inclusive). This uses the file timestamp embedded in the filename (file-datetime), not the HTTP metadata field last-modified. If None, all locally available files are considered.

  • to_datetime (Optional[str]) –

    Restrict which locally available snapshot/delta files are considered to those with file timestamps on/before this cutoff (inclusive). This uses the file timestamp embedded in the filename (file-datetime). If None, all locally available files are considered.

    Notes: - If to_datetime is provided and max_last_updated is not, the loader

    defaults max_last_updated to to_datetime (interpreting date-only strings as end-of-day). This is important for monthly delta regimes where the covering delta file can be timestamped at month-end (after to_datetime), and row-level filtering by last_updated is needed to honor the requested data.

  • catalog_file (Optional[str]) – Optional path to a local JPMaQS catalog parquet file. If not provided, the client will download/validate the latest catalog file for ticker resolution.

  • datasets (Optional[List[str]]) – Optional list of JPMaQS datasets (file-group IDs) to restrict which locally cached snapshot/delta parquet files are scanned/loaded. If not provided, datasets are inferred from the requested tickers using the catalog.

Returns:

A DataFrame containing the requested data.

Return type:

Union[pd.DataFrame, pl.DataFrame, pl.LazyFrame]

download(tickers=None, cids=None, xcats=None, metrics=None, start_date=None, end_date=None, min_last_updated=None, max_last_updated=None, include_file_column=False, dataframe_format='qdf', dataframe_type='pandas', categorical_dataframe=True, include_delta_files=True, include_metadata_files=True, delta_treatment='latest', show_progress=True, overwrite=False, since_datetime=None, to_datetime=None, skip_download=False, cleanup_old_files_n_days=None, delete_corrupt_files=False)[source]#

Download JPMaQS files into the local cache and load the requested timeseries.

This is the main “one-stop” method: it resolves tickers to the underlying JPMaQS datasets, downloads the necessary snapshot/delta/metadata files into the local cache (unless skip_download=True), and returns the filtered data.

For a “load-only” workflow (no snapshot/delta downloads), call load_data() directly (or call this method with skip_download=True).

Parameters:
  • tickers (Optional[List[str]]) – A list of tickers to filter datasets. Each ticker must be in the standard format “CID_XCAT” used in JPMaQS.

  • cids (Optional[List[str]]) – A list of cross-sectional identifiers (CIDs) to filter datasets.

  • xcats (Optional[List[str]]) – A list of extended categories (XCATS) to filter datasets.

  • metrics (Optional[List[str]]) – A list of JPMaQS metrics to filter the data. Available metrics are “value”, “grading”, “eop_lag”, “mop_lag”, and “last_updated”. The available metrics are also defined in macrosynergy.management.constants.JPMAQS_METRICS. The default is None, in which case all metrics are returned.

  • start_date (Optional[str]) – The start date for the returned data in “YYYY-MM-DD” (or “YYYYMMDD”) format. If None, data is returned from the earliest available date.

  • end_date (Optional[str]) – The end date for the returned data in “YYYY-MM-DD” (or “YYYYMMDD”) format. If None, data is returned up to the latest available date.

  • min_last_updated (Optional[Union[str, pd.Timestamp]]) – If provided, only data points with last_updated on or after this timestamp are returned. Strings can be “YYYY-MM-DDThh:mm:ss”, “YYYYMMDDhhmmss”, or ISO 8601 format.

  • max_last_updated (Optional[Union[str, pd.Timestamp]]) – If provided, only data points with last_updated on or before this timestamp are returned. Strings can be “YYYY-MM-DDThh:mm:ss”, “YYYYMMDDhhmmss”, or ISO 8601 format.

  • include_file_column (bool) – If True, includes a column indicating the source file for each data point. Default is False.

  • dataframe_format (str) –

    The output schema. Options are:

    • ”qdf”: quantamental schema with cid and xcat columns.

    • ”tickers”: ticker schema with a single ticker column (instead of cid/xcat).

    Note: if you want a wide matrix (date x ticker), pivot the returned data using pandas/Polars. Default is “qdf”.

  • dataframe_type (str) – The type of DataFrame to return. Options are “pandas” for a pandas DataFrame, “polars” for a polars DataFrame, or “polars-lazy” for a polars LazyFrame. Default is “pandas”.

  • categorical_dataframe (bool) – If True and dataframe_type is “pandas”, the returned DataFrame will use categorical dtypes for object columns. Default is True.

  • include_delta_files (bool) – If True, delta files will be downloaded (and applied when loading, via delta_treatment). Default is True.

  • include_metadata_files (bool) – If True, metadata files will be included in the download. Default is True.

  • delta_treatment (str) –

    Specifies how to treat new or updated entries across files from different dates (based on last_updated). Options are:

    • ”latest”: keep the latest value per series/date (default).

    • ”earliest”: keep the earliest value per series/date.

    • ”all”: keep all entries.

  • show_progress (bool) – If True, displays a progress bar during downloads. Default is True.

  • overwrite (bool) – If True, overwrites files if they already exist. Default is False.

  • since_datetime (Optional[str]) – File-vintage window start (inclusive) for selecting which snapshot/delta/metadata files to download. This is based on the file timestamp (file-datetime) rather than the HTTP metadata field last-modified. Defaults to the start of the current day (UTC).

  • to_datetime (Optional[str]) –

    File-vintage window end (inclusive) for selecting which snapshot/delta/metadata files to download. Note: since_datetime and to_datetime only affect which files are downloaded; the returned timeseries is controlled by start_date/end_date.

    Note for historical (“delta-only”) vintages: - If to_datetime falls within a month where only monthly delta files exist,

    the selector may still include the covering month-end delta file even if its file timestamp is after to_datetime. Row-level filtering is then enforced via max_last_updated during the load step.

  • skip_download (bool) – If True, do not download snapshot/delta/metadata files and only load from the local cache. In this mode, the client will use the most recent local catalog parquet file (at or before to_datetime if provided) and will not make any network requests. If no local catalog is available, this method raises a ValueError. Default is False.

  • cleanup_old_files_n_days (Optional[int]) – If set to an integer value, deletes files older than this number of days from the local cache after the download is complete. This integer value is passed to cleanup_old_files(). If None, no cleanup is performed. Default is None.

Returns:

A DataFrame containing the requested data.

Return type:

Union[pd.DataFrame, pl.DataFrame, pl.LazyFrame]

download_as_of(tickers=None, cids=None, xcats=None, metrics=None, as_of_datetime=None, start_date=None, end_date=None, include_file_column=False, dataframe_format='qdf', dataframe_type='pandas', categorical_dataframe=True, include_delta_files=True, delta_treatment='latest', show_progress=True, overwrite=False, skip_download=False, cleanup_old_files_n_days=None, **kwargs)[source]#

Return data “as of” a specific point in time.

This is a very lightweight wrapper around download(): it only translates the intent (“as of”) into the correct download() arguments:

  • to_datetime: the file-vintage cutoff (which files can be used)

  • max_last_updated: the row-level vintage cutoff (which updates are allowed)

See func:macrosynergy.download.dataquery_file_api.dataquery_file_api.DataQueryFileAPIClient.download() for details on the other parameters and return value.

Parameters:

as_of_datetime (str) – The point in time to view the data as of. This can be a date-only string (e.g. “2023-12-31” or “20231231”) or a datetime string (e.g. “2023-12-31T15:30:00Z” or “20231231153000”). Date-only strings are interpreted as end-of-day.

Return type:

Union[DataFrame, DataFrame, LazyFrame]

class DataQueryFileAPIOauth(client_id, client_secret, resource='JPMC:URI:RS-06785-DataQueryExternalApi-PROD', auth_url='https://authe.jpmchase.com/as/token.oauth2', root_url='https://api-dataquery.jpmchase.com/research/dataquery-authe/api/v2', application_name='DataQueryFileAPI', proxies=None, verify=True, **kwargs)[source]#

Bases: JPMorganOAuth

A class to handle OAuth authentication for the JPMorgan DataQuery File API.

Submodules#