RE: SteemMonsters: How much DEC have you earned in the 22nd season?
You are viewing a single comment's thread:
. | Player | DEC from battles | Battles | Avg |
---|---|---|---|---|
1116 | ctrpch | 3016.478 | 179 | 16.852 |
. | Player | Max DEC from battle | |
---|---|---|---|
1191 | ctrpch | 43.924 | Link |
0
0
0.000
That's great thank you, can you tell me how I can run this report myself
That's great thank you, can
You tell me how I can run
This report myself
- ctrpch
I'm a bot. I detect haiku.
Hi. It's hard for me to give a full script to do all the job because basically I do it in two steps with python scripts.
First, I query data from SteemMonsters API and save it in my local database
https://api.steemmonsters.io/transactions/history?limit=1000&types=sm_battle&from_block=35600000
From this API you can query 1000 battles at once, so you need to take care of
from_block
parameter. I start from the latest block, query 1000 battles, remember the lowest block number and in the next iteration start from this new block number (from_block
parameter).Last season started at block
36015998
and ended at block36408813
.When all data are in the database you have to only iterate over all battles and count DEC rewards.
DEC reward for given battle is here: