I changed my script to get pendingUnstake, delegationsOut and stake to calculate the total staked. However, I continue to have a difference between the values displayed on https://www.wearealiveand.social/ and mine.
I have a total stake 1049936.2603 and the site is displaying 1,624,337.67.
find_all() has a while loop that loads 1000 more rows from find() until there is no more results to load, that is how it gets all rows and not just 1000.
The way it works is that all the rows of the data is divided into sections of 1000 rows in each, and what section to load is defined by the offset, and in the while loop it increases the offset by 1 every time that it runs the loop, and stops when there is no more sections to load.
There seems to be something still missing though as there is a difference of almost 10k Alive Power with your numbers compared to what Hive-engine shows on our tribe interface, and I get the same number as they do with my script.
@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (1/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.
@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (9/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.
@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (1/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.
@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (2/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.
I changed my script to get pendingUnstake, delegationsOut and stake to calculate the total staked. However, I continue to have a difference between the values displayed on https://www.wearealiveand.social/ and mine.
I have a total stake 1049936.2603 and the site is displaying 1,624,337.67.
Then you are most likely using the get_holder() function which has a limit of 1000, https://hiveengine.readthedocs.io/en/latest/hiveengine.tokenobject.html#hiveengine.tokenobject.Token.get_holder
You need to be using the find_all() function from the API module instead to get all stakeholders, there is over 6000 of them, https://hiveengine.readthedocs.io/en/latest/hiveengine.api.html#hiveengine.api.Api.find_all
!ALIVE
I was using the find() function, and I was not able to identify the difference between find() and find_all() since find_all uses the find function
https://github.com/holgern/hiveengine/blob/master/hiveengine/api.py
find_all() has a while loop that loads 1000 more rows from find() until there is no more results to load, that is how it gets all rows and not just 1000.
The way it works is that all the rows of the data is divided into sections of 1000 rows in each, and what section to load is defined by the offset, and in the while loop it increases the offset by 1 every time that it runs the loop, and stops when there is no more sections to load.
!ALIVE
Thanks a lot for the information.
Sorry for some questions, but I am not a Python programmer.
Now, that I change my script I have the following numbers
Circulating Supply: 1791477.7552
Supply: 1848004.5050
Staked: 1614706.1375002
Burn: 56526.7498
Accounts: 6731
Fantastic to see that you worked it out.
There seems to be something still missing though as there is a difference of almost 10k Alive Power with your numbers compared to what Hive-engine shows on our tribe interface, and I get the same number as they do with my script.
!ALIVE
I need to try to understand What is causing that difference.
Currently I am not understanding that difference since I am looking for all entres until I reach an empty entry.
@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (1/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.

@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (9/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.

@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (1/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.

@cryptosimplify! You Are Alive so I just staked 0.1 $ALIVE to your account on behalf of @flaxz.alive. (2/30)
The tip has been paid for by the We Are Alive Tribe through the earnings on @alive.chat, feel free to swing by our daily chat any time you want, plus you can win Hive Power and Alive Power delegations and Ecency Points in our chat every day.
