You are viewing a single comment's thread from:

RE: SteemMonsters: How much DEC have you earned in the 22nd season?

in #steemmonsterslast year

Interesting stuff results for ctrpch, please

Sort:  
.PlayerDEC from battlesBattlesAvg
1116ctrpch3016.47817916.852

.PlayerMax DEC from battle
1191ctrpch43.924Link

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 block 36408813.

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: