Returns various bits of information about a TRC-10 token

get_trc10_token_description(
  token_id = NULL,
  token_name = NULL,
  detailed_info = FALSE,
  max_attempts = 3L
)

Arguments

token_id

(character): ID of the TRC-10 token of interest, presented either as a set of numbers (e.g., "1002000").

token_name

(character): common name of the TRC-10 token of interest (e.g., BitTorrent).

detailed_info

(boolean): if FALSE (default), only basic information about the token is returned. If TRUE, an extended information is returned.

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 tibble, whose content depends on the detailed_info argument. If detailed_info = FALSE (default), the tibble will have the following 5 columns:

  • token_id (character): same as argument token_id;

  • token_name (character): commont name of the token;

  • token_abbr (character): abbreviated name of the token;

  • token_owner_address (character): address of the token issuer, in base58check format;

  • precision (integer): number of digits in the decimal part of the token's amount (see apply_decimal() for details).

If detailed_info = TRUE, the returned tibble will have the same 5 columns as above, and the following additional columns:

  • request_time (POSIXct): date and time when the query was made;

  • reputation (character): reputation of the token on the TRON blockchain (usually, "ok");

  • vip (boolean): indicator of whether this token is treated as a VIP asset on the blockchain;

  • description (character): a free-text field describing the token;

  • date_created (POSIXct): date and time of the token's creation;

  • ico_start_time (POSIXct, UTC timezone): date and time of the asset's ICO start;

  • ico_end_time (POSIXct, UTC timezone): date and time of the asset's ICO end;

  • url (character): URL of the token's project;

  • github (character): URL of the project's Github repository;

  • total_supply (double): total supply of the token;

  • amount_issued (double): number of issued tokens;

  • issued_percentage (double): percentage of amount_issued from total_supply;

  • number_of_holders (integer): current number of accounts that hold this token;

  • total_tx (integer): current cumulative number of transactions that involved this token;

  • price_in_trx (double): current price of this token expressed in TRX.

If no description for a token can be found (this happens in rare cases, e.g. for token_id = "1001369"), the function will return no data (NULL), with the respective console message.

Details

TRC-10 are tokens issued by the system contract (as opposed to TRC-20 tokens, which are issued by smart contracts). See official documentation for details.

Examples

r1 <- get_trc10_token_description( token_id = "1002000", detailed_info = TRUE ) r2 <- get_trc10_token_description( token_name = "BitTorrent", detailed_info = FALSE ) print(r1)
#> # A tibble: 1 x 20 #> request_time token_id token_name token_abbr token_owner_add… reputation #> <dttm> <chr> <chr> <chr> <chr> <chr> #> 1 2021-07-12 22:03:57 1002000 BitTorrent BTT TF5Bn4cJCT6GVeU… ok #> # … with 14 more variables: vip <lgl>, description <chr>, date_created <dttm>, #> # ico_start_time <dttm>, ico_end_time <dttm>, url <chr>, github <chr>, #> # total_supply <dbl>, amount_issued <dbl>, issued_percentage <dbl>, #> # precision <int>, number_of_holders <int>, total_tx <int>, #> # price_in_trx <dbl>
print(r2)
#> # A tibble: 1 x 5 #> token_id token_name token_abbr token_owner_address precision #> <chr> <chr> <chr> <chr> <int> #> 1 1002000 BitTorrent BTT TF5Bn4cJCT6GVeUgyCN4rBhDg42KBrpAjg 6