Endpoint: ?module=account&action=eth_get_balance&address={addressHash}
Description: Mimics Ethereum JSON RPC’s eth_getBalance. Returns the balance as of the provided block (defaults to latest).
Example:
curl -X GET "http://localhost:4000/api?module=account&action=eth_get_balance&address=0x0000000000000000000000000000000000000000"
Endpoint: ?module=account&action=balancemulti&address={addressHash1,addressHash2,addressHash3}
Description: Fetches the balance for multiple addresses.
Example:
curl -X GET "http://localhost:4000/api?module=account&action=balancemulti&address=0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000001"
Endpoint: ?module=account&action=pendingtxlist&address={addressHash}
Description: Retrieves pending transactions for a specific address.
Example:
curl -X GET "http://localhost:4000/api?module=account&action=pendingtxlist&address=0x0000000000000000000000000000000000000000"
Endpoint: ?module=account&action=txlist&address={addressHash}
Description: Retrieves up to 10,000 transactions for a specific address.
Example:
curl -X GET "http://localhost:4000/api?module=account&action=txlist&address=0x0000000000000000000000000000000000000000"
Endpoint: ?module=logs&action=getLogs&fromBlock={blockNumber}&toBlock={blockNumber}&address={addressHash}&topic0={firstTopic}
Description: Fetches event logs for an address and/or topics, up to a maximum of 1,000 logs.
Example:
curl -X GET "http://localhost:4000/api?module=logs&action=getLogs&fromBlock=0&toBlock=99999999&address=0x0000000000000000000000000000000000000000&topic0=0x0000000000000000000000000000000000000000000000000000000000000000"
Endpoint: ?module=token&action=getToken&contractaddress={contractAddressHash}
Description: Retrieves ERC-20 or ERC-721 token information by contract address.
Example:
curl -X GET "http://localhost:4000/api?module=token&action=getToken&contractaddress=0x0000000000000000000000000000000000000000"
Endpoint: ?module=token&action=getTokenHolders&contractaddress={contractAddressHash}
Description: Retrieves token holders by contract address.
Example:
curl -X GET "http://localhost:4000/api?module=token&action=getTokenHolders&contractaddress=0x0000000000000000000000000000000000000000"
Endpoint: ?module=stats&action=tokensupply&contractaddress={contractAddressHash}
Description: Retrieves ERC-20 or ERC-721 token total supply by contract address.
Example:
curl -X GET "http://localhost:4000/api?module=stats&action=tokensupply&contractaddress=0x0000000000000000000000000000000000000000"
Endpoint: ?module=stats&action=coinprice
Description: Retrieves the latest price of the native coin in USD and BTC.
Example:
curl -X GET "http://localhost:4000/api?module=stats&action=coinprice"
Endpoint: ?module=block&action=getblockreward&blockno={blockNumber}
Description: Retrieves block reward by block number.
Example:
curl -X GET "http://localhost:4000/api?module=block&action=getblockreward&blockno=1234567"
Endpoint: ?module=block&action=getblocknobytime×tamp={blockTimestamp}&closest={before/after}
Description: Retrieves block number by timestamp.
Example:
curl -X GET "http://localhost:4000/api?module=block&action=getblocknobytime×tamp=1625097600&closest=before"
Endpoint: ?module=contract&action=listcontracts
Description: Retrieves a list of contracts, sorted by the time they were first seen by the explorer.
Example:
curl -X GET "http://localhost:4000/api?module=contract&action=listcontracts"
Endpoint: ?module=contract&action=getabi&address={addressHash}
Description: Retrieves the ABI for a verified contract.
Example:
curl -X GET "http://localhost:4000/api?module=contract&action=getabi&address=0x0000000000000000000000000000000000000000"
Endpoint: ?module=transaction&action=gettxinfo&txhash={transactionHash}
Description: Retrieves transaction information.
Example:
curl -X GET "http://localhost:4000/api?module=transaction&action=gettxinfo&txhash=0x0000000000000000000000000000000000000000000000000000000000000000"
Endpoint: ?module=transaction&action=gettxreceiptstatus&txhash={transactionHash}
Description: Retrieves the status of a transaction receipt.
Example:
curl -X GET "http://localhost:4000/api?module=transaction&action=gettxreceiptstatus&txhash=0x0000000000000000000000000000000000000000000000000000000000000000"
To ensure a smooth integration and to maximize the utility of the RPC API, here are some suggestions and hints: