๐ Get transaction count in block by hash
Code samples
GET /api/v1/btc/block/hash/{blockHash}/transactions/count
Returns the number of transactions in a block identified by hash using getblock with verbosity 1.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| blockHash | path | string | true | Bitcoin block hash. |
Example responses
200 Response
{
"transactionCount": 2500
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Number of transactions in the block | Inline |
| 500 | Internal Server Error | Could not connect to BTC node | None |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป transactionCount | integer(int64)ยฆnull | false | none | Number of transactions (nTx) in the block, or null if unavailable. |