fine_ants đ
Got finance problems? Have some fine_ants to help.
Usage
$ gem install fine_ants
And then:
accounts = FineAnts.download(:vanguard, {
:user => "janelastname",
:password => ENV['VANGUARD_PASSWORD']
})
puts accounts
What?
I wrote this, because
nearly
every
service
and
app
that
offers multi-institution financial dashboarding stores your passwords in a way
that can be decrypted by the service (by design, since they need your credentials
to scrape the banks' sites). This means if these rando services get hacked, the
passwords to all of your financial accounts can be compromised at once.
The FDIC and SIPC are pretty great protections from the dissolution of banks, but
it doesn't protect you from their web sites being compromised, much less the web
sites of services that scrape them just to give you a pretty dashboard.
Handing all your financial credentials to anyone seems foolish, so I started the
fine_ants gem to build adapters for the various financial institutions I use. It
uses capybara to automate a browser and
scrape your account totals from your bank's webapp. It even supports
2FA. Since it's
designed to be run locally, it simply uses gets to read SMS, e-mail, and TOTP
tokens from
stdin
when a login process requires a 2FA challenge.
Adapters
Right now, FineAnts ships with adapters for:
You can also implement your own adapter and pass it to FineAnts.download. The
expected public contract of an adapter is:
require "bigdecimal"
class MyAdapter
def initialize(credentials)
end
def login
end
def two_factor_response(answer)
end
def download
[
{
:adapter => :your_adapter_name,
:user => "theloginbeingused",
:id => "id-of-the-account",
:amount => BigDecimal.new("1234.56")
}
]
end
end
You can pass your own adapter class:
accounts = FineAnts.download(MyAdapter, {
:user => "randojones",
:password => ENV['MY_PASSWORD']
})