π₯ Burn Tokens β API
Use this endpoint to permanently remove tokens from circulation.
Burning is irreversible β doubleβcheck your parameters before sending the call.
Endpointβ
POST https://api.pumpapi.io
Request Bodyβ
| Field | Description |
|---|---|
privateKey | Wallet that owns the tokens. Not required if you pass apiKey instead. |
apiKey | Optional. Not required. Pass it instead of privateKey if you prefer not to send your private key. Generate one on the Trade API page (π spoiler). |
action | Must be "burn" |
mint | Mint address of the token |
mintRef | Temporary token reference for token creations |
amount | Amount to burn. '100%' burns all available balance of the token |
priorityFee | Optional extra fee in SOL to speed up the transaction |
The response returns the burn transaction signature once confirmed.
π¦ Code Examplesβ
- Python
- JavaScript
- Rust
- Go
import requests
url = "http://api.pumpapi.io"
data = {
"privateKey": "base58_private_key", # or use "apiKey": "your_api_key" instead β generate one at pumpapi.io/trade-api (π spoiler)
"action": "burn",
"mint": "mint_address",
"amount": "100%", # burn all tokens
"priorityFee": 0.000001
}
response = requests.post(url, json=data)
print(response.json()) # {'signature': '...'}
import axios from 'axios';
const data = {
privateKey: "private_key", // or use "apiKey": "your_api_key" instead β generate one at pumpapi.io/trade-api (π spoiler)
action: "burn",
mint: "mint_address",
amount: "100%", // burn all tokens
priorityFee: 0.000001
};
axios.post('http://api.pumpapi.io', data)
.then(res => console.log(res.data)) // { signature: '...' }
.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("http://api.pumpapi.io")
.json(&json!({
"privateKey": "private_key", // or use "apiKey": "your_api_key" instead β generate one at pumpapi.io/trade-api (π spoiler)
"action": "burn",
"mint": "mint_address",
"amount": "100%",
"priorityFee": 0.000001,
}))
.send()
.await?
.text()
.await?;
println!("{}", res); // {"signature":"..."}
Ok(())
}
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
data := map[string]interface{}{
"privateKey": "private_key", // or use "apiKey": "your_api_key" instead β generate one at pumpapi.io/trade-api (π spoiler)
"action": "burn",
"mint": "mint_address",
"amount": "100%", // burn all tokens
"priorityFee": 0.000001,
}
jsonData, _ := json.Marshal(data)
resp, err := http.Post("http://api.pumpapi.io", "application/json", bytes.NewBuffer(jsonData))
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result) // map[signature:...]
}