Skip to main content

Parameters

chainId
string
default:"421614"
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:"eth_getBlockTransactionCountByNumber"
required
JSON-RPC method name.
params
object
required
Parameters for eth_getBlockTransactionCountByNumber: [blockNumber].Positional parameters for eth_getBlockTransactionCountByNumber:
  • params[0]: Block identifier. Can be an integer block number or a string tag: “latest”, “earliest”, or “pending”.

Returns

result
string
Integer of the number of transactions in this block. Example: “0x1b”.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=421614 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": [
      "0x1b4"
    ]
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1b"
}