| Title: | R Interface to 'FFIEC Central Data Repository REST API' Service |
|---|---|
| Description: | Provides a simplified interface to the Central Data Repository 'REST API' service made available by the United States Federal Financial Institutions Examination Council ('FFIEC'). Contains functions to retrieve reports of Condition and Income (Call Reports) and Uniform Bank Performance Reports ('UBPR') in list or tidy data frame format for most 'FDIC' insured institutions. See <https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf> for the official 'REST API' documentation published by the 'FFIEC'. |
| Authors: | Michael Thomas [aut, cre], Ketchbrook Analytics [cph, fnd], Dylan Hughes [ctb] |
| Maintainer: | Michael Thomas <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-05-19 09:59:53 UTC |
| Source: | https://github.com/ketchbrookanalytics/ffiec |
Retrieves Call Report or UBPR facsimile data from the FFIEC Central Data Repository API for the requested financial institution.
get_facsimile( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, fi_id_type = c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"), fi_id ) get_ubpr_facsimile( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, fi_id_type = c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"), fi_id )get_facsimile( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, fi_id_type = c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"), fi_id ) get_ubpr_facsimile( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, fi_id_type = c("ID_RSSD", "FDICCertNumber", "OCCChartNumber", "OTSDockNumber"), fi_id )
user_id |
(String) The UserID for authenticating against the FFIEC API |
bearer_token |
(String) The Bearer Token for authenticating against the FFIEC API |
reporting_period_end_date |
(String, character vector, Date, or Date vector) One or more reporting period end dates. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically. |
fi_id_type |
(String) The type of identifier being provided; one of
|
fi_id |
(String or character vector) One or more financial institution identifiers (can also be supplied as an integer vector) |
A tibble containing the facsimile data.
https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf
if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve facsimile data for reporting period 2025-03-31 for institution # with ID RSSD "480228" get_facsimile( reporting_period_end_date = "03/31/2025", fi_id = 480228 ) # Retrieve UBPR facsimile data for reporting period 2025-03-31 for # institution with FDIC Cert Number "3510" get_ubpr_facsimile( reporting_period_end_date = "03/31/2025", fi_id_type = "FDICCertNumber", fi_id = "3510" ) # Retrieve facsimile data for reporting periods 2025-03-31 and 2025-06-30 # for institutions with ID RSSD of "480228" and "451965" get_facsimile( reporting_period_end_date = c("03/31/2025", "06/30/2025"), fi_id = c("480228", "451965") ) # Retrieve UBPR data for reporting periods 2025-03-31 and 2025-06-30 # for institution with ID RSSD of "480228" get_ubpr_facsimile( reporting_period_end_date = c("03/31/2025", "06/30/2025"), fi_id = 480228 ) }if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve facsimile data for reporting period 2025-03-31 for institution # with ID RSSD "480228" get_facsimile( reporting_period_end_date = "03/31/2025", fi_id = 480228 ) # Retrieve UBPR facsimile data for reporting period 2025-03-31 for # institution with FDIC Cert Number "3510" get_ubpr_facsimile( reporting_period_end_date = "03/31/2025", fi_id_type = "FDICCertNumber", fi_id = "3510" ) # Retrieve facsimile data for reporting periods 2025-03-31 and 2025-06-30 # for institutions with ID RSSD of "480228" and "451965" get_facsimile( reporting_period_end_date = c("03/31/2025", "06/30/2025"), fi_id = c("480228", "451965") ) # Retrieve UBPR data for reporting periods 2025-03-31 and 2025-06-30 # for institution with ID RSSD of "480228" get_ubpr_facsimile( reporting_period_end_date = c("03/31/2025", "06/30/2025"), fi_id = 480228 ) }
Retrieves filer information from the FFIEC Central Data Repository API for filers updated since a specified date.
get_filers_since_date( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, last_update_date_time, as_data_frame = FALSE )get_filers_since_date( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, last_update_date_time, as_data_frame = FALSE )
user_id |
(String) The UserID for authenticating against the FFIEC API |
bearer_token |
(String) The Bearer Token for authenticating against the FFIEC API |
reporting_period_end_date |
(String or Date) The reporting period end date. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically. |
last_update_date_time |
(String) Filter for records updated
since this date/time. See |
as_data_frame |
(Logical) Should the result be returned as a tibble?
Default is |
Set the last_update_date_time value to the last time you ran the
method to retrieve only those institutions that have filed a newer report.
Possible formatting options include:
"04/15/2025"
"2025-04-15 21:00:00.000"
"04/15/2025 9:00 PM"
A list containing the parsed JSON response from the API, where each
element in the list represents an RSSD ID value. If
as_data_frame = TRUE, then the list is converted to a tibble (and
returned as such).
https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf
if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve filers since 2025-03-31, as of 2025-04-15 and return as a list get_filers_since_date( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025" ) # Retrieve filers since 2025-03-31, as of 2025-04-15 21:00:00.000 and return # as a tibble get_filers_since_date( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025 21:00:00.000", as_data_frame = TRUE ) }if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve filers since 2025-03-31, as of 2025-04-15 and return as a list get_filers_since_date( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025" ) # Retrieve filers since 2025-03-31, as of 2025-04-15 21:00:00.000 and return # as a tibble get_filers_since_date( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025 21:00:00.000", as_data_frame = TRUE ) }
Retrieves filer information from the FFIEC Central Data
Repository API for the ID RSSDs and submission date and time of the reporters
who have filed after the provided last_update_date_time and whose new
filings are available for public distribution.
get_filers_submission_datetime( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, last_update_date_time, as_data_frame = TRUE )get_filers_submission_datetime( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, last_update_date_time, as_data_frame = TRUE )
user_id |
(String) The UserID for authenticating against the FFIEC API |
bearer_token |
(String) The Bearer Token for authenticating against the FFIEC API |
reporting_period_end_date |
(String or Date) The reporting period end date. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically. |
last_update_date_time |
(String) Filter for records updated
since this date/time. See |
as_data_frame |
(Logical) Should the result be returned as a tibble?
Default is |
Set the last_update_date_time value to the last time you ran the
method to retrieve only those institutions that have filed a newer report.
Possible formatting options include:
"04/15/2025"
"04/15/2025 9:00 PM"
A list containing the parsed JSON response from the API, where each
element in the list represents an RSSD ID value. If
as_data_frame = TRUE, then the list is converted to a tibble (and
returned as such).
https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf
if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve filers since 2025-03-31, as of 2025-04-15 and return as a tibble get_filers_submission_datetime( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025" ) # Retrieve filers since 2025-03-31, as of 2025-04-15 21:00:00.000 and return # as a list get_filers_submission_datetime( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025 21:00:00.000", as_data_frame = FALSE ) }if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve filers since 2025-03-31, as of 2025-04-15 and return as a tibble get_filers_submission_datetime( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025" ) # Retrieve filers since 2025-03-31, as of 2025-04-15 21:00:00.000 and return # as a list get_filers_submission_datetime( reporting_period_end_date = "03/31/2025", last_update_date_time = "04/15/2025 21:00:00.000", as_data_frame = FALSE ) }
Retrieves filer information from the FFIEC Central Data Repository API for the financial institutions in the Panel of Reporters (POR) expected to file for a given Call reporting period.
get_panel_of_reporters( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, as_data_frame = TRUE )get_panel_of_reporters( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), reporting_period_end_date, as_data_frame = TRUE )
user_id |
(String) The UserID for authenticating against the FFIEC API |
bearer_token |
(String) The Bearer Token for authenticating against the FFIEC API |
reporting_period_end_date |
(String or Date) The reporting period end date. Character values must be formatted as "MM/DD/YYYY". Date objects are also accepted and will be coerced to the required format automatically. |
as_data_frame |
(Logical) Should the result be returned as a tibble?
Default is |
A tibble containing the parsed JSON response from the API of filer
information since the given reporting_period_end_date date value. If
as_data_frame = FALSE, then the result is returned as a nested list
object, where each element represents a unique ID_RSSD value.
https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf
if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve expected filers for reporting period 2025-03-31 and return as a # tibble get_panel_of_reporters( reporting_period_end_date = "03/31/2025" ) # Retrieve expected filers for reporting period 2025-03-31 and return as a # list get_panel_of_reporters( reporting_period_end_date = "03/31/2025", as_data_frame = FALSE ) }if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve expected filers for reporting period 2025-03-31 and return as a # tibble get_panel_of_reporters( reporting_period_end_date = "03/31/2025" ) # Retrieve expected filers for reporting period 2025-03-31 and return as a # list get_panel_of_reporters( reporting_period_end_date = "03/31/2025", as_data_frame = FALSE ) }
Retrieves Call Report or UBPR filer information from the FFIEC Central Data Repository API for available reporting periods.
get_reporting_periods( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), as_data_frame = FALSE ) get_ubpr_reporting_periods( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), as_data_frame = FALSE )get_reporting_periods( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), as_data_frame = FALSE ) get_ubpr_reporting_periods( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"), as_data_frame = FALSE )
user_id |
(String) The UserID for authenticating against the FFIEC API |
bearer_token |
(String) The Bearer Token for authenticating against the FFIEC API |
as_data_frame |
(Logical) Should the result be returned as a tibble?
Default is |
A list containing the parsed JSON response from the API, where each
element in the list represents an available reporting period. If
as_data_frame = TRUE, then the list is converted to a tibble (and
returned as such).
https://cdr.ffiec.gov/public/Files/SIS611_-_Retrieve_Public_Data_via_Web_Service.pdf
if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve reporting periods and return as a list get_reporting_periods() # Retrieve UBPR reporting periods and return as a tibble get_ubpr_reporting_periods(as_data_frame = TRUE) }if (!no_creds_available()) { # Assume you have set the following environment variables: # - FFIEC_USER_ID # - FFIEC_BEARER_TOKEN # Retrieve reporting periods and return as a list get_reporting_periods() # Retrieve UBPR reporting periods and return as a tibble get_ubpr_reporting_periods(as_data_frame = TRUE) }
Handle missing UserID / Bearer Token values without throwing an error for unit testing purposes
no_creds_available( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN") )no_creds_available( user_id = Sys.getenv("FFIEC_USER_ID"), bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN") )
user_id |
(String) The UserID for authenticating against the FFIEC API |
bearer_token |
(String) The Bearer Token for authenticating against the FFIEC API |
Intended for internal use.
(Logical) FALSE if a non-empty user_id and bearer_token have
been supplied; otherwise TRUE.