Sol Incinerator API Integration Guide

Currenthttps://v2.api.sol-incinerator.com

Quick Start

Two common operations to get started. Each returns base58-encoded serialized transactions for your wallet to sign and send.

Build a Burn Transaction

Burns a token, NFT, or closes a token account. Returns a single serialized transaction ready for signing.

cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/burn' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "ASSET_MINT_OR_ACCOUNT"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/burn", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId }),
});

const { serializedTransaction } = await res.json();

// Deserialize and sign locally
const tx = VersionedTransaction.deserialize(
  bs58.decode(serializedTransaction),
);
tx.sign([userKeypair]);

// Relay through API RPC
const relay = await fetch("https://v2.api.sol-incinerator.com/transactions/send", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({
    signedTransaction: bs58.encode(tx.serialize()),
    waitForConfirmation: true,
  }),
});

const { signature } = await relay.json();
Response
json
{
  "assetId": "7xKXtg2CW...",
  "serializedTransaction": "AQAAAA...",
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "transactionType": "TOKEN_BURN",
  "isDestructiveAction": true
}

Close All Empty Accounts

Reclaim rent from all empty token accounts. Returns multiple transactions when a wallet has many accounts. Most teams run this on a schedule.

cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/batch/close-all' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "limit": 50,
    "offset": 0
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/batch/close-all", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, limit: 50, offset: 0 }),
});

const { transactions } = await res.json();

// Sign transactions locally
const signedTransactions: string[] = [];
for (const raw of transactions) {
  const tx = VersionedTransaction.deserialize(
    bs58.decode(raw),
  );
  tx.sign([userKeypair]);
  signedTransactions.push(bs58.encode(tx.serialize()));
}

// Relay them in parallel through API RPC
await fetch("https://v2.api.sol-incinerator.com/transactions/send-batch", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({
    signedTransactions,
    maxConcurrency: 4,
  }),
});
Response
json
{
  "transactions": ["AQAAAA...", "BQAAAA..."],
  "accountsClosed": 12,
  "totalLamportsReclaimed": 23981940,
  "totalSolanaReclaimed": 0.02398194,
  "hasDestructiveActions": false,
  "totalAccountsFound": 12,
  "truncated": false
}

Authentication

Core burn, close, batch, and transaction relay endpoints require x-api-key (or Authorization bearer). Public routes include GET /, POST /api-keys/generate, and discovery/docs endpoints like /openapi.json. MCP OAuth metadata/endpoints are also public (/.well-known/oauth-*, /register, /oauth/authorize, /oauth/token).

Required Header
http
x-api-key: YOUR_API_KEY

Burn Endpoints

Burn tokens and NFTs. Supports SPL tokens, Token-2022, Metaplex NFTs, editions, pNFTs, and MPL Core assets.

POST/burn

Build a serialized burn transaction for the user to sign and send.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
assetIdstring (base58)Yes-Mint address or token account address. For mint input, the API resolves to exactly one owned token account when required.
feePayerstring (base58)NouserPublicKeyPublic key of the account that pays transaction fees. Defaults to the userPublicKey when omitted.
autoCloseTokenAccountsbooleanNotrueWhen true, automatically closes the associated token accounts after burning, reclaiming their rent.
priorityFeeMicroLamportsintegerNoauto-estimatedPriority fee in micro-lamports to include with the transaction. When omitted the API auto-estimates an appropriate value.
asLegacyTransactionbooleanNofalseWhen true, returns a legacy transaction instead of a versioned (v0) transaction.
burnAmountstring | numberNoall tokensThe amount of tokens to burn. When omitted, the entire token balance is burned.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/burn' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "ASSET_MINT_OR_TOKEN_ACCOUNT"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/burn", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId }),
});

const { serializedTransaction } = await res.json();

