get_txs: Get transactions for an address

Description Usage Arguments Details Value Warning

View source: R/get_txs.R

Description

Get normal, internal, ERC-20, or ERC-721 transactions for an Ethereum address.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
get_txs(
  address,
  api_key,
  internal = FALSE,
  type = c("normal", "internal", "ERC20", "ERC721"),
  startblock = 0,
  endblock = 999999999,
  startdate,
  enddate,
  network = "mainnet",
  first_page = FALSE,
  no_errors = TRUE,
  quiet = FALSE
)

Arguments

address

Character. A single ethereum address as a character string (40 hexadecimal characters prepended by '0x').

api_key

An Etherscan API key (see Details).

internal

Logical. Should normal (FALSE, default) or internal (TRUE) transactions be queried? Deprecated. Please use type instead.

type

The type of transaction to query. One of 'normal', 'internal', 'ERC20', or 'ERC721'.

startblock

Starting block for transaction query. Default is 0.

endblock

Ending block for transaction query. Default is 999999999.

startdate

Optional Date or POSIXct object defining the start date or datetime for the resulting list of transactions to be filtered to. If startdate is provided, startblock is ignored.If a Date object is provided, timezone is assumed to be UTC, and all transactions up to midnight of that date will be included in the filtered result. For POSIXct objects, timezone is taken from the object. Note that, startdate is applied as a filter after downloading transactions, and so settings a value that is later than the earliest transaction sent/received by the address does not speed up the download process.

enddate

Optional Date or POSIXct object defining the end date or datetime for the resulting list of transactions to be filtered to. Starting block for transaction query. If enddate is provided, endblock is ignored. If a Date object is provided, timezone is assumed to be UTC, and all transactions up to midnight of that date will be included in the filtered result. For POSIXct objects, timezone is taken from the object.

network

Ethereum network to use. One of 'mainnet' (default), 'ropsten', 'rinkeby', 'kovan', or 'goerli'.

first_page

Logical. Should only the first page of results (up to 10,000 transactions) be returned.

no_errors

Logical. Should unsuccessful transactions be omitted (FALSE, default)?

quiet

Logical. Suppress messages? Default is FALSE.

Details

get_txs uses the Etherscan API to source information about transactions to and from an Ethereum address. Register for an API key at the Etherscan Developer APIs page.

Value

A tbl_df with transaction details. Columns vary depending on type.

Warning

As per the Etherscan documentation, the Etherscan Ethereum Developer APIs are provided as a community service and without warranty, so please just use what you need and no more. They support both GET/POST requests and a rate limit of 5 requests/sec.


dapped/eth documentation built on Oct. 23, 2021, 4:42 a.m.