false
false

API Documentation

[ Base URL: https://betanet-explorer.lamina1.com/api ]

This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests.

Account ?module=account

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: eth_get_balance

address *required

string (query)

The address of the account.

block

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* nonconsensus blocks.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

id
string
example: "1"
result
string
example: "767969"
jsonrpc
string
example: "2.0"

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: balance

address *required

string (query)

A 160-bit code used for identifying Accounts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
wei
example: "663046792267785498951364"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: balancemulti

address *required

string (query)

A 160-bit code used for identifying Accounts. Separate addresses by comma. Maximum of 20 addresses.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[AddressBalance]

}

AddressBalance {

address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
balance
wei
example: "663046792267785498951364"
stale
boolean
example: true

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: pendingtxlist

address *required

string (query)

A 160-bit code used for identifying Accounts.

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Transaction]

}

Transaction {

input
input
example: "0x797af627d02e23b68e085092cd0d47d6cfb54be025f37b5989c0264398f534c08af7dea9"
value
wei
example: "663046792267785498951364"
hash
transaction hash
example: "0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4"
to
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
from
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
confirmations
confirmations
example: "6005998"
gas
gas
example: "122261"
nonce
nonce
example: "0"
blockHash
block hash
example: "0xd3cabad6adab0b52eb632c386ea194036805713682c62cb589b5abcd76de2159"
blockNumber
block number
example: "34092"
contractAddress
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
cumulativeGasUsed
gas
example: "122261"
gasPrice
wei
example: "663046792267785498951364"
gasUsed
gas
example: "122261"
isError
error
enum: ["0", "1"]
enum
interpretation
"0"
ok
"1"
error
timeStamp
timestamp
example: "1439232889"
transactionIndex
transaction index
example: "0"
txreceipt_status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: txlist

address *required

string (query)

A 160-bit code used for identifying Accounts.

sort

string (query)

A string representing the order by block number direction. Defaults to descending order. Available values: asc, desc

start_block

integer (query)

A nonnegative integer that represents the starting block number.

end_block

integer (query)

A nonnegative integer that represents the ending block number.

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

filter_by

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

start_timestamp

unix timestamp (query)

Represents the starting block timestamp.

end_timestamp

unix timestamp (query)

Represents the ending block timestamp.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Transaction]

}

Transaction {

input
input
example: "0x797af627d02e23b68e085092cd0d47d6cfb54be025f37b5989c0264398f534c08af7dea9"
value
wei
example: "663046792267785498951364"
hash
transaction hash
example: "0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4"
to
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
from
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
confirmations
confirmations
example: "6005998"
gas
gas
example: "122261"
nonce
nonce
example: "0"
blockHash
block hash
example: "0xd3cabad6adab0b52eb632c386ea194036805713682c62cb589b5abcd76de2159"
blockNumber
block number
example: "34092"
contractAddress
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
cumulativeGasUsed
gas
example: "122261"
gasPrice
wei
example: "663046792267785498951364"
gasUsed
gas
example: "122261"
isError
error
enum: ["0", "1"]
enum
interpretation
"0"
ok
"1"
error
timeStamp
timestamp
example: "1439232889"
transactionIndex
transaction index
example: "0"
txreceipt_status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: txlistinternal

txhash *required

string (query)

Transaction hash. Hash of contents of the transaction. A transaction hash or address hash is required.

address

string (query)

A 160-bit code used for identifying accounts. An address hash or transaction hash is required.

sort

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.

start_block

integer (query)

A nonnegative integer that represents the starting block number. WARNING: Only available if 'address' is provided.

end_block

integer (query)

A nonnegative integer that represents the ending block number. WARNING: Only available if 'address' is provided.

page

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.

offset

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.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[InternalTransaction]

}

