Returns transactions that took place within a user-specified period of time
get_tx_for_time_range( min_timestamp = 0, max_timestamp = NULL, add_contract_data = TRUE, max_attempts = 3L )
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). |
add_contract_data | (boolean): if |
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
|
A nested tibble where each row corresponds to one transaction.
A detailed description of the content of this tibble can be found in the
help file for get_tx_info_by_id()
.
The number of transactions that take place on the TRON blockchain
is 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.
# \donttest{ min_timestamp <- "1577836800000" max_timestamp <- "1577836803000" tx_df <- get_tx_for_time_range(min_timestamp, max_timestamp)#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#> # A tibble: 41 x 20 #> request_time tx_id block_number timestamp contract_result #> <dttm> <chr> <chr> <dttm> <chr> #> 1 2021-07-12 22:04:08 5f13111… 15860581 2020-01-01 00:00:00 SUCCESS #> 2 2021-07-12 22:04:08 a186fc1… 15860581 2020-01-01 00:00:00 SUCCESS #> 3 2021-07-12 22:04:09 bf9c96d… 15860581 2020-01-01 00:00:00 SUCCESS #> 4 2021-07-12 22:04:10 f342f3e… 15860581 2020-01-01 00:00:00 SUCCESS #> 5 2021-07-12 22:04:10 90ee18d… 15860581 2020-01-01 00:00:00 SUCCESS #> 6 2021-07-12 22:04:10 0c01304… 15860581 2020-01-01 00:00:00 SUCCESS #> 7 2021-07-12 22:04:11 bcfbf1b… 15860581 2020-01-01 00:00:00 SUCCESS #> 8 2021-07-12 22:04:11 b9889be… 15860581 2020-01-01 00:00:00 SUCCESS #> 9 2021-07-12 22:04:11 44b123a… 15860581 2020-01-01 00:00:00 SUCCESS #> 10 2021-07-12 22:04:11 084d57b… 15860581 2020-01-01 00:00:00 SUCCESS #> # … with 31 more rows, and 15 more variables: confirmed <lgl>, #> # confirmations_count <int>, sr_confirm_list <list>, contract_type <chr>, #> # from_address <chr>, to_address <chr>, is_contract_from_address <lgl>, #> # is_contract_to_address <lgl>, costs <list>, trx_transfer <dbl>, #> # trc10_transfer <list>, trc20_transfer <lgl>, internal_tx <list>, #> # info <lgl>, contract_data <list># }