Etherscan v2.0.2 Etherscan.API.Stats
Module to wrap Etherscan stats endpoints.
Link to this section Summary
Functions
Get ether price
Get total supply of ether
Get total supply of ERC20 token, by token_address
Link to this section Functions
Get ether price.
Example
iex> Etherscan.get_eth_price()
{:ok, %{"ethbtc" => 0.04259, "ethusd" => 272.29}}
Get total supply of ether.
Example
iex> Etherscan.get_eth_supply()
{:ok, 101493235.99899999797344207764}
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
.
Example
iex> Etherscan.get_token_supply("0x57d90b64a1a57749b0f932f1a3395792e12e7055")
{:ok, 21265524714464}