InternalTransaction {

input
input
example: "0x797af627d02e23b68e085092cd0d47d6cfb54be025f37b5989c0264398f534c08af7dea9"
type
type
example: "create"
value
wei
example: "663046792267785498951364"
to
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
from
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
gas
gas
example: "122261"
blockNumber
block number
example: "34092"
contractAddress
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
gasUsed
gas
example: "122261"
isError
error
enum: ["0", "1"]
enum
interpretation
"0"
ok
"1"
rejected/cancelled
timeStamp
timestamp
example: "1439232889"
callType
type
example: "delegatecall"
errCode
string
example: "Out of gas"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: tokentx

address *required

string (query)

A 160-bit code used for identifying accounts.

contractaddress

string (query)

A 160-bit code used for identifying contracts.

sort

string (query)

A string representing the order by block number direction. Defaults to ascending order. Available values: asc, desc

start_block

integer (query)

A nonnegative integer that represents the starting block number.

end_block

integer (query)

A nonnegative integer that represents the ending block number.

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[TokenTransfer]

}

TokenTransfer {

input
input
example: "0x797af627d02e23b68e085092cd0d47d6cfb54be025f37b5989c0264398f534c08af7dea9"
value
integer
example: "663046792267785498951364"
values
array
[Transferred amount]
hash
transaction hash
example: "0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4"
to
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
from
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
confirmations
confirmations
example: "6005998"
gas
gas
example: "122261"
nonce
nonce
example: "0"
tokenID
integer
example: "0"
tokenIDs
array
[Token ID]
blockHash
block hash
example: "0xd3cabad6adab0b52eb632c386ea194036805713682c62cb589b5abcd76de2159"
blockNumber
block number
example: "34092"
contractAddress
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
cumulativeGasUsed
gas
example: "122261"
gasPrice
wei
example: "663046792267785498951364"
gasUsed
gas
example: "122261"
timeStamp
timestamp
example: "1439232889"
transactionIndex
transaction index
example: "0"
tokenDecimal
integer
example: "18"
tokenName
string
example: "Some Token Name"
tokenSymbol
string
example: "SYMBOL"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: tokenbalance

contractaddress *required

string (query)

A 160-bit code used for identifying contracts.

address *required

string (query)

A 160-bit code used for identifying accounts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
integer
example: "135499"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: tokenlist

address *required

string (query)

A 160-bit code used for identifying accounts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[TokenBalance]

}

TokenBalance {

decimals
integer
example: "18"
name
string
example: "Some Token Name"
symbol
string
example: "SYMBOL"
balance
integer
example: "135499"
contractAddress
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getminedblocks

address *required

string (query)

A 160-bit code used for identifying accounts.

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Block]

}

Block {

blockNumber
block number
example: "34092"
timeStamp
timestamp
example: "1480072029"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: account

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: listaccounts

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Account]

}

Account {

address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
balance
wei
example: "663046792267785498951364"

}

Logs ?module=logs

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: logs

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getLogs

fromBlock *required

integer (query)

A nonnegative integer that represents the starting block number. The use of 'latest' is also supported.

toBlock *required

integer (query)

A nonnegative integer that represents the ending block number. The use of 'latest' is also supported.

address *required

string (query)

A 160-bit code used for identifying contracts. An address and/or topic{x} is required.

topic0 *required

string (query)

A string equal to the first topic. A topic{x} and/or address is required.

topic1

string (query)

A string equal to the second topic. A topic{x} and/or address is required.

topic2

string (query)

A string equal to the third topic. A topic{x} and/or address is required.

topic3

string (query)

A string equal to the fourth topic. A topic{x} and/or address is required.

topic0_1_opr

string (query)

A string representing the and|or operator for topic0 and topic1. Required if topic0 and topic1 is used. Available values: and, or

topic0_2_opr

string (query)

A string representing the and|or operator for topic0 and topic2. Required if topic0 and topic2 is used. Available values: and, or

topic0_3_opr

string (query)

A string representing the and|or operator for topic0 and topic3. Required if topic0 and topic3 is used. Available values: and, or

topic1_2_opr

string (query)

A string representing the and|or operator for topic1 and topic2. Required if topic1 and topic2 is used. Available values: and, or

