All Projects → bankscrap → Bankscrap

bankscrap / Bankscrap

Licence: mit
Ruby gem to extract balance and transactions from multiple banks.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Bankscrap

Mangopay2 Nodejs Sdk
Node.js SDK for MANGOPAY
Stars: ✭ 40 (-79.7%)
Mutual labels:  api, fintech
Example Scalping
A working example algorithm for scalping strategy trading multiple stocks concurrently using python asyncio
Stars: ✭ 267 (+35.53%)
Mutual labels:  api, fintech
Mangopay2 Php Sdk
PHP SDK for MANGOPAY
Stars: ✭ 108 (-45.18%)
Mutual labels:  api, fintech
Iex Api
The IEX API provides any individual or academic, public or private institution looking to develop applications that require stock market data to access near real-time quote and trade data for all stocks trading on IEX.
Stars: ✭ 683 (+246.7%)
Mutual labels:  api, fintech
Coinbase Pro Node
Coinbase Pro API written in TypeScript and covered by tests.
Stars: ✭ 116 (-41.12%)
Mutual labels:  api, fintech
Uniswap Python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 191 (-3.05%)
Mutual labels:  api
Component
🔥🔥🔥A powerful componentized framework.一个强大、100% 兼容、支持 AndroidX、支持 Kotlin并且灵活的组件化框架
Stars: ✭ 2,434 (+1135.53%)
Mutual labels:  api
Libmoji
📚 Bitmoji's API made easy for everyone
Stars: ✭ 189 (-4.06%)
Mutual labels:  api
Hitchhiker
a Restful Api test tool
Stars: ✭ 2,175 (+1004.06%)
Mutual labels:  api
Web3x
Ethereum TypeScript Client Library - for perfect types and tiny builds.
Stars: ✭ 197 (+0%)
Mutual labels:  api
Node Vk Bot Api
🤖 VK bot framework for Node.js, based on Bots Long Poll API and Callback API.
Stars: ✭ 195 (-1.02%)
Mutual labels:  api
Api
API for Current cases and more stuff about COVID-19 and Influenza
Stars: ✭ 2,323 (+1079.19%)
Mutual labels:  api
Jsonapi Utils
Build JSON API-compliant APIs on Rails with no (or less) learning curve.
Stars: ✭ 191 (-3.05%)
Mutual labels:  api
Mellow
Mellow can communicate with several APIs like Ombi, Sonarr, Radarr and Tautulli which are related to home streaming to use those services directly in your Discord client.
Stars: ✭ 193 (-2.03%)
Mutual labels:  api
Gaos
HTTP mocking to test API services for chaos scenarios
Stars: ✭ 191 (-3.05%)
Mutual labels:  api
Hapi Openapi
Build design-driven apis with OpenAPI (formerly swagger) 2.0 and hapi.
Stars: ✭ 196 (-0.51%)
Mutual labels:  api
Aws Lambda Fastify
Insipired by aws-serverless-express to work with Fastify with inject functionality.
Stars: ✭ 190 (-3.55%)
Mutual labels:  api
Cloudflare
CloudFlare API - PHP
Stars: ✭ 192 (-2.54%)
Mutual labels:  api
Allure Docker Service
This docker container allows you to see up to date reports simply mounting your "allure-results" directory in the container (for a Single Project) or your "projects" directory (for Multiple Projects). Every time appears new results (generated for your tests), Allure Docker Service will detect those changes and it will generate a new report automatically (optional: send results / generate report through API), what you will see refreshing your browser.
Stars: ✭ 194 (-1.52%)
Mutual labels:  api
Video Admin
node+koa2+mysql
Stars: ✭ 192 (-2.54%)
Mutual labels:  api

💸 Bankscrap 💸

Gem Version Build Status

Ruby gem to extract account balance and transactions from banks. You can use it either as command line tool or as a library.

Feel free to contribute and add your bank if it isn't supported.

Contact: [email protected].

Supported banks

Interested in any other bank? Open a new Issue and we'll try to help.

Background and motivation

Most banks don't offer public APIs and the only way to access your data (balance and transactions) is through their websites... and most bank websites are a f*cking nightmare.

We are developers and we don't want to waste time doing things we are able to automate. Having to perform 20 clicks in an awful website just to check how much money we have is not something we like.

There are two approaches to solve this problem:

  • Web scraping on the bank's site.
  • Reverse engineering the bank's mobile app or the bank's single page web app (if they have one) to use the same API.

BankScrap uses both methods depending on the bank.

Requirements

Some banks needs a JavaScript runtime in order to work. So if you find an error like "Could not find JavaScript runtime" try to install one. It has been tested with nodejs.

Installation

Installation from RubyGems:

# BBVA
gem install bankscrap-bbva

# ING
gem install bankscrap-ing

