Returns TRC-20 transfer transactions for a user-specified time range
get_trc20_transfers( contract_address = NULL, related_address = NULL, min_timestamp, max_timestamp, max_attempts = 3L )
contract_address | (character): contract address of
a TRC-20 token of interest, either in |
---|---|
related_address | (character): address of the
account, for which the transfer data are to be be retrieved
(either in |
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
|
Tibble with the following colums (see get_tx_info_by_id()
and
get_trc20_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_contract_address
(character);
token_name
(character);
token_abbr
(character).
If contract_address = NULL
, all TRC-20 token transfers will be
returned for the requested time range. However, if contract_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-20 token 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.
# Results contain all TRC-20 transfers that took place # within the requested time range: r1 <- get_trc20_transfers( min_timestamp = "1609459860000", max_timestamp = "1609459865000" )#>#>#> # A tibble: 7 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 ce343811d4d2f… 26368083 2021-01-01 00:11:03 TVn1pGmuZRfUPYB… TFQyXjQXUuBC… #> 2 db14cb7057821… 26368083 2021-01-01 00:11:03 TNaRAoLUyYEV2uF… TNuXJj7NvA3e… #> 3 6c96ed38b8162… 26368083 2021-01-01 00:11:03 TYci9vinp8PByaE… TMpkzcmPb1BW… #> 4 75d785972605a… 26368083 2021-01-01 00:11:03 TNaRAoLUyYEV2uF… TP9sBpao6VQW… #> 5 8739d87ed1e4c… 26368083 2021-01-01 00:11:03 TDfKAoGTgQsHCoA… TEJPcb6ULVnz… #> 6 56e665ef5143d… 26368083 2021-01-01 00:11:03 TS3cGyL3DvpMo15… TSH9XuuiYDF8… #> 7 4ce68f65055f4… 26368083 2021-01-01 00:11:03 TEPSrSYPDSQ7yXp… TFknPRnUr4PX… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_contract_address <chr>, token_name <chr>, #> # token_abbr <chr># Results contain all TRC-10 transfers to/from a specific account # that took place within the requested time range: r2 <- get_trc20_transfers( related_address = "TFQyXjQXUuBCFTXP9K72wTinqbsDUD5EDL", min_timestamp = "1609459860000", max_timestamp = "1609459865000" )#>#># Results contain transfers of a specific token: r3 <- get_trc20_transfers( contract_address = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", min_timestamp = "1609459860000", max_timestamp = "1609459865000" )#>#>#> # A tibble: 8 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 ce343811d4d2f… 26368083 2021-01-01 00:11:03 TVn1pGmuZRfUPYB… TFQyXjQXUuBC… #> 2 db14cb7057821… 26368083 2021-01-01 00:11:03 TNaRAoLUyYEV2uF… TNuXJj7NvA3e… #> 3 6c96ed38b8162… 26368083 2021-01-01 00:11:03 TYci9vinp8PByaE… TMpkzcmPb1BW… #> 4 75d785972605a… 26368083 2021-01-01 00:11:03 TNaRAoLUyYEV2uF… TP9sBpao6VQW… #> 5 4ce68f65055f4… 26368083 2021-01-01 00:11:03 TEPSrSYPDSQ7yXp… TFknPRnUr4PX… #> 6 f84de31808595… 26368082 2021-01-01 00:11:00 TMSxsUxYiNH2jJY… TNrU4UJP647U… #> 7 f84de31808595… 26368082 2021-01-01 00:11:00 TNrU4UJP647UKgc… TQn9Y2khEsLJ… #> 8 4dd19a5f22923… 26368082 2021-01-01 00:11:00 TQn9Y2khEsLJW1C… TVCkFCdTMSFv… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_contract_address <chr>, token_name <chr>, #> # token_abbr <chr># Results contain transfers of a specific token to/from a specific address # that took place within the requested time range: r4 <- get_trc20_transfers( contract_address = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", related_address = "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE", min_timestamp = "1609459860000", max_timestamp = "1609459865000" )#>#>#>#>#> # A tibble: 2 x 13 #> tx_id block_number timestamp from_address to_address #> <chr> <chr> <dttm> <chr> <chr> #> 1 f84de31808595… 26368082 2021-01-01 00:11:00 TNrU4UJP647UKgc… TQn9Y2khEsLJ… #> 2 4dd19a5f22923… 26368082 2021-01-01 00:11:00 TQn9Y2khEsLJW1C… TVCkFCdTMSFv… #> # … with 8 more variables: is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, contract_result <chr>, confirmed <lgl>, #> # amount <dbl>, token_contract_address <chr>, token_name <chr>, #> # token_abbr <chr>