Emre avatar

Lighthive update: 0.4.2

emrebeyler

Published: 15 Feb 2023 › Updated: 15 Feb 2023Lighthive update: 0.4.2

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 gamer00Hive account@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.

Leave Lighthive update: 0.4.2 to:

Written by

Software Guy. Witness.

Read more #python posts


Best Posts From Emre

We have not curated any of emrebeyler's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Emre