For SOL fee-share v2, this total measures normal claimer earnings after platform, partner, and deployer deductions. It excludes the separate deployer payout. The dedicated deployer balance endpoint reports currently unclaimed pending and accrued deployer revenue; it is not a lifetime metric. See Deployer Fees for the accounting details.
Prerequisites
Before starting, make sure you have:- Completed our TypeScript and Node.js Setup Guide.
- Got your API key from the Bags Developer Portal.
- The token mint address you want to analyze.
1. The Token Lifetime Fees Script
Here is a simple script to fetch token lifetime fees. Save this asget-token-lifetime-fees.ts.
This script uses the updated SDK API to retrieve lifetime fees for any token and displays them in a user-friendly format.
Endpoint Used Under the Hood
This guide uses:GET /token-launch/lifetime-feesviasdk.state.getTokenLifetimeFees()
2. Run Your Script
To analyze a token’s lifetime fees, edit thegetTokenLifetimeFees function call at the bottom of the script with the actual mint address you want to analyze.
Then, run the script from your terminal:
What You’ll See
The script will output the total lifetime fees earned by the token in SOL, formatted with proper number localization for easy reading. Example output:Alternative: Using the Bags CLI
This section requires the Bags CLI. See Install and Set Up the Bags CLI to get started.
Use Cases
This information is valuable for:- Token Performance Analysis: Track how much revenue a token has generated
- Investment Research: Evaluate token success based on fee generation
- Portfolio Management: Monitor earnings from tokens you’ve created or invested in
- Market Analysis: Compare performance across different tokens
