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
| Field | Type | Required | Description |
|---|---|---|---|
sTokenAddress | string | yes | Token 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 }
]
}
| Field | Description |
|---|---|
sRewardsRecipient | Wallet that received the claimed SOL (creator wallet for both pool types). |
claims[].sSource | cpmm, pumpfun, or pumpswap. |
claims[].nAmountLamports | Amount swept, present for PumpFun sources. |
Errors
| Status | Meaning |
|---|---|
400 | No rewards to claim, or NFT already claimed (CPMM). |
404 | Token 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": "…" }'