:mod:`golosscripts.golos_helper` ================================ .. py:module:: golosscripts.golos_helper Module Contents --------------- .. data:: STEEMIT_BANDWIDTH_AVERAGE_WINDOW_SECONDS .. data:: STEEMIT_BANDWIDTH_PRECISION :annotation: = 1000000 .. data:: STEEMIT_100_PERCENT :annotation: = 10000 .. data:: STEEMIT_VOTE_REGENERATION_SECONDS .. data:: STEEMIT_INFLATION_RATE_START_PERCENT :annotation: = 1515 .. data:: STEEMIT_INFLATION_RATE_STOP_PERCENT :annotation: = 95 .. data:: STEEMIT_INFLATION_NARROWING_PERIOD :annotation: = 250000 .. data:: STEEMIT_BLOCK_INTERVAL :annotation: = 3 .. data:: STEEMIT_BLOCKS_PER_YEAR .. data:: STEEMIT_BLOCKS_PER_DAY .. data:: STEEMIT_MAX_WITNESSES :annotation: = 21 .. data:: timeshare_weight :annotation: = 5 .. data:: top19_weight :annotation: = 1 .. data:: witness_pay_normalization_factor :annotation: = 25 .. data:: key_types :annotation: = ['owner', 'active', 'posting', 'memo'] .. data:: post_entry .. data:: bandwidth .. data:: feed .. data:: emission .. data:: log .. py:class:: GolosHelper(*args, **kwargs) Bases: :class:`golos.Steem` Helper class for Golos which implements additional methods. Please see base class documentation on instantiation. .. note:: On instantiation this class calls :py:func:`golos.instance.set_shared_steemd_instance`! This means all your golos objects like ``Account()`` etc will use that instance. .. method:: parse_url(url: str) :staticmethod: Parses an url to exctract author and permlink. :param url: URL to post/comment :rtype: post_entry .. method:: get_bandwidth(self, account: str, type_: str = 'market') Estimate current account bandwidth and usage ratio. :param str account: account name :param str type_: 'market' used for transfer operations, forum - for posting and voting, custom - custom ops .. method:: get_market_price(self, type_: str = 'bid') Get current market price GBG/GOLOS from internal Dex. :param str type_: bid or ask :return: price as float .. method:: get_min_price(self) Get GBG/GOLOS minimal price (limit by chain). .. method:: get_price_feeds(self) Get current price feeds as reported by witnesses. .. method:: get_witness_pricefeed(self, witness: Union[str, Dict]) Obtain current published price for single witness. .. method:: estimate_median_price(self) Calculate new expected median price based on last median price feed. .. method:: get_voting_power(self, account: str) Calculate real voting power instead of stale info in get_account() :param str account: account name :return: voting power 0-100 .. method:: calc_inflation(self, start_block_num: Optional[int] = None, stop_block_num: Optional[int] = None, virtual_supply: Optional[float] = None, worker_percent: Optional[int] = None, witness_percent: Optional[int] = None, vesting_percent: Optional[int] = None, precise_rewards: bool = False) Calculate inflation in range from start block to stop block. :param int start_block_num: start block :param int stop_block_num: stop block :param float virtual_supply: initial virtual_supply :param int worker_percent: worker fund inflation percent (0-10000) :param int witness_percent: witness pay inflation percent (0-10000) :param int vesting_percent: vesting inflation percent (0-10000) :param bool precise_rewards: calculate precise witness reward; precise but slow; Gives a little better results (difference is very low) :return: new emission detailed data for requested period