Retrieves the current token and bandwidth balances of an account

get_account_balance(address, max_attempts = 3L)

Arguments

address

(character): address of the account of interest, either in base58check or hex format.

max_attempts

(integer, positive): specifies the maximum number of additional attempts to call a URL if the first attempt fails (i.e. its call status is different from 200). Additional attempts are implemented with an exponential backoff. Defaults to 3.

Value

A nested tibble with the following columns:

  • request_time (POSIXct, UTC timezone): date and time of the request;

  • address (character): account address (in base58check format);

  • name (character): name of the account (NA if absent);

  • total_tx: total number of transactions recorded for the account as of request_time;

  • bandwidth (list): contains a tibble with several variables describing the energy and bandwidth usage of the account;

  • trx_balance (double): currently available (i.e. not-frozeb) balance of Tronix (TRX);

  • n_trc20 (integer): number of unique TRC-20 tokens currently held by the account (0 if absent);

  • trc20 (list or NA if absent): contains a tibble with n_trc20 rows and several variables describing the TRC-20 tokens held by the account (see get_trc20_token_description() for their definitions);

  • n_trc10 (integer): number of unique TRC-10 tokens currently held by the account (0 if absent);

  • trc10 (list or NA if absent): contains a tibble with n_trc10 rows and several columns describing the TRC-10 assets held by the account (see get_trc10_token_description() for their definitions).

See also

Examples

r <- get_account_balance("TQjaZ9FD473QBTdUzMLmSyoGB6Yz1CGpux") print(r)
#> # A tibble: 1 x 10 #> request_time address name total_tx bandwidth trx_balance n_trc20 trc20 #> <dttm> <chr> <chr> <int> <list> <dbl> <int> <lis> #> 1 2021-07-12 22:03:49 TQjaZ9… SunT… 69237 <tibble … 3927692. 16 <tib… #> # … with 2 more variables: n_trc10 <int>, trc10 <list>