Skip to main content

/extended/v1/tx/block/{block_hash} REST API Endpoint

Retrieves a list of all transactions within a block for a given block hash.

Updated on
Oct 4, 2023

/extended/v1/tx/block/{block_hash} REST API Endpoint

Path Parameters

block_hash
string
REQUIRED
Hash of block.

Query Parameters

limit
integer
max number of transactions to fetch.
offset
integer
index of first transaction to fetch.

Returns

object
array
Returns a transaction object
limit
integer
The number of Non-Fungible Token holdings to return.
offset
integer
The number to Non-Fungible Token holdings to skip (starting at 0).
total
integer
The number of Non-Fungible Token holdings available.
results
array
tx_id
string
Transaction ID.
nonce
integer
Used for ordering the transactions originating from and paying from an account. The nonce ensures that a transaction is processed at most once. The nonce counts the number of times an account's owner(s) have authorized a transaction. The first transaction from an account will have a nonce value equal to 0, the second will have a nonce value equal to 1, and so on.
fee_rate
string
Transaction fee as Integer string (64-bit unsigned integer).
sender_address
string
Address of the transaction initiator.
sponsor_nonce
integer
Array of MempoolTokenTransferTransaction (object) or MempoolSmartContractTransaction (object) or MempoolContractCallTransaction (object) or MempoolPoisonMicroblockTransaction (object) or MempoolCoinbaseTransaction (object).
sponsored
boolean
Denotes whether the originating account is the same as the paying account
sponsor_address
string
Array of MempoolTokenTransferTransaction (object) or MempoolSmartContractTransaction (object) or MempoolContractCallTransaction (object) or MempoolPoisonMicroblockTransaction (object) or MempoolCoinbaseTransaction (object).
post_condition_mode
string
Array of MempoolTokenTransferTransaction (object) or MempoolSmartContractTransaction (object) or MempoolContractCallTransaction (object) or MempoolPoisonMicroblockTransaction (object) or MempoolCoinbaseTransaction (object).
post_conditions
array
Array of MempoolTokenTransferTransaction (object) or MempoolSmartContractTransaction (object) or MempoolContractCallTransaction (object) or MempoolPoisonMicroblockTransaction (object) or MempoolCoinbaseTransaction (object).
anchor_mode
string
Enum: "on_chain_only", "off_chain_only", "any", on_chain_only: the transaction MUST be included in an anchored block, off_chain_only: the transaction MUST be included in a microblock, any: the leader can choose where to include the transaction.
block_hash
string
Hash of the blocked this transactions was associated with
block_height
integer
Height of the block this transactions was associated with
burn_block_time
integer
Unix timestamp (in seconds) indicating when this block was mined
burn_block_time_iso
string
An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this block was mined.
parent_burn_block_time
integer
Unix timestamp (in seconds) indicating when this parent block was mined
parent_burn_block_time_iso
string
An ISO 8601 (YYYY-MM-DDTHH:mm:ss.sssZ) timestamp indicating when this parent block was mined.
canonical
boolean
Set to true if block corresponds to the canonical chain tip
tx_index
integer
Index of the transaction, indicating the order. Starts at 0 and increases with each transaction
tx_status
string
Enum: "success" "abort_by_response" "abort_by_post_condition". Status of the transaction.
tx_result
object
Result of the transaction. For contract calls, this will show the value returned by the call. For other transaction types, this will return a boolean indicating the success of the transaction.
event_count
integer
Number of transaction events
parent_block_hash
string
Hash of the previous block.
is_unanchored
boolean
True if the transaction is included in a microblock that has not been confirmed by an anchor block.
microblock_hash
string
The microblock hash that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be an empty string.
microblock_sequence
integer
The microblock sequence number that this transaction was streamed in. If the transaction was batched in an anchor block (not included within a microblock) then this value will be 2147483647 (0x7fffffff, the max int32 value), this value preserves logical transaction ordering on (block_height, microblock_sequence, tx_index).
microblock_canonical
boolean
Set to true if microblock is anchored in the canonical chain tip, false if the transaction was orphaned in a micro-fork.
execution_cost_read_count
integer
Execution cost read count.
execution_cost_read_length
integer
Execution cost read length.
execution_cost_runtime
integer
Execution cost runtime.
execution_cost_write_count
integer
Execution cost write count.
execution_cost_write_length
integer
Execution cost write length.
events
array
List of transaction events.
tx_type
string
Value: "token_transfer"
token_transfer
object
Request
1
curl -X 'GET' \
2
'https://docs-demo.stacks-mainnet.quiknode.pro/extended/v1/tx/block/0x5b4f12dcf6eb9de5959398db165f1c094e1e6bea73f2ef9b707faabe559426fa' \
3
-H 'Content-Type: application/json'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free