[ Base URL: https://testnet.bkcscan.com/api ]
This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests.
?module=account&action=eth_get_balance&address={addressHash}
eth_get_balance
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: eth_get_balance
string (query)
The address of the account.
string (query)
Either the block number as a string, or one of latest, earliest or pending latest will be the latest balance in a *consensus* block. earliest will be the first recorded balance for the address. pending will be the latest balance in consensus *or* nonconcensus blocks.
Response Body
successful operation
?module=account&action=balance&address={addressHash}
balance
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: balance
string (query)
A 160-bit code used for identifying Accounts.
Response Body
successful operation
error
?module=account&action=balancemulti&address={addressHash1,addressHash2,addressHash3}
balancemulti
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: balancemulti
string (query)
A 160-bit code used for identifying Accounts. Separate addresses by comma. Maximum of 20 addresses.
Response Body
successful operation
error
?module=account&action=pendingtxlist&address={addressHash}
pendingtxlist
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: pendingtxlist
string (query)
A 160-bit code used for identifying Accounts.
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
Response Body
successful operation
error
?module=account&action=txlist&address={addressHash}
txlist
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: txlist
string (query)
A 160-bit code used for identifying Accounts.
string (query)
A string representing the order by block number direction. Defaults to descending order. Available values: asc, desc
integer (query)
A nonnegative integer that represents the starting block number.
integer (query)
A nonnegative integer that represents the ending block number.
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
string (query)
A string representing the field to filter by. If none is given it returns transactions that match to, from, or contract address. Available values: to, from
unix timestamp (query)
Represents the starting block timestamp.
unix timestamp (query)
Represents the ending block timestamp.
Response Body
successful operation
error
?module=account&action=txlistinternal&txhash={transactionHash}
txlistinternal
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: txlistinternal
string (query)
Transaction hash. Hash of contents of the transaction. A transcation hash or address hash is required.
string (query)
A 160-bit code used for identifying accounts. An address hash or transaction hash is required.
string (query)
A string representing the order by block number direction. Defaults to ascending order. Available values: asc, desc. WARNING: Only available if 'address' is provided.
integer (query)
A nonnegative integer that represents the starting block number. WARNING: Only available if 'address' is provided.
integer (query)
A nonnegative integer that represents the ending block number. WARNING: Only available if 'address' is provided.
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction. WARNING: Only available if 'address' is provided.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction. WARNING: Only available if 'address' is provided.
Response Body
successful operation
error
?module=account&action=tokentx&address={addressHash}
tokentx
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: tokentx
string (query)
A 160-bit code used for identifying accounts.
string (query)
A 160-bit code used for identifying contracts.
string (query)
A string representing the order by block number direction. Defaults to ascending order. Available values: asc, desc
integer (query)
A nonnegative integer that represents the starting block number.
integer (query)
A nonnegative integer that represents the ending block number.
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
Response Body
successful operation
error
?module=account&action=tokenbalance&contractaddress={contractAddressHash}&address={addressHash}
tokenbalance
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: tokenbalance
string (query)
A 160-bit code used for identifying contracts.
string (query)
A 160-bit code used for identifying accounts.
Response Body
successful operation
error
?module=account&action=tokenlist&address={addressHash}
tokenlist
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: tokenlist
string (query)
A 160-bit code used for identifying accounts.
Response Body
successful operation
error
?module=account&action=getminedblocks&address={addressHash}
getminedblocks
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: getminedblocks
string (query)
A 160-bit code used for identifying accounts.
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
Response Body
successful operation
error
?module=account&action=listaccounts
listaccounts
string (query)
A string with the name of the module to be invoked.
Must be set to: account
string (query)
A string with the name of the action to be invoked.
Must be set to: listaccounts
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
Response Body
successful operation
?module=logs&action=getLogs&fromBlock={blockNumber}&toBlock={blockNumber}&address={addressHash}&topic0={firstTopic}
getLogs
string (query)
A string with the name of the module to be invoked.
Must be set to: logs
string (query)
A string with the name of the action to be invoked.
Must be set to: getLogs
integer (query)
A nonnegative integer that represents the starting block number. The use of 'latest' is also supported.
integer (query)
A nonnegative integer that represents the ending block number. The use of 'latest' is also supported.
string (query)
A 160-bit code used for identifying contracts. An address and/or topic{x} is required.
string (query)
A string equal to the first topic. A topic{x} and/or address is required.
string (query)
A string equal to the second topic. A topic{x} and/or address is required.
string (query)
A string equal to the third topic. A topic{x} and/or address is required.
string (query)
A string equal to the fourth topic. A topic{x} and/or address is required.
string (query)
A string representing the and|or operator for topic0 and topic1. Required if topic0 and topic1 is used. Available values: and, or
string (query)
A string representing the and|or operator for topic0 and topic2. Required if topic0 and topic2 is used. Available values: and, or
string (query)
A string representing the and|or operator for topic0 and topic3. Required if topic0 and topic3 is used. Available values: and, or
string (query)
A string representing the and|or operator for topic1 and topic2. Required if topic1 and topic2 is used. Available values: and, or
string (query)
A string representing the and|or operator for topic1 and topic3. Required if topic1 and topic3 is used. Available values: and, or
string (query)
A string representing the and|or operator for topic2 and topic3. Required if topic2 and topic3 is used. Available values: and, or
Response Body
successful operation
error
?module=token&action=getToken&contractaddress={contractAddressHash}
getToken
string (query)
A string with the name of the module to be invoked.
Must be set to: token
string (query)
A string with the name of the action to be invoked.
Must be set to: getToken
string (query)
A 160-bit code used for identifying contracts.
Response Body
successful operation
error
?module=token&action=getTokenHolders&contractaddress={contractAddressHash}
getTokenHolders
string (query)
A string with the name of the module to be invoked.
Must be set to: token
string (query)
A string with the name of the action to be invoked.
Must be set to: getTokenHolders
string (query)
A 160-bit code used for identifying contracts.
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
Response Body
successful operation
error
?module=stats&action=tokensupply&contractaddress={contractAddressHash}
tokensupply
string (query)
A string with the name of the module to be invoked.
Must be set to: stats
string (query)
A string with the name of the action to be invoked.
Must be set to: tokensupply
string (query)
A 160-bit code used for identifying contracts.
Response Body
successful operation
error
?module=stats&action=ethsupplyexchange
ethsupplyexchange
string (query)
A string with the name of the module to be invoked.
Must be set to: stats
string (query)
A string with the name of the action to be invoked.
Must be set to: ethsupplyexchange
Response Body
successful operation
?module=stats&action=ethsupply
ethsupply
string (query)
A string with the name of the module to be invoked.
Must be set to: stats
string (query)
A string with the name of the action to be invoked.
Must be set to: ethsupply
Response Body
successful operation
?module=stats&action=coinsupply
coinsupply
string (query)
A string with the name of the module to be invoked.
Must be set to: stats
string (query)
A string with the name of the action to be invoked.
Must be set to: coinsupply
Response Body
successful operation
?module=stats&action=coinprice
coinprice
string (query)
A string with the name of the module to be invoked.
Must be set to: stats
string (query)
A string with the name of the action to be invoked.
Must be set to: coinprice
Response Body
successful operation
?module=stats&action=totalfees&date={date}
totalfees
string (query)
A string with the name of the module to be invoked.
Must be set to: stats
string (query)
A string with the name of the action to be invoked.
Must be set to: totalfees
string (query)
day in ISO 8601 format (yyyy-mm-dd)
Response Body
successful operation
error
?module=block&action=getblockreward&blockno={blockNumber}
getblockreward
string (query)
A string with the name of the module to be invoked.
Must be set to: block
string (query)
A string with the name of the action to be invoked.
Must be set to: getblockreward
integer (query)
A nonnegative integer that represents the block number.
Response Body
successful operation
error
?module=block&action=getblocknobytime×tamp={blockTimestamp}&closest={before/after}
getblocknobytime
string (query)
A string with the name of the module to be invoked.
Must be set to: block
string (query)
A string with the name of the action to be invoked.
Must be set to: getblocknobytime
integer (query)
A nonnegative integer that represents the block timestamp (Unix timestamp in seconds).
string (query)
Direction to find the closest block number to given timestamp. Available values: before/after.
Response Body
successful operation
error
?module=block&action=eth_block_number
eth_block_number
string (query)
A string with the name of the module to be invoked.
Must be set to: block
string (query)
A string with the name of the action to be invoked.
Must be set to: eth_block_number
integer (query)
A nonnegative integer that represents the json rpc request id.
Response Body
successful request
?module=contract&action=listcontracts
listcontracts
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: listcontracts
integer (query)
A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.
integer (query)
A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.
string (query)
verified|decompiled|unverified|not_decompiled|empty, or 1|2|3|4|5 respectively. This requests only contracts with that status.
string (query)
Ensures that none of the returned contracts were decompiled with the provided version. Ignored unless filtering for decompiled contracts.
Response Body
successful operation
?module=contract&action=getabi&address={addressHash}
getabi
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: getabi
string (query)
A 160-bit code used for identifying contracts.
Response Body
successful operation
error
?module=contract&action=getsourcecode&address={addressHash}
getsourcecode
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: getsourcecode
string (query)
A 160-bit code used for identifying contracts.
Response Body
successful operation
error
curl POST example:
?module=contract&action=verify&addressHash={addressHash}&name={name}&compilerVersion={compilerVersion}&optimization={false}&contractSourceCode={contractSourceCode}
verify
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: verify
string (query)
The address of the contract.
string (query)
The name of the contract.
string (query)
The compiler version for the contract.
boolean (query)
Whether or not compiler optimizations were enabled.
string (query)
The source code of the contract.
string (query)
The constructor argument data provided.
boolean (query)
Whether or not automatically detect constructor argument.
string (query)
The EVM version for the contract.
integer (query)
The number of optimization runs used during compilation
string (query)
The name of the first library used.
string (query)
The address of the first library used.
string (query)
The name of the second library used.
string (query)
The address of the second library used.
string (query)
The name of the third library used.
string (query)
The address of the third library used.
string (query)
The name of the fourth library used.
string (query)
The address of the fourth library used.
string (query)
The name of the fourth library used.
string (query)
The address of the fourth library used.
Response Body
successful operation
error
POST body example:
?module=contract&action=verify_via_sourcify&addressHash={addressHash}
verify_via_sourcify
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: verify_via_sourcify
string (query)
The address of the contract.
file[] (query)
Array with sources and metadata files
Response Body
successful operation
error
curl POST example:
?module=contract&action=verify_vyper_contract&addressHash={addressHash}&name={name}&compilerVersion={compilerVersion}&contractSourceCode={contractSourceCode}
verify_vyper_contract
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: verify_vyper_contract
string (query)
The address of the contract.
string (query)
The name of the contract.
string (query)
The compiler version for the contract.
string (query)
The source code of the contract.
string (query)
The constructor argument data provided.
Response Body
successful operation
error
?module=contract&action=verifysourcecode&codeformat={solidity-standard-json-input}&contractaddress={contractaddress}&contractname={contractname}&compilerversion={compilerversion}&sourceCode={sourceCode}
verifysourcecode
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: verifysourcecode
string (query)
Format of sourceCode(supported only "solidity-standard-json-input")
string (query)
The address of the contract.
string (query)
The name of the contract. It could be empty string(""), just contract name("ContractName"), or filename and contract name("contracts/contract_1.sol:ContractName")
string (query)
The compiler version for the contract.
string (query)
Standard input json
string (query)
The constructor argument data provided.
boolean (query)
Whether or not automatically detect constructor argument.
Response Body
successful operation
?module=contract&action=checkverifystatus&guid={identifierString}
checkverifystatus
string (query)
A string with the name of the module to be invoked.
Must be set to: contract
string (query)
A string with the name of the action to be invoked.
Must be set to: checkverifystatus
string (query)
A string used for identifying verification attempt
Response Body
successful operation
?module=transaction&action=gettxinfo&txhash={transactionHash}
gettxinfo
string (query)
A string with the name of the module to be invoked.
Must be set to: transaction
string (query)
A string with the name of the action to be invoked.
Must be set to: gettxinfo
string (query)
Transaction hash. Hash of contents of the transaction.
integer (query)
A nonnegative integer that represents the log index to be used for pagination.
Response Body
successful operation
error
?module=transaction&action=gettxreceiptstatus&txhash={transactionHash}
gettxreceiptstatus
string (query)
A string with the name of the module to be invoked.
Must be set to: transaction
string (query)
A string with the name of the action to be invoked.
Must be set to: gettxreceiptstatus
string (query)
Transaction hash. Hash of contents of the transaction.
Response Body
successful operation
error
?module=transaction&action=getstatus&txhash={transactionHash}
getstatus
string (query)
A string with the name of the module to be invoked.
Must be set to: transaction
string (query)
A string with the name of the action to be invoked.
Must be set to: getstatus
string (query)
Transaction hash. Hash of contents of the transaction.
Response Body
successful operation
error
?module=circulation&action=get_circulation
get_circulation
string (query)
A string with the name of the module to be invoked.
Must be set to: circulation
string (query)
A string with the name of the action to be invoked.
Must be set to: get_circulation
Response Body
successful operation
error