curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "1.0",
"id": "curltest",
"method": "getblockchaininfo",
"params": []
}'
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Returns an object containing various state info regarding blockchain processing.
This method will use 10
Compute Units.
Return information about all known tips in the block tree, including the main chain as well as orphaned branches.
This method will use 10
Compute Units.
If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’. If verbose is true, returns an Object with information about blockheader ‘hash’.
This method will use 10
Compute Units.
blockhash
- string, required
The block hash
verbose
- boolean, optional, default=true
true for a json object, false for the hex-encoded data
Returns the hash of the best (tip) block in the most-work fully-validated chain.
This method will use 10
Compute Units.
Name | Type | Description |
---|---|---|
Compute per block statistics for a given window. All amounts are in satoshis. It won’t work for some heights with pruning.
This method will use 10
.
hash_or_height
- string or numeric, required
The block hash or height of the target block
stats
- json array, optional, default=all values
Values to plot (see result below)
Compute statistics about the total number and rate of transactions in the chain.
This method will use 10
.
nblocks
- numeric, optional, default=one month
Size of the window in number of blocks
blockhash
- string, optional, default=chain tip
The hash of the block that ends the window.
If verbosity is 0, returns a string that is serialized, hex-encoded data for block ‘hash’.
If verbosity is 1, returns an Object with information about block ‘hash’.
If verbosity is 2, returns an Object with information about block ‘hash’ and information about each transaction.
This method will use 10
.
blockhash
- string, required
The block hash
verbosity
- numeric, optional, default=1
0 for hex-encoded data, 1 for a json object, and 2 for json object with transaction data
Name | Type | Description |
---|
Returns details on the active state of the TX memory pool.
This method will use 10
.
txid
- string, required
The transaction id (must be in mempool)
verbose
- boolean, optional, default=false
True for a json object, false for array of transaction ids
Returns a hex-encoded proof that “txid” was included in a block.
NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included manually (by blockhash).
This method will use 10
.
txids
- json array, required
The txids to filter
blockhash
- string, optional
If specified, looks for txid in the block with this hash
Returns statistics about the unspent transaction output set. Note this call may take some time.
This method will use 10
.
hash_type
- string, optional, default=hash_serialized_2
Which UTXO set hash should be calculated. Options: ‘hash_serialized_2’ (the legacy algorithm), ‘none’.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|
hex
string
the block hash, hex-encoded
hex
string
A string that is serialized, hex-encoded data for block ‘hash’
str | string | A string that is a serialized, hex-encoded data for the proof. |
hex | string | A string that is serialized, hex-encoded data for block ‘hash’ |
n | numeric | the proof-of-work difficulty as a multiple of the minimum difficulty. |
n | numeric | The current block count |
hex | string | The block hash |
Returns all transaction ids in memory pool as a json array of string transaction ids.
Hint: use getmempoolentry to fetch a specific transaction from the mempool.
This method will use 10
Compute Units.
verbose
- boolean, optional, default=false
True for a json object, false for array of transaction ids
mempool_sequence
- boolean, optional, default=false
If verbose=false, returns a json object with transaction list and mempool sequence number attached.
If txid is in the mempool, returns all in-mempool ancestors.
This method will use 10
Compute Units.
txid
- string, required
The transaction id (must be in mempool)
verbose
- boolean, optional, default=false
True for a json object, false for array of transaction ids
Returns details on the active state of the TX memory pool.
This method will use 10
Compute Units.
Returns details about an unspent transaction output.
This method will use 10
Compute Units.
txid
- string, required
The transaction id
n
- numeric, required
vout number
include_mempool
- boolean, optional, default=true
Whether to include the mempool. Note that an unspent output that is spent in the mempool won’t appear.