topic1_3_opr

string (query)

A string representing the and|or operator for topic1 and topic3. Required if topic1 and topic3 is used. Available values: and, or

topic2_3_opr

string (query)

A string representing the and|or operator for topic2 and topic3. Required if topic2 and topic3 is used. Available values: and, or

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Log]

}

Log {

data
data
example: "0x"
address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
blockNumber
block number
example: "0x5c958"
gasPrice
wei
example: "0xba43b7400"
gasUsed
gas
example: "0x10682"
timeStamp
timestamp
example: "0x561d688c"
transactionIndex
hexadecimal
example: "0x"
logIndex
hexadecimal
example: "0x"
topics
topics
example: ["0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545"]
transactionHash
transaction hash
example: "0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4"

}

200

Token ?module=token

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: token

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getToken

contractaddress *required

string (query)

A 160-bit code used for identifying contracts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
Token

}

Token {

decimals
integer
example: "18"
name
string
example: "Some Token Name"
type
token type
enum: ["ERC-20", "ERC-721"]
enum
interpretation
"ERC-20"
ERC-20 token standard
"ERC-721"
ERC-721 token standard
symbol
string
example: "SYMBOL"
cataloged
boolean
example: true
contractAddress
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
totalSupply
integer
example: "1000000000"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: token

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getTokenHolders

contractaddress *required

string (query)

A 160-bit code used for identifying contracts.

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Token holder Detail]

}

Token holder Detail {

value
value
example: "1000000000000000000"
address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"

}

200

Stats ?module=stats

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: stats

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: tokensupply

contractaddress *required

string (query)

A 160-bit code used for identifying contracts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
integer
example: "1000000000"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: stats

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: ethsupplyexchange

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
integer
example: "101959776311500000000000000"
description: The total supply.

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: stats

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: ethsupply

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
integer
example: "101959776311500000000000000"
description: The total supply in Wei from DB.

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: stats

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: coinsupply

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

result
integer
example: 101959776.3115
description: The total supply from DB minus burnt number in coin dimension.

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: stats

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: coinprice

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
CoinPrice

}

CoinPrice {

coin_btc
coin_btc
example: "0.03161"
coin_btc_timestamp
timestamp
example: "1537234460"
coin_usd
coin_usd
example: "197.57"
coin_usd_timestamp
timestamp
example: "1537234460"

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: stats

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: totalfees

date *required

string (query)

day in ISO 8601 format (yyyy-mm-dd)

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
TotalFees

}

TotalFees {

total_fees
total_fees
example: "75411956011480008034"

}

200

Block ?module=block

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: block

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getblockreward

blockno *required

integer (query)

A nonnegative integer that represents the block number.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
BlockReward

}

BlockReward {

uncles
null
blockNumber
block number
example: "34092"
timeStamp
timestamp
example: "1480072029"
blockMiner
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
blockReward
block reward
example: "5003251945421042780"
uncleInclusionReward
null

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: block

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getblocknobytime

timestamp *required

integer (query)

A nonnegative integer that represents the block timestamp (Unix timestamp in seconds).

closest *required

string (query)

Direction to find the closest block number to given timestamp. Available values: before/after.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
BlockNo

}

BlockNo {

blockNumber
block number
example: "34092"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: block

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: eth_block_number

id

integer (query)

A nonnegative integer that represents the json rpc request id.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful request

            

Result {

id
string
example: "1"
result
string
example: "767969"
jsonrpc
string
example: "2.0"

}

Contract ?module=contract

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: listcontracts

page

integer (query)

A nonnegative integer that represents the page number to be used for pagination. 'offset' must be provided in conjunction.

offset

integer (query)

A nonnegative integer that represents the maximum number of records to return when paginating. 'page' must be provided in conjunction.

filter

string (query)

verified|decompiled|unverified|not_decompiled|empty, or 1|2|3|4|5 respectively. This requests only contracts with that status.

not_decompiled_with_version

string (query)

Ensures that none of the returned contracts were decompiled with the provided version. Ignored unless filtering for decompiled contracts.

verified_at_start_timestamp

unix timestamp (query)

Represents the starting timestamp when contracts verified. Taking into account only with `verified` filter.

verified_at_end_timestamp

unix timestamp (query)

Represents the ending timestamp when contracts verified. Taking into account only with `verified` filter.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Contract]

}

