How to get the list of your delegator on HIVE/STEEM
I would like to share with you a very simple python code to get in a very reasonable time frame the list of all the delegators to your account.
Unfortunately there is not a build in function out of the box for this purpose, like to get your outgoing delegations, so a simple work around could get you what you need, but we need to check the whole account transaction history, so that's why I said this solution gives the result in a reasonable time frame.
This code works both for
HIVE blockchains and it use the last version of
beem python library
from beem import Steem from beem.account import Account from beem.instance import set_shared_steem_instance import re stm = Steem("https://api.hive.blog") #https://api.steemit.com for the steem blockchain set_shared_steem_instance(stm) acc = Account("[YOUR ACCOUNT]",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("'vesting_shares': '(.+?)'",str(c)) name=re.findall("'delegator': '(.+?)'",str(c)) if name not in names: c_list.append(data) names.append(name) active= removed= for i in c_list: if str(i)=="['0.000000 VESTS']": data=i,i removed.append(data) else: hive=stm.vests_to_sp(float(i.split(' '))) data=i,hive active.append(data) for i in active: print (i,':',i,'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,':',i,'HIVE') else: exit
As you can see reading the code it ends up by printing the whole list of account and the amount of SP/HP delegates to you, and the number of active delegators and the number of the delegatos who remove their vests to you.
If you want to print the list of the account who remove the delegation you have to type
y and click enter, else just click enter and the program will stop.