Lighthive update: 0.4.2


Lighthive documentation


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.

Changelog

  • Account history helper was not working well. Fixed the issues there and migrated account history helper to account_history_api instead of condenser_api.

Screenshot 2023-02-15 at 19.56.16.png

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)

  • Removed obsolete RC helper
  • Updated node list and removed a couple of public nodes that are down, recently.
  • Documentation is also updated to reflect the changes.

Shoutout

Thanks @gamer00 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.

H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
60 Comments