Skip to content
Overview
Overview

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

chainIds
[String!],non-null

(Optional) A list of chain IDs to subscribe to. If omitted, the subscription includes new blocks from all chains.

quantity
Default:20

The number of most recent blocks to include in the initial payload when the subscription starts.

Return type

[Block!]
id
ID!,non-null

Globally unique identifier for this block node.

hash
String!,non-null

The cryptographic hash of the block. This serves as its unique identifier within the blockchain.

chainId
BigInt!,non-null

The specific chain where this block was mined. Kadena is a multi-chain system, and each block belongs to exactly one chain.

creationTime
DateTime!,non-null

The timestamp when this block was created and added to the chain.

difficulty
BigInt!,non-null

The network difficulty at the time the block was mined. Higher difficulty reflects the amount of computational work required to produce a valid block.

epoch
DateTime!,non-null

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.

flags
Decimal!,non-null

Consensus flags used internally by the protocol.

height
BigInt!,non-null

The height (block number) of this block within its chain. The genesis block is height 0, and each subsequent block increments by 1.

nonce
Decimal!,non-null

A nonce value used in the proof-of-work process. Miners vary this value to discover a hash below the target threshold.

payloadHash
String!,non-null

The hash of the payload data contained within the block. This ensures the integrity of the transactions and other included data.

weight
String!,non-null

The cumulative weight of the chain up to and including this block. Weight increases with each mined block and helps determine the canonical chain.

target
String!,non-null

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.

coinbase
String!,non-null

The coinbase transaction data. This transaction rewards the miner and may include information about block rewards or other protocol-defined payouts.

neighbors

The neighboring blocks that reference this block as a parent. These neighbors are essential in Kadena’s braided multi-chain architecture.

powHash
String!,non-null

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.

canonical
Boolean!,non-null

Indicates whether this block is part of the canonical chain. Non-canonical blocks may occur during temporary forks or reorganizations.

parent

The parent block directly preceding this one in the chain. Together with the hash, this forms the cryptographic link that secures the chain.

totalGasUsedInKda
Decimal!,non-null

The total amount of gas used by all transactions in this block, expressed in KDA.

events

Paginated list of events emitted by transactions within this block.

afterbeforefirstlast
minerAccount

The account that mined this block and received the coinbase reward.

transactions

Paginated list of transactions included in this block.

