Getting block info at a specific height

api/v1

Path Parameter

Parameter

Type

Required

Description

height

number

Yes

Height of a specific block on the Hycon blockchain

Response - 200 OK, application/json

Parameter

Type

Description

hash

string

Hash representation of the transaction

difficulty

string

Mining difficulty of block

stateRoot

string

Hash of the world state at that block

merkleRoot

string

Merkle hash of all transactions in the block

txs

list

List of transactions in the block

height

string

Height of the block

timestamp

number

Timestamp when the block was added

Response Error Table

Status

Error

Message

404

NOT_FOUND

no block found at that height

GET/api/v1/block/height/{height}

Example request

$ curl -X GET http://localhost:2442/api/v1/block/height/317713 \
    -H 'Content-Type: application/json;charset=utf-8'

Response (Success)

{
    "hash": "55FeLzZohwsp7kUyxGBRcHQJAVqRLsar6CQmZvK9ZdpM",
    "difficulty": "1.4607536548526529e-9",
    "stateRoot": "EpQv5Vrkisf1n9wgMH4Pec82i3FxcFhsiKi2WeKHohDf",
    "merkleRoot": "xyw95Bsby3s4mt6f4FmFDnFVpQBAeJxBFNGzu2cX4dM",
    "txs": [
        {
            "amount": "1.077076457",
            "hash": "BLDTEDhqbUaxftUQ4oZSVAPUj5qzBrBuQ37EMNQEES1m",
            "fee": "0.000001",
            "from": "H23fF8ktBWYwK7aHFbPSW52LtoHcbDvmT",
            "to": "H3ZHv2sLw7NhpDnJJVpJ85u2kmECJBZud",
            "estimated": "1.077077457",
            "receiveTime": 1541402086473
        },
        ...
    ],
    "height": "317713",
    "timeStamp": 1541402040765
}

Last updated