> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch burn (SPL + Token-2022)

> Burn SPL or Token-2022 tokens. Accepts a batched `items[]` array or the
legacy single-item shorthand.

Items are grouped by `wallet` and each `(wallet, mint)` pair is
resolved to its actual token account (supports seed-based accounts,
not just standard ATAs). Burns are packed into the fewest possible
1232-byte transactions.

Replaces `POST /api/sol/burn` from `public.raze.sh`.




## OpenAPI

````yaml openapi-spec/trading.yaml post /utils/sol/burn
openapi: 3.0.3
info:
  title: Raze Trading API
  description: >
    Trading endpoints for Solana token swaps — quote, buy, sell, and raw
    instructions.


    Runs on port 8082.


    **Auth methods**: `Authorization: Bearer sk_...` header, `X-API-Key: sk_...`
    header, or `?apiKey=sk_...` query param.
  version: 2.0.0
servers:
  - url: https://router.raze.bot
    description: >-
      Raze global trading router — GeoDNS routes to the nearest region
      automatically
security: []
paths:
  /utils/sol/burn:
    post:
      summary: Batch burn (SPL + Token-2022)
      description: |
        Burn SPL or Token-2022 tokens. Accepts a batched `items[]` array or the
        legacy single-item shorthand.

        Items are grouped by `wallet` and each `(wallet, mint)` pair is
        resolved to its actual token account (supports seed-based accounts,
        not just standard ATAs). Burns are packed into the fewest possible
        1232-byte transactions.

        Replaces `POST /api/sol/burn` from `public.raze.sh`.
      operationId: utilsSolBurn
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BurnRequest'
            example:
              items:
                - wallet: WalletPubkeyA...
                  tokenAddress: MintPubkeyA...
                  amount: 100
                - wallet: WalletPubkeyA...
                  tokenAddress: MintPubkeyB...
                  amount: 50
      responses:
        '200':
          description: Transactions built
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UtilsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    BurnRequest:
      type: object
      description: |
        Batch burn. Either pass `items[]` for the full batched form, or use
        top-level `wallet` / `tokenAddress` / `amount`.
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/BurnItem'
        wallet:
          type: string
        tokenAddress:
          type: string
        amount:
          type: number
        feeTipLamports:
          type: integer
        transactionsFeeLamports:
          type: integer
        encoding:
          type: string
          enum:
            - base64
            - base58
          default: base64
        maxInstructionsPerTx:
          type: integer
        simulate:
          type: boolean
          default: false
    UtilsResponse:
      type: object
      description: |
        Shared envelope for every `/utils/sol/*` write endpoint. Optional
        fields are omitted from the JSON when unset.
      properties:
        success:
          type: boolean
        transactions:
          type: array
          description: Serialized partially-signed transactions in submission order.
          items:
            type: string
        batches:
          type: array
          description: |
            For batch endpoints (`transfer`, `burn`): packing metadata.
            `batches[i]` describes `transactions[i]`.
          items:
            $ref: '#/components/schemas/BatchInfo'
        mint:
          type: string
          description: Set by `/utils/sol/launch` — the mint of the launched token.
        platform:
          type: string
          description: Set by `/utils/sol/launch` and `/utils/sol/fees/claim`.
        status:
          type: object
          description: Set by `/utils/sol/fees/config` for `action=status` reads.
        simulations:
          type: array
          description: |
            Set when the request had `simulate: true`. One entry per built tx,
            in the same order as `transactions`. Each entry is the RPC
            `simulateTransaction` `value` object (logs / unitsConsumed / err).
          items:
            type: object
        error:
          type: string
      required:
        - success
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        details:
          type: string
      required:
        - success
        - error
    BurnItem:
      type: object
      description: One leg of a batched burn.
      properties:
        wallet:
          type: string
          description: |
            Burn authority + fee payer. Optional — falls back to top-level
            `wallet`. Items with different wallets go to separate transactions.
        tokenAddress:
          type: string
        amount:
          type: number
          description: UI-denominated amount; decimals are resolved from the mint.
      required:
        - tokenAddress
        - amount
    BatchInfo:
      type: object
      description: |
        Per-transaction packing metadata returned by batch endpoints. Lets the
        caller correlate input items → serialized txs for partial-retry logic
        when one tx in a batch lands and another doesn't.
      properties:
        signers:
          type: array
          items:
            type: string
          description: Required signers for this tx (fee payer first).
        itemIndices:
          type: array
          items:
            type: integer
          description: Indices into the request's `items[]` array packed into this tx.
        instructionCount:
          type: integer
          description: >-
            Non-fee instructions in this tx (excludes compute-budget + fee
            transfers).
      required:
        - signers
        - itemIndices
        - instructionCount
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````