Skip to content

Instantly share code, notes, and snippets.

@pluswave
Last active April 13, 2018 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pluswave/de653e0175db485fd82c6a0d5831c190 to your computer and use it in GitHub Desktop.
Save pluswave/de653e0175db485fd82c6a0d5831c190 to your computer and use it in GitHub Desktop.
etherscan api demo from nodejs
var api = require('etherscan-api').init('REPLACE THIS WITH YOUR API KEY @ ETHERSCAN', 'ropsten', '3000');
var address = 'RELPACE THIS WITH ADDRESS YOU ARE INTREST';
var balance = api.account.balance(address);
balance.then(function (balanceData) {
//b = JSON.parse(balanceData);
console.log(balanceData);
});
var txlist = api.account.txlist(address, 1, 'latest', 'asc');
txlist.then(function (txData) {
//b = JSON.parse(balanceData);
console.log(txData);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment