
delegators list
Today I was quite happy to finally update and start to reuse my github.
So after the code I published this morning, this afternoon I have found the time to write few lines to help me create my delegators list.
Actually is something I had ready already but I had to update in order to work properly and to clean a bit the mess that was my original code.
The script in python that uses been library to interact both with steem and hive blockchains.
It returns the historical of an account delegations, the current active delegations and the list of the accounts that undelegated.
from beem.account import Account
from beem.instance import set_shared_steem_instance
from beem import Steem
import re
stm = Steem("https://anyx.io")#use https://api.steemit.com for steem
set_shared_steem_instance(stm)
acc = Account("[the account you want to check]",steem_instance=stm)
c_list = []
names=[]
for c in acc.history_reverse(only_ops=["delegate_vesting_shares"]):
data=re.findall("'delegator': '(.+?)'",str(c)),re.findall("'delegatee': '(.+?)'",str(c)),re.findall("'amount': '(.+?)'",str(c))
name=re.findall("'delegator': '(.+?)'",str(c))
if name not in names:
print(re.findall("'delegator': '(.+?)'",str(c)),re.findall("'delegatee': '(.+?)'",str(c)),re.findall("'amount': '(.+?)'",str(c)))
c_list.append(data)
names.append(name)
active=[]
removed=[]
for i in c_list:
if str(i[2])=="['0']":
data=i[0][0],i[2][0]
removed.append(data)
else:
hive=stm.vests_to_sp(i[2][0])#.split(' ')[0]))
data=i[0][0], hive #i[2][0]
#print ('DATA 2', data)
active.append(data)
for i in active:
print (i[0],':',round(i[1]/1000000,3),'HIVE')
print ('ACTIVE:',len(active))
print ('LOST:',len(removed))
a=input ('Do you want to print the undelgator list?')
if a=='y':
for i in removed:
print (i[0][0],':',i[1],'HIVE')
else:
exit
this is the repo on github:
https://github.com/digital-mine/delegators-list
Leave delegators list to:
Read more #steem posts
Best Posts From the.journal
We have not curated any of the.journal's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From the.journal
- Restart the A.I. training
- Training new A.I. model
- New track from A.I. generated music
- Difference in output with 2 different A.I. scripts
- New Project- Artificial intelligence Music composer
- New curation trail no delegation required
- Double login (steem/hive) for website
- Python package for steemlogin.com
- How to encrypt information in custom_json [episode 2]
- How to encrypt information in custom_json [episode 1]
- Start to test BLURT blockchain
- Python script to save and compare active users on steem and hive
- delegators list
- steem and hive account creator
- Hive up and HUOBI promotion
- HIVE price UP 130%
- Something is moving [STEEM and HIVE price]
- STEEM-HIVE price and trade 4/8/2020 [VIDEO VERSION]
- STEEM-HIVE price and trade 4/8/2020
- thank you coronavirus helpers google doodle