๐ Get transaction count in block by height
Code samples
GET /api/v1/eth/block/{blockNumber}/transactions/count
curl 'https://settla.net/api/v1/eth/block/25880000/transactions/count' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns the number of transactions in a block identified by number or tag using eth_getBlockTransactionCountByNumber.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| blockNumber | path | string | true | Block number or tag (latest, earliest, pending). |
Example responses
200 Response
{
"transactionCount": "0x129"
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Number of transactions in the block | Inline |
| 500 | Internal Server Error | Could not connect to ETH node | None |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป transactionCount | string | false | none | Transaction count as hex QUANTITY (0x129 = 297 transactions). |