HYCON
Search…
Getting a list of recently published blocks
api/v1
Retrieve a list of ten (10) most recent blocks published on the Hycon network.
Path Parameter
Parameter
Type
Required
Description
index
number
Yes
Index value of the recent block list (0 returns the 10 most recent blocks)
Response - 200 OK, application/json
Parameter
Type
Description
hash
string
Hash representation of the transaction
difficulty
string
Mining difficulty of block
height
number
Height of the block
size
number
Size of block information, in bytes
txs
list
List of transactions in the block
timestamp
number
Timestamp when the block was added
prevBlock
string
Previous block hash
nonce
string
Value assigned by the miner that constitutes proof of work
miner
string
Wallet address of the miner
length
string
Page number of the block list, used for pagination
Response Error Table
Status
Error
Message
404
INVALID_ROUTE
resource not found
GET/api/v1/blockList/{index}
Example request
1
$ curl -X GET http://localhost:2442/api/v1/blockList/0 \
2
-H 'Content-Type: application/json;charset=utf-8'
Copied!
Response (Success)
1
{
2
"blocks": [
3
{
4
"hash": "5rjhUnz94wBE4Aakq4Hb5NhSiy3XcTmvmDFdJG6dcLvW",
5
"difficulty": "2.391887430150769e-9",
6
"height": 348632,
7
"size": 3995,
8
"txs": [
9
{
10
"amount": "1.128210794",
11
"hash": "3SmACLKLj9ydUQUn77r1ZVGWsUuhNeUFmMVVQ2qWBUEh",
12
"fee": "0.000001",
13
"from": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
14
"to": "H3PFczLsRMtq2pNndqD64TrWVKpAc2u6x",
15
"estimated": "1.128211794"
16
},
17
...
18
],
19
"timeStamp": 1542077044227,
20
"prevBlock": [
21
{
22
"0": 131,
23
"1": 160,
24
"2": 31,
25
"3": 182,
26
"4": 50,
27
"5": 249,
28
"6": 29,
29
"7": 80,
30
"8": 172,
31
"9": 221,
32
"10": 181,
33
"11": 17,
34
"12": 145,
35
"13": 51,
36
"14": 248,
37
"15": 108,
38
"16": 111,
39
"17": 68,
40
"18": 184,
41
"19": 238,
42
"20": 68,
43
"21": 45,
44
"22": 91,
45
"23": 222,
46
"24": 230,
47
"25": 84,
48
"26": 83,
49
"27": 121,
50
"28": 14,
51
"29": 64,
52
"30": 37,
53
"31": 168
54
}
55
],
56
"nonce": "000008613fffeb00",
57
"miner": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT"
58
},
59
...
60
],
61
"length": 17433
62
}
Copied!
Last modified 3mo ago
Copy link