RE: Update: Filtering of operations returned by the get_account_history API call.

avatar
(Edited)

You are viewing a single comment's thread:

Thanks for your work, it helped me to add this feature to beem. At the moment it is only used on https://api.hive.blog.

from beem import Hive
from beem.account import Account
hive = Hive("https://api.hive.blog")
account = Account("miniature-tiger", blockchain_instance=hive)
votes = list(account.history_reverse(stop=-1000, use_block_num=False, only_ops=["vote"]))

This returns all votes in the last 1000 account operations using operation_filter_low and operation_filter_high. The numbers are calculated in:

operation_filter_low, operation_filter_high = account._get_operation_filter(only_ops=["vote"])


0
0
0.000
2 comments
avatar
(Edited)

Cool! Can you add more than one operation to the only_ops array? Like ["vote", "comment"]?

0
0
0.000
avatar

Yes this works also. Do you know when the update is applied to all API full nodes?

0
0
0.000