Skip to main content

ots_getBlockTransactions RPC Method

Returns the list of transactions in the block with the specified block number.

Updated on
Nov 2, 2023

ots_getBlockTransactions RPC Method

Parameters

block
integer
REQUIRED
The block number
index
integer
REQUIRED
The index value
pageSize
integer
REQUIRED
The number of transaction it may return

Returns

result
object
A result object which contains the following fields:
fullblock
object
A full block object, or null when no block was found
baseFeePerGas
A string of the base fee encoded in hexadecimal format. Please note that this response field will not be included in a block requested before the EIP-1559 upgrade
difficulty
The integer of the difficulty for this block encoded as a hexadecimal
extraData
The “extra data” field of this block
gasLimit
The maximum gas allowed in this block encoded as a hexadecimal
gasUsed
The total used gas by all transactions in this block encoded as a hexadecimal
hash
The block hash of the requested block. null if pending
logsBloom
The bloom filter for the logs of the block. null if pending
miner
The address of the beneficiary to whom the mining rewards were given
mixHash
A string of a 256-bit hash encoded as a hexadecimal
nonce
The hash of the generated proof-of-work. null if pending
number
The block number of the requested block encoded as a hexadecimal. null if pending
parentHash
The hash of the parent block
receiptsRoot
The root of the receipts trie of the block
sha3Uncles
The SHA3 of the uncles data in the block
size
The size of this block in bytes as an Integer value encoded as hexadecimal
stateRoot
The root of the final state trie of the block
timestamp
The unix timestamp for when the block was collated
totalDifficulty
The integer of the total difficulty of the chain until this block encoded as a hexadecimal
transactionCount
The number of transaction
transactionsRoot
The root of the transaction trie of the block
transactions
object
An array of transaction objects with the following fields:
blockHash
The hash of the block where this log was in. Null when it's a pending log
blockNumber
The block number where this log was in. Null when it's a pending log
from
The address of the sender
gas
The gas provided by the sender, encoded as hexadecimal
gasPrice
The gas price provided by the sender in wei, encoded as hexadecimal
maxFeePerGas
The maximum fee per gas set in the transaction
maxPriorityFeePerGas
The maximum priority gas fee set in the transaction
hash
The hash of the transaction
input
The data sent along with the transaction
nonce
The number of transactions made by the sender before this one encoded as hexadecimal
to
The address of the receiver. Null when it's a contract creation transaction
transactionIndex
The integer of the transaction's index position that the log was created from. Null when it's a pending log
value
The value transferred in wei encoded as hexadecimal
type
The transaction type
accessList
A list of addresses and storage keys that the transaction plans to access
chainId
The chain id of the transaction, if any
v
The standardized V field of the signature
r
The R field of the signature
s
The S field of the signature
uncles
An array of uncle hashes
withdrawals
object
An array of withdrawals which contains the following fields:
index
The index associated with the withdrawal
validatorIndex
The index or identifier of the validator associated with this withdrawal
address
The Ethereum address where the withdrawn funds are being sent
amount
The value of the withdrawn amount, expressed in hexadecimal format
withdrawalsRoot
The withdrawals root of the block
receipts
object
An array of receipts
blockHash
The hash of the block. null when pending
blockNumber
The block number
contractAddress
The contract address created if the transaction was a contract creation, otherwise null
cumulativeGasUsed
The total amount of gas used when this transaction was executed in the block
effectiveGasPrice
The actual value per gas deducted from the sender account
from
The address of the sender
gasUsed
The amount of gas used by this specific transaction alone
logs
A log objects that generated this transaction
logsBloom
The bloom filter for light clients to quickly retrieve related logs
status
It is either 1 (success) or 0 (failure) encoded as a hexadecimal
to
The address of the receiver. null when it's a contract creation transaction
transactionHash
The hash of the transaction
transactionIndex
An index of the transaction in the block
type
The value type
Request
1
curl https://docs-demo.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"ots_getBlockTransactions","params":[17854439,0,25],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free