0.0
No commit activity in last 3 years
No release in over 3 years
Lookup bank names by routing number.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

This is a tiny project that provides a super simple lookup table for bank routing numbers to bank names.

Note: Currently, we simply load the routing numbers and bank names into memory. There are approximately 20,656 banks in the database, so this will likely take up a few megabytes of memory in each process that loads the BankLookup::DB into memory.

Usage

In your Gemfile:

gem 'bank_lookup'

You need to instruct the gem to parse the database file. This gem ships with a file that will be periodically updated (you can also suppply your own). In an initializer, make sure you load the DB by parsing the data file:

# config/initializers/bank_lookup.rb
BankLookup::Parser.parse

Mount the API in your router:

MyApp::Application.routes.draw do
  mount BankLookup::API => 'lookup'
end

Now get some bank names:

curl https://example.com/lookup/bank_name?number=121202211
# => {"name":"CHARLES SCHWAB BANK","pretty_name":"Charles Schwab Bank"}