acurley / ffiec

Ruby wrapper around the FFIEC's Public Data Distribution (PDD) Public Web Service (PWS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FFIEC Public Data Distribution Web Service

This gem is a Ruby wrapper for the FFIEC (Federal Financial Institutions Examination Council) Public Data Distribution (PDD) Public Web Service (PWS). Before using this gem you must sign up for a web services account at the FFIEC's website where you will choose a username and be provided with an API key.

Note: Currently, the PWS will allow a limited number of downloads (approximately 2500 per hour). If the download limit has been reached within one hour, the user will have to wait until the next hour to continue with the next download.

Installation

Add this line to your application's Gemfile:

gem 'ffiec'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ffiec

Usage

require 'ffiec'

client = Ffiec::Client.new(username:'your_username', api_key:'your_api_key')

client.available_commands
=> [:test_user_access, :retrieve_reporting_periods, :retrieve_panel_of_reporters, :retrieve_filers_submission_date_time, :retrieve_filers_since_date, :retrieve_facsimile, :retrieve_ubpr_reporting_periods, :retrieve_ubprxbrl_facsimile]

client.test_user_access
=> true

client.retrieve_facsimile(date: '9/30/2015', format: 'SDF', id: 37, id_type: 'ID_RSSD')
=> "Call Date;Bank RSSD Identifier;MDRM #;Value;Last Update;Short Definition;Call Schedule;Line Number\r\n20150930;37;RCOA3792;20326;20151028;Total capital (sum of items 26 and 34.a)..."

client.retrieve_panel_of_reporters(date: '9/30/2015')
=> {:id_rssd=>"496434", :fdic_cert_number=>"2794", :occ_chart_number=>"9681", :ots_dock_number=>"14685" ...}

Development

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/acurley/ffiec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

About

Ruby wrapper around the FFIEC's Public Data Distribution (PDD) Public Web Service (PWS)

License:MIT License


Languages

Language:Ruby 98.2%Language:Shell 1.8%