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

# Swap-Transaktion erstellen (Base-Output)

> Erzeugt eine serialisierte Swap-Transaktion für einen gewünschten Ausgabebetrag.
Erfordert eine erfolgreiche Compute-Antwort von `/compute/swap-base-out`.




## OpenAPI

````yaml /de/api-reference/openapi/route-api-v2.yaml post /transaction/swap-base-out
openapi: 3.0.3
info:
  title: Raydium Transaction API (Route V2)
  version: 1.0.0
  description: >
    Serverseitiger Builder für Swap-Transaktionen auf Solana. Diese API erzeugt
    serialisierte Swap-Transaktionen, ohne dass Clients eine eigene
    RPC-Verbindung oder das vollständige Raydium SDK betreiben müssen.


    Antworten folgen einem einheitlichen Envelope-Format:

    - **Erfolg**: `{ id: string, success: true, data: {...} }`

    - **Fehler**: `{ id: string, success: false, msg: string }`
  contact:
    name: Raydium
    url: https://raydium.io
servers:
  - url: https://transaction-v1.raydium.io
    description: Mainnet
  - url: https://transaction-v1-devnet.raydium.io
    description: Devnet
security: []
tags:
  - name: Compute
    description: >-
      Read-only-Endpunkte zur Berechnung von Swap-Quotes (ohne
      Transaktionsaufbau).
  - name: Transaction
    description: >-
      Erstellt serialisierte Swap-Transaktionen, die bereit zum Signieren und
      Broadcasten sind.
paths:
  /transaction/swap-base-out:
    post:
      tags:
        - Transaction
      summary: Swap-Transaktion erstellen (Base-Output)
      description: >
        Erzeugt eine serialisierte Swap-Transaktion für einen gewünschten
        Ausgabebetrag.

        Erfordert eine erfolgreiche Compute-Antwort von
        `/compute/swap-base-out`.
      operationId: buildSwapTransactionBaseOut
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BuildTransactionRequest'
      responses:
        '200':
          description: Serialisierte Transaktion erfolgreich erstellt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionResponse'
        '400':
          description: Ungültiger Request-Body oder Compute-Zustand.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BuildTransactionRequest:
      type: object
      required:
        - wallet
        - swapResponse
        - txVersion
        - computeUnitPriceMicroLamports
      properties:
        wallet:
          type: string
          description: Wallet-Adresse des Signers (base58).
          example: '11111111111111111111111111111111'
        swapResponse:
          type: object
          description: Das vollständige Antwortobjekt des compute-Endpunkts.
          properties:
            id:
              type: string
            success:
              type: boolean
            version:
              type: string
            data:
              type: object
        txVersion:
          type: string
          enum:
            - V0
            - LEGACY
          description: Solana-Transaktionsversion.
          example: V0
        computeUnitPriceMicroLamports:
          type: string
          description: Compute-Unit-Preis in Mikro-Lamports (für Priority Fees).
          example: '1000'
        wrapSol:
          type: boolean
          description: >-
            Gibt an, ob SOL gewrappt werden soll, falls die Eingabe natives SOL
            ist.
          example: false
        unwrapSol:
          type: boolean
          description: Gibt an, ob WSOL in der Ausgabe zu SOL entwrappt werden soll.
          example: false
        inputAccount:
          type: string
          description: >-
            Optionale Token-Account-Adresse für die Eingabe. Erforderlich, wenn
            SOL nicht gewrappt wird.
          example: TokenAccount1111111111111111111111111111111111
        outputAccount:
          type: string
          description: Optionale Token-Account-Adresse für die Ausgabe.
          example: TokenAccount2222222222222222222222222222222222
        jitoInfo:
          type: object
          description: Optionale Jito-Bundle-Parameter für MEV-Schutz.
          properties:
            address:
              type: string
              description: Adresse zur Einreichung des Jito-Bundles.
            amount:
              type: string
              description: Bundle-Tip-Betrag in Lamports.
        referrerWallet:
          type: string
          description: Optionale Referrer-Wallet-Adresse für die Gebührenerfassung.
          example: ReferrerWallet1111111111111111111111111111111111
    TransactionResponse:
      type: object
      properties:
        id:
          type: string
          description: Eindeutiger Request-Identifier.
          example: 550e8400-e29b-41d4-a716-446655440000
        success:
          type: boolean
          description: Gibt an, ob der Transaktionsaufbau erfolgreich war.
          example: true
        version:
          type: string
          example: V1
        data:
          type: object
          description: Transaktionsdaten.
          properties:
            transaction:
              type: string
              description: Base64-kodierte versionierte Transaktion (signierbereit).
            addressLookupTableAddresses:
              type: array
              description: Adressen der Address Lookup Tables (falls txVersion=V0).
              items:
                type: string
    ErrorResponse:
      type: object
      properties:
        id:
          type: string
          description: Eindeutige Request-ID.
        success:
          type: boolean
          example: false
        version:
          type: string
          example: V1
        msg:
          type: string
          description: >-
            Fehlermeldungs-Code (z. B. REQ_SLIPPAGE_BPS_ERROR,
            REQ_WALLET_ERROR).

````