Track SPL token transfers to build token analytics, monitor wallet activity, or analyze token flow patterns.
Use Case
Token transfer tracking enables you to:
- Build token transfer analytics and volume trackers
- Monitor wallet token activity
- Analyze transfer patterns
- Track token mints and burns
Code Example
curl --compressed -X POST 'https://portal.sqd.dev/datasets/solana-mainnet/stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "solana",
"fromBlock": 280000000,
"toBlock": 280000003,
"fields": {
"block": {
"number": true,
"timestamp": true
},
"tokenBalance": {
"account": true,
"preMint": true,
"postMint": true,
"preAmount": true,
"postAmount": true,
"preOwner": true,
"postOwner": true
}
},
"tokenBalances": [{
"preMint": ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]
}]
}'
Try it yourself with the interactive query interface below:
Key Parameters
| Parameter | Description |
|---|
preMint | Token mint address before the transaction |
postMint | Token mint address after the transaction |
preAmount | Token balance before the transaction |
postAmount | Token balance after the transaction |
preOwner | Token account owner before the transaction |
postOwner | Token account owner after the transaction |
account | Token account address |
Expected Output
{
"header": {
"number": 259985000,
"timestamp": 1697544779
},
"tokenBalances": [
{
"account": "TokenAccountAddress...",
"preMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"postMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"preAmount": "1000000",
"postAmount": "2000000",
"preOwner": "SenderAddress...",
"postOwner": "RecipientAddress..."
}
]
}
Track Specific Token Account
Monitor transfers for a specific token account:
curl --compressed -X POST 'https://portal.sqd.dev/datasets/solana-mainnet/stream' \
-H 'Content-Type: application/json' \
-d '{
"type": "solana",
"fromBlock": 280000000,
"toBlock": 280000003,
"fields": {
"tokenBalance": {
"account": true,
"preAmount": true,
"postAmount": true
}
},
"tokenBalances": [{
"account": ["SpecificTokenAccountAddress"]
}]
}'
- Filter by mint: Query specific tokens instead of all transfers
- Use slot ranges: Process data in 10k-50k slot batches
- Request minimal fields: Only request fields you need
- Filter by account: Monitor specific token accounts