matic

Polygon (MATIC)

Method: POST eth_getBlockTransactionCountByNumber

dropdown

POST eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block matching the given block number.

Parameters

QUANTITY|TAG - integer or string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://matic.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["latest"],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x2f"
}