Last active
April 13, 2018 07:26
-
-
Save pluswave/de653e0175db485fd82c6a0d5831c190 to your computer and use it in GitHub Desktop.
etherscan api demo from nodejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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