// Deserialize, sign, and send
const tx = VersionedTransaction.deserialize(
  bs58.decode(serializedTransaction),
);
tx.sign([userKeypair]);
const sig = await connection.sendTransaction(tx);
Response
json
{
  "assetId": "7xKXtg2CW...",
  "serializedTransaction": "AQAAAA...",
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "transactionType": "TOKEN_BURN",
  "isDestructiveAction": true
}
FieldTypeDescription
assetIdstringThe asset identifier from the request.
serializedTransactionstring (base58)Serialized transaction for the user to sign and send.
lamportsReclaimedintegerLamports reclaimed from closed token accounts.
solanaReclaimednumberSOL equivalent of lamportsReclaimed.
transactionTypestringOperation type: TOKEN_BURN, METAPLEX_BURN, TOKEN_2022_BURN, METAPLEX_CORE_BURN, etc.
isDestructiveActionbooleanTrue if the operation destroys an asset with potential market value.
POST/burn/preview

Preview fees, reclaim amounts, and asset info before signing a burn transaction.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
assetIdstring (base58)Yes-Mint address or token account address. For mint input, the API resolves to exactly one owned token account when required.
feePayerstring (base58)NouserPublicKeyPublic key of the account that pays transaction fees. Defaults to the userPublicKey when omitted.
autoCloseTokenAccountsbooleanNotrueWhen true, automatically closes the associated token accounts after burning, reclaiming their rent.
priorityFeeMicroLamportsintegerNoauto-estimatedPriority fee in micro-lamports to include with the transaction. When omitted the API auto-estimates an appropriate value.
asLegacyTransactionbooleanNofalseWhen true, returns a legacy transaction instead of a versioned (v0) transaction.
burnAmountstring | numberNoall tokensThe amount of tokens to burn. When omitted, the entire token balance is burned.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/burn/preview' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "ASSET_MINT_OR_TOKEN_ACCOUNT"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/burn/preview", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId }),
});

const preview = await res.json();
console.log(preview.feeBreakdown, preview.lamportsReclaimed);
Response
json
{
  "assetId": "7xKXtg2CW...",
  "transactionType": "TOKEN_BURN",
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "isDestructiveAction": true,
  "assetInfo": {
    "tokenAccount": "5abc...",
    "mintAddress": "7xKX...",
    "isMetaplexNFT": true,
    "tokenStandard": 0
  },
  "feeBreakdown": {
    "totalFee": 40785,
    "rentReclaimed": { "tokenAccount": 2039280 }
  }
}
FieldTypeDescription
assetIdstringThe asset identifier from the request.
transactionTypestringOperation type: METAPLEX_BURN, TOKEN_BURN, TOKEN_2022_BURN, etc.
lamportsReclaimedintegerEstimated lamports to reclaim.
solanaReclaimednumberSOL equivalent of lamportsReclaimed.
isDestructiveActionbooleanTrue if the operation would destroy an asset with potential value.
assetInfoobjectAsset details including tokenAccount, mintAddress, programId, isMetaplexNFT, isProgrammableNFT, tokenStandard, frozen, and tokenBalance.
feeBreakdownobjectBreakdown of fees: totalFee, optional partnerFee, and rentReclaimed per account type (tokenAccount, metadata, edition, tokenRecord).
POST/burn-instructions

Return raw serialized instructions without wrapping them in a full transaction.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
assetIdstring (base58)Yes-Mint address or token account address. For mint input, the API resolves to exactly one owned token account when required.
autoCloseTokenAccountsbooleanNotrueWhen true, automatically closes the associated token accounts after burning, reclaiming their rent.
burnAmountstring | numberNoall tokensThe amount of tokens to burn. When omitted, the entire token balance is burned.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/burn-instructions' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "ASSET_MINT_OR_TOKEN_ACCOUNT"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/burn-instructions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId }),
});

const { instructions, computeUnitsRequired } = await res.json();

