Skip to main content

Parameters

chainId
string
default:"starknet-sepolia"
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:"starknet_getBlockTransactionCount"
required
JSON-RPC method name.
params
object
required
Parameters for starknet_getBlockTransactionCount: [block_id].Parameters for starknet_getBlockTransactionCount:
  • params.block_id: BlockID object containing hash and number.
  • params.index: Index of the transaction within the specified block.

Returns

result
integer
Integer - Number of transactions in the requested block. Example: 148.
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "starknet_getBlockTransactionCount",
    "params": {
      "block_id": {
        "block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
      },
      "index": 1
    }
  }'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 148
}