## balance **Type:** GraphQL queries **Description:** Returns the balances for a given account, chain, and module combination. This query calculates and returns the user's balance for each specified combination of **account**, **chain ID**, and **module**. For example, it can return how much balance the account `k:9492...5c17` holds on **chain 1** within the **coin** module. ### Arguments - accountName (String): The full account name to retrieve balances for. - chainIds (String): A list of chain IDs to include in the balance retrieval. Example: `["0", "1"]` - module (String): The name of the module that issued the token. Example: `"coin"` - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of balance records to return when paginating forward. - last (Int): Maximum number of balance records to return when paginating backward. ### Response **Type:** QueryBalanceConnection **Description:** Connection type for balance query results. #### Fields - edges (QueryBalanceConnectionEdge) - pageInfo (PageInfo) --- ## block **Type:** GraphQL queries **Description:** Retrieve detailed information about a specific block using its unique hash. Every block in the Kadena blockchain is identified by a cryptographic hash — a unique fingerprint generated from its contents. This query allows you to look up a block directly by that hash, returning all available details about it, such as its height, creation time, transactions, miner, and more. This is especially useful when you already know the block’s hash (for example, from a transaction receipt or an event log) and want to quickly inspect or verify that block’s contents without scanning the entire chain. ### Arguments - hash (String): The unique cryptographic hash (identifier) of the block to retrieve. ### Response **Type:** Block **Description:** A **Block** is the fundamental unit of the Kadena blockchain. Each block bundles a verified set of transactions and metadata that secure and extend the chain. Blocks are linked together cryptographically — each one referencing its parent — forming the immutable and tamper-evident chain structure. This type exposes all the core properties of a block, including consensus data (like difficulty, nonce, and proof of work), network metadata (like chain ID and epoch), and relations to transactions, events, and neighboring blocks. #### Fields - id (ID): Globally unique identifier for this block node. - hash (String): The cryptographic hash of the block. This serves as its unique identifier within the blockchain. - chainId (BigInt): The specific chain where this block was mined. Kadena is a multi-chain system, and each block belongs to exactly one chain. - creationTime (DateTime): The timestamp when this block was created and added to the chain. - difficulty (BigInt): 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): 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): Consensus flags used internally by the protocol. - height (BigInt): 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): A nonce value used in the proof-of-work process. Miners vary this value to discover a hash below the target threshold. - payloadHash (String): The hash of the payload data contained within the block. This ensures the integrity of the transactions and other included data. - weight (String): 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): 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): The coinbase transaction data. This transaction rewards the miner and may include information about block rewards or other protocol-defined payouts. - neighbors (BlockNeighbor): The neighboring blocks that reference this block as a parent. These neighbors are essential in Kadena’s braided multi-chain architecture. - powHash (String): 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): Indicates whether this block is part of the canonical chain. Non-canonical blocks may occur during temporary forks or reorganizations. - parent (Block): 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): The total amount of gas used by all transactions in this block, expressed in KDA. - events (BlockEventsConnection): Paginated list of events emitted by transactions within this block. - minerAccount (FungibleChainAccount): The account that mined this block and received the coinbase reward. - transactions (BlockTransactionsConnection): Paginated list of transactions included in this block. --- ## blocksFromDepth **Type:** GraphQL queries **Description:** Retrieves blocks based on their **depth** in the Kadena blockchain. In Kadena, each new block extends the chain by one unit, and the term **depth** refers to how far a block is from the current chain tip (the most recent block). - A block with a depth of `0` is the latest block (the chain head). - A block with a depth of `1` is one block behind the tip, and so on. Because new blocks can occasionally be reorganized near the tip, specifying a **minimumDepth** helps ensure that only blocks that are deep enough — and therefore finalized and stable — are returned. For example, a `minimumDepth` of `20` means only blocks that are at least 20 blocks behind the current tip will be included in the results, reducing the chance of including blocks that might later be replaced due to a chain reorganization. Use this query to fetch finalized blocks across one or more chains. ### Arguments - chainIds (String): The chain IDs to retrieve blocks from. - minimumDepth (Int): The minimum depth of the blocks to retrieve. Blocks closer to the tip than this depth will be excluded. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of balance records to return when paginating forward. - last (Int): Maximum number of balance records to return when paginating backward. ### Response **Type:** QueryBlocksFromDepthConnection **Description:** undefined #### Fields - edges (QueryBlocksFromDepthConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## blocksFromHeight **Type:** GraphQL queries **Description:** Retrieve blocks from one or more chains based on their block height range. In Kadena, **height** represents a block’s sequential position within its chain, starting at 0 for the genesis block and increasing by 1 for each new block. This query lets you fetch blocks by specifying a starting height (`startHeight`) and, optionally, an ending height (`endHeight`). It is particularly useful when you want to retrieve a continuous range of blocks — for example, when backfilling data, syncing from a specific point in the chain, or analyzing block activity over a known range. If `endHeight` is omitted, the query returns all blocks from the starting height up to the current chain tip. ### Arguments - chainIds (String): The chain IDs to retrieve blocks from. Kadena runs multiple braided chains in parallel — specify one or more chain IDs here. - endHeight (Int): The inclusive upper bound of the height range. If omitted, results will include all blocks from `startHeight` to the current tip. - startHeight (Int): The inclusive lower bound of the height range. Blocks with a height below this value will be excluded. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of records to return when paginating forward. - last (Int): Maximum number of records to return when paginating backward. ### Response **Type:** QueryBlocksFromHeightConnection **Description:** undefined #### Fields - edges (QueryBlocksFromHeightConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## completedBlockHeights **Type:** GraphQL queries **Description:** 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 - chainIds (String): The chain IDs to include when checking for completed heights. Only heights where all of these chains have produced a block will be returned. - completedHeights (Boolean): 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. - heightCount (Int): 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`, and `105`, and you set `heightCount: 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`. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of results to return when paginating forward. - last (Int): Maximum number of results to return when paginating backward. ### Response **Type:** QueryCompletedBlockHeightsConnection **Description:** undefined #### Fields - edges (QueryCompletedBlockHeightsConnectionEdge) - pageInfo (PageInfo) --- ## events **Type:** GraphQL queries **Description:** 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 - qualifiedEventName (String): Fully qualified event name (e.g., `coin.TRANSFER`) to select a specific event type. - moduleName (String): The module that emitted the event (e.g., `coin`). - blockHash (String): Hash of the block that contains the event. - requestKey (String): Transaction request key (hash) associated with the event. - chainId (String): Chain ID where the event occurred. - maxHeight (Int): Inclusive upper bound for block height. - minHeight (Int): Inclusive lower bound for block height. - minimumDepth (Int): Minimum depth of the block that emitted the event (distance from the chain tip). Use this to return only more-final and stable events. - orderIndex (Int): Event position within the transaction’s execution order. - parametersFilter (String): JSON-stringified Prisma JSON object property filter applied to event parameters. Example (JSON-escaped): parametersFilter: "{\"array_starts_with\":\"k:abcdefg\"}" - after (String): Cursor to start paginating **after** a specific result (forward pagination). - before (String): Cursor to start paginating **before** a specific result (backward pagination). - first (Int): Maximum number of records to return when paginating forward. - last (Int): Maximum number of records to return when paginating backward. ### Response **Type:** QueryEventsConnection **Description:** undefined #### Fields - edges (QueryEventsConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## fungibleAccount **Type:** GraphQL queries **Description:** 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 - accountName (String): The full name of the account to retrieve. Example: `"k:abcdef123456..."` for a user account or `"free.my-contract"` for a contract account. - fungibleName (String): The name of the fungible token module (e.g., `coin`) associated with the account. ### Response **Type:** FungibleAccount **Description:** Represents an account associated with a specific fungible token on the Kadena blockchain. A `FungibleAccount` tracks the balance and activity of a single account (such as a user key account or contract) for a given fungible token module (for example, `coin` for KDA). Because Kadena is a multi-chain network, a fungible account may have balances distributed across multiple chains. This type exposes both the aggregated balance and per-chain details, along with historical transactions and transfers. #### Fields - id (ID): Globally unique identifier for this fungible account node. - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - chainAccounts (FungibleChainAccount): Per-chain breakdown of this fungible account. Since Kadena operates multiple braided chains, an account can have different balances on each chain. - fungibleName (String): The name of the fungible token module associated with this account (e.g., `coin`). - totalBalance (Decimal): The total balance of this account across all chains for the specified fungible token. - transactions (FungibleAccountTransactionsConnection): Paginated list of transactions involving this account. Transactions represent operations such as transfers, contract calls, or other state changes that affect this account. - transfers (FungibleAccountTransfersConnection): Paginated list of transfers associated with this account. Transfers represent direct movements of the fungible token into or out of this account. --- ## fungibleAccountsByPublicKey **Type:** GraphQL queries **Description:** 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 - fungibleName (String): The name of the fungible token module to filter by (e.g., `coin` for the native KDA token). Defaults to `"coin"` if not specified. - publicKey (String): The public key used to control the account(s). Example: `"abcdef1234567890..."`. ### Response **Type:** FungibleAccount **Description:** Represents an account associated with a specific fungible token on the Kadena blockchain. A `FungibleAccount` tracks the balance and activity of a single account (such as a user key account or contract) for a given fungible token module (for example, `coin` for KDA). Because Kadena is a multi-chain network, a fungible account may have balances distributed across multiple chains. This type exposes both the aggregated balance and per-chain details, along with historical transactions and transfers. #### Fields - id (ID): Globally unique identifier for this fungible account node. - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - chainAccounts (FungibleChainAccount): Per-chain breakdown of this fungible account. Since Kadena operates multiple braided chains, an account can have different balances on each chain. - fungibleName (String): The name of the fungible token module associated with this account (e.g., `coin`). - totalBalance (Decimal): The total balance of this account across all chains for the specified fungible token. - transactions (FungibleAccountTransactionsConnection): Paginated list of transactions involving this account. Transactions represent operations such as transfers, contract calls, or other state changes that affect this account. - transfers (FungibleAccountTransfersConnection): Paginated list of transfers associated with this account. Transfers represent direct movements of the fungible token into or out of this account. --- ## fungibleChainAccount **Type:** GraphQL queries **Description:** 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 - accountName (String): The full name of the account to retrieve. Example: `"k:abcdef123456..."` for a user account or `"free.my-contract"` for a contract account. - chainId (String): The chain ID where the account exists. Kadena runs multiple braided chains, and balances are tracked separately on each. - fungibleName (String): The name of the fungible token module (e.g., `coin`) associated with the account. Defaults to `"coin"` if not specified. ### Response **Type:** FungibleChainAccount **Description:** Represents a fungible account **on a specific chain** in the Kadena blockchain. While a `FungibleAccount` aggregates balances and activity across all chains, a `FungibleChainAccount` focuses on a single chain. It exposes the account’s balance, security guard, and full transaction and transfer history specific to that chain and fungible token (e.g., `coin` for KDA). This type is useful when you need fine-grained, chain-level data — such as for explorers, wallets, or analytics tools that track balances and movements per chain. #### Fields - id (ID): Globally unique identifier for this chain account node. - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - balance (Float): The current balance of this account on the specified chain for the given fungible token. - chainId (String): The chain ID where this account exists. - fungibleName (String): The name of the fungible token module associated with this account (e.g., `coin`). - guard (IGuard): The guard that defines the account’s security conditions. A guard determines who must sign transactions in order to spend from this account. - transactions (FungibleChainAccountTransactionsConnection): Paginated list of transactions involving this account on this chain. Transactions represent operations such as transfers, contract calls, or other state changes. - transfers (FungibleChainAccountTransfersConnection): 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. --- ## fungibleChainAccounts **Type:** GraphQL queries **Description:** 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 - accountName (String): The full name of the account to retrieve. Example: `"k:abcdef123456..."` for a user account or `"free.my-contract"` for a contract account. - chainIds (String): The list of chain IDs where the account exists. You can specify one or more chains to retrieve `FungibleChainAccount` details for each. - fungibleName (String): The name of the fungible token module associated with the account (e.g., `coin`). Defaults to `"coin"` if not specified. ### Response **Type:** FungibleChainAccount **Description:** Represents a fungible account **on a specific chain** in the Kadena blockchain. While a `FungibleAccount` aggregates balances and activity across all chains, a `FungibleChainAccount` focuses on a single chain. It exposes the account’s balance, security guard, and full transaction and transfer history specific to that chain and fungible token (e.g., `coin` for KDA). This type is useful when you need fine-grained, chain-level data — such as for explorers, wallets, or analytics tools that track balances and movements per chain. #### Fields - id (ID): Globally unique identifier for this chain account node. - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - balance (Float): The current balance of this account on the specified chain for the given fungible token. - chainId (String): The chain ID where this account exists. - fungibleName (String): The name of the fungible token module associated with this account (e.g., `coin`). - guard (IGuard): The guard that defines the account’s security conditions. A guard determines who must sign transactions in order to spend from this account. - transactions (FungibleChainAccountTransactionsConnection): Paginated list of transactions involving this account on this chain. Transactions represent operations such as transfers, contract calls, or other state changes. - transfers (FungibleChainAccountTransfersConnection): 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. --- ## fungibleChainAccountsByPublicKey **Type:** GraphQL queries **Description:** 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 - chainId (String): The ID of the chain to search on. Kadena runs multiple braided chains — specify the one where the accounts exist. - fungibleName (String): The name of the fungible token module to filter by (e.g., `coin` for the native KDA token). Defaults to `"coin"` if not specified. - publicKey (String): The public key used to control the account(s). Example: `"abcdef1234567890..."`. ### Response **Type:** FungibleChainAccount **Description:** Represents a fungible account **on a specific chain** in the Kadena blockchain. While a `FungibleAccount` aggregates balances and activity across all chains, a `FungibleChainAccount` focuses on a single chain. It exposes the account’s balance, security guard, and full transaction and transfer history specific to that chain and fungible token (e.g., `coin` for KDA). This type is useful when you need fine-grained, chain-level data — such as for explorers, wallets, or analytics tools that track balances and movements per chain. #### Fields - id (ID): Globally unique identifier for this chain account node. - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - balance (Float): The current balance of this account on the specified chain for the given fungible token. - chainId (String): The chain ID where this account exists. - fungibleName (String): The name of the fungible token module associated with this account (e.g., `coin`). - guard (IGuard): The guard that defines the account’s security conditions. A guard determines who must sign transactions in order to spend from this account. - transactions (FungibleChainAccountTransactionsConnection): Paginated list of transactions involving this account on this chain. Transactions represent operations such as transfers, contract calls, or other state changes. - transfers (FungibleChainAccountTransfersConnection): 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. --- ## gasLimitEstimate **Type:** GraphQL queries **Description:** 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 either `meta` or `signers` (optional: `chainId` if `signers` is provided without `meta`) - `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 - input (String): One or more JSON-encoded transaction inputs to estimate gas for. Each entry must follow one of the supported input type structures listed above. ### Response **Type:** GasLimitEstimation **Description:** Represents the gas estimation result for a single transaction input. Includes the estimated gas amount and metadata about how the estimation was performed. #### Fields - amount (Int): The estimated gas limit required to execute the transaction. - inputType (String): The detected input type (e.g., `code`, `payload`, `full-transaction`, etc.). - transaction (String): The normalized JSON representation of the transaction used for estimation. - usedPreflight (Boolean): Whether a pre-execution (preflight) simulation was used during estimation. - usedSignatureVerification (Boolean): Whether signature verification was performed as part of the estimation. --- ## graphConfiguration **Type:** GraphQL queries **Description:** 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. ### Response **Type:** GraphConfiguration **Description:** General information about the GraphQL API. #### Fields - minimumBlockHeight (BigInt): The lowest block-height that is indexed in this endpoint. - version (String): The version of the graphl api. --- ## lastBlockHeight **Type:** GraphQL queries **Description:** Get the height of the block with the highest height. ### Response **Type:** BigInt --- ## networkInfo **Type:** GraphQL queries **Description:** 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. ### Response **Type:** NetworkInfo **Description:** Detailed information about the current Kadena network and its state. The `NetworkInfo` type provides an overview of the network’s operational and consensus metrics, including circulation supply, hash rate, difficulty, transaction count, and chain topology details. It’s commonly used by explorers, monitoring tools, and analytics dashboards to understand the state, performance, and configuration of the Kadena blockchain network. #### Fields - apiVersion (String): The version of this GraphQL API. Useful to verify compatibility between the client and API. - coinsInCirculation (Float): The current total number of coins in circulation on the network. - networkHashRate (Float): The current aggregate hash rate of the Kadena network. Indicates the total mining power securing the network. - networkHost (String): The host address or domain of the network node serving this API. - networkId (String): The unique identifier of the network (e.g., `mainnet01`, `testnet04`). - totalDifficulty (Float): The cumulative difficulty of all blocks mined so far. A higher value reflects the total work securing the chain. - transactionCount (Int): The total number of transactions that have been processed across the network. - nodeBlockDelay (Int): The current delay (in blocks) between the latest mined block and the block processed by the node. Useful for monitoring node synchronization status. - nodeChains (String): The list of chain IDs that make up the Kadena network. Kadena operates multiple braided chains in parallel. - numberOfChains (Int): The total number of chains in the network. - genesisHeights (GenesisHeight): The genesis block height for each chain in the network. Provides insight into the starting point of each chain’s history. - nodePackageVersion (String): The version of the node software package running this endpoint. - nodeServiceDate (DateTime): The service start date and time of the current node. Useful for tracking uptime and deployment history. - nodeLatestBehaviorHeight (Int): The latest block height known by the node’s behavior monitor. Can be used to assess node synchronization and chain progress. - countersOfEachChain (CountersOfEachChain): Transaction counters and statistics broken down by chain. Useful for analyzing per-chain activity levels and throughput. --- ## node **Type:** GraphQL queries **Description:** Retrieve a single object in the graph by its globally unique identifier. All major entities in this API implement the `Node` interface, which ensures that each one has a unique `id` field. This query allows you to fetch any of those entities directly using that global ID, regardless of its specific type (e.g., `Block`, `Transaction`, `FungibleAccount`). ### Arguments - id (ID): The globally unique identifier (`id`) of the object to retrieve. ### Response **Type:** Node **Description:** A globally identifiable object in the GraphQL schema. All core entities in this API implement the `Node` interface, which guarantees that they have a unique `id` field, enabling consistent caching, pagination, and reference resolution across the API. #### Fields - id (ID): A globally unique identifier for the object. --- ## nodes **Type:** GraphQL queries **Description:** Retrieve multiple objects in the graph by their globally unique identifiers. Like the `node` query, this query returns any entities that implement the `Node` interface, but allows you to request several objects in a single call by passing a list of IDs. It’s useful when resolving multiple references at once — for example, when reconstructing relationships between entities or populating a list by ID. ### Arguments - ids (ID): A list of globally unique identifiers (`id`) of the objects to retrieve. ### Response **Type:** Node **Description:** A globally identifiable object in the GraphQL schema. All core entities in this API implement the `Node` interface, which guarantees that they have a unique `id` field, enabling consistent caching, pagination, and reference resolution across the API. #### Fields - id (ID): A globally unique identifier for the object. --- ## nonFungibleAccount **Type:** GraphQL queries **Description:** Retrieve details of a specific non-fungible account by its name. A non-fungible account represents the ownership and activity of unique tokens (NFTs) on the Kadena blockchain. Unlike fungible accounts that track divisible token balances, non-fungible accounts hold individual, distinct tokens and their associated metadata. This query lets you look up a specific account and retrieve information such as its NFT balances, per-chain details, and historical transaction and transfer activity. It is commonly used in NFT explorers, wallets, or analytics tools to inspect an account’s non-fungible holdings and interactions. ### Arguments - accountName (String): The full name of the account to retrieve. Example: `"k:abcdef123456..."` for a user account or `"free.my-contract"` for a contract account. ### Response **Type:** NonFungibleAccount **Description:** Represents an account associated with non-fungible tokens (NFTs) on the Kadena blockchain. A `NonFungibleAccount` tracks the ownership and activity of a specific account for non-fungible tokens. Unlike fungible accounts, which hold divisible token balances, non-fungible accounts are associated with unique tokens and their metadata. Because Kadena operates as a multi-chain network, a single account may hold NFTs across multiple chains. This type exposes account-level NFT balances, per-chain details, and historical transaction and transfer data. #### Fields - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - chainAccounts (NonFungibleChainAccount): Per-chain breakdown of this non-fungible account. Since Kadena operates multiple braided chains, NFT balances and activity are tracked separately on each chain. - id (ID): Globally unique identifier for this non-fungible account node. - nonFungibleTokenBalances (NonFungibleTokenBalance): A list of non-fungible token balances held by this account across all chains. Each balance entry includes token identifiers, metadata, and ownership details. - transactions (NonFungibleAccountTransactionsConnection): Paginated list of transactions involving this account. Note: Custom token-related transactions are not included. Transactions here represent operations such as NFT minting, transfers, or contract interactions related to NFTs. - transfers (NonFungibleAccountTransfersConnection): Paginated list of NFT transfers associated with this account. Transfers represent movements of non-fungible tokens into or out of this account. --- ## nonFungibleChainAccount **Type:** GraphQL queries **Description:** Retrieve details of a specific non-fungible account on a specific chain. This query returns a `NonFungibleChainAccount`, which represents an account’s NFT holdings and activity **restricted to a single chain** within the Kadena network. Because Kadena operates as a multi-chain blockchain, NFT balances, transactions, and transfers are tracked separately on each chain. Use this query when you need precise, chain-level data about a particular account — for example, when building an NFT explorer or wallet feature that shows a user’s holdings and interactions on a specific chain. ### Arguments - accountName (String): The full name of the account to retrieve. Example: `"k:abcdef123456..."` for a user account or `"free.my-contract"` for a contract account. - chainId (String): The ID of the chain where the account exists. Kadena runs multiple braided chains, and NFT data is tracked separately on each. ### Response **Type:** NonFungibleChainAccount **Description:** Represents a non-fungible (NFT) account **on a specific chain** in the Kadena network. While `NonFungibleAccount` aggregates NFT holdings and activity across all chains for an account, `NonFungibleChainAccount` focuses on a single chain. It exposes the account’s per-chain NFT balances and its transaction/transfer history limited to that chain. This is useful for explorers, wallets, and analytics tools that need precise, chain-level NFT data. #### Fields - accountName (String): The full name of the account (e.g., `k:abcdef123456...` for a user account or `free.my-contract` for a contract account). - chainId (String): The chain ID where this non-fungible account exists. - id (ID): Globally unique identifier for this chain-scoped NFT account node. - nonFungibleTokenBalances (NonFungibleTokenBalance): The list of NFT balances held by this account on this chain. Each entry typically includes the token identifier(s), quantity/ownership info, and associated metadata for that token/collection. - transactions (NonFungibleChainAccountTransactionsConnection): Paginated list of NFT-related transactions involving this account on this chain. Transactions can include mints, transfers, or contract interactions that affect NFT state. - transfers (NonFungibleChainAccountTransfersConnection): Paginated list of NFT transfers into or out of this account on this chain. Transfers are a subset of transactions focused specifically on movements of NFTs. --- ## pactQuery **Type:** GraphQL queries **Description:** Execute arbitrary Pact code via a local call without requiring gas estimation or signature verification. The `pactQuery` query allows you to run read-only Pact code directly against the Kadena blockchain, such as arithmetic expressions or contract read functions (e.g., `(coin.get-details "")`). It does **not** create a transaction or modify chain state — it simply executes the code locally and returns the result. This is ideal for use cases like: - Retrieving token or account details without submitting a transaction. - Running lightweight Pact expressions or view functions. - Building dashboards or explorers that query contract state in real time. Multiple queries can be sent in a single request by providing an array of `PactQuery` objects. ### Arguments - pactQuery (PactQuery, Not Null): A list of Pact queries to execute. Each query specifies the `chainId`, `code`, and optional input `data`. - chainId (String): The ID of the chain on which the Pact code should be executed. - code (String): The Pact code to execute. Examples: - `"(+ 1 2)"` - `"(coin.get-details \\\"k:abcdef123456...\\\")"` - data (PactQueryData): Optional arguments or environment data for the Pact code execution. Typically used to pass variables or structured input required by the smart contract. - key (String) - value (String) ### Response **Type:** PactQueryResponse **Description:** The result of executing a Pact query via a local call. Each `PactQueryResponse` corresponds to one `PactQuery` input and contains the execution result, status, and any error message returned by the Pact interpreter. #### Fields - chainId (String): The chain ID on which the query was executed. - code (String): The original Pact code that was executed. - error (String): Any error message returned during execution. `null` if the query was successful. - result (String): The raw JSON-encoded result returned by the Pact execution. - status (String): The execution status, typically `"success"` or `"failure"`. --- ## transaction **Type:** GraphQL queries **Description:** Retrieve a specific transaction by its request key, with optional additional filters. While a `requestKey` uniquely identifies a transaction at the Pact level, the same request key can appear in **multiple blocks** due to chain reorganization or orphaned blocks. Because of this, retrieving a transaction by `requestKey` alone may return more than one match over the chain’s history. To disambiguate results, you can provide the `blockHash` parameter. - A specific `requestKey` combined with a `blockHash` will always return **at most one transaction**, since that pair is unique. - Among those combinations, **only one transaction will belong to a canonical block** (i.e., part of the main chain). - All other matches (with the same `requestKey` but different `blockHash` values) represent transactions included in **orphaned blocks** — blocks that were mined but later discarded due to chain reorganization. The `minimumDepth` parameter can also be used to limit results to transactions in blocks that are at least a certain depth from the chain tip, helping ensure finality. This query is typically used when you need to verify the canonical inclusion of a transaction or inspect all occurrences of a given request key across the chain’s history. ### Arguments - blockHash (String): The hash of the block that contains the transaction. When provided along with `requestKey`, guarantees a unique match. Only one such combination will correspond to a canonical block; others (if any) are from orphaned blocks. - minimumDepth (Int): The minimum depth (distance from the chain tip) the block containing the transaction must have. Useful to filter for transactions in finalized blocks. - requestKey (String): The unique request key of the transaction. Note: The same request key can appear in multiple blocks over time due to chain reorganizations. ### Response **Type:** Transaction **Description:** Represents a transaction executed on the Kadena blockchain. A `Transaction` encapsulates the full structure and outcome of a blockchain transaction — from the original signed command to the resulting execution details. Each transaction is uniquely identified by its `hash` and includes the submitted command (`cmd`), associated signatures (`sigs`), and the execution result (`result`). This type is fundamental for querying and analyzing blockchain activity, tracking execution outcomes, and verifying signed payloads. #### Fields - id (ID): Globally unique identifier for this transaction node. - cmd (TransactionCommand): The original signed transaction command submitted to the network. Includes metadata, payload, signers, and network information. - hash (String): 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 (TransactionInfo): The result of executing the transaction. Includes information such as success/failure status, events, continuation data, and any state changes triggered by execution. - sigs (TransactionSignature): 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. --- ## transactions **Type:** GraphQL queries **Description:** Retrieve a paginated list of transactions with flexible filtering options. This query allows you to search and explore transactions on the Kadena blockchain based on a wide range of parameters — including account involvement, block location, chain, request key, height range, and coinbase status. It is commonly used by block explorers, wallets, and analytics tools to inspect on-chain activity and trace transaction history. You can combine multiple filters to refine results. For example: - Filter by `accountName` to find transactions sent from or received by a specific account. - Use `blockHash` to retrieve all transactions included in a particular block. - Combine `chainId`, `minHeight`, and `maxHeight` to query transactions over a block range on a specific chain. - Provide a `requestKey` to search for a particular transaction. - Set `isCoinbase` to `true` to return only mining reward transactions. - Use `minimumDepth` to ensure results include only transactions in finalized blocks. ### Arguments - accountName (String): Filter transactions involving a specific account name. Can match either the sender or recipient. Example: `"k:abcdef123456..."`. - blockHash (String): Retrieve only transactions included in the block with this hash. Useful when inspecting all transactions within a specific block. - chainId (String): Restrict results to a specific chain ID. - fungibleName (String): Filter transactions by the fungible token module involved. Example: `"coin"`. - maxHeight (Int): The maximum block height to include in results. Transactions in blocks above this height will be excluded. - minHeight (Int): The minimum block height to include in results. Transactions in blocks below this height will be excluded. - minimumDepth (Int): Minimum depth (distance from the chain tip) of the block containing the transaction. Use this to filter for transactions in finalized blocks. - requestKey (String): Filter by the unique request key of the transaction. Useful when looking up a specific transaction by its identifier. - isCoinbase (Boolean): When true, returns only coinbase transactions — block reward transactions created during mining. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of transactions to return when paginating forward. - last (Int): Maximum number of transactions to return when paginating backward. ### Response **Type:** QueryTransactionsConnection **Description:** undefined #### Fields - edges (QueryTransactionsConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## transactionsByPublicKey **Type:** GraphQL queries **Description:** Retrieve a paginated list of transactions associated with a specific public key. This query returns all transactions that involve accounts controlled by the given `publicKey`. Because a single public key can control multiple accounts — including accounts on different chains or created by contracts — this query is a convenient way to fetch all related transactions without needing to know each account name individually. It is commonly used by wallets, explorers, and analytics tools to display a user’s complete on-chain activity, track transactions linked to a particular key, or audit key usage across the network. ### Arguments - publicKey (String): The public key to filter transactions by. Example: `"abcdef1234567890..."`. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of transactions to return when paginating forward. - last (Int): Maximum number of transactions to return when paginating backward. ### Response **Type:** QueryTransactionsByPublicKeyConnection **Description:** undefined #### Fields - edges (QueryTransactionsByPublicKeyConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## transactionsByPactCode **Type:** GraphQL queries **Description:** Retrieve a paginated list of transactions that executed a specific Pact code. This query allows you to search for transactions based on the exact Pact code they executed. It’s particularly useful when you want to trace all interactions with a specific contract function, audit how and when a certain piece of code was used on-chain, or analyze usage patterns of a given module. Because the match is performed on the full Pact code string, results will only include transactions where the executed code exactly matches the provided `pactCode`. This query is commonly used by block explorers, indexers, and analytics tools to track contract usage and behavior over time. ### Arguments - pactCode (String): The exact Pact code to filter transactions by. Only transactions that executed this code will be returned. Example: `"(coin.transfer \\\"k:abc...\\\" \\\"k:def...\\\" 1.0)"` - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of transactions to return when paginating forward. - last (Int): Maximum number of transactions to return when paginating backward. ### Response **Type:** QueryTransactionsByPactCodeConnection **Description:** undefined #### Fields - edges (QueryTransactionsByPactCodeConnectionEdge) - pageInfo (PageInfo) --- ## transfers **Type:** GraphQL queries **Description:** Retrieve a paginated list of token transfers with flexible filtering options. This query returns on-chain transfer events — movements of tokens from one account to another — and supports filtering by block, transaction, account, chain, token type, and more. It is commonly used by explorers, wallets, and analytics tools to display account activity, track token movements, and analyze on-chain transfers. Transfers can represent either **fungible tokens** (like `coin` for KDA) or **non-fungible tokens (NFTs)**, depending on the `isNFT` flag. You can combine multiple filters to narrow down results. For example: - Filter by `accountName` to retrieve all incoming and outgoing transfers for a specific account. - Use `blockHash` to get all transfers included in a particular block. - Combine `chainId` and `fungibleName` to target transfers of a specific token on a specific chain. - Provide a `requestKey` to return transfers associated with a specific transaction. - Set `isNFT: true` to return only NFT transfers. ⚠️ **Important:** `fungibleName` **cannot** be used when `isNFT` is set to `true`. NFT transfers do not belong to a fungible token module, so this parameter must be omitted in that case. ### Arguments - blockHash (String): Retrieve only transfers included in the block with this hash. Useful when analyzing all token movements in a specific block. - requestKey (String): Filter by the unique request key of the transaction that emitted the transfer. - accountName (String): Filter transfers involving a specific account. Matches both senders and recipients. - chainId (String): Restrict results to transfers that occurred on a specific chain. - fungibleName (String): Filter transfers by the fungible token module involved. Example: `"coin"`. ⚠️ Cannot be used if `isNFT` is set to `true`. - isNFT (Boolean): Set to `true` to retrieve only non-fungible token (NFT) transfers. When `false` or omitted, only fungible token transfers are returned. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of transfers to return when paginating forward. - last (Int): Maximum number of transfers to return when paginating backward. ### Response **Type:** QueryTransfersConnection **Description:** undefined #### Fields - edges (QueryTransfersConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## tokens **Type:** GraphQL queries **Description:** Retrieve a paginated list of all tokens deployed on the Kadena network, excluding the native `coin` token. This query returns both fungible tokens and non-fungible token contracts (currently limited to `marmalade` and `marmalade-v2`), providing basic metadata such as the token’s name, deployment chain, and contract address. It is commonly used by explorers, indexers, and dApps to discover tokens deployed on-chain, list available assets, or build token selection interfaces. The results are network-wide and not limited to a specific module or account. ### Arguments - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - first (Int): Maximum number of tokens to return when paginating forward. - last (Int): Maximum number of tokens to return when paginating backward. ### Response **Type:** QueryTokensConnection **Description:** undefined #### Fields - edges (QueryTokensEdge) - pageInfo (PageInfo) --- ## pools **Type:** GraphQL queries **Description:** Retrieve a paginated list of liquidity pools with sorting and optional protocol filtering. This query returns AMM pools (currently sourced from a single protocol used by the Sushi team) including reserves, TVL (USD), volume, fees, APR, and recent activity metrics. Prices for TVL/volume/fees are computed using DIA data (https://api.diadata.org) refreshed approximately every 5 minutes. Use `orderBy` to sort by TVL, 24h/7d volume, 24h APR, or 24h transaction count (ASC/DESC), and `protocolAddress` to limit results to a specific protocol/module name on Kadena. Results support cursor-based pagination. ### Arguments - after (String): Cursor to start paginating **after** a specific result (forward pagination). - before (String): Cursor to start paginating **before** a specific result (backward pagination). - first (Int): Maximum number of pools to return when paginating forward. - last (Int): Maximum number of pools to return when paginating backward. - orderBy (PoolOrderBy): Sort order for the returned pools. - protocolAddress (String): The protocol/module name (on Kadena) to filter by. Use this to restrict results to a specific DEX implementation. ### Response **Type:** QueryPoolsConnection **Description:** undefined #### Fields - edges (QueryPoolsConnectionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## pool **Type:** GraphQL queries **Description:** Retrieve a specific liquidity pool by its unique ID. This query returns detailed information about a single AMM liquidity pool, including its reserves, paired tokens, TVL, trading volume, APR, and recent performance metrics. It’s commonly used by explorers, dashboards, and analytics tools to power individual pool detail views. You can optionally provide a `timeFrame` to shape the data returned in metrics and charts, and a `type` to filter transactions by category (e.g., swaps, adds, removes). ⚠️ **Note:** While `first`, `after`, `last`, and `before` arguments are accepted for API consistency, they are **not used** by the internal resolvers of this query. Pagination of pool transactions is handled by the parent pool resolver, not directly here. ### Arguments - id (ID): The globally unique ID of the pool to retrieve. - timeFrame (TimeFrame): Optional time frame used for calculating and returning chart data. - type (PoolTransactionType): Optional transaction type filter (e.g., swaps, adds, removes) applied to the returned transactions. - first (Int): Accepted for API consistency but **not used** by this resolver. - after (String): Accepted for API consistency but **not used** by this resolver. - last (Int): Accepted for API consistency but **not used** by this resolver. - before (String): Accepted for API consistency but **not used** by this resolver. ### Response **Type:** Pool **Description:** Represents an automated market maker (AMM) liquidity pool for a pair of tokens. A `Pool` tracks on-chain reserves, liquidity (LP) supply, pricing-derived metrics (TVL, volume, fees), and short-term performance indicators (24h / 7d deltas). Prices used to compute TVL/volume/fees are sourced from DIA and refreshed periodically. Use this type to power pool lists, detail pages, analytics dashboards, and historical charts. Note: Numeric reserve and supply values are returned as strings to preserve precision. #### Fields - id (ID): Globally unique identifier for this pool node. - address (String): The on-chain address / module reference for this pool. - token0 (Token): The first token in the pair (base/slot-0). - token1 (Token): The second token in the pair (quote/slot-1). - reserve0 (String): Current on-chain reserve of `token0` held by the pool (as a string for full precision). - reserve1 (String): Current on-chain reserve of `token1` held by the pool (as a string for full precision). - totalSupply (String): Total supply of the pool’s LP (liquidity provider) tokens (as a string for full precision). - key (String): A stable key for the pool (e.g., a deterministic pair identifier). - tvlUsd (Float): Total value locked (USD) in this pool, derived from reserves and external pricing. - tvlChange24h (Float): 24-hour percentage change in TVL. - volume24hUsd (Float): Notional 24-hour traded volume (USD). - volumeChange24h (Float): 24-hour percentage change in volume. - volume7dUsd (Float): Notional 7-day traded volume (USD). - fees24hUsd (Float): Notional 24-hour fees accrued by the pool (USD). - feesChange24h (Float): 24-hour percentage change in fees. - transactionCount24h (Int): Count of pool transactions over the last 24 hours. - transactionCountChange24h (Float): 24-hour percentage change in transaction count. - apr24h (Float): 24-hour APR estimate derived from recent fees relative to TVL (as a percentage). - createdAt (DateTime): Timestamp when this pool record was created. - updatedAt (DateTime): Timestamp when this pool record was last updated. - charts (PoolCharts): Get chart/series data for this pool over a specified timeframe (e.g., TVL, volume). - transactions (PoolTransactionsConnection): Get transactions related to this pool, with optional type filtering and cursor-based pagination. --- ## poolTransactions **Type:** GraphQL queries **Description:** Retrieve a paginated list of transactions for a specific liquidity pool. This query returns all on-chain transactions related to a given AMM pool, such as swaps, liquidity additions, and removals. It is most often used by explorers, analytics dashboards, and dApps to display pool activity, analyze trading behavior, or calculate historical metrics. You must provide the `pairId` (the unique pool identifier), and you can optionally filter by `type` to restrict results to a specific category of transactions. ### Arguments - pairId (String): The unique identifier of the liquidity pool pair whose transactions you want to retrieve. - type (PoolTransactionType): Optional transaction type filter to narrow down results. Examples: `SWAP`, `ADD_LIQUIDITY`, `REMOVE_LIQUIDITY` - first (Int): Maximum number of transactions to return when paginating forward. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - last (Int): Maximum number of transactions to return when paginating backward. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. ### Response **Type:** PoolTransactionsConnection **Description:** Connection type for pool transactions #### Fields - edges (PoolTransactionEdge): List of transaction edges - pageInfo (PageInfo): Pagination information - totalCount (Int): Total number of transactions --- ## liquidityPositions **Type:** GraphQL queries **Description:** Retrieve a paginated list of a user's liquidity positions across all supported pools. This query returns all active liquidity positions associated with a given Kadena account (`walletAddress`), including the amount of liquidity provided, its USD value, and the 24h APR for each position. Each position also includes the underlying pool details for deeper insights. It is commonly used by wallets, dashboards, and DeFi analytics tools to show a user's liquidity distribution, portfolio value, and performance metrics across supported AMM protocols (currently limited to the Sushi-integrated DEX). ### Arguments - walletAddress (String): The Kadena account address whose liquidity positions you want to retrieve. Example: `"k:abcd1234..."` - first (Int): Maximum number of liquidity positions to return when paginating forward. - after (String): Cursor to start paginating **after** a specific result. Used for forward pagination. - last (Int): Maximum number of liquidity positions to return when paginating backward. - before (String): Cursor to start paginating **before** a specific result. Used for backward pagination. - orderBy (LiquidityPositionOrderBy): Sort order for the returned positions. Defaults to `VALUE_USD_DESC`. Options: - VALUE_USD_ASC / VALUE_USD_DESC - LIQUIDITY_ASC / LIQUIDITY_DESC - APR_ASC / APR_DESC ### Response **Type:** LiquidityPositionsConnection **Description:** undefined #### Fields - edges (LiquidityPositionEdge) - pageInfo (PageInfo) - totalCount (Int) --- ## dexMetrics **Type:** GraphQL queries **Description:** Retrieve key metrics for the decentralized exchange (DEX), including total value locked (TVL), trading volume, and pool count, with optional historical data. This query aggregates protocol-level statistics across all pools under a supported DEX (currently limited to the Sushi-integrated deployment) and is commonly used by dashboards, explorers, and analytics tools to visualize network-wide DeFi activity. If `startDate` and `endDate` are not provided, the query defaults to a 30-day historical range. Use `protocolAddress` to filter metrics for a specific DEX module on Kadena. Returned data includes the current TVL, total pool count, total volume over the selected period, and historical time series data for both TVL and volume. ### Arguments - startDate (DateTime): (Optional) Start date for the historical range used to calculate TVL and volume metrics. - endDate (DateTime): (Optional) End date for the historical range used to calculate TVL and volume metrics. - protocolAddress (String): (Optional) Filter metrics by the protocol’s module name on Kadena. Useful when multiple DEX protocols are supported. ### Response **Type:** DexMetrics **Description:** Aggregated performance metrics for a decentralized exchange (DEX). `DexMetrics` provides a snapshot and historical overview of network-wide DeFi activity, including total liquidity (TVL), trading volume, and the number of active pools. It is designed for powering dashboards, analytics views, and protocol-level insights. All USD-denominated values (TVL, volume) are calculated using price data from DIA, and historical data is shaped by the time range specified in the query (defaults to 30 days if none is provided). #### Fields - totalPools (Int): The total number of liquidity pools deployed under the protocol. - currentTvlUsd (Decimal): The current total value locked (TVL) across all pools, expressed in USD. This reflects the combined liquidity available in the protocol at the time of the query. - tvlHistory (ChartDataPoint): Historical time-series data points representing TVL evolution over the selected time range. Useful for charting liquidity growth and analyzing protocol trends. - volumeHistory (ChartDataPoint): Historical time-series data points representing trading volume over the selected time range. Useful for charting market activity and usage patterns. - totalVolumeUsd (Decimal): The total cumulative trading volume (in USD) observed over the specified time range. --- ## lastTokenPriceInKda **Type:** GraphQL queries **Description:** Retrieve the latest price of a specific token denominated in KDA. This query returns the most recent known price of a given token relative to Kadena’s native token (`KDA`), based on aggregated on-chain data and pricing information from supported sources. ### Arguments - moduleName (String): The module name of the token whose price you want to retrieve. Example: `"kaddex.token"``. ### Response **Type:** Decimal --- ## tokenPrice **Type:** GraphQL queries **Description:** Retrieve the latest price information for a specific token. This query behaves like `tokenPrices` but returns the price data for a single token instead of a list. It includes the token's price in both KDA and USD, the protocol where the price was sourced, and the timestamp of the latest update. Use this when you only need pricing information for a single token rather than fetching the full list. ### Arguments - tokenAddress (String): The on-chain address (module name) of the token whose price you want to retrieve. Example: `"kaddex.token"` - protocolAddress (String): (Optional) The module name of the DEX protocol to query the price from. If omitted, the default supported protocol (currently Sushi) is used. ### Response **Type:** TokenPrice **Description:** Represents the latest known price information for a specific token. `TokenPrice` provides the current valuation of a token in both KDA (the Kadena native token) and USD, along with metadata about the protocol where the token is traded and the timestamp of the most recent price update. #### Fields - id (ID): Globally unique identifier for this token price entry. - token (Token): The token associated with this price data. - priceInKda (Decimal): The current price of the token denominated in KDA. - priceInUsd (Decimal): The current price of the token denominated in USD. - protocolAddress (String): The protocol/module name on Kadena where this price was retrieved from. - updatedAt (DateTime): The timestamp of the most recent price update. --- ## tokenPrices **Type:** GraphQL queries **Description:** Retrieve the latest price information for all tokens available in a specific protocol. This query returns a list of `TokenPrice` objects, each containing the current price of a token in both KDA and USD, along with metadata about the protocol and the timestamp of the most recent update. It is commonly used by explorers, analytics dashboards, and DEX frontends to power price feeds, portfolio valuations, and liquidity analytics. You can optionally specify a `protocolAddress` to restrict the results to a particular DEX module. If omitted, the default supported protocol (currently Sushi) is used. ### Arguments - protocolAddress (String): (Optional) The module name of the DEX protocol whose token prices you want to retrieve. If omitted, the default supported protocol (currently Sushi) is used. ### Response **Type:** TokenPrice **Description:** Represents the latest known price information for a specific token. `TokenPrice` provides the current valuation of a token in both KDA (the Kadena native token) and USD, along with metadata about the protocol where the token is traded and the timestamp of the most recent price update. #### Fields - id (ID): Globally unique identifier for this token price entry. - token (Token): The token associated with this price data. - priceInKda (Decimal): The current price of the token denominated in KDA. - priceInUsd (Decimal): The current price of the token denominated in USD. - protocolAddress (String): The protocol/module name on Kadena where this price was retrieved from. - updatedAt (DateTime): The timestamp of the most recent price update.