afterbeforefirstlast
Subscription sample
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
    }
  }
}
Variables
{ "chainIds": [ "Example String" ], "quantity": 40 }
Response sample
{ "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

chainId

(Optional) The chain ID where the transaction is expected to occur. If omitted, all chains are searched.

requestKey
String!,non-nullrequired

The request key of the transaction to listen for. The subscription emits an event once this transaction is confirmed and indexed.

Return type

Transaction
id
ID!,non-null

Globally unique identifier for this transaction node.

The original signed transaction command submitted to the network. Includes metadata, payload, signers, and network information.

hash
String!,non-null

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.

result

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 sample
subscription transaction($chainId: String, $requestKey: String!) {
  transaction(chainId: $chainId, requestKey: $requestKey) {
    id 
    cmd {
      __typename
      # ...TransactionCommandFragment
    }
    hash 
    result {
      __typename
      # ...TransactionMempoolInfoFragment
    }
    sigs {
      __typename
      # ...TransactionSignatureFragment
    }
  }
}
Variables
{ "chainId": "Example String", "requestKey": "Example String" }
Response sample
{ "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

quantity
Default:20

The number of most recent confirmed transactions to include in the initial payload when the subscription starts. Defaults to 20.

Return type

[Transaction!]
id
ID!,non-null

Globally unique identifier for this transaction node.

The original signed transaction command submitted to the network. Includes metadata, payload, signers, and network information.

hash
String!,non-null

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.

result

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 sample
subscription transactions($quantity: Int) {
  transactions(quantity: $quantity) {
    id 
    cmd {
      __typename
      # ...TransactionCommandFragment
    }
    hash 
    result {
      __typename
      # ...TransactionMempoolInfoFragment
    }
    sigs {
      __typename
      # ...TransactionSignatureFragment
    }
  }
}
Variables
{ "quantity": 40 }
Response sample
{ "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

chainId

(Optional) Restrict the subscription to a specific chain. If omitted, events from all chains are included.

minimumDepth

(Optional) Minimum number of confirmations a block must have before its events are emitted.

parametersFilter

(Optional) A stringified JSON object used to filter event parameters. Must follow Prisma’s JSON property filter syntax. Example: "{"array_starts_with": "k:abcdefg"}"

qualifiedEventName
String!,non-nullrequired

The fully qualified event name to subscribe to. Example: "coin.TRANSFER".

quantity
Default:20

Number of most recent matching events to include in the initial payload. Defaults to 20.

Return type

[Event!]
id
ID!,non-null

Globally unique identifier for this event.

name
String!,non-null

The name of the event as defined in the smart contract. Example: "TRANSFER".

block
Block!,non-null

The block in which this event was emitted.

chainId
BigInt!,non-null

The ID of the chain where the event occurred.

height
BigInt!,non-null

The height of the block in which this event was emitted.

moduleName
String!,non-null

The name of the module that emitted the event. Example: "coin".

orderIndex
BigInt!,non-null

The index position of this event within the transaction’s event list. Useful when multiple events are emitted by the same transaction.

requestKey
String!,non-null

The request key of the transaction that emitted this event.

parameters

The raw JSON-encoded event parameters as emitted by the contract.

parameterText
String!,non-null

A human-readable text representation of the event parameters.

qualifiedName
String!,non-null

The fully qualified event name, combining the module and event name. Example: "coin.TRANSFER".

transaction

The transaction that emitted this event.

Subscription sample
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
    }
  }
}
Variables
{ "chainId": "Example String", "minimumDepth": 40, "parametersFilter": "Example String", "qualifiedEventName": "Example String", "quantity": 40 }
Response sample
{ "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

chainIds
[String!],non-null

(Optional) A list of chain IDs to subscribe to. If omitted, blocks from all chains are included.

minimumDepth
Int!,non-nullrequired

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.

quantity
Default:20

The number of most recent eligible blocks to include in the initial payload when the subscription starts.

Return type

[Block!]
id
ID!,non-null

Globally unique identifier for this block node.

hash
String!,non-null

The cryptographic hash of the block. This serves as its unique identifier within the blockchain.

chainId
BigInt!,non-null

The specific chain where this block was mined. Kadena is a multi-chain system, and each block belongs to exactly one chain.

creationTime
DateTime!,non-null

The timestamp when this block was created and added to the chain.

difficulty
BigInt!,non-null

The network difficulty at the time the block was mined. Higher difficulty reflects the amount of computational work required to produce a valid block.

epoch
DateTime!,non-null

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.

flags
Decimal!,non-null

Consensus flags used internally by the protocol.

height
BigInt!,non-null

The height (block number) of this block within its chain. The genesis block is height 0, and each subsequent block increments by 1.

nonce
Decimal!,non-null

A nonce value used in the proof-of-work process. Miners vary this value to discover a hash below the target threshold.

payloadHash
String!,non-null

The hash of the payload data contained within the block. This ensures the integrity of the transactions and other included data.

weight
String!,non-null

The cumulative weight of the chain up to and including this block. Weight increases with each mined block and helps determine the canonical chain.

target
String!,non-null

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.

coinbase
String!,non-null

The coinbase transaction data. This transaction rewards the miner and may include information about block rewards or other protocol-defined payouts.

neighbors

The neighboring blocks that reference this block as a parent. These neighbors are essential in Kadena’s braided multi-chain architecture.

powHash
String!,non-null

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.

canonical
Boolean!,non-null

Indicates whether this block is part of the canonical chain. Non-canonical blocks may occur during temporary forks or reorganizations.

parent

The parent block directly preceding this one in the chain. Together with the hash, this forms the cryptographic link that secures the chain.

totalGasUsedInKda
Decimal!,non-null

The total amount of gas used by all transactions in this block, expressed in KDA.

events

Paginated list of events emitted by transactions within this block.

afterbeforefirstlast
minerAccount

The account that mined this block and received the coinbase reward.

transactions

Paginated list of transactions included in this block.

afterbeforefirstlast
Subscription sample
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
    }
  }
}
Variables
{ "chainIds": [ "Example String" ], "minimumDepth": 40, "quantity": 40 }
Response sample
{ "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" } } ] }
Overview
Overview
Overview
Overview
Overview
Overview