// Add to your own transaction
for (const ix of instructions) {
  transaction.add(deserializeInstruction(ix));
}
Response
json
{
  "assetId": "7xKXtg2CW...",
  "instructions": [
    {
      "programId": "BURNowgY7HVZsFrGo6u7ACfs3wxaThQQdCJhUY4eKtCW",
      "accounts": [
        { "pubkey": "5abc...", "isSigner": false, "isWritable": true }
      ],
      "data": "AQAAAA..."
    }
  ],
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "instructionType": "TOKEN_BURN",
  "isDestructiveAction": true,
  "computeUnitsRequired": 30000
}
FieldTypeDescription
assetIdstringThe asset identifier from the request.
instructionsarraySerialized instructions to add to your own transaction.
lamportsReclaimedintegerLamports reclaimed from closed accounts.
solanaReclaimednumberSOL equivalent of lamportsReclaimed.
instructionTypestringOperation type: METAPLEX_BURN, TOKEN_BURN, TOKEN_2022_BURN, etc.
isDestructiveActionbooleanTrue if the operation destroys an asset with potential value.
computeUnitsRequiredintegerEstimated compute units needed for the instructions.

Close Endpoints

Close empty or zero-balance token accounts to reclaim rent.

POST/close

Build a close-account transaction to reclaim rent from an empty token account.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
assetIdstring (base58)Yes-Token account (preferred) or mint address that resolves to exactly one owned token account.
feePayerstring (base58)NouserPublicKeyPublic key of the account that pays transaction fees. Defaults to the userPublicKey when omitted.
priorityFeeMicroLamportsintegerNoauto-estimatedPriority fee in micro-lamports to include with the transaction. When omitted the API auto-estimates an appropriate value.
asLegacyTransactionbooleanNofalseWhen true, returns a legacy transaction instead of a versioned (v0) transaction.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/close' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "TOKEN_ACCOUNT_ADDRESS"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/close", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId: tokenAccountAddress }),
});

const { serializedTransaction } = await res.json();

const tx = VersionedTransaction.deserialize(
  bs58.decode(serializedTransaction),
);
tx.sign([userKeypair]);
await connection.sendTransaction(tx);
Response
json
{
  "assetId": "5abc...",
  "serializedTransaction": "AQAAAA...",
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "transactionType": "TOKEN_CLOSE",
  "isDestructiveAction": false
}
FieldTypeDescription
assetIdstringThe token account address from the request.
serializedTransactionstring (base58)Serialized transaction for the user to sign and send.
lamportsReclaimedintegerRent reclaimed from the closed token account.
solanaReclaimednumberSOL equivalent of lamportsReclaimed.
transactionTypestringTOKEN_CLOSE or TOKEN_2022_CLOSE depending on the token program.
isDestructiveActionbooleanAlways false for close operations.
POST/close/preview

Preview close outcome and fee split before signing.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
assetIdstring (base58)Yes-Token account (preferred) or mint address that resolves to exactly one owned token account.
feePayerstring (base58)NouserPublicKeyPublic key of the account that pays transaction fees. Defaults to the userPublicKey when omitted.
priorityFeeMicroLamportsintegerNoauto-estimatedPriority fee in micro-lamports to include with the transaction. When omitted the API auto-estimates an appropriate value.
asLegacyTransactionbooleanNofalseWhen true, returns a legacy transaction instead of a versioned (v0) transaction.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/close/preview' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "TOKEN_ACCOUNT_ADDRESS"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/close/preview", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId: tokenAccountAddress }),
});

const preview = await res.json();
console.log(preview.feeBreakdown, preview.lamportsReclaimed);
Response
json
{
  "assetId": "5abc...",
  "transactionType": "TOKEN_CLOSE",
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "isDestructiveAction": false,
  "assetInfo": {
    "tokenAccount": "5abc...",
    "mintAddress": "7xKX...",
    "programId": "TokenkegQf...",
    "isZeroBalance": true,
    "tokenBalance": "0"
  },
  "feeBreakdown": {
    "totalFee": 40785,
    "rentReclaimed": { "tokenAccount": 2039280 }
  }
}
FieldTypeDescription
assetIdstringThe token account address from the request.
transactionTypestringTOKEN_CLOSE or TOKEN_2022_CLOSE depending on the token program.
lamportsReclaimedintegerEstimated rent to reclaim.
solanaReclaimednumberSOL equivalent of lamportsReclaimed.
isDestructiveActionbooleanAlways false for close operations.
assetInfoobjectAsset details: tokenAccount, mintAddress, programId, isZeroBalance, tokenBalance, frozen.
feeBreakdownobjectBreakdown of fees: totalFee, optional partnerFee, and rentReclaimed.tokenAccount.
POST/close-instructions

