nectarengine.tokenobject module

class nectarengine.tokenobject.Token(symbol: str | Dict[str, Any], api: Api | None = None)

Bases: dict

hive-engine token dict

Parameters:

token (str) – Name of the token

get_all_buy_book() List[Dict[str, Any]]

Returns the buy book by looping through all pages

get_all_holder() List[Dict[str, Any]]

Returns all token holders by looping through all pages

get_all_sell_book() List[Dict[str, Any]]

Returns the sell book by looping through all pages

get_buy_book(limit: int = 100, offset: int = 0) List[Dict[str, Any]]

Returns the buy book

get_holder(limit: int = 1000, offset: int = 0) List[Dict[str, Any]]

Returns all token holders

get_info() Dict[str, Any] | None

Returns information about the token

get_market_info() Dict[str, Any] | None

Returns market information

get_sell_book(limit: int = 100, offset: int = 0) List[Dict[str, Any]]

Returns the sell book

quantize(amount: float | int | str) Decimal

Round down a amount using the token precision and returns a Decimal object

refresh() None