Special APIs for Degens
Burn Tokens
Burn tokens and reclaim the sol back
Use this endpoint to burn your tokens and get back the SOL. You get the SOL usually (0.002) from closing the token account and reclaiming back the rent fee.
Endpoint
POST https://pumpapi.fun/api/burn_tokens
Request Body
The request body should contain the following parameters:
Parameter | Type | Description |
---|---|---|
mint | string | The mint address of the token to be burned |
priorityFee | number | The priority fee for the transaction |
userPrivateKey | string | The user’s private key |
Request Example
Response
The response will contain the result of the burn token transaction.
Parameter | Type | Description |
---|---|---|
transactionId | string | The ID of the transaction |
status | string | The status of the transaction (e.g. “success” or “failed”) |
message | string | A message describing the result of the transaction |
Response Example
Required Parameters
The following parameters are required in the request body:
- mint: The mint address of the token to be burned
- priorityFee: The priority fee for the transaction
- userPrivateKey: The user’s private key
Error Codes
400 Bad Request
: Invalid request parameters or missing required fields.401 Unauthorized
: Authentication failed.404 Not Found
: The requested resource (endpoint) is not found.429 Too Many Requests
: Rate limit exceeded.500 Internal Server Error
: Unexpected server-side error.
API Codes
200 OK
: The request was successful.