Return raw serialized close instructions without wrapping them in a full transaction.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
assetIdstring (base58)Yes-Token account (preferred) or mint address that resolves to exactly one owned token account.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/close-instructions' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "assetId": "TOKEN_ACCOUNT_ADDRESS"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/close-instructions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, assetId: tokenAccountAddress }),
});

const { instructions } = await res.json();

// Add to your own transaction
for (const ix of instructions) {
  transaction.add(deserializeInstruction(ix));
}
Response
json
{
  "assetId": "5abc...",
  "instructions": [{ "programId": "CLEANALo6FtS6quqTTEXDGFFTuSKMkeKGgcweeiPRJzK", "accounts": [...], "data": "..." }],
  "lamportsReclaimed": 1998495,
  "solanaReclaimed": 0.001998495,
  "instructionType": "TOKEN_CLOSE",
  "isDestructiveAction": false,
  "computeUnitsRequired": 30000
}
FieldTypeDescription
assetIdstringThe token account address.
instructionsarraySerialized close instructions to add to your own transaction.
lamportsReclaimedintegerRent reclaimed from the closed account.
solanaReclaimednumberSOL equivalent of lamportsReclaimed.
instructionTypestringTOKEN_CLOSE or TOKEN_2022_CLOSE depending on the token program.
isDestructiveActionbooleanAlways false for close operations.
computeUnitsRequiredintegerEstimated compute units needed.

Batch Endpoints

Close all empty accounts for a wallet in one call. Supports pagination via offset/limit.

POST/batch/close-all

Close empty token accounts for a wallet. Returns one or more base58 transactions (or an empty array for preview-only API keys).

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
offsetinteger (>= 0)No0Number of token accounts to skip before processing. Used for pagination.
limitinteger (1-5000)No500Maximum number of token accounts to include in a single batch. Range: 1-5000.
feePayerstring (base58)NouserPublicKeyPublic key of the account that pays transaction fees. Defaults to the userPublicKey when omitted.
priorityFeeMicroLamportsintegerNoauto-estimatedPriority fee in micro-lamports to include with the transaction. When omitted the API auto-estimates an appropriate value.
asLegacyTransactionbooleanNofalseWhen true, returns a legacy transaction instead of a versioned (v0) transaction.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/batch/close-all' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "limit": 500,
    "offset": 0
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/batch/close-all", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, limit: 500, offset: 0 }),
});

const { transactions } = await res.json();

// Sign and send each transaction
for (const raw of transactions) {
  const tx = VersionedTransaction.deserialize(
    bs58.decode(raw),
  );
  tx.sign([userKeypair]);
  await connection.sendTransaction(tx);
}
Response
json
{
  "transactions": ["AQAAAA...", "BQAAAA..."],
  "accountsClosed": 12,
  "totalLamportsReclaimed": 23981940,
  "totalSolanaReclaimed": 0.02398194,
  "hasDestructiveActions": false,
  "totalAccountsFound": 12,
  "truncated": false
}
FieldTypeDescription
transactionsstring[]Array of base58-serialized transactions for the user to sign and send.
accountsClosedintegerNumber of token accounts closed in this batch.
totalLamportsReclaimedintegerTotal lamports reclaimed across all accounts.
totalSolanaReclaimednumberSOL equivalent of totalLamportsReclaimed.
hasDestructiveActionsbooleanAlways false for close-account operations.
totalAccountsFoundintegerTotal empty accounts discovered for this wallet.
truncatedbooleanTrue if results were limited by the limit parameter.
nextOffsetintegerOffset to use for the next page when truncated is true. Omitted when not truncated.
POST/batch/close-all/preview

