Etherscan v0.1.2 Etherscan

Documentation for Etherscan.

Link to this section Summary

Functions

Get ether balance for a single address. Balance is returned in wei

Get ether balance for a list of multiple addresses, up to a maximum of 20. Balances are returned in wei

Get block and uncle rewards by block_number

Get a list of blocks mined by address

Get contract ABI for contracts with verified source code, by address

Check contract execution status (if there was an error during contract execution) by transaction_hash

Get ether price

Get total supply of ether. Total supply is returned in wei

Get a list of ‘Internal’ transactions by address. Returns up to a maximum of the last 10,000 transactions only

Get a list of ‘Internal Transactions’ by transaction_hash. Returns up to a maximum of the last 10,000 transactions only

Get the ERC20 token balance of the address for token at token_address

Get total supply of ERC20 token, by token_address

Get a list of ‘Normal’ transactions by address. Returns up to a maximum of the last 10,000 transactions only

Get a list of uncles mined by address

Link to this section Functions

Link to this function get_balance(address)
get_balance(address :: String.t) ::
  {:ok, non_neg_integer} |
  {:error, atom}

Get ether balance for a single address. Balance is returned in wei.

Link to this function get_balances(addresses)
get_balances(addresses :: [String.t]) ::
  {:ok, map} |
  {:error, atom}

Get ether balance for a list of multiple addresses, up to a maximum of 20. Balances are returned in wei.

Link to this function get_block_and_uncle_rewards(block_number)
get_block_and_uncle_rewards(block_number :: non_neg_integer) :: {:ok, Etherscan.BlockReward.t} :: {:error, atom}

Get block and uncle rewards by block_number.

BETA

Link to this function get_blocks_mined(address, params \\ %{})
get_blocks_mined(address :: String.t, params :: map) ::
  {:ok, [Etherscan.Block.t]} |
  {:error, atom}

Get a list of blocks mined by address.

params = %{
  page: 1, # Page number
  offset: 10 # Max records returned
}
Link to this function get_contract_abi(address)
get_contract_abi(address :: String.t) ::
  {:ok, list} |
  {:error, atom}

Get contract ABI for contracts with verified source code, by address.

More Info

Link to this function get_contract_execution_status(transaction_hash)
get_contract_execution_status(transaction_hash :: String.t) ::
  {:ok, map} |
  {:error, atom}

Check contract execution status (if there was an error during contract execution) by transaction_hash.

BETA

Link to this function get_eth_price()
get_eth_price() :: {:ok, map}

Get ether price.

Link to this function get_eth_supply()
get_eth_supply() :: {:ok, non_neg_integer}

Get total supply of ether. Total supply is returned in wei.

Link to this function get_internal_transactions(address, params \\ %{})
get_internal_transactions(address :: String.t, params :: map) ::
  {:ok, [Etherscan.Block.t]} |
  {:error, atom}

Get a list of ‘Internal’ transactions by address. Returns up to a maximum of the last 10,000 transactions only.

BETA

params = %{
  page: 1, # Page number
  offset: 10, # Max records returned
  sort: "asc", # Sort returned records
  startblock: 0, # Start block number
  endblock: 99999999 # End block number
}
Link to this function get_internal_transactions_by_hash(transaction_hash)
get_internal_transactions_by_hash(transaction_hash :: String.t) ::
  {:ok, [Etherscan.Block.t]} |
  {:error, atom}

Get a list of ‘Internal Transactions’ by transaction_hash. Returns up to a maximum of the last 10,000 transactions only.

Link to this function get_token_balance(address, token_address)
get_token_balance(address :: String.t, token_address :: String.t) ::
  {:ok, non_neg_integer} |
  {:error, atom}

Get the ERC20 token balance of the address for token at token_address.

Link to this function get_token_supply(token_address)
get_token_supply(token_address :: String.t) ::
  {:ok, non_neg_integer} |
  {:error, atom}

Get total supply of ERC20 token, by token_address.

Link to this function get_transactions(address, params \\ %{})
get_transactions(address :: String.t, params :: map) ::
  {:ok, [Etherscan.Block.t]} |
  {:error, atom}

Get a list of ‘Normal’ transactions by address. Returns up to a maximum of the last 10,000 transactions only.

BETA

params = %{
  page: 1, # Page number
  offset: 10, # Max records returned
  sort: "asc", # Sort returned records
  startblock: 0, # Start block number
  endblock: 99999999 # End block number
}
Link to this function get_uncles_mined(address, params \\ %{})
get_uncles_mined(address :: String.t, params :: map) ::
  {:ok, [Etherscan.Block.t]} |
  {:error, atom}

Get a list of uncles mined by address.

params = %{
  page: 1, # Page number
  offset: 10 # Max records returned
}