> ## 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 transfer (SOL + SPL + Token-2022)

> One→one or one→many transfer of native SOL and/or any SPL / Token-2022
token. Accepts either a batched `items[]` array or the legacy
single-item shorthand.

Items are grouped by `sender` (one fee payer per tx) and packed into
the fewest possible 1232-byte transactions. The server detects each
mint's token program via one batched `getMultipleAccounts` and emits
`create_associated_token_account_idempotent` + `transfer_checked` for
non-SOL items.

Replaces `POST /api/sol/transfer` from `public.raze.sh` with a batched
shape and Token-2022 autodetection.




## OpenAPI

````yaml openapi-spec/history.yaml post /utils/sol/transfer
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    Also hosts write utilities (`/utils/sol/*`): token launch, transfer, burn,

    distribute, consolidate, and fee claim/config — previously on

    `router.raze.bot`.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /utils/sol/transfer:
    post:
      summary: Batch transfer (SOL + SPL + Token-2022)
      description: |
        One→one or one→many transfer of native SOL and/or any SPL / Token-2022
        token. Accepts either a batched `items[]` array or the legacy
        single-item shorthand.

        Items are grouped by `sender` (one fee payer per tx) and packed into
        the fewest possible 1232-byte transactions. The server detects each
        mint's token program via one batched `getMultipleAccounts` and emits
        `create_associated_token_account_idempotent` + `transfer_checked` for
        non-SOL items.

        Replaces `POST /api/sol/transfer` from `public.raze.sh` with a batched
        shape and Token-2022 autodetection.
      operationId: utilsSolTransfer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferRequest'
            example:
              sender: treasuryWalletPubkeyHere...
              items:
                - receiver: RecipientPubkeyA...
                  amount: 0.1
                - receiver: RecipientPubkeyB...
                  tokenAddress: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                  amount: 5
              simulate: true
      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:
    TransferRequest:
      type: object
      description: |
        Batch transfer. Either pass `items[]` for the full batched form, or use
        the top-level `sender` / `receiver` / `tokenAddress` / `amount` for the
        legacy single-item shape. Items are grouped by sender and packed into
        the fewest possible 1232-byte transactions.
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TransferItem'
        sender:
          type: string
        receiver:
          type: string
        tokenAddress:
          type: string
        amount:
          type: number
        feeTipLamports:
          type: integer
          description: Legacy alias for tipLamports — tips the Raze relay wallet.
        tipWallet:
          type: string
          description: Custom tip recipient wallet (defaults to the Raze relay tip wallet).
        tipLamports:
          type: integer
          description: >-
            Flat tip in lamports, floored at 100000. Takes precedence over
            feeTipLamports.
        feeWallet:
          type: string
          description: Custom fee recipient wallet. Only charged together with feeBps.
        feeBps:
          type: integer
          description: |
            Percentage fee in basis points of the SOL volume this endpoint
            moves, sent to feeWallet. Endpoints with no SOL volume charge
            nothing.
        transactionsFeeLamports:
          type: integer
          description: |
            Optional priority fee in lamports. When set, compute-budget
            instructions are added to every output tx.
        encoding:
          type: string
          enum:
            - base64
            - base58
          default: base64
        maxInstructionsPerTx:
          type: integer
          description: |
            Optional cap on non-fee instructions per tx. Default = whatever fits
            the 1232-byte budget.
        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:
        error:
          type: string
        message:
          type: string
        code:
          type: string
        success:
          type: boolean
      example:
        error: Unauthorized
        message: Invalid API key
        code: INVALID_KEY
        success: false
    TransferItem:
      type: object
      description: One leg of a batched transfer.
      properties:
        sender:
          type: string
          description: |
            Payer + sender for this item. Optional — falls back to the
            top-level `sender` field. Items with different senders end up in
            separate transactions (one fee payer per tx).
        receiver:
          type: string
        tokenAddress:
          type: string
          description: |
            SPL or Token-2022 mint. Omit (or pass the wSOL mint) for native SOL.
            The token program is autodetected per mint.
        amount:
          type: number
          description: >-
            UI-denominated amount; decimals are resolved from the mint when
            non-SOL.
      required:
        - receiver
        - 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: query
      name: apiKey

````