Skip to main content

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"
}
}
}
}
}
}
Try in sandbox

Arguments

ArgumentDescriptionType
transactionHashThe transaction hash to retrieve details forString!
networkThe network where the transaction occurredNetwork!

Fields

Main Fields

FieldDescriptionType
keyA unique identifierString!
networkNetwork where the transaction occurredNetwork!
timestampUnix timestamp in millisecondsTimestamp!
transactionContains detailed transaction informationOnChainTransaction!
appThe associated application detailsActivityFeedApp!
interpretationContains human-readable descriptions and asset transfersActivityInterpretation!

Transaction Fields

FieldDescriptionType
hashTransaction hashString!
nonceTransaction nonceInt!
gasPriceGas price in weiString!
gasGas limitInt!
fromUserThe initiating address with detailsAccount!
toUserThe receiving address with detailsAccount!
blockHashHash of the block containing the transactionString!
blockNumberBlock number containing the transactionInt!

Interpretation Fields

FieldDescriptionType
descriptionHuman-readable description with variablesString!
processedDescriptionFully processed human-readable descriptionString!
descriptionDisplayItemsReferences for variables in the description[ActivityFeedDisplayItem!]!
inboundAttachmentsAssets received in the transaction[ActivityFeedDisplayItem!]!
outboundAttachmentsAssets sent in the transaction[ActivityFeedDisplayItem!]!

Display Item Fields

Common fields for all display item types:

FieldDescriptionType
typeType of the display itemString!
networkNetwork of the itemNetwork!

Token-specific fields:

FieldDescriptionType
tokenAddressContract address of the tokenAddress!
amountRawRaw token amount (requires decimal adjustment)String!
tokenV2Detailed token informationToken!

NFT-specific fields:

FieldDescriptionType
collectionAddressContract address of the NFT collectionAddress!
tokenIdUnique identifier of the NFTString!
quantityNumber of NFTs transferredFloat

Actor-specific fields:

FieldDescriptionType
addressAddress of the actorAddress!
accountAccount details including display nameAccount!
note

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.

tip

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.