Format: ${sort_column}[.asc | .desc]. Specifies the sorting method. Valid sort_column values: height, transactions, reward. Example: height.desc for ascending order based on block number. Default: height.desc (sorting by number in descending order) if the parameter is empty.
Example:
height.desc
page
integer
optional
Page
Example:
1
page_size
integer
optional
How many blocks are displayed per page
Example:
10
Header Params
Content-Type
string
required
Example:
application/vnd.api+json
Accept
string
required
Example:
application/vnd.api+json
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request GET 'https://mainnet-api.explorer.nervos.org/api/v1/blocks?sort=height.desc&page=1&page_size=10' \
--header'Accept: application/vnd.api+json' \
--header'Content-Type: application/vnd.api+json'