Returns TRC-10 transfer transactions for a specific combination of time range, token and account

get_trc10_transfers(
  owner_address = NULL,
  related_address = NULL,
  min_timestamp,
  max_timestamp,
  max_attempts = 3L
)

Arguments

owner_address

(character): address of the token issuer, either in base58check or hex format.

related_address

(character): address of the account, for which the transfer data are to be be retrieved (either in base58check or hex format).

min_timestamp

(numeric or character): a Unix timestamp (including milliseconds), which defines the beginning of the period of interest (inclusive). Defaults to 0.

max_timestamp

(numeric or character): a Unix timestamp (including milliseconds), which defines the end of the period of interest (inclusive).

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

Tibble with the following colums (see get_tx_info_by_id() and get_trc10_token_description() for their definitions):

  • tx_id (character);

  • block_number (character);

  • timestamp (POSIXct, UTC timezone);

  • from_address (character);

  • to_address (character);

  • is_contract_from_address (boolean);

  • is_contract_to_address (boolean);

  • contract_result (character);

  • confirmed (boolean);

  • amount (double);

  • token_id (character);

  • token_name (character);

  • token_abbr (character).

Details

If owner_address = NULL, all TRC-10 asset transfers will be returned, including Tronix (TRX) (which is technically a TRC-10 token). However, if owner_address is specified, only results for the corresponding token will be returned. This argument accepts only one address at a time.

If related_address is provided, the returned TRC-10 asset transfers will be in relation to that specific related_address, and will include both incoming or outgoing transfers.

The number of transfers that take place on the TRON blockchain can be very large, and thus users are advised to choose min_timestamp and max_timestamp wisely. If the requested time range is too large, the maximum number of transactions returned by the underlying Tronscan API will be capped at 10000, and the processing time may become prohibitively long. Chunking the time range of interest into smaller periods can help to avoid gaps in data in such cases. However, users would have to implement their own logic for that.

Examples

# Results contain all TRC-10 transfers that took place # within the specified time range: r1 <- get_trc10_transfers( min_timestamp = "1577837400000", max_timestamp = "1577837430000" )
#>
#> - Fetching data... Elapsed time: 00:00:00
print(r1)
#> # A tibble: 15 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 f641ef9c3b993… 15860789 2020-01-01 00:10:30 TAGY4jZiHLF7Jn… THoVwtGGxwu6… #> 2 cc71ee8a451b1… 15860788 2020-01-01 00:10:27 TEEqgcJFNYJd6X… TP6d1u2aEhW9… #> 3 604a65a85f794… 15860788 2020-01-01 00:10:27 TGV7WvYAZdoLtX… TQaiSLgGYj3n… #> 4 d6c59b6d73b7a… 15860788 2020-01-01 00:10:27 TNk53vo7ihZobd… TLvQcFbrvxgD… #> 5 675a3606a414f… 15860788 2020-01-01 00:10:27 TMaBqmMRekKZMQ… TT5W8MPbYJih… #> 6 0d38557f1495d… 15860787 2020-01-01 00:10:24 TZBDHDwQocwpWX… TLc41pwt3HJt… #> 7 97a227a430ab1… 15860787 2020-01-01 00:10:24 TV5jzbbiBhp2UT… TFfayfUQpfFW… #> 8 5e6025a703032… 15860786 2020-01-01 00:10:21 TDsxwH2QimMFpq… TJKWvFZVTX3k… #> 9 4081eb369aa2c… 15860784 2020-01-01 00:10:15 TQoX5EnSpaBAZL… TFCn5JuJ4fCd… #> 10 ae2000ea3e10b… 15860784 2020-01-01 00:10:15 TMaBqmMRekKZMQ… TBhjJyuXnadz… #> 11 cda3b9f5a59f6… 15860783 2020-01-01 00:10:12 TXYLN4bQZe1j7A… TXXsngWoLCtE… #> 12 d1210b09f7ae0… 15860783 2020-01-01 00:10:12 TNk53vo7ihZobd… TJLzg1dBAjaP… #> 13 0ae49511eca29… 15860783 2020-01-01 00:10:12 TMJMkYike39YNU… TFTAC3k9KFQA… #> 14 8340fe21bcd12… 15860782 2020-01-01 00:10:09 TNLTMTwWQX2T24… TMhM9YmRXN8t… #> 15 d4df90e8fe8d0… 15860780 2020-01-01 00:10:03 TQ7WucGRWyzW9T… TGwpHfMKcj9G… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_id <chr>, token_name <chr>, token_abbr <chr>
# Results contain all TRC-10 transfers to/from a specific account # that took place within the specified time range: r2 <- get_trc10_transfers( related_address = "TMaBqmMRekKZMQEq3u3QrJpGDwPYZZo87V", min_timestamp = "1577837400000", max_timestamp = "1577837430000" )
#>
#> - Fetching data... Elapsed time: 00:00:00
print(r2)
#> # A tibble: 2 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 675a3606a414f… 15860788 2020-01-01 00:10:27 TMaBqmMRekKZMQE… TT5W8MPbYJih… #> 2 ae2000ea3e10b… 15860784 2020-01-01 00:10:15 TMaBqmMRekKZMQE… TBhjJyuXnadz… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_id <chr>, token_name <chr>, token_abbr <chr>
# Results contain transfers of a specific token # that took place within the specified time range: r3 <- get_trc10_transfers( owner_address = "TF5Bn4cJCT6GVeUgyCN4rBhDg42KBrpAjg", min_timestamp = "1577837400000", max_timestamp = "1577837430000" )
#>
#> - Fetching data... Elapsed time: 00:00:00
#>
#> \ Fetching data... Elapsed time: 00:00:00
print(r3)
#> # A tibble: 1 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 97a227a430ab1… 15860787 2020-01-01 00:10:24 TV5jzbbiBhp2UTK… TFfayfUQpfFW… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_id <chr>, token_name <chr>, token_abbr <chr>
# Results contain transfers of a specific token to/from a specifc address # that took place within the specified time range: r4 <- get_trc10_transfers( owner_address = "THLLMnsEKEci5e5dJHnW28QQU8AujGhSoK", related_address = "TBhjJyuXnadzLX1s3yHFduZgpCeWEzda5u", min_timestamp = "1577837400000", max_timestamp = "1577837430000" )
#>
#> - Fetching data... Elapsed time: 00:00:00
print(r4)
#> # A tibble: 1 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 ae2000ea3e10b… 15860784 2020-01-01 00:10:15 TMaBqmMRekKZMQE… TBhjJyuXnadz… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_id <chr>, token_name <chr>, token_abbr <chr>