- etherscan/api
- etherscan/api
- log
- proxy
- stats
- block
- transaction
- contract
- account
- getLogs
- getLogs
- eth_blockNumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getBlockTransactionCountByNumber
- eth_getTransactionByHash
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionCount
- eth_sendRawTransaction
- eth_getTransactionReceipt
- eth_call
- eth_getCode
- eth_getStorageAt
- eth_gasPrice
- eth_estimateGas
- tokensupply
- ethsupply
- ethprice
- getblockreward
- getstatus
- getabi
- tokenbalance
- balance
- txlistinternal
- txlist
- getminedblocks
- tokentx
- pickChainUrl
- getRequest
apiKeystring (optional) Your Etherscan APIkeychainstring (optional) Testnet chain keys [ropsten, rinkeby, kovan]timeoutnumber (optional) Timeout in milliseconds for requests, default 10000
The Event Log API was designed to provide an alternative to the native eth_getLogs.
addressfromBlocktoBlocktopic0topic0_1_oprtopic1topic1_2_oprtopic2topic2_3_oprtopic3topic0_2_opr
returns the status of a specific transaction hash
addressfromBlockstring fromBlocktoBlockstring toBlocktopic0string topic (32 Bytes per topic)topic0_1_oprstring and|or between topic0 & topic1topic1string topic (32 Bytes per topic)topic1_2_oprstring and|or between topic1 & topic2topic2string topic (32 Bytes per topic)topic2_3_oprstring and|or between topic2 & topic3topic3string topic (32 Bytes per topic)topic0_2_oprstring and|or between topic0 & topic2
https://etherscan.io/apis#logsReturns the number of most recent block
var block = api.proxy.eth_blockNumber();Returns Promise<integer>
Returns information about a block by block number.
tagstring Tag to look up
var blockNumber = api.proxy.eth_getBlockByNumber('0x10d4f');Returns Promise<integer>
Returns information about a uncle by block number.
var res = api.proxy.eth_getUncleByBlockNumberAndIndex('0x210A9B', '0x0');Returns the number of transactions in a block from a block matching the given block number
tagstring Tag to look up
var res = api.proxy.eth_getBlockTransactionCountByNumber('0x10FB78');Returns the information about a transaction requested by transaction hash
txhashhashstring Transaction hash
var res = api.proxy.eth_getTransactionByHash('0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1');Returns information about a transaction by block number and transaction index position
var res = api.proxy.eth_getTransactionByBlockNumberAndIndex('0x10d4f', '0x0');Returns the number of transactions sent from an address
addressstring Address of the transaction
var res = api.proxy.eth_getTransactionCount('0x2910543af39aba0cd09dbb2d50200b3e800a63d2', 'latest');Creates new message call transaction or a contract creation for signed transactions
hexstring Serialized Message
var res = api.proxy.eth_sendRawTransaction('0xf904808000831cfde080');Returns the receipt of a transaction by transaction hash
txhashstring Transaction hash
var ret = api.proxy.eth_getTransactionReceipt('0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1');Executes a new message call immediately without creating a transaction on the block chain
var res = api.proxy.eth_call('0xAEEF46DB4855E25702F8237E8f403FddcaF931C0', '0x70a08231000000000000000000000000e16359506c028e51f16be38986ec5746251e9724', 'latest');Returns code at a given address
var res = api.proxy.eth_getCode('0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c', 'latest');Returns the value from a storage position at a given address.
var res = api.proxy.eth_getStorageAt('0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd', '0x0', 'latest');Returns the current price per gas in wei. var gasprice = api.proxy.eth_gasPrice();
Makes a call or transaction, which won't be added to the blockchain and returns the used gas, which can be used for estimating the used gas
Returns the supply of Tokens
var supply = api.stats.tokensupply(null, '0x57d90b64a1a57749b0f932f1a3395792e12e7055');Returns total supply of ether var supply = api.stats.ethsupply();
Returns Promise<integer>
Returns the price of ether now
var price = api.stats.ethprice();Returns Promise<integer>
Find the block reward for a given address and block
returns the status of a specific transaction hash
txhashstring Transaction hash
Returns the ABI/Interface of a given contract
addressstring Contract address
api.contract
.getabi('0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359')
.at('0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359')
.memberId('0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359')
.then(console.log)Returns the amount of Tokens a specific account owns.
addressstring Contract addresstokennamestring Name of the tokencontractaddressstring Contract address
var supply = api.account.tokenbalance(
'0x4366ddc115d8cf213c564da36e64c8ebaa30cdbd',
'',
'0xe0b7927c4af23765cb51314a0e0521a9645f0e2a' // DGD contract address
);Returns the balance of a sepcific account
addressstring Address
var balance = api.account.balance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');Get a list of internal transactions
txhashstring Transaction hash. If specified then address will be ignoredaddressstring Transaction addressstartblockstring start looking hereendblockstring end looking theresortstring Sort asc/desc
var txlist = api.account.txlistinternal('0x40eb908387324f2b575b4879cd9d7188f69c8fc9d87c901b9e2daaea4b442170');Get a list of transactions for a specfic address
addressstring Transaction addressstartblockstring start looking hereendblockstring end looking therepagenumber Page numberoffsetnumber Max records to returnsortstring Sort asc/desc
var txlist = api.account.txlist('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae', 1, 'latest', 1, 100, 'asc');Get a list of blocks that a specific account has mineds
addressstring Transaction hash
var txlist = api.account.getminedblocks('0x9dd134d14d1e65f84b706d6f205cd5b1cd03a46b');[BETA] Get a list of "ERC20 - Token Transfer Events" by Address
addressstring Account addresscontractaddressstring Address of ERC20 token contract (if not specified lists transfers for all tokens)startblockstring start looking hereendblockstring end looking theresortstring Sort asc/desc
var txlist = api.account.tokentx('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae', '0x5F988D968cb76c34C87e6924Cc1Ef1dCd4dE75da', 1, 'latest', 'asc');chainstring
Returns string
query
Returns Promise<any>