Profile follow revenue
Full code example
https://github.com/lens-protocol/api-examples/blob/master/src/revenue/profile-follow-revenue.ts
This query returns the amounts earned on the requested profile for all follows. It will group them up by currency.
API Design
query ProfileFollowRevenue {
profileFollowRevenue(request: { profileId: "0x15" }) {
revenues {
total {
asset {
name
symbol
decimals
address
}
value
}
}
}
}
{
"data": {
"profileFollowRevenue": {
"revenues": [
{
"total": {
"asset": {
"name": "WETH",
"symbol": "WETH",
"decimals": 18,
"address": "0x3C68CE8504087f89c640D02d133646d98e64ddd9"
},
"value": "0.31"
}
},
{
"total": {
"asset": {
"name": "Wrapped Matic",
"symbol": "WMATIC",
"decimals": 18,
"address": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"
},
"value": "190.0012"
}
}
]
}
}
}
Using LensClient SDK
const result = await lensClient.revenue.profileFollow({ profileId: '0x0185' });
Updated 3 months ago