Question: How to figure out how much and by whom is delegated to an account using the Steem API or steem-python?

I am trying to figure out how I can determine how much SP are delegated to a particular account and by whom. It is important to do this without using third party services (like steemreports), but by interacting with a blockchain node directly. Hence, I want to use the Steem API directly or, preferably, use the steem-python wrapper library.

Anyone around here knowing how this works? Maybe @justyy? Thanks a lot :-)

EDIT: All I could come up with so far is this:

[x for x in account.history_reverse(filter_by='delegate_vesting_shares')]

But this seems to be a bit over top!? Doesn't it? I don't want to stream the entire history everytime I need an update on the vested shares.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now