HYCON
Search…
Response (latest block)
api/v3

Response (latest block)200 OK, application/json

If range is not set or set to 1, the following object is returned. Else, a block list with the following objects as elements is returned:
Parameter
Type
Description
height
number
Height of the block.
hash
string
Hash value representing the block.
difficulty
string
Difficulty of the mined block.
merkleRoot
string
Merkle hash of all transactions in the block.
stateRoot
string
Hash of the world state at that block.
timestamp
number
Timestamp when the block was added.
txs
array
List of transactions in the block.
nonce
string
Nonce of the block.
miner
string
A Hycon wallet address of the miner.
uncleHash
array
List of hash values of uncle block.
previousHash
string
The hash value of the previous block.
Response Error Table
Status
Error
Message
400
BAD_REQUEST
The parameter value passed as count is invalid
404
NOT_FOUND
Tip information is undefined in consensus
Example request without specified range
1
$ curl -X GET http://localhost:2442/api/v3/block \
2
-H 'Content-Type: application/json;charset=utf-8'
Copied!
Response (Success) without specified range
1
{
2
"height": 412510,
3
"hash": "6ZDkzCeih26nQ6ry84FhvJackNpRgKGKmFCrhvQsdfMf",
4
"difficulty": "2.2465660159450127e-9",
5
"merkleRoot": "8FKVTsPMMfgjp7tWZLgmrodcFPy8PcVMMc9r3fPdvu5p",
6
"stateRoot": "DVuavQUzM2GTD7D43n83vDm1TDnb5r6dVc2UDNZbdJon",
7
"timestamp": 1543462655832,
8
"txs": [
9
{
10
"amount": "28.312759446",
11
"to": "H3mt6xb2evbvJ5m58181t2hjQxrhE6gFz",
12
"txhash": "4qpzsvd9YtZAtU7UWnByN8JTfbkYHrGd2PjZ9pQNepTj",
13
"fee": "0.000001",
14
"from": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
15
"nonce": 2667656
16
},
17
...
18
],
19
"nonce": "16769771563250614862",
20
"miner": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
21
"uncleHash": [
22
"7ZY6RZGxLeBnzenpYL6m8x1F1sq3umsyW5ZEry3d1D8o"
23
],
24
"previousHash": "3ZPBmRgzt3sN1QqvbArfvDG465b47FUR7bPvRwtnxWbS"
25
}
Copied!
Example request with specified range
1
$ curl -X GET http://localhost:2442/api/v3/block\?range=-2 \
2
-H 'Content-Type: application/json;charset=utf-8'
Copied!
Response (Success) with specified range
1
[
2
{
3
"height": 412509,
4
"hash": "3ZPBmRgzt3sN1QqvbArfvDG465b47FUR7bPvRwtnxWbS",
5
"difficulty": "2.267803372508838e-9",
6
"merkleRoot": "xyw95Bsby3s4mt6f4FmFDnFVpQBAeJxBFNGzu2cX4dM",
7
"stateRoot": "EryxtWHTHorKRmqozQe63XmYLezjdaNxcAZESyWdaCPd",
8
"timestamp": 1543462624068,
9
"txs": [],
10
"nonce": "16909528905709264102",
11
"miner": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
12
"uncleHash": [],
13
"previousHash": "BtGd36He84SMQYv61Tr1wowtnoE1Ey1HiMTW2QwajQea"
14
},
15
...
16
]
Copied!
Last modified 3mo ago
Copy link