Preview the outcome of a batch close-all operation before signing.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
offsetinteger (>= 0)No0Number of token accounts to skip before processing. Used for pagination.
limitinteger (1-1000)No500Maximum number of token accounts to preview. Range: 1-1000.
feePayerstring (base58)NouserPublicKeyPublic key of the account that pays transaction fees. Defaults to the userPublicKey when omitted.
priorityFeeMicroLamportsintegerNoauto-estimatedPriority fee in micro-lamports to include with the transaction. When omitted the API auto-estimates an appropriate value.
asLegacyTransactionbooleanNofalseWhen true, returns a legacy transaction instead of a versioned (v0) transaction.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/batch/close-all/preview' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "limit": 500
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/batch/close-all/preview", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, limit: 500 }),
});

const preview = await res.json();
console.log(
  `${preview.accountsToClose} accounts, ` +
  `${preview.totalSolanaReclaimed} SOL reclaimable`
);
Response
json
{
  "accountPreviews": [
    {
      "assetId": "5abc...",
      "transactionType": "TOKEN_CLOSE",
      "lamportsReclaimed": 1998495,
      "solanaReclaimed": 0.001998495,
      "isDestructiveAction": false
    }
  ],
  "accountsPreviewed": 12,
  "accountsToClose": 12,
  "totalAccountsFound": 12,
  "totalLamportsReclaimed": 23981940,
  "totalSolanaReclaimed": 0.02398194,
  "estimatedTransactions": 2,
  "hasDestructiveActions": false,
  "summary": {
    "standardTokenAccounts": 10,
    "token2022Accounts": 2
  },
  "truncated": false
}
FieldTypeDescription
accountPreviewsarrayPer-account preview with assetId, transactionType, lamports/SOL reclaimed, and destruction flag.
accountsPreviewedintegerNumber of accounts included in the preview.
accountsToCloseintegerNumber of accounts included in this preview page.
totalAccountsFoundintegerTotal empty accounts discovered for this wallet.
totalLamportsReclaimedintegerTotal lamports reclaimable across all previewed accounts.
totalSolanaReclaimednumberSOL equivalent of totalLamportsReclaimed.
estimatedTransactionsintegerEstimated number of transactions needed for the accounts returned in this preview page.
hasDestructiveActionsbooleanAlways false for close-account operations.
summaryobjectBreakdown by account type: standardTokenAccounts and token2022Accounts.
truncatedbooleanTrue if results were limited by the limit parameter.
nextOffsetintegerOffset to use for the next page when truncated is true. Omitted when not truncated.
POST/batch/close-all/summary

Fast count of closeable accounts and total reclaimable SOL without building transactions. Scans all empty accounts regardless of limit.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/batch/close-all/summary' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY"
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/batch/close-all/summary", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey }),
});

const summary = await res.json();
console.log(
  `${summary.emptyAccountCount} empty accounts, ` +
  `${summary.totalSolanaReclaimable} SOL reclaimable`
);
Response
json
{
  "emptyAccountCount": 12,
  "totalLamportsReclaimable": 23981940,
  "totalSolanaReclaimable": 0.02398194,
  "summary": {
    "standardTokenAccounts": 10,
    "token2022Accounts": 2
  }
}
FieldTypeDescription
emptyAccountCountintegerTotal number of empty token accounts found.
totalLamportsReclaimableintegerTotal lamports reclaimable across all empty accounts.
totalSolanaReclaimablenumberSOL equivalent of totalLamportsReclaimable.
summaryobjectBreakdown by account type (standardTokenAccounts, token2022Accounts).
POST/batch/close-all-instructions

Return raw serialized instructions for a batch close-all operation.

ParameterTypeRequiredDefaultDescription
userPublicKeystring (base58)Yes-The wallet public key of the user initiating the action.
offsetinteger (>= 0)No0Number of token accounts to skip before processing. Used for pagination.
limitinteger (1-5000)No500Maximum number of token accounts to include in a single batch. Range: 1-5000.
partnerFeeAccountstring (base58)No-Public key of the partner account that receives a share of the reclaimed SOL. Must be provided together with partnerFeeBps.
partnerFeeBpsinteger (0-9800)No-Fee share in basis points (0-9800) directed to the partnerFeeAccount. Must be provided together with partnerFeeAccount.
referralCodestringNo-2-20 lowercase alphanumeric characters. Accepted on all core burn/close POST endpoints (including preview/summary). Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used another referral code, the API will not reassign it. Create and claim rewards at https://sol-incinerator.com/rewards. Mutually exclusive with partnerFeeAccount/partnerFeeBps.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/batch/close-all-instructions' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "userPublicKey": "YOUR_WALLET_PUBKEY",
    "limit": 500
  }'
