Tom Reznick && Dan Bernier bio photo

Tom Reznick && Dan Bernier

wait, you put your dan, and your tom together? and it worked? /shudders/ This pair is 37% Canadian, 50% Vegetarian and 100% not to be trusted!

Look Up Your Bank with the FDIC Gem

The FDIC exposed an unpublished JSON API. So we made a ruby gem for it.

Back in February, ProgrammableWeb posted that the FDIC had switched their BankFind site from ASPX-backed search forms to a JavaScript frontend backed by a JSON API.

This meant that there’s an unpublished JSON endpoint to hit the FDIC and find Financial Institutions.

Recently, we made a gem that wraps that endpoint.

Like most APIs that provide data for industries as mature as banking, the terminology can be intimidating to a new-comer. Fortunately, the FDIC provides a glossary. Where the field names are old-fashioned or acronym-y, we’ve taken the liberty of polishing them: “FACode” becomes “supervising_authority”, “insuredFrmDt” becomes “insured_from_date”, etc.

Here’s the source.

It’s pretty easy to use.

The FDIC API lets you find an Institution if you have its FDIC Certificate Number:

1 institution = FDIC.find_institution(26588)
2 #=> FDIC::Institution

If you don’t have the certificate number, you can search for a Bank by name, and get back all matching Banks:

1 banks = FDIC.find_bank('Dedicated Community Bank')
2 #=> [FDIC::Bank, FDIC::Bank, ...]

Once you have a Bank, you can get its Institution, which has much more data available:

1 # Bang, because it's another network request
2 institution = banks.first.find_institution!

The API also exposes information about an Institution’s branches, and its history. You can query both of these on the FDIC module directly, or on the Institution:

 1 institution.find_branches!
 2 #=> [FDIC::Branch, FDIC::Branch, ...]
 3 
 4 FDIC.find_branches(25688)
 5 #=> [FDIC::Branch, FDIC::Branch, ...]
 6 
 7 institution.find_history_events!
 8 #=> [FDIC::HistoryEvent, ...]
 9 
10 FDIC.find_history_events('Dedicated Community Bank', 26588)
11 #=> [FDIC::HistoryEvent, ...]

Since a Bank knows its certificate number, it can look up its branch and history information, too.

1 bank.find_branches!
2 bank.find_history_events!

We’re working on making it better. The FDIC provides a fair amount of data - we’re looking at their enforcement database - and we’re considering adding that to this gem, or providing another one.

:wq