🔥 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 |
action | Must be "burn" |
mint | Mint address of the token |
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": "private_key",
"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",
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",
"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",
"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:...]
}