Get staking rewards for an account for the previous year and add token price to each reward date
Important
Use at own risk - check the generated report is aligned with your records!
The token rewards are downloaded using get_simple_v1_rewards find API
File with FLOW token historical prices can be downloaded from coinmarketcap.com
make sure to select correct currency before downloading the file.
Note
This program requires python to be installed.
- clone repo
- Initialize python virtual environment
python3 -m venv ./venv
source ./venv/bin/activate
- install required packages
pip3 install -r requirements.txt
- get & save the token prices file
To downlod the data for previous year, run:
python3 flow_token_staking_rewards_processing.py -a ACCOUNT_NUMBER -p Flow_2024-01-01-2024-12-31_historical_data_coinmarketcap_CAD.csv -u 'username' -w 'password'
Or to download data for specific date range:
python3 flow_token_staking_rewards_processing.py -a ACCOUNT_NUMBER -p Flow_2024-01-01-2024-12-31_historical_data_coinmarketcap_CAD.csv -u 'username' -w 'password' -s 2025-01-01 -e 2025-11-21
Example staking_rewards_exported.csv output CSV file:
| Date | Staking Reward | Closing Token Price (CAD) |
|---|---|---|
| 2024-10-02 | 3.9 | 0.7166169252 |
| 2024-09-25 | 3.8 | 0.8098495376 |
| 2024-09-18 | 3.7 | 0.7429451951 |
| 2024-09-11 | 3.6 | 0.7425934153 |
| . | ||
| . | ||
| . |