Contract {

ABI
ABI
example: "[{ \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event\" }, { \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event2\" }, { \"type\":\"function\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}], \"name\":\"foo\", \"outputs\": [] }]"
Address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
ContractName
string
example: "Some name"
OptimizationUsed
optimization used
enum: ["0", "1"]
enum
interpretation
"0"
false
"1"
true

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getabi

address *required

string (query)

A 160-bit code used for identifying contracts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
abi

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getsourcecode

address *required

string (query)

A 160-bit code used for identifying contracts.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
array
[Contract]

}

Contract {

ABI
ABI
example: "[{ \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event\" }, { \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event2\" }, { \"type\":\"function\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}], \"name\":\"foo\", \"outputs\": [] }]"
Address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
ContractName
string
example: "Some name"
DecompiledSourceCode
contract decompiled source code
example: const name() = 'CryptoKitties' const GEN0_STARTING_PRICE() = 10^16 const GEN0_AUCTION_DURATION() = 86400 const GEN0_CREATION_LIMIT() = 45000 const symbol() = 'CK' const PROMO_CREATION_LIMIT() = 5000 def storage: ceoAddress is addr # mask(160, 0) at storage #0 cfoAddress is addr # mask(160, 0) at storage #1 stor1.768 is uint16 => uint256 # mask(256, 768) at storage #1 cooAddress is addr # mask(160, 0) at storage #2 stor2.0 is uint256 => uint256 # mask(256, 0) at storage #2 paused is uint8 # mask(8, 160) at storage #2 stor2.256 is uint256 => uint256 # mask(256, 256) at storage #2 stor3 is uint32 # ...<continues>
DecompilerVersion
decompiler version
example: decompiler.version
OptimizationUsed
optimization used
enum: ["0", "1"]
enum
interpretation
"0"
false
"1"
true
SourceCode
contract source code
example: "pragma solidity >0.4.24; contract Test { constructor() public { b = hex"12345678901234567890123456789012"; } event Event(uint indexed a, bytes32 b); event Event2(uint indexed a, bytes32 b); function foo(uint a) public { emit Event(a, b); } bytes32 b; }"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: verify

addressHash *required

string (query)

The address of the contract.

name *required

string (query)

The name of the contract.

compilerVersion *required

string (query)

The compiler version for the contract.

optimization *required

boolean (query)

Whether or not compiler optimizations were enabled.

contractSourceCode *required

string (query)

The source code of the contract.

constructorArguments

string (query)

The constructor argument data provided.

autodetectConstructorArguments

boolean (query)

Whether or not automatically detect constructor argument.

evmVersion

string (query)

The EVM version for the contract.

optimizationRuns

integer (query)

The number of optimization runs used during compilation

library1Name

string (query)

The name of the first library used.

library1Address

string (query)

The address of the first library used.

library2Name

string (query)

The name of the second library used.

library2Address

string (query)

The address of the second library used.

library3Name

string (query)

The name of the third library used.

library3Address

string (query)

The address of the third library used.

library4Name

string (query)

The name of the fourth library used.

library4Address

string (query)

The address of the fourth library used.

library5Name

string (query)

The name of the fourth library used.

library5Address

string (query)

The address of the fourth library used.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Contract {

ABI
ABI
example: "[{ \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event\" }, { \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event2\" }, { \"type\":\"function\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}], \"name\":\"foo\", \"outputs\": [] }]"
Address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
ContractName
string
example: "Some name"
OptimizationUsed
optimization used
enum: ["0", "1"]
enum
interpretation
"0"
false
"1"
true

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: verify_via_sourcify

addressHash *required

string (query)

The address of the contract.

files

file[] (query)

Array with sources and metadata files

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Contract {

ABI
ABI
example: "[{ \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event\" }, { \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event2\" }, { \"type\":\"function\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}], \"name\":\"foo\", \"outputs\": [] }]"
Address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
ContractName
string
example: "Some name"
OptimizationUsed
optimization used
enum: ["0", "1"]
enum
interpretation
"0"
false
"1"
true

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: verify_vyper_contract

addressHash *required

string (query)

The address of the contract.

name *required

string (query)

The name of the contract.

compilerVersion *required

string (query)

The compiler version for the contract.

contractSourceCode *required

string (query)

The source code of the contract.

constructorArguments

string (query)

The constructor argument data provided.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Contract {

ABI
ABI
example: "[{ \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event\" }, { \"type\":\"event\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}], \"name\":\"Event2\" }, { \"type\":\"function\", \"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}], \"name\":\"foo\", \"outputs\": [] }]"
Address
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
ContractName
string
example: "Some name"
OptimizationUsed
optimization used
enum: ["0", "1"]
enum
interpretation
"0"
false
"1"
true

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: verifysourcecode

codeformat *required

string (query)

Format of sourceCode(supported only "solidity-standard-json-input")

contractaddress *required

string (query)

The address of the contract.

contractname *required

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")

compilerversion *required

string (query)

The compiler version for the contract.

sourceCode *required

string (query)

Standard input json

constructorArguments

string (query)

The constructor argument data provided.

autodetectConstructorArguments

boolean (query)

Whether or not automatically detect constructor argument.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

UID {

UID
string
example: b080b96bd06ad1c9341c2afb7e3730311388544961acde94

}

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: contract

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: checkverifystatus

guid *required

string (query)

A string used for identifying verification attempt

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Status {

status
string
example: `Pending in queue` | `Pass - Verified` | `Fail - Unable to verify` | `Unknown UID`

}

Transaction ?module=transaction

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: transaction

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: gettxinfo

txhash *required

string (query)

Transaction hash. Hash of contents of the transaction.

index

integer (query)

A nonnegative integer that represents the log index to be used for pagination.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
TransactionInfo

}

TransactionInfo {

input
input
example: "0x797af627d02e23b68e085092cd0d47d6cfb54be025f37b5989c0264398f534c08af7dea9"
value
wei
example: "663046792267785498951364"
success
boolean
example: true
hash
transaction hash
example: "0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4"
to
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
from
address hash
example: "0x95426f2bc716022fcf1def006dbc4bb81f5b5164"
confirmations
confirmations
example: "6005998"
logs
array
[Log Detail]
blockNumber
block number
example: "34092"
gasPrice
wei
example: "663046792267785498951364"
gasUsed
gas
example: "122261"
timeStamp
timestamp
example: "1439232889"
gasLimit
wei
example: "663046792267785498951364"
revertReason
revert_reason
example: "No credit of that type"

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: transaction

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: gettxreceiptstatus

txhash *required

string (query)

Transaction hash. Hash of contents of the transaction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
TransactionReceiptStatus

}

TransactionReceiptStatus {

status
status
enum: ["0", "1"]
enum
interpretation
"0"
fail
"1"
pass

}

200

Parameters

Name

Description

Module *required

string (query)

A string with the name of the module to be invoked.

Must be set to: transaction

Action *required

string (query)

A string with the name of the action to be invoked.

Must be set to: getstatus

txhash *required

string (query)

Transaction hash. Hash of contents of the transaction.

Curl

          
Request URL

          
Server Response

Code

Details

Response Body


            

Responses

Code

Description
200
successful operation

            

Result {

message
string
example: "OK"
status
status
enum: ["0", "1"]
enum
interpretation
"0"
error
"1"
ok
result
TransactionStatus

}

TransactionStatus {

isError
isError
enum: ["0", "1"]
enum
interpretation
"0"
pass
"1"
error
errDescription
string
example: "Out of gas"

}

200