RE: Personal SteemMonsters cards usage + winratio + DEC | 23rd season
Basically I do it in two steps. First, I query battle data from Steemmonsters API and save it to my local database.
https://api.steemmonsters.io/transactions/history?limit=1000&types=sm_battle&from_block=36080128
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 36437549
and ended at block 36875825
.
This is how the example record looks like:
The field result
contains the most important data like player names, dec reward, used cards.
When all data are in the local database you have to only iterate over all battles and count DEC rewards, and usage / winratio for each player.
PS I plan to make a simple website where anyone can check these stats at any time.
. | . |
---|---|
Player | schneegecko |
Battles analyzed | 417 |
DEC earned | 38484 |
Season | 23 |
MONSTERS
Usage% | Monster | W | L | Winratio | DEC |
---|---|---|---|---|---|
34.53% | Cocatrice | 96 | 48 | 66.67% | 14424 |
33.09% | Creeping Ooze | 88 | 50 | 63.77% | 13941 |
31.65% | Lord Arianthus | 81 | 51 | 61.36% | 12214 |
24.94% | Swamp Thing | 66 | 38 | 63.46% | 9950 |
21.82% | Earth Elemental | 55 | 36 | 60.44% | 8293 |
21.58% | Elven Cutthroat | 58 | 32 | 64.44% | 8912 |
16.55% | Feral Spirit | 42 | 27 | 60.87% | 6471 |
16.07% | Spirit of the Forest | 46 | 21 | 68.66% | 6557 |
12.47% | Crustacean King | 31 | 21 | 59.62% | 4096 |
11.03% | Brownie | 31 | 15 | 67.39% | 4745 |
10.79% | Armorsmith | 31 | 14 | 68.89% | 4729 |
10.55% | Javelin Thrower | 25 | 19 | 56.82% | 3655 |
10.07% | Centaur | 30 | 12 | 71.43% | 4327 |
9.83% | Enchanted Pixie | 22 | 19 | 53.66% | 3246 |
9.59% | Angel of Light | 29 | 11 | 72.50% | 4681 |
9.59% | Goblin Shaman | 25 | 15 | 62.50% | 3797 |
8.63% | Serpentine Soldier | 23 | 13 | 63.89% | 3790 |
8.39% | Silvershield Bard | 26 | 9 | 74.29% | 4088 |
8.39% | Medusa | 18 | 17 | 51.43% | 2497 |
8.39% | Silvershield Paladin | 18 | 17 | 51.43% | 2650 |
8.15% | Gold Dragon | 22 | 12 | 64.71% | 3168 |
8.15% | Wood Nymph | 19 | 15 | 55.88% | 2726 |
7.91% | Kobold Miner | 19 | 14 | 57.58% | 3026 |
7.67% | Elemental Phoenix | 17 | 15 | 53.12% | 2613 |
7.19% | Cerberus | 17 | 13 | 56.67% | 2589 |
7.19% | Exploding Dwarf | 19 | 11 | 63.33% | 3259 |
6.71% | Flame Imp | 15 | 13 | 53.57% | 2242 |
6.47% | Divine Healer | 15 | 12 | 55.56% | 2352 |
6.00% | Goblin Sorcerer | 16 | 9 | 64.00% | 2347 |
6.00% | Pirate Archer | 14 | 11 | 56.00% | 2025 |
6.00% | Mischievous Mermaid | 15 | 10 | 60.00% | 2268 |
6.00% | Lord of Darkness | 14 | 11 | 56.00% | 1873 |
5.52% | Crystal Werewolf | 15 | 8 | 65.22% | 2257 |
5.04% | Peaceful Giant | 12 | 9 | 57.14% | 1797 |
5.04% | Skeleton Assassin | 13 | 8 | 61.90% | 1709 |
4.80% | Magi Sphinx | 9 | 11 | 45.00% | 1526 |
4.56% | Defender of Truth | 11 | 8 | 57.89% | 1691 |
4.56% | Hydra | 9 | 10 | 47.37% | 1533 |
4.56% | Mushroom Seer | 10 | 9 | 52.63% | 1477 |
4.32% | Fiendish Harpy | 12 | 6 | 66.67% | 1902 |
4.32% | Highland Archer | 10 | 8 | 55.56% | 1543 |
4.32% | Naga Warrior | 12 | 6 | 66.67% | 1597 |
4.08% | Ruler of the Seas | 10 | 7 | 58.82% | 1600 |
4.08% | Dwarven Wizard | 6 | 11 | 35.29% | 1075 |
4.08% | Goblin Chef | 12 | 5 | 70.59% | 2023 |
3.84% | Magi of the Forest | 8 | 8 | 50.00% | 1332 |
3.84% | Mermaid Healer | 8 | 8 | 50.00% | 1142 |
3.60% | Cyclops | 5 | 10 | 33.33% | 525 |
3.12% | Electric Eels | 11 | 2 | 84.62% | 1506 |
3.12% | Flesh Golem | 7 | 6 | 53.85% | 1130 |
3.12% | Giant Roc | 4 | 9 | 30.77% | 647 |
3.12% | Corrupted Pegasus | 9 | 4 | 69.23% | 1356 |
2.88% | Undead Priest | 8 | 4 | 66.67% | 1014 |
2.88% | Spineback Turtle | 7 | 5 | 58.33% | 783 |
2.64% | Stone Golem | 6 | 5 | 54.55% | 966 |
2.40% | Imp Bowman | 6 | 4 | 60.00% | 785 |
2.16% | Divine Sorceress | 7 | 2 | 77.78% | 1030 |
2.16% | Enchanted Defender | 4 | 5 | 44.44% | 650 |
2.16% | Serpent of the Flame | 4 | 5 | 44.44% | 866 |
2.16% | Peacebringer | 3 | 6 | 33.33% | 498 |
1.92% | Sacred Unicorn | 3 | 5 | 37.50% | 436 |
1.92% | Sea Genie | 6 | 2 | 75.00% | 765 |
1.92% | Pirate Captain | 4 | 4 | 50.00% | 386 |
1.68% | Haunted Spirit | 6 | 1 | 85.71% | 819 |
1.44% | Spineback Wolf | 4 | 2 | 66.67% | 668 |
1.44% | Water Elemental | 3 | 3 | 50.00% | 328 |
1.44% | Manticore | 3 | 3 | 50.00% | 444 |
1.44% | Sabre Shark | 2 | 4 | 33.33% | 177 |
1.44% | Haunted Spider | 5 | 1 | 83.33% | 551 |
1.20% | Black Dragon | 2 | 3 | 40.00% | 232 |
1.20% | Fire Demon | 3 | 2 | 60.00% | 432 |
1.20% | Raging Impaler | 2 | 3 | 40.00% | 231 |
1.20% | Silvershield Knight | 3 | 2 | 60.00% | 499 |
1.20% | Silvershield Warrior | 1 | 4 | 20.00% | 154 |
1.20% | Prismatic Energy | 3 | 2 | 60.00% | 258 |
1.20% | Air Elemental | 1 | 4 | 20.00% | 161 |
0.72% | Fire Beetle | 3 | 0 | 100.00% | 459 |
0.72% | Skeletal Warrior | 2 | 1 | 66.67% | 274 |
0.72% | Silvershield Archers | 3 | 0 | 100.00% | 560 |
0.72% | Minotaur Warrior | 1 | 2 | 33.33% | 220 |
0.48% | Shin-Lo | 1 | 1 | 50.00% | 107 |
0.48% | Lightning Dragon | 2 | 0 | 100.00% | 289 |
0.48% | Frost Giant | 1 | 1 | 50.00% | 154 |
0.48% | Dragonling Bowman | 2 | 0 | 100.00% | 212 |
0.48% | Grumpy Dwarf | 2 | 0 | 100.00% | 337 |
0.24% | Undead Archer | 1 | 0 | 100.00% | 162 |
0.24% | Red Dragon | 1 | 0 | 100.00% | 137 |
0.24% | Twisted Jester | 1 | 0 | 100.00% | 128 |
0.24% | Animated Corpse | 1 | 0 | 100.00% | 181 |
0.24% | Minotaur Warlord | 0 | 1 | 0.00% | 0 |
0.24% | Molten Ogre | 0 | 1 | 0.00% | 0 |
SUMMONERS
Usage% | Summoner | W | L | Winratio | DEC |
---|---|---|---|---|---|
20.14% | Prince Rennyn | 52 | 32 | 61.90% | 7640 |
13.43% | Plado Emberstorm | 33 | 23 | 58.93% | 5305 |
12.23% | Tyrus Paladium | 35 | 16 | 68.63% | 5289 |
10.31% | Selenia Sky | 29 | 14 | 67.44% | 4129 |
6.24% | Valnamor | 14 | 12 | 53.85% | 2065 |
5.28% | Xander Foxwood | 13 | 9 | 59.09% | 1941 |
5.04% | Kiara Lightbringer | 13 | 8 | 61.90% | 2219 |
4.32% | The Peakrider | 10 | 8 | 55.56% | 1488 |
3.84% | Crypt Mancer | 10 | 6 | 62.50% | 1278 |
3.36% | Talia Firestorm | 7 | 7 | 50.00% | 1171 |
3.12% | Xia Seachan | 8 | 5 | 61.54% | 883 |
3.12% | Alric Stormbringer | 6 | 7 | 46.15% | 914 |
2.88% | Lyanna Natura | 7 | 5 | 58.33% | 1081 |
1.92% | Daria Dragonscale | 5 | 3 | 62.50% | 731 |
1.92% | Zintar Mortalis | 5 | 3 | 62.50% | 802 |
1.44% | Jarlax the Undead | 4 | 2 | 66.67% | 509 |
0.96% | Archmage Arius | 0 | 4 | 0.00% | 0 |
0.48% | Malric Inferno | 1 | 1 | 50.00% | 203 |
Wow that would be awesome! Think all this work consumes a lot of your time?