Learn how to fetch Farcaster Moxie Rewards earned by Farcaster users, channels, and the Farcaster network. In addition, learn how to sort by the earnings to get the top earners of Moxie.
Introduction
The Moxie Protocol enables Farcaster Members to earn Everyday Rewards based on who engages with their casts. Developers can also earn rewards for each unique FID who interacts with their frames.
Top Moxie Earning Entities Based On Highest Moxie Earnings
You can fetch the top entities w/ highest Moxie earnings by specifying order.allEarnings to DESC:
Try Demo
Code
queryMyQuery { FarcasterMoxieEarningStats( input: {timeframe: LIFETIME,blockchain: ALL,filter: {entityType: {_eq: USER} # alternatively can be CHANNEL }, # Order by All earning for sorting by total earnings in # descending orderorder: {allEarnings: DESC} } ) { FarcasterMoxieEarningStat { allEarningsAmount allEarningsAmountInWei castEarningsAmount castEarningsAmountInWei entityId entityType frameDevEarningsAmount frameDevEarningsAmountInWei otherEarningsAmount otherEarningsAmountInWei timeframe } }}
{"data": {"FarcasterMoxieEarningStats": {"FarcasterMoxieEarningStat": [ {"allEarningsAmount":10136643.391825985,"allEarningsAmountInWei":"10136643391825986000000000","castEarningsAmount":51821.7356651616,"castEarningsAmountInWei":"51821735665161600000000","entityId":"336022","entityType":"USER","frameDevEarningsAmount":0,"frameDevEarningsAmountInWei":"0","otherEarningsAmount":10084821.656160824,"otherEarningsAmountInWei":"10084821656160823000000000","timeframe":"LIFETIME" },// Other top Farcaster user with most Moxie earned ] } }}
Developer Support
If you have any questions or need help regarding fetching Moxie earnings data, please join our Airstack's Telegram group.