Relevant Activity
Create Farcaster-based experiences by surfacing onchain activity made by Farcaster users or personalize it based on a users social graph.
Example Use Case: Swaps by followed users
Surface all the relevant swaps for a user based on the accounts they follow displaying account metadata as well as swap details.
Try it nowVariables
{
"address": "0x1111111111166b7fe7bd91427724b487980afc69",
"chainId": 8453,
"fid": 177,
"first": 5
}
Example Query
query RelevantSwapFeed(
$address: Address!
$chainId: Int!
$fid: Int!
$first: Int
) {
fungibleTokenV2(address: $address, chainId: $chainId) {
# Basic token information
address
symbol
name
decimals
imageUrlV2
# Market data and pricing information
priceData {
marketCap
price
priceChange5m
priceChange1h
priceChange24h
volume24h
totalGasTokenLiquidity
totalLiquidity
# Swaps based on accounts followed by a given FID
latestRelevantFarcasterSwaps(fid: $fid, first: $first) {
edges {
node {
timestamp
transactionHash
isBuy
amount
volumeUsd
gasTokenVolume
profile {
username
fid
metadata {
displayName
imageUrl
}
}
}
}
}
}
}
}
Example Response
{
"data": {
"fungibleTokenV2": {
"address": "0x1111111111166b7fe7bd91427724b487980afc69",
"symbol": "ZORA",
"name": "Zora",
"decimals": 18,
"imageUrlV2": "https://storage.googleapis.com/zapper-fi-assets/tokens/base/0x1111111111166b7fe7bd91427724b487980afc69.png",
"priceData": {
"marketCap": 0,
"price": 0.02232122087867972,
"priceChange5m": -0.7774590006196402,
"priceChange1h": 2.0098251451903026,
"priceChange24h": 4.15255486599162,
"volume24h": 15901125,
"totalGasTokenLiquidity": 604.9638913788616,
"totalLiquidity": 1062585.073036016,
"latestRelevantFarcasterSwaps": {
"edges": [
{
"node": {
"timestamp": 1745528691000,
"transactionHash": "0x84093a12fc3ef6f98945d14a3f8049a8101ff12a16f3614e63591d103bed3e3e",
"isBuy": false,
"amount": 164626.4929369055,
"volumeUsd": 3656.333444767042,
"gasTokenVolume": 2.075132433168994,
"profile": {
"username": "coopahtroopa.eth",
"fid": 206,
"metadata": {
"displayName": "Coop",
"imageUrl": "https://i.imgur.com/0NB7bxd.gif"
}
}
}
},
{
"node": {
"timestamp": 1745517315000,
"transactionHash": "0x8b57e472bd3922850219310026819bb6490717334366dce2e32ceb72153efaeb",
"isBuy": false,
"amount": 29835.009796891096,
"volumeUsd": 656.5727242413207,
"gasTokenVolume": 0.37403275510197703,
"profile": {
"username": "vali",
"fid": 214,
"metadata": {
"displayName": "Ayush Vaidya",
"imageUrl": "https://i.imgur.com/R66C7pe.jpg"
}
}
}
},
{
"node": {
"timestamp": 1745512877000,
"transactionHash": "0xf88bfa57bbd5fedba2efef1dfff75485009b39a5756dae938bb48acc5625908b",
"isBuy": true,
"amount": 1884.6739850662657,
"volumeUsd": 44.48997889426086,
"gasTokenVolume": 0.025096022605016654,
"profile": {
"username": "squirtle0x.eth",
"fid": 4022,
"metadata": {
"displayName": "Squirtle0x",
"imageUrl": "https://i.imgur.com/O7W7iUL.jpg"
}
}
}
},
{
"node": {
"timestamp": 1745502305000,
"transactionHash": "0xb8de61c734d5cfa6c4937567e5f0b667194af6eeaa1c4f3b159e86494433bd51",
"isBuy": false,
"amount": 1062.6430537633432,
"volumeUsd": 23.606687795975326,
"gasTokenVolume": 0.013447656414366215,
"profile": {
"username": "austinmccollom",
"fid": 2834,
"metadata": {
"displayName": "Austin",
"imageUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/28ce1208-3dad-4ea3-2f74-c30d3f897c00/rectcrop3"
}
}
}
},
{
"node": {
"timestamp": 1745483719000,
"transactionHash": "0x6795d52d1a26132a390681e4a514c91176faa189f47840cbaa39e4f064b9da0d",
"isBuy": false,
"amount": 4212.889834993,
"volumeUsd": 101.14652109319664,
"gasTokenVolume": 0.05847059107256474,
"profile": {
"username": "albiverse",
"fid": 6473,
"metadata": {
"displayName": "louis albiverse",
"imageUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/79e852c8-5c3f-456f-56c4-a10c2e4bd900/original"
}
}
}
}
]
}
}
}
}
}
note
These fields require heavy computation and cost an additional 8 credits.
Example Use Case: Swaps by Farcaster Users
Surface all the swaps made by Farcaster users, displaying account metadata as well as swap details.
Try it nowVariables
{
"address": "0x1111111111166b7fe7bd91427724b487980afc69",
"chainId": 8453,
"first": 5
}
Example Query
query FarcasterOnlySwapFeed(
$address: Address!
$chainId: Int!
$first: Int
) {
fungibleTokenV2(address: $address, chainId: $chainId) {
# Basic token information
address
symbol
name
decimals
imageUrlV2
# Market data and pricing information
priceData {
marketCap
price
priceChange5m
priceChange1h
priceChange24h
volume24h
totalGasTokenLiquidity
totalLiquidity
# Swaps for only addresses associated to Farcaster accounts
latestFarcasterSwaps(first: $first) {
edges {
node {
timestamp
transactionHash
isBuy
amount
volumeUsd
gasTokenVolume
profile {
username
fid
metadata {
displayName
imageUrl
}
}
}
}
}
}
}
}
Example Response
{
"data": {
"fungibleTokenV2": {
"address": "0x1111111111166b7fe7bd91427724b487980afc69",
"symbol": "ZORA",
"name": "Zora",
"decimals": 18,
"imageUrlV2": "https://storage.googleapis.com/zapper-fi-assets/tokens/base/0x1111111111166b7fe7bd91427724b487980afc69.png",
"priceData": {
"marketCap": 0,
"price": 0.02227697931266597,
"priceChange5m": -0.43901000728731043,
"priceChange1h": 1.1262417480142783,
"priceChange24h": 4.477864596805703,
"volume24h": 15900474,
"totalGasTokenLiquidity": 603.414869808165,
"totalLiquidity": 1061684.326832674,
"latestFarcasterSwaps": {
"edges": [
{
"node": {
"timestamp": 1745531137000,
"transactionHash": "0x08671ad863caa03d5eb24adb2b4f652db80cffd5fea3593ed8ef9673dc94d9ef",
"isBuy": true,
"amount": 3502.0224290587607,
"volumeUsd": 77.63767330581902,
"gasTokenVolume": 0.04420162557967144,
"profile": {
"username": "shr8z",
"fid": 867025,
"metadata": {
"displayName": "Shr8z",
"imageUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/5874ae8d-e5bf-4337-9913-917296518a00/rectcrop3"
}
}
}
},
{
"node": {
"timestamp": 1745531127000,
"transactionHash": "0xab0ebfa43d2984fc3b823cee1b2fba887bab6dc2ff9fe37f9368f54057bdd34a",
"isBuy": false,
"amount": 571.3625,
"volumeUsd": 12.57830309310642,
"gasTokenVolume": 0.007161232686083623,
"profile": {
"username": "avidadeumamao",
"fid": 395732,
"metadata": {
"displayName": "A-mão",
"imageUrl": "https://i.imgur.com/5lITs0v.jpg"
}
}
}
},
{
"node": {
"timestamp": 1745531061000,
"transactionHash": "0xf701cf8e240fe310de13e602ce8c68020db7c3420e854363abf8f1b99ff69d17",
"isBuy": false,
"amount": 36.89740974942,
"volumeUsd": 0.8137997538547516,
"gasTokenVolume": 0.0004633223857060181,
"profile": {
"username": "ugo-dms",
"fid": 440591,
"metadata": {
"displayName": "Funkypsy🎭",
"imageUrl": "https://i.imgur.com/JWfcpBE.jpg"
}
}
}
},
{
"node": {
"timestamp": 1745531047000,
"transactionHash": "0xf16df88410341be4ec95fcfe7c15367e220dc516930be8cccb036f98aa83cdfd",
"isBuy": false,
"amount": 377.69815348,
"volumeUsd": 8.333707014518295,
"gasTokenVolume": 0.004744647559122691,
"profile": {
"username": "metmelites",
"fid": 864872,
"metadata": {
"displayName": "Abby Melites",
"imageUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/aacceff9-2278-410a-65b7-e8922c0eaf00/rectcrop3"
}
}
}
},
{
"node": {
"timestamp": 1745531031000,
"transactionHash": "0xad79022d1c7066a8bd18e550e624ef1789601efb7bb061a033697712d1c40e9c",
"isBuy": false,
"amount": 15.860735271,
"volumeUsd": 0.3522228133836184,
"gasTokenVolume": 0.000200531781220114,
"profile": {
"username": "studyssw777",
"fid": 552583,
"metadata": {
"displayName": "Build",
"imageUrl": "https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/ac8798a5-92d3-4eda-7d64-e638b4e0e200/original"
}
}
}
}
]
}
}
}
}
}