Learn how to retrieve the total lifetime fees earned by a Solana token using the Bags API with TypeScript and Node.js
get-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.
getTokenLifetimeFees
function call at the bottom of the script with the actual mint address you want to analyze.
Then, run the script from your terminal: