Block Explorer for EarthCoin

Block height   2198510 API documentation     API link

API documentation

1. General functions

help
Return a short help on the API functions in the JSON format. This is also the default API method, if no API command used.
Examples:
http://explorer.yourdomain.com:3000/api/help
http://explorer.yourdomain.com:3000/api

2. Block functions

getheight (aliases: height, getblockcount)
Return the current block height. If the node is in sync with the network, it should be equal the number of blocks in the blockchain.
Examples:
http://explorer.yourdomain.com:3000/api/getheight
http://explorer.yourdomain.com:3000/api/height

getblock (alias: block)
Return a detail info on a particular block. The parameter can be a block hash or a block height. If no parameter is passed, the current block is returned.
Examples:
http://explorer.yourdomain.com:3000/api/getblock
http://explorer.yourdomain.com:3000/api/block
http://explorer.yourdomain.com:3000/api/getblock/99999
http://explorer.yourdomain.com:3000/api/getblock/b9aa1aefa248a9d11b63fafde7a65f7367842b3a9bd1583ea6be487145375d58

getdifficulty (alias: difficulty)
Return the difficulty value of the last mined block.
Examples:
http://explorer.yourdomain.com:3000/api/getdifficulty
http://explorer.yourdomain.com:3000/api/difficulty

getblockhash (alias: blockhash)
Return the block hash of a particular block. The parameter can be a block hash or a block height. If no parameter is passed, the current block hash is returned.
Examples:
http://explorer.yourdomain.com:3000/api/getblockhash
http://explorer.yourdomain.com:3000/api/blockhash
http://explorer.yourdomain.com:3000/api/getblockhash/99999
http://explorer.yourdomain.com:3000/api/getblockhash/b9aa1aefa248a9d11b63fafde7a65f7367842b3a9bd1583ea6be487145375d58

getblockheight (aliases: blockheight, getblockindex, blockindex)
Return the block height (index in the blockchain) of a particular block. The parameter can be a block hash or a block height. If no parameter is passed, the current block height is returned.
Examples:
http://explorer.yourdomain.com:3000/api/getblockheight
http://explorer.yourdomain.com:3000/api/blockheight
http://explorer.yourdomain.com:3000/api/getblockindex
http://explorer.yourdomain.com:3000/api/blockindex
http://explorer.yourdomain.com:3000/api/getblockheight/99999
http://explorer.yourdomain.com:3000/api/getblockheight/b9aa1aefa248a9d11b63fafde7a65f7367842b3a9bd1583ea6be487145375d58

getrawblock (aliases: rawblock)
Return the raw data of a particular block as a hexadecimal string. The parameter can be a block hash or a block height. If no parameter is passed, the data of current block are returned.
Examples:
http://explorer.yourdomain.com:3000/api/getrawblock
http://explorer.yourdomain.com:3000/api/rawblock
http://explorer.yourdomain.com:3000/api/getrawblock/99999
http://explorer.yourdomain.com:3000/api/getrawblock/b9aa1aefa248a9d11b63fafde7a65f7367842b3a9bd1583ea6be487145375d58

3. Transaction functions

txinfo (alias: tx)
Return a detail info on a particular transaction. The parameter have to be a transaction hash. If an invalid transaction hash or no parameter is passed, an error message is returned.
Examples:
http://explorer.yourdomain.com:3000/api/txinfo/b6732c039b62ec92cb6623872d2b5adf0460ccbf4144562941932029cba98bbf
http://explorer.yourdomain.com:3000/api/tx/b6732c039b62ec92cb6623872d2b5adf0460ccbf4144562941932029cba98bbf

getrawtransaction (aliases: rawtransaction, rawtx,)
Return the raw data of a particular a particular transaction as a hexadecimal string. The parameter have to be a transaction hash. If an invalid transaction hash or no parameter is passed, an error message is returned.
Examples:
http://explorer.yourdomain.com:3000/api/getrawtransaction/b6732c039b62ec92cb6623872d2b5adf0460ccbf4144562941932029cba98bbf
http://explorer.yourdomain.com:3000/api/rawtransaction/b6732c039b62ec92cb6623872d2b5adf0460ccbf4144562941932029cba98bbf
http://explorer.yourdomain.com:3000/api/rawtx/b6732c039b62ec92cb6623872d2b5adf0460ccbf4144562941932029cba98bbf

4. Address functions

addressfirstseen
Return the time of the first transaction to the address passed an the parameter. If an invalid/unused address or no parameter is passed, an error message is returned.
Example:
http://explorer.yourdomain.com:3000/api/addressfirstseen/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T

addressinfo
Return a short summary of the address passed an the parameter. If an invalid/unused address or no parameter is passed, an error message is returned.
Example:
http://explorer.yourdomain.com:3000/api/addressinfo/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T

getbalance (alias: balance)
Return the unspent balance of the address passed an the parameter. If an invalid/unused address or no parameter is passed, an error message is returned.
Examples:
http://explorer.yourdomain.com:3000/api/getbalance/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T
http://explorer.yourdomain.com:3000/api/balance/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T

utxo (alias: unspent)
Return details on unspent transaction outputs of the address passed an the parameter. If an invalid/unused address or no parameter is passed, an error message is returned.
The result of this function can be used to create a new tranasction on the client side. The addresses with too much transactions (e.g. a mining pool addresses) are protected and due to the complexity of the calculation, the result will not be shown.
Examples:
http://explorer.yourdomain.com:3000/api/utxo/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T
http://explorer.yourdomain.com:3000/api/unspent/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T

txbyaddr
Return details on all transactions of the address passed an the parameter. Two optional parameters (FIRST_INDEX, LAST_INDEX) can be used for paging of the resuts. If an invalid/unused address or no parameter is passed, an error message is returned.
The addresses with too much transactions (e.g. a mining pool addresses) are protected and due to the complexity of the calculation, the result will not be shown.
Example:
http://explorer.yourdomain.com:3000/api/txbyaddr/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T
http://explorer.yourdomain.com:3000/api/txbyaddr/eW1mCXiSfy4HfuBhVRfQ4kedviUcRLZd3T/10/20

Powered by Sando-explorer   Ⓒ 2018