Home

getchaintxstats

POST
https://btc-testnet.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Compute statistics about the total number and rate of transactions in the blockchain. You can optionally specify the number of blocks and a block hash to start from.

Body

application/json

Compute statistics about the total number and rate of transactions in the blockchain. You can optionally specify the number of blocks and a block hash to start from.

Request payload containing the documented method parameters and client request identifier.

jsonrpcstringrequired

JSON-RPC protocol version.

idstringrequired

Client-provided request identifier echoed in the response.

methodstringgetchaintxstatsrequired

JSON-RPC method name.

paramsArray<integer | string>required

Parameters:

  1. nblocks (integer, optional) — Number of blocks to average over. Default: 1 month worth (~4320).
  2. blockhash (string, optional) — Hash of the block to stop at; defaults to the chain tip.
Show child attributes

Single entry in the params array.

One of

JSON-RPC method parameters.

integer

JSON-RPC method parameters.

string

Response

200OK

Chain transaction statistics retrieved successfully

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal Server Error