URL method (specified block)

api/v3

Request Body - Content-Type: application/json;charset=utf-8

Parameter

Required

Description

hash

Yes*

The hash value of the block

height

Yes*

The height value of the block

range

No

Include blocks within the specified range. (Default: 1)

If the value of range is positive and greater than 1, a list of blocks starting from the specified hash or height is returned. If the range is negative, the list of blocks ending from the specified hash or height is returned.

*Only one of either the hash or height parameter should be used. If both are passed as query parameters, the hash parameter is used.GET/api/v3/block/:hash?{range}GET/api/v3/block/:height?{range}

Example request with height specified

curl -X GET http://localhost:2442/api/v3/block/406080?range=-2 \
-H 'Content-Type: application/json;charset=utf-8'

Example request with hash specified

curl -X GET http://localhost:2442/api/v3/block/6ZDkzCeih26nQ6ry84FhvJackNpRgKGKmFCrhvQsdfMf?range=2 \
-H 'Content-Type: application/json;charset=utf-8'

Last updated