Hi. Sorry I didn't reply earlier :)
It's hard for me to give a full script to do all the job because basically I do it in two steps:
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).
When all data are in the database you have to only iterate over all battles and count rulesets.
If it's double ruleset it is separated by |
character. For example: Aim True|Broken Arrows
.
I appreciate the detailed reply. You put a lot of work into this game. No wonder you are one of the best.