Skip to main content

Claiming Token Creator Fees

Pump.fun rewards token creators by allowing them to collect a fraction of the fees generated from trading activity on their token. You can use the PumpPortal Lightning or Local Transaction APIs to claim any creator fees from Pump.fun. The Lightning Transaction API can now also be used to claim creator fees from Meteora Dynamic Bonding Curves.

Examples below:

Lightning Transaction Examples:

import requests

response = requests.post(url="https://pumpportal.fun/api/trade?api-key=your-api-key-here", data={
"action": "collectCreatorFee",
"priorityFee": 0.000001,
"pool": "meteora-dbc" # "pump" or "meteora-dbc"
"mint": "token CA" # the token for which you are claiming fees
# Note: pump.fun claims creator fees all at once, so you do not need to specify "mint"
})

data = response.json() # Tx signature or error(s)

Local Transaction Examples:

import requests
from solders.transaction import VersionedTransaction
from solders.keypair import Keypair
from solders.commitment_config import CommitmentLevel
from solders.rpc.requests import SendVersionedTransaction
from solders.rpc.config import RpcSendTransactionConfig

response = requests.post(url="https://pumpportal.fun/api/trade-local", data={
"publicKey": "Your public key here",
"action": "collectCreatorFee",
"priorityFee": 0.000001,
})

keypair = Keypair.from_base58_string("Your base 58 private key here")
tx = VersionedTransaction(VersionedTransaction.from_bytes(response.content).message, [keypair])

commitment = CommitmentLevel.Confirmed
config = RpcSendTransactionConfig(preflight_commitment=commitment)
txPayload = SendVersionedTransaction(tx, config)

response = requests.post(
url="Your RPC Endpoint here - Eg: https://api.mainnet-beta.solana.com/",
headers={"Content-Type": "application/json"},
data=SendVersionedTransaction(tx, config).to_json()
)
txSignature = response.json()['result']
print(f'Transaction: https://solscan.io/tx/{txSignature}')