Skip to main content

POST /token/claim-rewards

Claim creator fees for a token. Works for both CPMM and PumpFun.

CPMM: harvests fees from the locked-LP position (requires prior /token/burn-and-lock). PumpFun: sweeps the bonding-curve vault and, if the token has migrated to PumpSwap, the PumpSwap AMM creator vault as well — both in one call.

Use case

Periodic revenue collection — cron this to run every N hours per launched token and route claimed SOL to the creator wallet.

Body

FieldTypeRequiredDescription
sTokenAddressstringyesToken mint. Must belong to the caller.

Response 200

CPMM:

{
"sTokenAddress": "…",
"ePoolType": "CPMM",
"sRewardsRecipient": "…",
"claims": [
{ "sSource": "cpmm", "sSignature": "3k…" }
]
}

PumpFun (up to two claim entries):

{
"sTokenAddress": "…",
"ePoolType": "PUMPFUN",
"sRewardsRecipient": "…",
"claims": [
{ "sSource": "pumpfun", "sSignature": "3k…", "nAmountLamports": 12345000 },
{ "sSource": "pumpswap", "sSignature": "4m…", "nAmountLamports": 8765000 }
]
}
FieldDescription
sRewardsRecipientWallet that received the claimed SOL (creator wallet for both pool types).
claims[].sSourcecpmm, pumpfun, or pumpswap.
claims[].nAmountLamportsAmount swept, present for PumpFun sources.

Errors

StatusMeaning
400No rewards to claim, or NFT already claimed (CPMM).
404Token not found, missing NFT record, or creator wallet not found.

Example

curl -X POST "$BASE_URL/token/claim-rewards" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "sTokenAddress": "…" }'