Subscribe to new blocks as they are produced on the Kadena network.
This subscription streams newly mined blocks in real time, allowing clients to react immediately to chain updates without repeatedly polling the API. It is commonly used by explorers, indexers, and event-driven applications that need to stay in sync with the latest state of the blockchain.
You can optionally filter the subscription by specific chainIds
to receive blocks only from selected chains.
If omitted, blocks from all chains are included.
The quantity
parameter controls how many of the most recent blocks are returned initially
when the subscription starts (default: 20).
After the initial batch, new blocks are pushed to the client as they are finalized.
Arguments
(Optional) A list of chain IDs to subscribe to. If omitted, the subscription includes new blocks from all chains.
The number of most recent blocks to include in the initial payload when the subscription starts.
Return type
[Block!]Globally unique identifier for this block node.
The cryptographic hash of the block. This serves as its unique identifier within the blockchain.
The specific chain where this block was mined. Kadena is a multi-chain system, and each block belongs to exactly one chain.
The timestamp when this block was created and added to the chain.
The network difficulty at the time the block was mined. Higher difficulty reflects the amount of computational work required to produce a valid block.
The epoch timestamp marking when the difficulty was last adjusted. Kadena targets ~30 seconds per block, and the difficulty is recalibrated periodically to maintain that target.
Consensus flags used internally by the protocol.
The height (block number) of this block within its chain. The genesis block is height 0, and each subsequent block increments by 1.
A nonce value used in the proof-of-work process. Miners vary this value to discover a hash below the target threshold.
The hash of the payload data contained within the block. This ensures the integrity of the transactions and other included data.
The cumulative weight of the chain up to and including this block. Weight increases with each mined block and helps determine the canonical chain.
The target hash threshold that the block’s proof-of-work hash must fall below. This value adjusts with difficulty to regulate block production time.
The coinbase transaction data. This transaction rewards the miner and may include information about block rewards or other protocol-defined payouts.
The neighboring blocks that reference this block as a parent. These neighbors are essential in Kadena’s braided multi-chain architecture.
The proof-of-work hash of the block. This is the result of hashing the block header with the nonce and must satisfy the target condition.
Indicates whether this block is part of the canonical chain. Non-canonical blocks may occur during temporary forks or reorganizations.
The parent block directly preceding this one in the chain. Together with the hash, this forms the cryptographic link that secures the chain.
The total amount of gas used by all transactions in this block, expressed in KDA.
Paginated list of events emitted by transactions within this block.
The account that mined this block and received the coinbase reward.
Paginated list of transactions included in this block.
subscription newBlocks($chainIds: [String!], $quantity: Int) {
newBlocks(chainIds: $chainIds, quantity: $quantity) {
id
hash
chainId
creationTime
difficulty
epoch
flags
height
nonce
payloadHash
weight
target
coinbase
neighbors {
__typename
# ...BlockNeighborFragment
}
powHash
canonical
parent {
__typename
# ...BlockFragment
}
totalGasUsedInKda
events(
# Arguments Here
) {
__typename
# ...BlockEventsConnectionFragment
}
minerAccount {
__typename
# ...FungibleChainAccountFragment
}
transactions(
# Arguments Here
) {
__typename
# ...BlockTransactionsConnectionFragment
}
}
}
{ "chainIds": [ "Example String" ], "quantity": 40 }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "hash": "Example String", "chainId": "Example Custom Scalar", "creationTime": "Example Custom Scalar", "difficulty": "Example Custom Scalar", "epoch": "Example Custom Scalar", "flags": "Example Custom Scalar", "height": "Example Custom Scalar", "nonce": "Example Custom Scalar", "payloadHash": "Example String", "weight": "Example String", "target": "Example String", "coinbase": "Example String", "neighbors": [ { "__typename": "BlockNeighbor" } ], "powHash": "Example String", "canonical": true, "parent": { "__typename": "Block" }, "totalGasUsedInKda": "Example Custom Scalar", "events": { "__typename": "BlockEventsConnection" }, "minerAccount": { "__typename": "FungibleChainAccount" }, "transactions": { "__typename": "BlockTransactionsConnection" } } ] }
Subscribe to a transaction and receive an event when it is included in a block and indexed.
This subscription lets clients listen for a specific transaction by its requestKey
and be notified
as soon as that transaction is mined, confirmed, and available in the indexer.
It is typically used by wallets, explorers, and dApps to update the transaction status in real time
without polling the API.
You can optionally specify a chainId
to narrow the search to a single chain.
If omitted, the subscription will look for the transaction across all chains.
⚠️ Note: The event is emitted only once — when the transaction leaves the mempool and becomes part of a block that has been indexed.
Arguments
(Optional) The chain ID where the transaction is expected to occur. If omitted, all chains are searched.
The request key of the transaction to listen for. The subscription emits an event once this transaction is confirmed and indexed.
Return type
TransactionGlobally unique identifier for this transaction node.
The original signed transaction command submitted to the network. Includes metadata, payload, signers, and network information.
The unique hash of the transaction. This value is derived from the signed command and serves as the canonical identifier for the transaction on-chain.
The result of executing the transaction. Includes information such as success/failure status, events, continuation data, and any state changes triggered by execution.
The list of signatures associated with the transaction. Each signature proves authorization from a required signer and is used to validate that the transaction was properly authorized before execution.
subscription transaction($chainId: String, $requestKey: String!) {
transaction(chainId: $chainId, requestKey: $requestKey) {
id
cmd {
__typename
# ...TransactionCommandFragment
}
hash
result {
__typename
# ...TransactionMempoolInfoFragment
}
sigs {
__typename
# ...TransactionSignatureFragment
}
}
}
{ "chainId": "Example String", "requestKey": "Example String" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "cmd": { "__typename": "TransactionCommand" }, "hash": "Example String", "result": { "__typename": "TransactionMempoolInfo" }, "sigs": [ { "__typename": "TransactionSignature" } ] } }
Subscribe to transactions as they are confirmed on the Kadena network.
This subscription streams newly confirmed transactions in real time, allowing clients to react immediately to network activity without polling. It is typically used by explorers, indexers, monitoring tools, and analytics platforms to track transaction flow and update UIs as new data arrives.
By default, the subscription delivers transactions that have reached the minimum required confirmation depth, ensuring they are finalized and indexed before being emitted.
The quantity
parameter controls how many of the most recent transactions are included in the initial payload
when the subscription starts (default: 20). After the initial batch, new transactions are pushed to the client
as they are confirmed.
Arguments
The number of most recent confirmed transactions to include in the initial payload when the subscription starts. Defaults to 20.
Return type
[Transaction!]Globally unique identifier for this transaction node.
The original signed transaction command submitted to the network. Includes metadata, payload, signers, and network information.
The unique hash of the transaction. This value is derived from the signed command and serves as the canonical identifier for the transaction on-chain.
The result of executing the transaction. Includes information such as success/failure status, events, continuation data, and any state changes triggered by execution.
The list of signatures associated with the transaction. Each signature proves authorization from a required signer and is used to validate that the transaction was properly authorized before execution.
subscription transactions($quantity: Int) {
transactions(quantity: $quantity) {
id
cmd {
__typename
# ...TransactionCommandFragment
}
hash
result {
__typename
# ...TransactionMempoolInfoFragment
}
sigs {
__typename
# ...TransactionSignatureFragment
}
}
}
{ "quantity": 40 }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "cmd": { "__typename": "TransactionCommand" }, "hash": "Example String", "result": { "__typename": "TransactionMempoolInfo" }, "sigs": [ { "__typename": "TransactionSignature" } ] } ] }
Subscribe to on-chain events by their fully qualified name (e.g., coin.TRANSFER
).
Streams matching events in real time once their containing blocks meet the required confirmation depth. Useful for explorers, wallets, indexers, and analytics apps.
parametersFilter
must be a stringified JSON using Prisma JSON property filter syntax.
Example:
events(
qualifiedEventName: "coin.TRANSFER",
parametersFilter: "{"array_starts_with": "k:abcdefg"}"
)
quantity
controls the size of the initial payload (default: 20); new events are pushed thereafter.
Arguments
(Optional) Restrict the subscription to a specific chain. If omitted, events from all chains are included.
(Optional) Minimum number of confirmations a block must have before its events are emitted.
(Optional) A stringified JSON object used to filter event parameters. Must follow Prisma’s JSON property filter syntax. Example: "{"array_starts_with": "k:abcdefg"}"
The fully qualified event name to subscribe to. Example: "coin.TRANSFER".
Number of most recent matching events to include in the initial payload. Defaults to 20.
Return type
[Event!]Globally unique identifier for this event.
The name of the event as defined in the smart contract.
Example: "TRANSFER"
.
The block in which this event was emitted.
The ID of the chain where the event occurred.
The height of the block in which this event was emitted.
The name of the module that emitted the event.
Example: "coin"
.
The index position of this event within the transaction’s event list. Useful when multiple events are emitted by the same transaction.
The request key of the transaction that emitted this event.
The raw JSON-encoded event parameters as emitted by the contract.
A human-readable text representation of the event parameters.
The fully qualified event name, combining the module and event name.
Example: "coin.TRANSFER"
.
The transaction that emitted this event.
subscription events(
$chainId: String
$minimumDepth: Int
$parametersFilter: String
$qualifiedEventName: String!
$quantity: Int
) {
events(
chainId: $chainId
minimumDepth: $minimumDepth
parametersFilter: $parametersFilter
qualifiedEventName: $qualifiedEventName
quantity: $quantity
) {
id
name
block {
__typename
# ...BlockFragment
}
chainId
height
moduleName
orderIndex
requestKey
parameters
parameterText
qualifiedName
transaction {
__typename
# ...TransactionFragment
}
}
}
{ "chainId": "Example String", "minimumDepth": 40, "parametersFilter": "Example String", "qualifiedEventName": "Example String", "quantity": 40 }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "name": "Example String", "block": { "__typename": "Block" }, "chainId": "Example Custom Scalar", "height": "Example Custom Scalar", "moduleName": "Example String", "orderIndex": "Example Custom Scalar", "requestKey": "Example String", "parameters": "Example String", "parameterText": "Example String", "qualifiedName": "Example String", "transaction": { "__typename": "Transaction" } } ] }
Subscribe to new blocks starting from a specific minimum depth.
This subscription behaves like newBlocks
but only emits blocks that have reached
a specified confirmation depth, ensuring they are finalized and stable before being delivered.
It is commonly used by indexers, explorers, and analytics tools that require deeper chain
finality guarantees rather than reacting to blocks as soon as they are mined.
Arguments
(Optional) A list of chain IDs to subscribe to. If omitted, blocks from all chains are included.
The minimum number of confirmations a block must have before being emitted. Blocks that do not meet this depth will be ignored until they do.
The number of most recent eligible blocks to include in the initial payload when the subscription starts.
Return type
[Block!]Globally unique identifier for this block node.
The cryptographic hash of the block. This serves as its unique identifier within the blockchain.
The specific chain where this block was mined. Kadena is a multi-chain system, and each block belongs to exactly one chain.
The timestamp when this block was created and added to the chain.
The network difficulty at the time the block was mined. Higher difficulty reflects the amount of computational work required to produce a valid block.
The epoch timestamp marking when the difficulty was last adjusted. Kadena targets ~30 seconds per block, and the difficulty is recalibrated periodically to maintain that target.
Consensus flags used internally by the protocol.
The height (block number) of this block within its chain. The genesis block is height 0, and each subsequent block increments by 1.
A nonce value used in the proof-of-work process. Miners vary this value to discover a hash below the target threshold.
The hash of the payload data contained within the block. This ensures the integrity of the transactions and other included data.
The cumulative weight of the chain up to and including this block. Weight increases with each mined block and helps determine the canonical chain.
The target hash threshold that the block’s proof-of-work hash must fall below. This value adjusts with difficulty to regulate block production time.
The coinbase transaction data. This transaction rewards the miner and may include information about block rewards or other protocol-defined payouts.
The neighboring blocks that reference this block as a parent. These neighbors are essential in Kadena’s braided multi-chain architecture.
The proof-of-work hash of the block. This is the result of hashing the block header with the nonce and must satisfy the target condition.
Indicates whether this block is part of the canonical chain. Non-canonical blocks may occur during temporary forks or reorganizations.
The parent block directly preceding this one in the chain. Together with the hash, this forms the cryptographic link that secures the chain.
The total amount of gas used by all transactions in this block, expressed in KDA.
Paginated list of events emitted by transactions within this block.
The account that mined this block and received the coinbase reward.
Paginated list of transactions included in this block.
subscription newBlocksFromDepth(
$chainIds: [String!]
$minimumDepth: Int!
$quantity: Int
) {
newBlocksFromDepth(
chainIds: $chainIds
minimumDepth: $minimumDepth
quantity: $quantity
) {
id
hash
chainId
creationTime
difficulty
epoch
flags
height
nonce
payloadHash
weight
target
coinbase
neighbors {
__typename
# ...BlockNeighborFragment
}
powHash
canonical
parent {
__typename
# ...BlockFragment
}
totalGasUsedInKda
events(
# Arguments Here
) {
__typename
# ...BlockEventsConnectionFragment
}
minerAccount {
__typename
# ...FungibleChainAccountFragment
}
transactions(
# Arguments Here
) {
__typename
# ...BlockTransactionsConnectionFragment
}
}
}
{ "chainIds": [ "Example String" ], "minimumDepth": 40, "quantity": 40 }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "hash": "Example String", "chainId": "Example Custom Scalar", "creationTime": "Example Custom Scalar", "difficulty": "Example Custom Scalar", "epoch": "Example Custom Scalar", "flags": "Example Custom Scalar", "height": "Example Custom Scalar", "nonce": "Example Custom Scalar", "payloadHash": "Example String", "weight": "Example String", "target": "Example String", "coinbase": "Example String", "neighbors": [ { "__typename": "BlockNeighbor" } ], "powHash": "Example String", "canonical": true, "parent": { "__typename": "Block" }, "totalGasUsedInKda": "Example Custom Scalar", "events": { "__typename": "BlockEventsConnection" }, "minerAccount": { "__typename": "FungibleChainAccount" }, "transactions": { "__typename": "BlockTransactionsConnection" } } ] }