TypeScript
typescript
const res = await fetch("https://v2.api.sol-incinerator.com/batch/close-all-instructions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ userPublicKey, limit: 500 }),
});

const { instructionGroups } = await res.json();

// Build your own transactions from instruction groups
for (const group of instructionGroups) {
  for (const ix of group.instructions) {
    transaction.add(deserializeInstruction(ix));
  }
}
Response
json
{
  "instructionGroups": [
    {
      "assetId": "5abc...",
      "instructions": [{ "programId": "CLEANALo6FtS6quqTTEXDGFFTuSKMkeKGgcweeiPRJzK", "accounts": [...], "data": "..." }],
      "lamportsReclaimed": 1998495,
      "solanaReclaimed": 0.001998495,
      "transactionType": "TOKEN_CLOSE",
      "isDestructiveAction": false
    }
  ],
  "accountsClosed": 12,
  "totalLamportsReclaimed": 23981940,
  "totalSolanaReclaimed": 0.02398194,
  "hasDestructiveActions": false,
  "totalAccountsFound": 12,
  "truncated": false
}
FieldTypeDescription
instructionGroupsarrayGroups of instructions, each for one account. Contains assetId, instructions, lamports/SOL reclaimed, type, and destruction flag.
accountsClosedintegerNumber of accounts closed in this batch.
totalLamportsReclaimedintegerTotal lamports reclaimed across all accounts.
totalSolanaReclaimednumberSOL equivalent of totalLamportsReclaimed.
hasDestructiveActionsbooleanAlways false for close-account operations.
totalAccountsFoundintegerTotal empty accounts discovered for this wallet.
truncatedbooleanTrue if results were limited by the limit parameter.
nextOffsetintegerOffset to use for the next page when truncated is true. Omitted when not truncated.

Execution Endpoints

Relay signed transactions through the API RPC layer. This is ideal for agent flows after local signing with a user keypair.

POST/transactions/send

Relay one signed transaction to Solana RPC through the API and optionally wait for confirmation.

ParameterTypeRequiredDefaultDescription
signedTransactionstringYes-Signed serialized transaction payload. Default encoding is base58.
encoding"base58" | "base64"Nobase58Encoding used for signedTransaction/signedTransactions payload fields.
skipPreflightbooleanNofalseForwarded to Solana sendRawTransaction options.
maxRetriesinteger (0-100)No-Forwarded to Solana sendRawTransaction options.
minContextSlotinteger (>= 0)No-Forwarded to Solana sendRawTransaction options.
preflightCommitment"processed" | "confirmed" | "finalized"NoconfirmedPreflight commitment for sendRawTransaction. If omitted, the API uses its RPC connection default (currently confirmed).
waitForConfirmationbooleanNofalseWhen true, the API polls signature status until the target commitment or timeout.
confirmationCommitment"processed" | "confirmed" | "finalized"NoconfirmedTarget commitment used when waitForConfirmation is true.
confirmationTimeoutMsinteger (1000-180000)No30000Maximum wait duration for confirmation polling.
pollIntervalMsinteger (100-5000)No1250Polling interval for confirmation checks.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/transactions/send' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "signedTransaction": "BASE58_OR_BASE64_SIGNED_TX",
    "waitForConfirmation": true
  }'
TypeScript
typescript
const relay = await fetch("https://v2.api.sol-incinerator.com/transactions/send", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({
    signedTransaction,
    waitForConfirmation: true,
  }),
});