Or, if you're using Bundler, just add the following to your Gemfile:

# BBVA
gem 'bankscrap-bbva'

# ING
gem 'bankscrap-ing'

Note that you only need to install the gem for your selected bank – the main gem (bankscrap) will be installed as a dependency.

Usage

From terminal

Bank account balance

BBVA
$ bankscrap balance BBVA --credentials=user:YOUR_BANK_USER password:YOUR_BANK_PASSWORD
ING Direct

ING needs one more argument: your birthday.

$ bankscrap balance ING --credentials=dni:YOUR_DNI password:YOUR_BANK_PASSWORD birthday:01/01/1980

Replace 01/01/1980 with your actual birthday.

Transactions for last 30 days

BBVA
$ bankscrap transactions BBVA --credentials=user:YOUR_BANK_USER password:YOUR_BANK_PASSWORD
ING Direct
$ bankscrap transactions ING --credentials=dni:YOUR_DNI password:YOUR_BANK_PASSWORD birthday:01/01/1980

Transactions with date range

$ bankscrap transactions YourBank --credentials=user:YOUR_BANK_USER password:YOUR_BANK_PASSWORD --from 01-01-2015 --to 01-02-2015

By default it will use your first bank account, if you want to fetch transactions for a different account you can use this syntax:

$ bankscrap transactions YourBank --iban "your_iban" --credentials=user:YOUR_BANK_USER password:YOUR_BANK_PASSWORD

If you don't want to pass your user and password everytime you can define them in your .bash_profile by adding:

export BANKSCRAP_[BANK_NAME]_USER=YOUR_BANK_USER
export BANKSCRAP_[BANK_NAME]_PASSWORD=YOUR_BANK_USER
export BANKSCRAP_[BANK_NAME]_ANY_OTHER_CREDENTIAL=ANY_OTHER_CREDENTIAL

eg: export BANKSCRAP_BBVA_NET_CASH_USER=YOUR_BANK_USER

Export transactions to CSV

$ bankscrap transactions YourBank --credentials=user:YOUR_BANK_USER password:YOUR_BANK_PASSWORD --format CSV [--output ./my_transactions.csv]

Currently only CSV is supported. The output parameter is optional, by default transactions.csv is used.

From Ruby code

You can also use this gem from your own app as library. To do so first you must initialize a BankScrap::Bank object

# BBVA
require 'bankscrap-bbva'
bbva = Bankscrap::BBVA::Bank.new(user: YOUR_BBVA_USER, password: YOUR_BBVA_PASSWORD)

# ING
require 'bankscrap-ing'
ing = Bankscrap::ING::Bank.new(dni: YOUR_DNI, password: YOUR_ING_PASSWORD, birthday: "dd/mm/yyyy")

The initialize method will automatically login and fetch your bank accounts

You can now explore your bank accounts accounts:

bank.accounts

And get its balance:

bank.accounts.first.balance

Get last month transactions for a particular account:

account = bank.accounts.first
account.transactions

Get transactions for last year (from now):

account = bank.accounts.first
account.transactions = account.fetch_transactions(start_date: Date.today - 1.year, end_date: Date.today)
account.transactions

From Ruby code (with IRB, useful when developing)

In the terminal:

irb -I lib/ -r 'bankscrap'

After that, you can use your bank adapter as usual:

require 'bankscrap-ing'
ing = Bankscrap::ING::Bank.new(dni: YOUR_DNI, password: YOUR_ING_PASSWORD, birthday: "dd/mm/yyyy")

Contributing

  1. Fork it ( https://github.com/bankscrap/bankscrap/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Start a new Bank Adapter with the generator

You can use a generator to create the basic template for your new bank adapter.

  1. Install the bankscrap gem (gem install bankscrap) if you don't have it already.
  2. Use the name of your BankName like: bankscrap generate_adapter BankName, you will get:
      create
      create  bankscrap-my-bank-name.gemspec
      create  .gitignore
      create  Gemfile
      create  LICENSE.txt
      create  README.md
      create  Rakefile
      create  lib/bankscrap-my-bank-name.rb
      create  lib/bankscrap/my-bank-name/bank.rb
      create  lib/bankscrap/my-bank-name/version.rb

Great! Now you can start implementing your bank's adapter for Bankscrap.

To get started take a look to:
/Users/username/bankscrap/bankscrap-my-bank-name/lib/bankscrap/my-bank-name/bank.rb

If you need help you can join our Slack chat room. Click the Slack badge on Github:
https://github.com/bankscrap/bankscrap
  1. Create a git repository on the newly created directory (git init) and start commiting.
  2. Push your repo to github and open an Issue at https://github.com/bankscrap/bankscrap/issues referencing it

Thanks

Thanks to Javier Cuevas (@javiercr) for his BBVA gem.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].