Learn how to fetch all the Farcaster users that are currently designated as Moxie Heroes and the variable boost they received on their FarScore.
Moxie Heroes are designated each week based on their prior week's quality and diversity of engagement. Every week Moxie Heroes get a variable boost to their FarScore based on their existing score.
Heroes can keep these powers for themselves or transfer to another user. Heroes' superpowers last for a full week. A new set of heroes is launched each week based on previous week diversity and quality of engagement. It will be rotated so no one is hero in consecutive weeks.
To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
Get All The Current Moxie Heroes
You can get the Farcaster users that are currently Moxie Heroes by using the FarScores API and configure the API by setting the heroBoost filter to greater than 0 to only fetch those with Hero boost:
Try Demo
Code
queryMyQuery { FarScores( input: {filter: { # Only get user that have hero boostheroBoost: {_gt: 0} },limit: 200 } ) { FarScore { farScore heroBoost social { profileNamefid: userId } } }}
{"data": {"Socials": {"Social": [ {"userId":"488178","profileName":"nikomfer.eth","farcasterScore": {"farBoost":290.87599810419005,"farRank":3,"farScore":582.6746181312901,"farScoreRaw":"58267461813129.003488414568103642",// This is the Moxie Hero Boost of the user"heroBoost":291.337309065645,"liquidityBoost":0,"powerBoost":288.56944329691504,"tvl":"828868042240291844385275","tvlBoost":2.306554807275 } },// Other Farcaster users ] } }}
Once you get the Moxie Hero boost of the user, you can use the formula here to get the multiplier.
Developer Support
If you have any questions or need help regarding fetching FarScore & FarBoosts data, please join our Airstack's Telegram group.