Skip to main content

bb_getBlock RPC Method

Returns information about the block with transaction objects.

Updated on
Nov 14, 2024

bb_getBlock RPC Method

Please note that this RPC method requires the Base Blockbook JSON-RPC add-on enabled on your QuickNode endpoint.

Parameters

block
string
REQUIRED
The block hash or block height (as a string)
object
object
The options object with the following fields:
page
integer
The page you would like to retrieve.

Returns

result
object
The details of the result
page
integer
The page number returned in this response
totalPages
integer
The number of pages available for your original query
itemsOnPage
integer
The maximum number of transactions returned in this response
hash
string
The block hash
previousBlockHash
string
The hash of the previous block
nextBlockHash
string
The hash of the next block
height
integer
The block height or index
confirmations
integer
The number of confirmations, or -1 if the block is not on the main chain
size
integer
The size of the block in bytes
time
integer
The block time expressed in UNIX epoch time
version
integer
The block version
merkleRoot
string
The merkle root
nonce
string
A number that miners adjust in order to find a block hash that meets the network's specified difficulty target
bits
string
The value of the nBits field in the block header
difficulty
string
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
txCount
integer
Total number of transactions within the returned block
txs
array
A list of txs
txid
string
The transaction id
vin
array
An array of transaction objects used as inputs for the current transaction
n
integer
The nonce of this transaction
addresses
array
An array of addresses in this transaction
isAddress
boolean
Boolean value of whether there is an address or not
value
string
The value of this transaction in satoshis
vout
array
An array of output transaction objects for the current transaction
value
string
The value of this transaction in satoshis
n
integer
The nonce of this transaction
addresses
array
An array of addresses in this transaction
isAddress
boolean
Boolean value of whether there is an address or not
blockHash
string
The hash of the block at which the transaction was included
blockHeight
integer
The block height at which the transaction output was created
confirmations
integer
The number of confirmations since this transaction was included in a block
blockTime
integer
The unix timestamp of when the block was confirmed
value
string
The total value of the transaction
fees
string
The fees for the transaction
tokenTransfers
array
(Optional) An array containing details of token transfers within the transaction
type
string
The type of token transfer
from
string
The address from which the tokens are transferred.
to
string
The address to which the tokens are transferred
contract
string
The address of the token contract
name
string
The name of the token
symbol
string
The symbol of the token
decimals
integer
The number of decimal places used by the token
value
string
The value of the token transfer
ethereumSpecific
object
Object containing Ethereum-specific transaction details
status
integer
The transaction status (1 means OK, 0 means Failure, -1 means pending)
nonce
integer
The nonce of the transaction
gasLimit
integer
The gas limit of the transaction
gasUsed
integer
The gas used by the transaction
gasPrice
string
(Optional) The gas price of the transaction
data
string
The data associated with the transaction
parsedData
object
The parsed data object which contains the following fields:
methodId
string
The method id of the transaction data
name
string
The name associated with the method ID
function
string
(Optional) The name of the function being called in the smart contract
params
array
(Optional) An array containing information about the parameters passed to the function
type
string
The data type of the parameter
value
array
The values of the parameters passed to the function
addressAliases
object
(Optional) The addressAliases object which contains the following fields:
address
object
The address object which contains the following fields:
Type
string
The type of the address
Alias
string
The label associated with the address
Request
1
curl --location 'https://docs-demo.base-mainnet.quiknode.pro/' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"method": "bb_getBlock",
5
"params": [
6
"0xa3b63a935e345301df17431a3f23d20b140188f863eea0a30d485fa94ab1919e",
7
{
8
"page": 1
9
}
10
],
11
"id": 1,
12
"jsonrpc": "2.0"
13
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free