Skip to main content

Parameters

chainId
string
default:"solana-devnet"
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:"getBlocksWithLimit"
required
JSON-RPC method name.
params
object
required
Parameters for method getBlocksWithLimit: [startSlot, limit, config]Positional parameters for getBlocksWithLimit:
  • params[0]: Starting slot number for the range.
  • params[1]: Maximum number of results to return.
  • params[2]: Optional configuration object.

Returns

result
array
Returns a list of confirmed blocks with a limit
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=solana-devnet \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "getBlocksWithLimit",
    "params": [
      5,
      10
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    5,
    6,
    7,
    8,
    "..."
  ]
}