const result = await relay.json();
console.log(result.signature, result.confirmation);
Response
json
{
  "signature": "4G3k...abc",
  "sent": true,
  "confirmation": {
    "commitment": "confirmed",
    "confirmed": true,
    "timedOut": false,
    "status": {
      "slot": 312345678,
      "confirmations": null,
      "confirmationStatus": "confirmed",
      "err": null
    }
  }
}
FieldTypeDescription
signaturestringTransaction signature returned by RPC.
sentbooleanTrue when submission to RPC succeeded.
confirmationobjectPresent when waitForConfirmation is true; includes confirmed/timedOut/status.
POST/transactions/send-batch

Relay multiple signed transactions in parallel with bounded concurrency and per-item results.

ParameterTypeRequiredDefaultDescription
signedTransactionsstring[]Yes-Array of signed serialized transaction payloads. Default encoding is base58.
encoding"base58" | "base64"Nobase58Encoding used for signedTransaction/signedTransactions payload fields.
maxConcurrencyinteger (1-32)No8Parallel send concurrency for /transactions/send-batch.
skipPreflightbooleanNofalseForwarded to Solana sendRawTransaction options.
maxRetriesinteger (0-100)No-Forwarded to Solana sendRawTransaction options.
minContextSlotinteger (>= 0)No-Forwarded to Solana sendRawTransaction options.
preflightCommitment"processed" | "confirmed" | "finalized"NoconfirmedPreflight commitment for sendRawTransaction. If omitted, the API uses its RPC connection default (currently confirmed).
waitForConfirmationbooleanNofalseWhen true, the API polls signature status until the target commitment or timeout.
confirmationCommitment"processed" | "confirmed" | "finalized"NoconfirmedTarget commitment used when waitForConfirmation is true.
confirmationTimeoutMsinteger (1000-180000)No30000Maximum wait duration for confirmation polling.
pollIntervalMsinteger (100-5000)No1250Polling interval for confirmation checks.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/transactions/send-batch' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "signedTransactions": ["SIGNED_TX_1", "SIGNED_TX_2"],
    "maxConcurrency": 4
  }'
TypeScript
typescript
const relay = await fetch("https://v2.api.sol-incinerator.com/transactions/send-batch", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({
    signedTransactions,
    maxConcurrency: 4,
  }),
});

const batch = await relay.json();
console.log(batch.sentCount, batch.failedCount, batch.results);
Response
json
{
  "sentCount": 2,
  "failedCount": 1,
  "results": [
    { "index": 0, "sent": true, "signature": "2v9..." },
    { "index": 1, "sent": true, "signature": "9Qa..." },
    { "index": 2, "sent": false, "error": "blockhash not found" }
  ]
}
FieldTypeDescription
sentCountintegerHow many transactions were accepted by RPC.
failedCountintegerHow many transactions failed to submit.
resultsarrayPer-index send result with signature or error details.
POST/transactions/status

Lookup confirmation status and errors for a transaction signature.

ParameterTypeRequiredDefaultDescription
signaturestringYes-Transaction signature to look up.
searchTransactionHistorybooleanNotrueWhether to include rooted history in signature status lookup.
cURL
bash
curl -X POST 'https://v2.api.sol-incinerator.com/transactions/status' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{
    "signature": "4G3k...abc"
  }'
TypeScript
typescript
const statusRes = await fetch("https://v2.api.sol-incinerator.com/transactions/status", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": process.env.BURN_API_KEY!,
  },
  body: JSON.stringify({ signature }),
});

const status = await statusRes.json();
console.log(status.found, status.status);
Response
json
{
  "signature": "4G3k...abc",
  "found": true,
  "status": {
    "slot": 312345678,
    "confirmations": null,
    "confirmationStatus": "finalized",
    "err": null
  }
}
FieldTypeDescription
signaturestringSignature from request.
foundbooleanTrue when RPC returns a status for this signature.
statusobject | nullSignature status payload (slot, confirmationStatus, err).

Fee Model

Basis-point fees applied to reclaimable rent with floor arithmetic.

Protocol Fee

200 BPS (2.00%) of reclaimable rent, applied to every operation.

fee = floor(reclaimableRent * 200 / 10000)

User Receives

Reclaimable rent minus protocol fee and any optional partner fee.

userReceives = reclaimableRent - protocolFee - partnerFee

Worked Example

A token account with 2,039,280 lamports (0.00204 SOL) in reclaimable rent:

