Single Transactions
Presents the details of an onchain transaction in a simple descriptive summary with references to dynamic elements such as tokens, NFTs, accounts, and apps. This endpoint is ideal for building detailed transaction views or surfacing specific transaction information.
timelineEvent
Takes a transactionHash
and network
as input. Returns comprehensive information about a specific transaction including:
- Transaction details (hash, nonce, gas info)
- Human-readable description
- Asset transfers (tokens and NFTs)
- Related app information
- Account details for actors involved
Example Use Case: Transaction Details Page
Let's say you want to display details about a specific transaction in a human-readable format with dynamic references to onchain elements. The query returns:
- Formatted transaction description (
processedDescription
) - Raw description with variables (
description
) - Display items for each referenced element (
descriptionDisplayItems
) - Network and app information
- Complete data about tokens and NFTs involved
Example Variables
{
"transactionHash": "0xc8323f3a5a03b8f8bbb0fe0d2d3b297334e9351dffb74efb8ae5ff5dc1fabf57",
"network": "BASE_MAINNET"
}
Example Query
query TimelineEventQuery($transactionHash: String!, $network: Network!) {
timelineEvent(transactionHash: $transactionHash, network: $network) {
interpretation {
processedDescription
description
descriptionDisplayItems {
... on TokenDisplayItem {
type
network
tokenAddress
amountRaw
tokenV2 {
symbol
decimals
name
imageUrl
marketData {
price(currency: USD)
}
}
}
... on NFTDisplayItem {
type
network
collectionAddress
tokenId
quantity
nftToken {
collection {
name
}
}
}
... on ActorDisplayItem {
type
address
account {
displayName {
value
}
}
}
}
}
app {
app {
displayName
imgUrl
}
}
transaction {
hash
nonce
gasPrice
gas
blockNumber
timestamp
fromUser {
displayName {
value
}
}
toUser {
displayName {
value
}
}
}
}
}
Example Response
{
"data": {
"timelineEvent": {
"interpretation": {
"processedDescription": "Swapped 231.668 DEGEN for 4.95 USDC and sent to 0x9b3a...4b30",
"description": "Swapped $1 for $2 and sent to $3",
"descriptionDisplayItems": [
{
"type": "token",
"network": "BASE_MAINNET",
"tokenAddress": "0x4ed4e862860bed51a9570b96d89af5e1b0efefed",
"amountRaw": "231668037511194154483",
"tokenV2": {
"symbol": "DEGEN",
"decimals": 18,
"name": "Degen (Base)",
"imageUrl": "https://storage.googleapis.com/zapper-fi-assets/tokens/base/0x4ed4e862860bed51a9570b96d89af5e1b0efefed.png",
"marketData": {
"price": 0.0092215
}
}
},
{
"type": "token",
"network": "BASE_MAINNET",
"tokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amountRaw": "4950000",
"tokenV2": {
"symbol": "USDC",
"decimals": 6,
"name": "USDC",
"imageUrl": "https://storage.googleapis.com/zapper-fi-assets/tokens/base/0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.png",
"marketData": {
"price": 0.999999
}
}
},
{
"type": "actor",
"address": "0x9b3a20176d2c5d0a22dae382496416a1a8934b30",
"account": {
"displayName": {
"value": "0x9b3a...4b30"
}
}
}
]
},
"app": {
"app": {
"displayName": "Coinbase Commerce",
"imgUrl": "https://storage.googleapis.com/zapper-fi-assets/apps%2Fcoinbase-commerce.png"
}
},
"transaction": {
"hash": "0xc8323f3a5a03b8f8bbb0fe0d2d3b297334e9351dffb74efb8ae5ff5dc1fabf57",
"nonce": 1766,
"gasPrice": "24165433",
"gas": 381746,
"blockNumber": 22625088,
"timestamp": 1732039523000,
"fromUser": {
"displayName": {
"value": "0xjasper.eth"
}
},
"toUser": {
"displayName": {
"value": "0x0305...b7a8"
}
}
}
}
}
}
Arguments
Argument | Description | Type |
---|---|---|
transactionHash | The transaction hash to retrieve details for | String! |
network | The network where the transaction occurred | Network! |
Fields
Main Fields
Field | Description | Type |
---|---|---|
key | A unique identifier | String! |
network | Network where the transaction occurred | Network! |
timestamp | Unix timestamp in milliseconds | Timestamp! |
transaction | Contains detailed transaction information | OnChainTransaction! |
app | The associated application details | ActivityFeedApp! |
interpretation | Contains human-readable descriptions and asset transfers | ActivityInterpretation! |
Transaction Fields
Field | Description | Type |
---|---|---|
hash | Transaction hash | String! |
nonce | Transaction nonce | Int! |
gasPrice | Gas price in wei | String! |
gas | Gas limit | Int! |
fromUser | The initiating address with details | Account! |
toUser | The receiving address with details | Account! |
blockHash | Hash of the block containing the transaction | String! |
blockNumber | Block number containing the transaction | Int! |
Interpretation Fields
Field | Description | Type |
---|---|---|
description | Human-readable description with variables | String! |
processedDescription | Fully processed human-readable description | String! |
descriptionDisplayItems | References for variables in the description | [ActivityFeedDisplayItem!]! |
inboundAttachments | Assets received in the transaction | [ActivityFeedDisplayItem!]! |
outboundAttachments | Assets sent in the transaction | [ActivityFeedDisplayItem!]! |
Display Item Fields
Common fields for all display item types:
Field | Description | Type |
---|---|---|
type | Type of the display item | String! |
network | Network of the item | Network! |
Token-specific fields:
Field | Description | Type |
---|---|---|
tokenAddress | Contract address of the token | Address! |
amountRaw | Raw token amount (requires decimal adjustment) | String! |
tokenV2 | Detailed token information | Token! |
NFT-specific fields:
Field | Description | Type |
---|---|---|
collectionAddress | Contract address of the NFT collection | Address! |
tokenId | Unique identifier of the NFT | String! |
quantity | Number of NFTs transferred | Float |
Actor-specific fields:
Field | Description | Type |
---|---|---|
address | Address of the actor | Address! |
account | Account details including display name | Account! |
The description
field contains variables in the format $1
, $2
, etc., which reference items in the descriptionDisplayItems
array. This allows you to create interactive elements by replacing these variables with links to the corresponding tokens, NFTs, or accounts.
When displaying token amounts, remember to divide amountRaw
by 10^decimals
to get the human-readable amount. For example, an amountRaw
of "400000000" with 6 decimals represents 400 USDC.