Record changes in the wallet's XRC20 token balance using Blocksscan Api.
Record to DB using sqlite.
git clone https://github.com/AoiToSouma/blocksscan_api.git
cd blocksscan_api
chmod +x *.sh
nano .env
sleeptime : API execution interval(defalut is 300 seconds)
dbname : sqlite DB name for logging records
csvfile : Prefix of CSV file when outputting records from DB
nano address.json
Register the addresses to monitor.
If you want to monitor only a specific token, also include the token_address.
If you want to monitor a specific wallet at an interval different from sleeptime, also include interval_timer.
The unit of interval_timer is seconds.
Records in json format.
./initialize.sh
Firstly, "sqlite3", "bc", "jq" package is required.
If these packages are not installed, this process will automatically install them.
The DB will be created in the "data" directory.
pm2 BalanceCheck.sh
If there is a difference between the XRC20 token in the wallet and the previous value, it will be recorded in the DB.
./OutputCsv.sh
It can be loaded into a spreadsheet.