Protocol feefloor(2,039,280 × 200 / 10,000) = 40,785 lamports
User receives2,039,280 − 40,785 = 1,998,495 lamports (0.001998495 SOL)

Partner Fee System

Integrators can collect a fee on each operation by providing a partner account and fee rate.

Configuration

partnerFeeAccountBase58 public key receiving the fee
partnerFeeBpsInteger 0-9800 (100 BPS = 1%)

Both must be provided together, or both omitted. Fee is deducted from reclaimable rent alongside the protocol fee.

Example

Same 2,039,280 lamport account with partnerFeeBps: 150 (1.5%):

Protocol feefloor(2,039,280 × 200 / 10,000) = 40,785
Partner feefloor(2,039,280 × 150 / 10,000) = 30,589
User receives2,039,280 − 40,785 − 30,589 = 1,967,906

Referral Code System

Use referralCode on burn/close requests to apply a referral code. Referrers earn 20% of a referred wallet's future protocol fees for life. Create a code and claim rewards on https://sol-incinerator.com/rewards.

Behavior

FieldreferralCode
Format2-20 lowercase alphanumeric
Payout20% of future protocol fees for life
ReassignmentNo (existing referral stays)

Current Effect

Send referralCode in burn/close requests to count activity toward that referral code. Referrers receive 20% of future protocol fees from referred wallets for life. If a wallet already used a different referral code, the API will not reassign it to your code. Rewards are managed at https://sol-incinerator.com/rewards.

Referral + Partner Parameters

These two monetization approaches are mutually exclusive. The API rejects requests that include both partnerFeeAccount/partnerFeeBps and referralCode with a 400 error.

Partner Fees

Direct cut of reclaimable rent at a rate you control. Funds go to your partner account on-chain in the same transaction.

Referral Codes

Use referralCode to apply a referral code and earn 20% of future protocol fees for life. Existing referred wallets are not reassigned to a new code. Create and claim rewards on sol-incinerator.com/rewards.

Errors & Rate Limits

HTTP status codes and rate limiting behavior.

StatusMeaning
400Invalid payload or unsupported parameter combination
401Missing or invalid API key / bearer token / session token
403Admin role required or missing token scope
409One-key policy conflict
429Rate limit exceeded

Standard Endpoints

240 requests/minute per route + identity

Batch Endpoints

60 requests/minute for /batch/close-all, /batch/close-all/preview, /batch/close-all/summary, and /batch/close-all-instructions

AI & Tooling Integration

Hosted MCP endpoint/mcp
OAuth protected-resource metadata/.well-known/oauth-protected-resource
OAuth auth-server metadata/.well-known/oauth-authorization-server
OpenAPI spec/openapi.json
API catalog (RFC 9727)/.well-known/api-catalog
LLM index/llms.txt
LLM markdown guide/llms.md

Use our hosted MCP server to expose burn/close API operations as tools in Codex and Claude.

Codex CLI
bash
codex mcp add solincinerator --url "https://v2.api.sol-incinerator.com/mcp"
Codex Config (config.toml)
toml
[mcp_servers.solincinerator]
url = "https://v2.api.sol-incinerator.com/mcp"
Claude CLI
bash
claude mcp add -s user -t http solincinerator "https://v2.api.sol-incinerator.com/mcp"

Execution tools only relay signed payloads. The wallet owner must sign transactions locally with their private key/keypair before using send_transaction or send_transaction_batch.

Start with signing_requirements to get the expected signer flow and a known-good Node snippet (including correct bs58 import shape).

MCP Tools
text
signing_requirements
burn
burn_preview
burn_instructions
close
close_preview
close_instructions
close_wallet
close_wallet_preview
batch_close_all
batch_close_all_preview
batch_close_all_summary
batch_close_all_instructions
send_transaction
send_transaction_batch
get_transaction_status
get_status
get_openapi
get_api_catalog
get_llms_index
get_llms_markdown
get_llms_full
get_docs_markdown

Help & Support

If you run into issues or discover a bug, please create a ticket in our Discord server.

Join Sol Slugs Discord