Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

etherscan-getbalance

node v9.11.2
version: 1.0.0
endpointsharetweet
require('isomorphic-fetch') const getBalance = async (address) => { const balanceUrl = `https://api.etherscan.io/api?module=account&action=balance&address=${address}&tag=latest` let resp = await fetch(balanceUrl) resp = await resp.json() return Number(resp['result'] || 0) } const balance = await getBalance("0x738d145faabb1e00cf5a017588a9c0f998318012") console.log(balance)
Loading…

no comments

    sign in to comment