Unofficial node.js implementation of Banco do Brasil's mobile API
Installation
yarn add bb-api# or npm install bb-api --save
API Usage
Checking Account (Conta Corrente)
; const bb = ;await bb; // Recover balanceconst checkingBalance = await bbchecking; // Recover transactions in monthconst checkingTransactions = await bbchecking;
Savings Account (Poupança)
; const bb = ;await bb; // Recover savings accounts available (variações, ex: 1, 51, etc)const savingsAccounts = await bbsavings; // Recover transactions from savings account in monthconst savingsTransactions = await savingsAccounts0;
Credit Card (Cartão de Crédito)
; const bb = ;await bb; // Recover list of available credit cardsconst creditCards = await bbcreditCard; // Recover bills of a credit card (faturas)const creditCardBills = await creditCards0; // Recover transactions from specific billconst creditCardTransactions = await creditCardBills0;
Command line
Clone the repository and follow the steps bellow:
To use it via command line just execute the command below, replacing XXXXXs by your credentials:
$ yarn babel-node src/index.js --bbBranch="XXXXX" --bbAccount="XXXXXXX" --bbPassword="XXXXXXXX"
and it will print in console the last data of your account:
checkingBalance: 27348 checkingTransactions: date: 2018-11-05T02:00:00000Z description: 'Transferido da poupança' amount: 84018 date: 2018-11-05T02:00:00000Z description: 'Compra com Cartão' amount: -1019 date: 2018-11-05T02:00:00000Z description: 'Transferência enviada 04/11 JOÃO' amount: -15918 ... savingsAccounts: variation: 1 description: 'Poupança Ouro - Variação 1' variation: 51 description: 'Poupança Ouro - Variação 51' ... savingsTransactions: date: 2018-11-16T02:00:00000Z description: 'Juros' amount: 002 date: 2018-11-30T02:00:00000Z description: 'Transferencia Para Conta' amount: -392 ... creditCards: brand: 'VISA' modality: '74' cardAccountNumber: '12345678' cardNumber: '0000123456781111' brand: 'VISA' modality: '1' cardAccountNumber: '12345679' cardNumber: '0000123456781112' ... creditCardBills: cardAccountNumber: '12345678' billId: '123123123' billDate: '25112018' cardAccountNumber: '12345678' billId: '123123124' billDate: '25102018' ... creditCardTransactions: type: 'payment' date: 2018-10-22T03:00:00000Z description: 'PGTO. CASH AG. 1111 000123456 100' amount: 100012 type: 'atSight' date: 2018-10-10T03:00:00000Z description: 'RESTAURANTE X' amount: -27 ...
Contributing
- Fork it (https://github.com/arthurnobrega/bb-api/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request