- liquidityPositions
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
andfungibleName
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
Retrieve only transfers included in the block with this hash. Useful when analyzing all token movements in a specific block.
Filter by the unique request key of the transaction that emitted the transfer.
Filter transfers involving a specific account. Matches both senders and recipients.
Restrict results to transfers that occurred on a specific chain.
Filter transfers by the fungible token module involved.
Example: "coin"
.
⚠️ Cannot be used if isNFT
is set to true
.
Set to true
to retrieve only non-fungible token (NFT) transfers.
When false
or omitted, only fungible token transfers are returned.
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 transfers to return when paginating forward.
Maximum number of transfers to return when paginating backward.
Return type
Queryquery transfers(
$blockHash: String
$requestKey: String
$accountName: String
$chainId: String
$fungibleName: String
$isNFT: Boolean
$after: String
$before: String
$first: Int
$last: Int
) {
transfers(
blockHash: $blockHash
requestKey: $requestKey
accountName: $accountName
chainId: $chainId
fungibleName: $fungibleName
isNFT: $isNFT
after: $after
before: $before
first: $first
last: $last
) {
edges {
cursor
node {
amount
block {
__typename
# ...BlockFragment
}
blockHash
chainId
creationTime
crossChainTransfer {
__typename
# ...TransferFragment
}
height
id
moduleHash
moduleName
orderIndex
receiverAccount
requestKey
senderAccount
tokenId
transaction {
__typename
# ...TransactionFragment
}
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
{ "blockHash": "Example String", "requestKey": "Example String", "accountName": "Example String", "chainId": "Example String", "fungibleName": "Example String", "isNFT": true, "after": "Example String", "before": "Example String", "first": 40, "last": 40 }
{ "data": { "edges": [ { "cursor": "Example String", "node": { "amount": "Example Custom Scalar", "block": { "__typename": "Block" }, "blockHash": "Example String", "chainId": "Example Custom Scalar", "creationTime": "Example Custom Scalar", "crossChainTransfer": { "__typename": "Transfer" }, "height": "Example Custom Scalar", "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "moduleHash": "Example String", "moduleName": "Example String", "orderIndex": "Example Custom Scalar", "receiverAccount": "Example String", "requestKey": "Example String", "senderAccount": "Example String", "tokenId": "Example String", "transaction": { "__typename": "Transaction" } } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true }, "totalCount": 40 } }
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
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 tokens to return when paginating forward.
Maximum number of tokens to return when paginating backward.
Return type
Queryquery tokens(
$after: String
$before: String
$first: Int
$last: Int
) {
tokens(
after: $after
before: $before
first: $first
last: $last
) {
edges {
cursor
node {
id
name
chainId
address
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
}
}
{ "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", "chainId": "Example String", "address": "Example String" } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true } } }
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
Cursor to start paginating after a specific result (forward pagination).
Cursor to start paginating before a specific result (backward pagination).
Maximum number of pools to return when paginating forward.
Maximum number of pools to return when paginating backward.
Sort order for the returned pools.
The protocol/module name (on Kadena) to filter by. Use this to restrict results to a specific DEX implementation.
Return type
Queryquery pools(
$after: String
$before: String
$first: Int
$last: Int
$orderBy: PoolOrderBy
$protocolAddress: String
) {
pools(
after: $after
before: $before
first: $first
last: $last
orderBy: $orderBy
protocolAddress: $protocolAddress
) {
edges {
cursor
node {
id
address
token0 {
__typename
# ...TokenFragment
}
token1 {
__typename
# ...TokenFragment
}
reserve0
reserve1
totalSupply
key
tvlUsd
tvlChange24h
volume24hUsd
volumeChange24h
volume7dUsd
fees24hUsd
feesChange24h
transactionCount24h
transactionCountChange24h
apr24h
createdAt
updatedAt
charts(
# Arguments Here
) {
__typename
# ...PoolChartsFragment
}
transactions(
# Arguments Here
) {
__typename
# ...PoolTransactionsConnectionFragment
}
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
{ "after": "Example String", "before": "Example String", "first": 40, "last": 40, "orderBy": "TVL_USD_ASC", "protocolAddress": "Example String" }
{ "data": { "edges": [ { "cursor": "Example String", "node": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "address": "Example String", "token0": { "__typename": "Token" }, "token1": { "__typename": "Token" }, "reserve0": "Example String", "reserve1": "Example String", "totalSupply": "Example String", "key": "Example String", "tvlUsd": 40, "tvlChange24h": 40, "volume24hUsd": 40, "volumeChange24h": 40, "volume7dUsd": 40, "fees24hUsd": 40, "feesChange24h": 40, "transactionCount24h": 40, "transactionCountChange24h": 40, "apr24h": 40, "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "charts": { "__typename": "PoolCharts" }, "transactions": { "__typename": "PoolTransactionsConnection" } } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true }, "totalCount": 40 } }
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
The globally unique ID of the pool to retrieve.
Optional time frame used for calculating and returning chart data.
Optional transaction type filter (e.g., swaps, adds, removes) applied to the returned transactions.
Accepted for API consistency but not used by this resolver.
Accepted for API consistency but not used by this resolver.
Accepted for API consistency but not used by this resolver.
Accepted for API consistency but not used by this resolver.
Return type
PoolGlobally unique identifier for this pool node.
The on-chain address / module reference for this pool.
The first token in the pair (base/slot-0).
The second token in the pair (quote/slot-1).
Current on-chain reserve of token0
held by the pool (as a string for full precision).
Current on-chain reserve of token1
held by the pool (as a string for full precision).
Total supply of the pool’s LP (liquidity provider) tokens (as a string for full precision).
A stable key for the pool (e.g., a deterministic pair identifier).
Total value locked (USD) in this pool, derived from reserves and external pricing.
24-hour percentage change in TVL.
Notional 24-hour traded volume (USD).
24-hour percentage change in volume.
Notional 7-day traded volume (USD).
Notional 24-hour fees accrued by the pool (USD).
24-hour percentage change in fees.
Count of pool transactions over the last 24 hours.
24-hour percentage change in transaction count.
24-hour APR estimate derived from recent fees relative to TVL (as a percentage).
Timestamp when this pool record was created.
Timestamp when this pool record was last updated.
Get chart/series data for this pool over a specified timeframe (e.g., TVL, volume).
Get transactions related to this pool, with optional type filtering and cursor-based pagination.
query pool(
$id: ID!
$timeFrame: TimeFrame
$type: PoolTransactionType
$first: Int
$after: String
$last: Int
$before: String
) {
pool(
id: $id
timeFrame: $timeFrame
type: $type
first: $first
after: $after
last: $last
before: $before
) {
id
address
token0 {
__typename
# ...TokenFragment
}
token1 {
__typename
# ...TokenFragment
}
reserve0
reserve1
totalSupply
key
tvlUsd
tvlChange24h
volume24hUsd
volumeChange24h
volume7dUsd
fees24hUsd
feesChange24h
transactionCount24h
transactionCountChange24h
apr24h
createdAt
updatedAt
charts(
# Arguments Here
) {
__typename
# ...PoolChartsFragment
}
transactions(
# Arguments Here
) {
__typename
# ...PoolTransactionsConnectionFragment
}
}
}
{ "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "timeFrame": "DAY", "type": "SWAP", "first": 40, "after": "Example String", "last": 40, "before": "Example String" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "address": "Example String", "token0": { "__typename": "Token" }, "token1": { "__typename": "Token" }, "reserve0": "Example String", "reserve1": "Example String", "totalSupply": "Example String", "key": "Example String", "tvlUsd": 40, "tvlChange24h": 40, "volume24hUsd": 40, "volumeChange24h": 40, "volume7dUsd": 40, "fees24hUsd": 40, "feesChange24h": 40, "transactionCount24h": 40, "transactionCountChange24h": 40, "apr24h": 40, "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar", "charts": { "__typename": "PoolCharts" }, "transactions": { "__typename": "PoolTransactionsConnection" } } }
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
The unique identifier of the liquidity pool pair whose transactions you want to retrieve.
Optional transaction type filter to narrow down results.
Examples: SWAP
, ADD_LIQUIDITY
, REMOVE_LIQUIDITY
Maximum number of transactions to return when paginating forward.
Cursor to start paginating after a specific result. Used for forward pagination.
Maximum number of transactions to return when paginating backward.
Cursor to start paginating before a specific result. Used for backward pagination.
Return type
PoolList of transaction edges
Pagination information
Total number of transactions
query poolTransactions(
$pairId: String!
$type: PoolTransactionType
$first: Int
$after: String
$last: Int
$before: String
) {
poolTransactions(
pairId: $pairId
type: $type
first: $first
after: $after
last: $last
before: $before
) {
edges {
cursor
node {
id
maker
amount0In
amount1In
amount0Out
amount1Out
amountUsd
timestamp
transactionId
requestkey
transactionType
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
{ "pairId": "Example String", "type": "SWAP", "first": 40, "after": "Example String", "last": 40, "before": "Example String" }
{ "data": { "edges": [ { "cursor": "Example String", "node": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "maker": "Example String", "amount0In": "Example Custom Scalar", "amount1In": "Example Custom Scalar", "amount0Out": "Example Custom Scalar", "amount1Out": "Example Custom Scalar", "amountUsd": "Example Custom Scalar", "timestamp": "Example Custom Scalar", "transactionId": 40, "requestkey": "Example String", "transactionType": "SWAP" } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true }, "totalCount": 40 } }
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
The Kadena account address whose liquidity positions you want to retrieve.
Example: "k:abcd1234..."
Maximum number of liquidity positions to return when paginating forward.
Cursor to start paginating after a specific result. Used for forward pagination.
Maximum number of liquidity positions to return when paginating backward.
Cursor to start paginating before a specific result. Used for backward pagination.
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
Return type
Liquidityquery liquidityPositions(
$walletAddress: String!
$first: Int
$after: String
$last: Int
$before: String
$orderBy: LiquidityPositionOrderBy
) {
liquidityPositions(
walletAddress: $walletAddress
first: $first
after: $after
last: $last
before: $before
orderBy: $orderBy
) {
edges {
cursor
node {
id
pairId
liquidity
walletAddress
valueUsd
apr24h
pair {
__typename
# ...PoolFragment
}
createdAt
updatedAt
}
}
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}
{ "walletAddress": "Example String", "first": 40, "after": "Example String", "last": 40, "before": "Example String", "orderBy": "VALUE_USD_ASC" }
{ "data": { "edges": [ { "cursor": "Example String", "node": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "pairId": "Example String", "liquidity": "Example String", "walletAddress": "Example String", "valueUsd": "Example Custom Scalar", "apr24h": "Example Custom Scalar", "pair": { "__typename": "Pool" }, "createdAt": "Example Custom Scalar", "updatedAt": "Example Custom Scalar" } } ], "pageInfo": { "startCursor": "Example String", "endCursor": "Example String", "hasNextPage": true, "hasPreviousPage": true }, "totalCount": 40 } }
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
(Optional) Start date for the historical range used to calculate TVL and volume metrics.
(Optional) End date for the historical range used to calculate TVL and volume metrics.
(Optional) Filter metrics by the protocol’s module name on Kadena. Useful when multiple DEX protocols are supported.
Return type
DexThe total number of liquidity pools deployed under the protocol.
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.
Historical time-series data points representing TVL evolution over the selected time range. Useful for charting liquidity growth and analyzing protocol trends.
Historical time-series data points representing trading volume over the selected time range. Useful for charting market activity and usage patterns.
The total cumulative trading volume (in USD) observed over the specified time range.
query dexMetrics(
$startDate: DateTime
$endDate: DateTime
$protocolAddress: String
) {
dexMetrics(
startDate: $startDate
endDate: $endDate
protocolAddress: $protocolAddress
) {
totalPools
currentTvlUsd
tvlHistory {
__typename
# ...ChartDataPointFragment
}
volumeHistory {
__typename
# ...ChartDataPointFragment
}
totalVolumeUsd
}
}
{ "startDate": "Example Custom Scalar", "endDate": "Example Custom Scalar", "protocolAddress": "Example String" }
{ "data": { "totalPools": 40, "currentTvlUsd": "Example Custom Scalar", "tvlHistory": [ { "__typename": "ChartDataPoint" } ], "volumeHistory": [ { "__typename": "ChartDataPoint" } ], "totalVolumeUsd": "Example Custom Scalar" } }
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
The module name of the token whose price you want to retrieve. Example: `"kaddex.token"``.
Return type
DecimalFloats that will have a value of 0 or more.
query lastTokenPriceInKda($moduleName: String!) {
lastTokenPriceInKda(moduleName: $moduleName)
}
{ "moduleName": "Example String" }
{ "data": "Example Custom Scalar" }
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
The on-chain address (module name) of the token whose price you want to retrieve.
Example: "kaddex.token"
(Optional) The module name of the DEX protocol to query the price from. If omitted, the default supported protocol (currently Sushi) is used.
Return type
TokenGlobally unique identifier for this token price entry.
The token associated with this price data.
The current price of the token denominated in KDA.
The current price of the token denominated in USD.
The protocol/module name on Kadena where this price was retrieved from.
The timestamp of the most recent price update.
query tokenPrice($tokenAddress: String!, $protocolAddress: String) {
tokenPrice(tokenAddress: $tokenAddress, protocolAddress: $protocolAddress) {
id
token {
__typename
# ...TokenFragment
}
priceInKda
priceInUsd
protocolAddress
updatedAt
}
}
{ "tokenAddress": "Example String", "protocolAddress": "Example String" }
{ "data": { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "token": { "__typename": "Token" }, "priceInKda": "Example Custom Scalar", "priceInUsd": "Example Custom Scalar", "protocolAddress": "Example String", "updatedAt": "Example Custom Scalar" } }
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
(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.
Return type
[TokenGlobally unique identifier for this token price entry.
The token associated with this price data.
The current price of the token denominated in KDA.
The current price of the token denominated in USD.
The protocol/module name on Kadena where this price was retrieved from.
The timestamp of the most recent price update.
query tokenPrices($protocolAddress: String) {
tokenPrices(protocolAddress: $protocolAddress) {
id
token {
__typename
# ...TokenFragment
}
priceInKda
priceInUsd
protocolAddress
updatedAt
}
}
{ "protocolAddress": "Example String" }
{ "data": [ { "id": "9cfb1c81-4c79-452f-b1f5-8ee6571276b4", "token": { "__typename": "Token" }, "priceInKda": "Example Custom Scalar", "priceInUsd": "Example Custom Scalar", "protocolAddress": "Example String", "updatedAt": "Example Custom Scalar" } ] }