Skip to main content
POST
https://api.uniblock.dev
/
uni
/
v1
/
json-rpc
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=137 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "blockchain",
    "params": [
      1,
      100
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "last_height": "1276718",
    "block_metas": [
      {
        "block_id": {
          "__truncated": true
        },
        "block_size": 1000000,
        "header": {
          "__truncated": true
        },
        "num_txs": "54"
      }
    ]
  }
}

Parameters

chainId
string
default:"137"
required
Unique identifier for a blockchain network.
id
number
default:1
required
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"blockchain"
required
JSON-RPC method name.
params
object
required
The parameters for method blockchain: [minHeight, maxHeight].Positional parameters for blockchain:
  • params[0]: Integer - minHeight to return.
  • params[1]: Integer - maxHeight to return.

Returns

result
object
The block headers.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=137 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "blockchain",
    "params": [
      1,
      100
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "last_height": "1276718",
    "block_metas": [
      {
        "block_id": {
          "__truncated": true
        },
        "block_size": 1000000,
        "header": {
          "__truncated": true
        },
        "num_txs": "54"
      }
    ]
  }
}