- fungibleChainAccounts
Retrieve a list of completed block heights across one or more chains, starting from a given point.
In Kadena’s braided multi-chain architecture, a block height is considered completed only when all chains have successfully produced a block at that height. Since each chain progresses independently, some chains may temporarily lag behind others. This query ensures that only globally finalized heights — where every specified chain has reached that block height — are returned.
This is particularly useful for building indexers, explorers, and analytics tools that require consistent cross-chain data.
You can specify how many completed heights to return with heightCount
.
Arguments
The chain IDs to include when checking for completed heights. Only heights where all of these chains have produced a block will be returned.
Whether to include only completed heights.
Defaults to true
.
If set to false
, the query may include heights that are not yet completed across all chains.
The maximum number of sequential completed heights to return per query. Results are always returned without gaps, starting from the most recent completed height and moving backward if no pagination arguments are provided.
Examples:
- If completed heights are
101
,102
,103
,104
, and105
, and you setheightCount: 3
without pagination, the query returns the 3 most recent completed heights:105
,104
,103
. - If you set
heightCount: 10
in the same scenario, the query still returns only the 5 available heights:105
,104
,103
,102
,101
.
Cursor to start paginating after a specific result. Used for forward pagination.
Cursor to start paginating before a specific result. Used for backward pagination.
Maximum number of results to return when paginating forward.
Maximum number of results to return when paginating backward.
Return type
Queryquery completedBlockHeights(
$chainIds: [String!]
$completedHeights: Boolean
$heightCount: Int
$after: String
$before: String
$first: Int
$last: Int
) {
completedBlockHeights(
chainIds: $chainIds
completedHeights: $completedHeights
heightCount: $heightCount
after: $after
before: $before
first: $first
last: $last
) {
edges {
cursor
node {
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
}
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
{ "chainIds": [ "Example String" ], "completedHeights": true, "heightCount": 40, "after": "Example String", "before": "Example String", "first": 40, "last": 40 }
{ "data": { "edges": [ { "cursor": "Example String", "node": { "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" } } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true } } }
Retrieve blockchain events with powerful filtering options.
In Kadena, events are emitted by smart contracts when specific actions occur (e.g., coin.TRANSFER
).
You can filter by event name, module, chain, block, transaction, height range, or minimum depth,
and even by JSON parameters using Prisma-compatible JSON object property filters (stringified).
Arguments
Fully qualified event name (e.g., coin.TRANSFER
) to select a specific event type.
The module that emitted the event (e.g., coin
).
Hash of the block that contains the event.
Transaction request key (hash) associated with the event.
Chain ID where the event occurred.
Inclusive upper bound for block height.
Inclusive lower bound for block height.
Minimum depth of the block that emitted the event (distance from the chain tip). Use this to return only more-final and stable events.
Event position within the transaction’s execution order.
JSON-stringified Prisma JSON object property filter applied to event parameters.
Example (JSON-escaped): parametersFilter: "{"array_starts_with":"k:abcdefg"}"
Cursor to start paginating after a specific result (forward pagination).
Cursor to start paginating before a specific result (backward pagination).
Maximum number of records to return when paginating forward.
Maximum number of records to return when paginating backward.
Return type
Queryquery events(
$qualifiedEventName: String
$moduleName: String
$blockHash: String
$requestKey: String
$chainId: String
$maxHeight: Int
$minHeight: Int
$minimumDepth: Int
$orderIndex: Int
$parametersFilter: String
$after: String
$before: String
$first: Int
$last: Int
) {
events(
qualifiedEventName: $qualifiedEventName
moduleName: $moduleName
blockHash: $blockHash
requestKey: $requestKey
chainId: $chainId
maxHeight: $maxHeight
minHeight: $minHeight
minimumDepth: $minimumDepth
orderIndex: $orderIndex
parametersFilter: $parametersFilter
after: $after
before: $before
first: $first
last: $last
) {
edges {
cursor
node {
id
name
block {
__typename
# ...BlockFragment
}
chainId
height
moduleName
orderIndex
requestKey
parameters
parameterText
qualifiedName
transaction {
__typename
# ...TransactionFragment
}
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
{ "qualifiedEventName": "Example String", "moduleName": "Example String", "blockHash": "Example String", "requestKey": "Example String", "chainId": "Example String", "maxHeight": 40, "minHeight": 40, "minimumDepth": 40, "orderIndex": 40, "parametersFilter": "Example String", "after": "Example String", "before": "Example String", "first": 40, "last": 40 }
{ "data": { "edges": [ { "cursor": "Example String", "node": { "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" } } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true }, "totalCount": 40 } }
Retrieve details of a specific fungible account (such as a KDA coin account) by its name and fungible type.
In Kadena, a fungible account represents a balance-holding entity for a given fungible token module (e.g., coin
, which isthe native KDA token).
This query lets you look up that account’s information by providing its full accountName
and the name of the fungible module.
It is commonly used to fetch the balance and metadata for a user or contract address.
Arguments
The full name of the account to retrieve.
Example: "k:abcdef123456..."
for a user account or "free.my-contract"
for a contract account.
The name of the fungible token module (e.g., coin
) associated with the account.
Return type
FungibleGlobally unique identifier for this fungible account node.
The full name of the account (e.g., k:abcdef123456...
for a user account or free.my-contract
for a contract account).
Per-chain breakdown of this fungible account. Since Kadena operates multiple braided chains, an account can have different balances on each chain.
The name of the fungible token module associated with this account (e.g., coin
).
The total balance of this account across all chains for the specified fungible token.
Paginated list of transactions involving this account. Transactions represent operations such as transfers, contract calls, or other state changes that affect this account.
Paginated list of transfers associated with this account. Transfers represent direct movements of the fungible token into or out of this account.
query fungibleAccount($accountName: String!, $fungibleName: String) {
fungibleAccount(accountName: $accountName, fungibleName: $fungibleName) {
id
accountName
chainAccounts {
__typename
# ...FungibleChainAccountFragment
}
fungibleName
totalBalance
transactions(
# Arguments Here
) {
__typename
# ...FungibleAccountTransactionsConnectionFragment
}
transfers(
# Arguments Here
) {
__typename
# ...FungibleAccountTransfersConnectionFragment
}
}
}
{ "accountName": "Example String", "fungibleName": "Example String" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "accountName": "Example String", "chainAccounts": [ { "__typename": "FungibleChainAccount" } ], "fungibleName": "Example String", "totalBalance": "Example Custom Scalar", "transactions": { "__typename": "FungibleAccountTransactionsConnection" }, "transfers": { "__typename": "FungibleAccountTransfersConnection" } } }
Retrieve all fungible accounts associated with a given public key.
In Kadena, a single public key can control multiple accounts — for example, one on each chain, or accounts tied to
different contracts or modules. This query returns all FungibleAccount
objects linked to the provided public key
for a specified fungible token (default: coin
).
This is particularly useful when you want to discover all accounts controlled by a user key across the Kadena network, including balances and activity for each.
Arguments
The name of the fungible token module to filter by (e.g., coin
for the native KDA token).
Defaults to "coin"
if not specified.
The public key used to control the account(s).
Example: "abcdef1234567890..."
.
Return type
[FungibleGlobally unique identifier for this fungible account node.
The full name of the account (e.g., k:abcdef123456...
for a user account or free.my-contract
for a contract account).
Per-chain breakdown of this fungible account. Since Kadena operates multiple braided chains, an account can have different balances on each chain.
The name of the fungible token module associated with this account (e.g., coin
).
The total balance of this account across all chains for the specified fungible token.
Paginated list of transactions involving this account. Transactions represent operations such as transfers, contract calls, or other state changes that affect this account.
Paginated list of transfers associated with this account. Transfers represent direct movements of the fungible token into or out of this account.
query fungibleAccountsByPublicKey($fungibleName: String, $publicKey: String!) {
fungibleAccountsByPublicKey(fungibleName: $fungibleName, publicKey: $publicKey) {
id
accountName
chainAccounts {
__typename
# ...FungibleChainAccountFragment
}
fungibleName
totalBalance
transactions(
# Arguments Here
) {
__typename
# ...FungibleAccountTransactionsConnectionFragment
}
transfers(
# Arguments Here
) {
__typename
# ...FungibleAccountTransfersConnectionFragment
}
}
}
{ "fungibleName": "Example String", "publicKey": "Example String" }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "accountName": "Example String", "chainAccounts": [ { "__typename": "FungibleChainAccount" } ], "fungibleName": "Example String", "totalBalance": "Example Custom Scalar", "transactions": { "__typename": "FungibleAccountTransactionsConnection" }, "transfers": { "__typename": "FungibleAccountTransfersConnection" } } ] }
Retrieve details of a specific fungible account on a specific chain.
In Kadena’s multi-chain architecture, an account can exist on multiple chains simultaneously, each maintaining
its own balance and transaction history. This query lets you retrieve the state of a single FungibleChainAccount
by specifying the account name, the chain ID, and the fungible token module (default: coin
).
It’s particularly useful when you need precise, chain-level information — such as a user’s balance or transfer activity — without aggregating data across all chains.
Arguments
The full name of the account to retrieve.
Example: "k:abcdef123456..."
for a user account or "free.my-contract"
for a contract account.
The chain ID where the account exists. Kadena runs multiple braided chains, and balances are tracked separately on each.
The name of the fungible token module (e.g., coin
) associated with the account.
Defaults to "coin"
if not specified.
Return type
FungibleGlobally unique identifier for this chain account node.
The full name of the account (e.g., k:abcdef123456...
for a user account or free.my-contract
for a contract account).
The current balance of this account on the specified chain for the given fungible token.
The chain ID where this account exists.
The name of the fungible token module associated with this account (e.g., coin
).
The guard that defines the account’s security conditions. A guard determines who must sign transactions in order to spend from this account.
Paginated list of transactions involving this account on this chain. Transactions represent operations such as transfers, contract calls, or other state changes.
Paginated list of token transfers into or out of this account on this chain. Transfers are a subset of events focused specifically on balance movements.
query fungibleChainAccount(
$accountName: String!
$chainId: String!
$fungibleName: String
) {
fungibleChainAccount(
accountName: $accountName
chainId: $chainId
fungibleName: $fungibleName
) {
id
accountName
balance
chainId
fungibleName
guard {
__typename
# ...IGuardFragment
}
transactions(
# Arguments Here
) {
__typename
# ...FungibleChainAccountTransactionsConnectionFragment
}
transfers(
# Arguments Here
) {
__typename
# ...FungibleChainAccountTransfersConnectionFragment
}
}
}
{ "accountName": "Example String", "chainId": "Example String", "fungibleName": "Example String" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "accountName": "Example String", "balance": 40, "chainId": "Example String", "fungibleName": "Example String", "guard": { "__typename": "IGuard" }, "transactions": { "__typename": "FungibleChainAccountTransactionsConnection" }, "transfers": { "__typename": "FungibleChainAccountTransfersConnection" } } }
Retrieve fungible account details across multiple chains.
In Kadena’s multi-chain architecture, an account can exist on several chains simultaneously — each maintaining its own
balance, guard, and activity history. This query allows you to retrieve all FungibleChainAccount
objects for a given
account name and fungible token (default: coin
) across one or more specified chains in a single request.
It’s especially useful when you want a comprehensive view of how an account is distributed across multiple chains, including balances and per-chain transaction or transfer histories.
Arguments
The full name of the account to retrieve.
Example: "k:abcdef123456..."
for a user account or "free.my-contract"
for a contract account.
The list of chain IDs where the account exists.
You can specify one or more chains to retrieve FungibleChainAccount
details for each.
The name of the fungible token module associated with the account (e.g., coin
).
Defaults to "coin"
if not specified.
Return type
[FungibleGlobally unique identifier for this chain account node.
The full name of the account (e.g., k:abcdef123456...
for a user account or free.my-contract
for a contract account).
The current balance of this account on the specified chain for the given fungible token.
The chain ID where this account exists.
The name of the fungible token module associated with this account (e.g., coin
).
The guard that defines the account’s security conditions. A guard determines who must sign transactions in order to spend from this account.
Paginated list of transactions involving this account on this chain. Transactions represent operations such as transfers, contract calls, or other state changes.
Paginated list of token transfers into or out of this account on this chain. Transfers are a subset of events focused specifically on balance movements.
query fungibleChainAccounts(
$accountName: String!
$chainIds: [String!]
$fungibleName: String
) {
fungibleChainAccounts(
accountName: $accountName
chainIds: $chainIds
fungibleName: $fungibleName
) {
id
accountName
balance
chainId
fungibleName
guard {
__typename
# ...IGuardFragment
}
transactions(
# Arguments Here
) {
__typename
# ...FungibleChainAccountTransactionsConnectionFragment
}
transfers(
# Arguments Here
) {
__typename
# ...FungibleChainAccountTransfersConnectionFragment
}
}
}
{ "accountName": "Example String", "chainIds": [ "Example String" ], "fungibleName": "Example String" }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "accountName": "Example String", "balance": 40, "chainId": "Example String", "fungibleName": "Example String", "guard": { "__typename": "IGuard" }, "transactions": { "__typename": "FungibleChainAccountTransactionsConnection" }, "transfers": { "__typename": "FungibleChainAccountTransfersConnection" } } ] }
Retrieve all fungible chain accounts associated with a given public key on a specific chain.
In Kadena, a single public key can control multiple accounts on the same chain — for example,
accounts created by different contracts or modules. This query returns all FungibleChainAccount
objects linked to the provided public key for a specified fungible token (default: coin
) on the given chain.
It’s especially useful when you want to discover all accounts controlled by a user key on a particular chain, including their balances, guards, and per-chain transaction history.
Arguments
The ID of the chain to search on. Kadena runs multiple braided chains — specify the one where the accounts exist.
The name of the fungible token module to filter by (e.g., coin
for the native KDA token).
Defaults to "coin"
if not specified.
The public key used to control the account(s).
Example: "abcdef1234567890..."
.
Return type
[FungibleGlobally unique identifier for this chain account node.
The full name of the account (e.g., k:abcdef123456...
for a user account or free.my-contract
for a contract account).
The current balance of this account on the specified chain for the given fungible token.
The chain ID where this account exists.
The name of the fungible token module associated with this account (e.g., coin
).
The guard that defines the account’s security conditions. A guard determines who must sign transactions in order to spend from this account.
Paginated list of transactions involving this account on this chain. Transactions represent operations such as transfers, contract calls, or other state changes.
Paginated list of token transfers into or out of this account on this chain. Transfers are a subset of events focused specifically on balance movements.
query fungibleChainAccountsByPublicKey(
$chainId: String!
$fungibleName: String
$publicKey: String!
) {
fungibleChainAccountsByPublicKey(
chainId: $chainId
fungibleName: $fungibleName
publicKey: $publicKey
) {
id
accountName
balance
chainId
fungibleName
guard {
__typename
# ...IGuardFragment
}
transactions(
# Arguments Here
) {
__typename
# ...FungibleChainAccountTransactionsConnectionFragment
}
transfers(
# Arguments Here
) {
__typename
# ...FungibleChainAccountTransfersConnectionFragment
}
}
}
{ "chainId": "Example String", "fungibleName": "Example String", "publicKey": "Example String" }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "accountName": "Example String", "balance": 40, "chainId": "Example String", "fungibleName": "Example String", "guard": { "__typename": "IGuard" }, "transactions": { "__typename": "FungibleChainAccountTransactionsConnection" }, "transfers": { "__typename": "FungibleChainAccountTransfersConnection" } } ] }
Estimate the gas limit required to execute one or more transactions on the Kadena blockchain.
This query accepts one or more JSON-encoded transaction inputs and analyzes them to calculate the expected gas usage. It automatically infers the transaction type based on the fields provided and returns the estimated gas limit for each input. If any transaction is invalid or cannot be parsed, the query will throw an error.
Supported input types and required fields:
full-transaction
: A fully signed transaction object. Required:cmd
,hash
,sigs
stringified-command
: A JSON-stringified command. Required:cmd
(optional:sigs
)full-command
: A complete command object. Required:payload
,meta
,signers
partial-command
: A partially defined command. Required:payload
and eithermeta
orsigners
(optional:chainId
ifsigners
is provided withoutmeta
)payload
: Only the payload of a command. Required:payload
,chainId
code
: Pact execution code. Required:code
,chainId
All input types optionally accept networkId
to override the default network configured in the environment.
query {
gasLimitEstimate(
input: [
"{
\"code\": \"(coin.details \\\"k:1234\\\")\",
\"chainId\": \"3\"
}"
]
) {
amount
inputType
}
}
Arguments
One or more JSON-encoded transaction inputs to estimate gas for. Each entry must follow one of the supported input type structures listed above.
Return type
[GasThe estimated gas limit required to execute the transaction.
The detected input type (e.g., code
, payload
, full-transaction
, etc.).
The normalized JSON representation of the transaction used for estimation.
Whether a pre-execution (preflight) simulation was used during estimation.
Whether signature verification was performed as part of the estimation.
query gasLimitEstimate($input: [String!]!) {
gasLimitEstimate(input: $input) {
amount
inputType
transaction
usedPreflight
usedSignatureVerification
}
}
{ "input": [ "Example String" ] }
{ "data": [ { "amount": 40, "inputType": "Example String", "transaction": "Example String", "usedPreflight": true, "usedSignatureVerification": true } ] }
Retrieve general information about this GraphQL API endpoint. It is commonly used to check how far back the indexer’s data goes and to verify the API version your application is interacting with.
Return type
Graphquery graphConfiguration {
graphConfiguration {
minimumBlockHeight
version
}
}
{ "data": { "minimumBlockHeight": "Example Custom Scalar", "version": "Example String" } }
Get the height of the block with the highest height.
Return type
BigThe BigInt
scalar type represents non-fractional signed whole numeric values.
query lastBlockHeight {
lastBlockHeight
}
{ "data": "Example Custom Scalar" }
Retrieve comprehensive information about the Kadena network.
This query returns a NetworkInfo
object containing key metrics and configuration details
about the current state of the network.
Developers typically use this query to monitor network health, verify node synchronization, analyze performance metrics, or display high-level blockchain data in explorers and dashboards.
Return type
NetworkThe version of this GraphQL API. Useful to verify compatibility between the client and API.
The current total number of coins in circulation on the network.
The current aggregate hash rate of the Kadena network. Indicates the total mining power securing the network.
The host address or domain of the network node serving this API.
The unique identifier of the network (e.g., mainnet01
, testnet04
).
The cumulative difficulty of all blocks mined so far. A higher value reflects the total work securing the chain.
The total number of transactions that have been processed across the network.
The current delay (in blocks) between the latest mined block and the block processed by the node. Useful for monitoring node synchronization status.
The list of chain IDs that make up the Kadena network. Kadena operates multiple braided chains in parallel.
The total number of chains in the network.
The genesis block height for each chain in the network. Provides insight into the starting point of each chain’s history.
The version of the node software package running this endpoint.
The service start date and time of the current node. Useful for tracking uptime and deployment history.
The latest block height known by the node’s behavior monitor. Can be used to assess node synchronization and chain progress.
Transaction counters and statistics broken down by chain. Useful for analyzing per-chain activity levels and throughput.
query networkInfo {
networkInfo {
apiVersion
coinsInCirculation
networkHashRate
networkHost
networkId
totalDifficulty
transactionCount
nodeBlockDelay
nodeChains
numberOfChains
genesisHeights {
__typename
# ...GenesisHeightFragment
}
nodePackageVersion
nodeServiceDate
nodeLatestBehaviorHeight
countersOfEachChain {
__typename
# ...CountersOfEachChainFragment
}
}
}
{ "data": { "apiVersion": "Example String", "coinsInCirculation": 40, "networkHashRate": 40, "networkHost": "Example String", "networkId": "Example String", "totalDifficulty": 40, "transactionCount": 40, "nodeBlockDelay": 40, "nodeChains": [ "Example String" ], "numberOfChains": 40, "genesisHeights": [ { "__typename": "GenesisHeight" } ], "nodePackageVersion": "Example String", "nodeServiceDate": "Example Custom Scalar", "nodeLatestBehaviorHeight": 40, "countersOfEachChain": [ { "__typename": "CountersOfEachChain" } ] } }