simple-tinkoff-transaction
v1.0.0
Published
Simple Tinkoff Transaction Downloader is a script, that allows you wery simple gets all of yours transaction from Tinkoff Bank
Downloads
3
Maintainers
Readme
Simple Tinkoff Transaction Downloader
Simple Tinkoff Transaction Downloader is a script, that allows you wery simple gets all of yours transaction from Tinkoff Bank.
It helps with:
- Authentication in Tinkoff OpenAPI
- Download your transaction from start date untill till date
Installation
Simple Tinkoff Transaction Downloader requires Node.js v8+ to run. Also, it uses node-fetch package.
Install from npm manager
$ npm i simple-tinkoff-transaction --save
Install from GiLab repository
$ git clone https://gitlab.com/mreedread/tinkoff-transaction-downloader.git
$ cd tinkoff-transaction-downloader
$ npm install
Work with package
NOTE: All parametres in methods must be string type! Firstly, you must connect this package:
const Tinkoff = require('Tinkoff');
const tks = new Tinkoff(inn, accountNumber, refreshToken);
Next step, you must get your Access Token:
const accessToken = await tks.auth();
After you've got Access Token you must create startDate and tillDate (package dont help with it, use method you prefer): NOTE: All variables must be string type and formatted as yyyy-MM-dd!
const startDate = '2019-01-01';
const tillDate = '2019-02-01';
And then, you can download your transaction:
const transactions = await (getTransaction(startDate, tillDate, accessToken);