Claim Cashback – API
Use this endpoint to claim accumulated cashback from pump.fun and PumpSwap via the pump.fun API and the PumpSwap API.
We claim cashback accumulated as a result of trading in pools where cashbackEnabled = True.
✅ If you are planning to discard your account and switch to a new one — do not forget to call this function first.
It will return several rent fees (~0.004 SOL) to your wallet, even if you have not traded in pools with cashback enabled.
You can verify the refund on Solscan in the "Balance Changes" tab to confirm that the return was successfully processed.
✅ You do not need to provide a specific pool name — we do everything for you.
Local transactions are supported
For a local-transaction example, visit the Trade API page and reuse the same local-transaction code snippets — the flow works the same way here.
Some features from the standard Trade API work here (e.g., guaranteedDelivery).
Endpoint
POST https://api.pumpapi.io
Request Body
| Field | Description |
|---|---|
privateKey | Private key of the wallet that will sign the claim transaction |
action | Must be "claimCashback" |
priorityFee | Priority fee in SOL. |
📦 Code Examples
- Python
- JavaScript
- Rust
- Go
import requests
url = "https://api.pumpapi.io"
data = {
"privateKey": "private_key",
"action": "claimCashback",
"priorityFee": "0.0000012",
}
response = requests.post(url, json=data)
print(response.json())
import axios from "axios";
const url = "https://api.pumpapi.io";
const data = {
privateKey: "private_key",
action: "claimCashback",
priorityFee: "0.0000012",
};
axios
.post(url, data)
.then((res) => console.log(res.data))
.catch((err) => console.error(err));
use reqwest::Client;
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let res = client
.post("https://api.pumpapi.io")
.json(&json!({
"privateKey": "private_key",
"action": "claimCashback",
"priorityFee": "0.0000012"
}))
.send()
.await?
.text()
.await?;
println!("{}", res);
Ok(())
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.pumpapi.io"
data := map[string]any{
"privateKey": "private_key",
"action": "claimCashback",
"priorityFee": "0.0000012",
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result any
_ = json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%v\n", result)
}