A new version of Lighthive is pushed to the Python package index with the tag 0.4.2 . As usual, pip install lighthive --upgrade is enough to get the latest version.
account_history_api instead of condenser_api.Example: GET the all deposits in HIVE to binance deposit account in the last week
import datetime
from lighthive.client import Client
from lighthive.helpers.amount import Amount
client = Client()
account = client.account('deepcrypto8')
one_week_ago = datetime.datetime.utcnow() - datetime.timedelta(days=7)
total_hive = 0
for op in account.history(
stop_at=one_week_ago,
filter=["transfer_operation"]):
if op["to"] != "deepcrypto8":
continue
total_hive += Amount.from_asset(op["amount"]).amount
print("Total HIVE transfers received", total_hive)
Thanks for the bug report. In general, if you have any issues and problems with the library, please file a ticket at Github repository or mention my name somwhere in HIVE blockchain.