Lum0x SDK
  • Lum0x-sdk
    • Getting started
    • Examples
      • Case 1 : Find my Fan
      • Case 2: Fetch user's Moxie earning
      • Case 3: Raffle events among the filtered casts
      • How to Deploy a Project with Vercel
    • FarcasterUser
      • Search for Usernames
      • Fetch users based on FIDs
      • Fetch power user objects
      • Fetches users based on Eth or Sol addresses
      • Lookup a user by custody-address
      • Retrieve all channels that a given fid follows
      • Get User Information by username
      • Get Recent Users
    • FarcasterCast
      • Retrieve cast for a given hash or Warpcast URL
      • Retrieve casts for a given user
      • Gets information about an array of casts
      • Retrieve the conversation for a given cast
      • Get Recent Casts
    • FarcasterFeed
      • Retrieve casts based on filters
      • Retrieve trending casts
    • FarcasterReaction
      • Fetches reactions for a given user
      • Fetches reactions for a given cast
    • FarcasterFollowers
      • Retrieve followers for a given user
      • Retrieve relevant followers for a given user
      • Retrieve a list of users followed by a user
    • FarcasterStorage
      • Fetches storage allocations for a given user
      • Fetches storage usage for a given user
    • FarcasterFname
      • Check if a given fname is available
    • FarcasterMute
      • Get fids that a user has muted
    • FarcasterChannel
      • Retrieve all channels with their details
      • Search for channels based on id or name
      • (Bulk) Retrieve channels by id or parent_url
      • Retrieve channel details by id or parent_url
      • Retrieve followers for a given channel
      • Get channels that a user is active in
      • Check If User Follows Channel
      • Retrieve trending channels based on activity
    • FarcasterNotification
      • Retrieve notifications for a given user
    • FarcasterMoxie
      • Retrieve Moxie earning status
      • Retrieve FarScore and FarRank
      • Retrieve Moxie airdrop claim status
      • Retrieve Moxie earning details for cast.
      • Retrieve Moxie earning details for reply.
      • Retrieve Moxie earning details for cast by fid.
      • Retrieve Moxie earning details for reply by fid.
      • Retrieve Moxie earning details from channel cast.
Powered by GitBook
On this page
  • Overview
  • Parameters
  • Usage
  • Response
  • Field Description
  1. Lum0x-sdk
  2. FarcasterMoxie

Retrieve Moxie earning status

farcasterMoxie.getEarningStat

Overview

Retrieve Moxie earning status for a certain user, channel or entire network.

Parameters

name
type
required
Note

entity_type

string

true

"USER", "CHNNEL" or "NETWORK"

entity_id

string

false

If entity_type is "USER" : "721870". If entity_type is "CHANNEL": "base". If entity_type is "NETWORK": null

timeframe

string

false

"LIFETIME", "TODAY" or "WEEKLY"

Usage

let res = await Lum0x.farcasterMoxie.getEarningStat({
    entity_type: "USER",
    entity_id: "721870",
    timeframe: "LIFETIME"
});
console.log(JSON.stringify(res, null, 2));

Response

{
  "data": {
    "FarcasterMoxieEarningStats": {
      "FarcasterMoxieEarningStat": [
        {
          "allEarningsAmount": 56.17236528230401,
          "allEarningsAmountInWei": "56172365282304010000",
          "castEarningsAmount": 56.17236528230401,
          "castEarningsAmountInWei": "56172365282304010000",
          "entityId": "721870",
          "entityType": "USER",
          "frameDevEarningsAmount": 0,
          "frameDevEarningsAmountInWei": "0",
          "otherEarningsAmount": 0,
          "otherEarningsAmountInWei": "0",
          "timeframe": "LIFETIME"
        }
      ]
    }
  }
}
Key
Value

allEarningsAmount

56.17236528230401

allEarningsAmountInWei

56172365282304010000

castEarningsAmount

56.17236528230401

castEarningsAmountInWei

56172365282304010000

entityId

721870

entityType

USER

frameDevEarningsAmount

0

frameDevEarningsAmountInWei

0

otherEarningsAmount

0

otherEarningsAmountInWei

0

timeframe

LIFETIME

Field Description

  • allEarningsAmount: The total earnings amount paid to the user (in Ether).

  • allEarningsAmountInWei: The total earnings amount expressed in Wei.

  • castEarningsAmount: The earnings amount from content creation paid to the user (in Ether).

  • castEarningsAmountInWei: The content creation earnings amount expressed in Wei.

  • entityId: The unique ID of the user or entity.

  • entityType: The type of entity providing the earnings information (e.g., USER).

  • frameDevEarningsAmount: The earnings amount related to frame development (in Ether).

  • frameDevEarningsAmountInWei: The frame development earnings amount expressed in Wei.

  • otherEarningsAmount: Other earnings amount (in Ether).

  • otherEarningsAmountInWei: The other earnings amount expressed in Wei.

  • timeframe: The period for which the earnings information is provided (e.g., LIFETIME).

PreviousFarcasterMoxieNextRetrieve FarScore and FarRank

Last updated 9 months ago