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

# simulateTransaction

> simulateTransaction zeigt die Protokolle, die Nutzung der Recheneinheit und die Kontenänderungen einer Solana-Transaktion an, ohne sie abzuschicken — Gebühren schätzen und Fehler erkennen.

## Anforderungsparameter

<ParamField body="transaction" type="string" required>
  Die signierte Transaktion als kodierter String (base58 oder base64).
</ParamField>

<ParamField body="encoding" type="string">
  Kodierung, die für die Transaktionsdaten verwendet wird.

  * `base58`
  * `base64`
</ParamField>

<ParamField body="skipPreflight" type="boolean">
  Überspringen der Vorflug-Transaktionsprüfungen.
</ParamField>

<ParamField body="preflightCommitment" type="string">
  Commitment-Level für den Vorflug verwenden.

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>

<ParamField body="sigVerify" type="boolean">
  Wenn wahr, die Transaktionssignaturen überprüfen.
</ParamField>

<ParamField body="replaceRecentBlockhash" type="boolean">
  Wenn wahr, den aktuellen Blockhash der Transaktion durch den neuesten ersetzen.
</ParamField>

<ParamField body="minContextSlot" type="number">
  Minimaler Slot, bei dem die Vorflug-Transaktionsprüfungen durchgeführt werden sollen.
</ParamField>

<ParamField body="innerInstructions" type="boolean">
  Wenn wahr, innere Anweisungen in die Antwort aufnehmen.
</ParamField>

<ParamField body="accounts" type="object" />

<ParamField body="accounts.addresses" type="array">
  Array von Konten, das zurückgegeben wird, als base-58 codierte Strings.
</ParamField>

<ParamField body="accounts.encoding" type="string">
  Kodierungsformat für zurückgegebene Kontodaten.

  * `base64`
  * `base58`
  * `base64+zstd`
  * `jsonParsed`
</ParamField>


## OpenAPI

````yaml de/openapi/rpc-http/simulateTransaction.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    Erweiterte Solana-Transaktionssimulations-API zum Testen und Debuggen von
    Blockchain-Transaktionen, bevor sie ins Solana-Netzwerk übertragen werden.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Mainnet RPC-Endpunkt
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC-Endpunkt
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: simulateTransaction
      description: >-
        Simulieren Sie Solana-Transaktionen, ohne sie auf der Blockchain
        auszuführen. Dieses leistungsstarke Debugging-Tool ermöglicht
        Entwicklern, die Ausführung von Transaktionen zu testen, das Verhalten
        von Programmen zu überprüfen, den Verbrauch von Berechnungseinheiten
        abzuschätzen, Fehler zu erkennen und Änderungen im Kontostatus zu
        überprüfen, bevor Transaktionen ins Netzwerk übertragen werden.
        Wesentlich für die Entwicklung von Solana-Anwendungen,
        Smart-Contract-Tests und die Optimierung von Transaktionen.
      operationId: simulateTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Die JSON-RPC-Protokollversion.
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Ein eindeutiger Bezeichner für die Anfrage.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - simulateTransaction
                  description: Der Name der aufzurufenden RPC-Methode.
                  example: simulateTransaction
                  default: simulateTransaction
                params:
                  type: array
                  description: Parameter für die Simulation einer Transaktion.
                  default:
                    - >-
                      AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=
                    - encoding: base64
                  items:
                    oneOf:
                      - type: string
                        description: >-
                          Die signierte Transaktion als codierter String (base58
                          oder base64).
                        example: >-
                          AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDArczbMia1tLmq7zz4DinMNN0pJ1JtLdqIJPUw3YrGCzYAMHBsgN27lcgB6H2WQvFgyZuJYHa46puOQo9yQ8CVQbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCp20C7Wj2aiuk5TReAXo+VTVg8QTHjs0UjNMMKCvpzZ+ABAgEBARU=
                      - type: object
                        description: Konfigurationsobjekt für die Simulation.
                        properties:
                          encoding:
                            type: string
                            description: >-
                              Kodierung, die für die Transaktionsdaten verwendet
                              wird.
                            enum:
                              - base58
                              - base64
                            example: base64
                          skipPreflight:
                            type: boolean
                            description: Überspringen der Preflight-Transaktionsprüfungen.
                            example: false
                          preflightCommitment:
                            type: string
                            description: Engagement Level für den Preflight.
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
                          sigVerify:
                            type: boolean
                            description: >-
                              Wenn true, werden die Transaktionssignaturen
                              überprüft.
                            example: false
                          replaceRecentBlockhash:
                            type: boolean
                            description: >-
                              Wenn true, wird der aktuelle Blockhash der
                              Transaktion durch den neuesten ersetzt.
                            example: false
                          minContextSlot:
                            type: integer
                            description: >-
                              Mindest-Slot, in dem
                              Preflight-Transaktionsprüfungen durchgeführt
                              werden.
                            example: 1000
                          innerInstructions:
                            type: boolean
                            description: >-
                              Wenn true, werden innere Anweisungen in die
                              Antwort einbezogen.
                            example: false
                          accounts:
                            type: object
                            properties:
                              addresses:
                                type: array
                                description: >-
                                  Array von Konten, die zurückgegeben werden,
                                  als base-58 codierte Strings.
                                items:
                                  type: string
                                  example: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri
                              encoding:
                                type: string
                                description: >-
                                  Kodierungsformat für zurückgegebene
                                  Kontodaten.
                                enum:
                                  - base64
                                  - base58
                                  - base64+zstd
                                  - jsonParsed
                                example: base64
      responses:
        '200':
          description: Die Transaktion wurde erfolgreich simuliert.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: Die JSON-RPC-Protokollversion.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Kennung, die der Anfrage entspricht.
                    example: '1'
                  result:
                    type: object
                    description: Ergebnis der simulierten Transaktion.
                    properties:
                      context:
                        type: object
                        description: Kontext der Simulationsantwort.
                        properties:
                          apiVersion:
                            type: string
                            description: Die API-Version des RPC-Knotens.
                            example: 2.3.3
                          slot:
                            type: integer
                            description: Slot, in dem die Daten abgerufen wurden.
                            example: 393226680
                      value:
                        type: object
                        description: Details des simulierten Transaktionsergebnisses.
                        properties:
                          accounts:
                            type:
                              - array
                              - 'null'
                            items:
                              type: object
                              description: >-
                                Konto-Details im Zusammenhang mit der
                                Transaktion.
                              example:
                                lamports: 5000
                                owner: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                          err:
                            type:
                              - object
                              - 'null'
                            description: >-
                              Fehler, falls die Transaktion fehlgeschlagen ist,
                              null bei Erfolg.
                            example: null
                          innerInstructions:
                            type:
                              - array
                              - 'null'
                            description: >-
                              Innere Anweisungen, die während der Transaktion
                              ausgeführt wurden.
                            example: null
                          loadedAccountsDataSize:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              Gesamtgröße in Bytes aller während der Simulation
                              geladenen Kontodaten.
                            example: 413
                          logs:
                            type:
                              - array
                              - 'null'
                            items:
                              type: string
                            description: >-
                              Protokolle der Programmausführung aus der
                              Transaktionssimulation.
                            example:
                              - >-
                                Program
                                TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                                invoke [1]
                              - 'Program log: Instruction: Transfer'
                              - >-
                                Program
                                TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                                consumed 1714 of 200000 compute units
                              - >-
                                Program
                                TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                                success
                          replacementBlockhash:
                            type:
                              - object
                              - 'null'
                            description: >-
                              Blockhash-Austauschinformationen, wenn
                              replaceRecentBlockhash aktiviert ist.
                            properties:
                              blockhash:
                                type: string
                                description: Der Austausch-Blockhash.
                                example: 6oFLsE7kmgJx9PjR4R63VRNtpAVJ648gCTr3nq5Hihit
                              lastValidBlockHeight:
                                type: integer
                                description: >-
                                  Die letzte gültige Blockhöhe für den
                                  Austausch-Blockhash.
                                example: 381186895
                          returnData:
                            type:
                              - object
                              - 'null'
                            properties:
                              programId:
                                type: string
                                example: 83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri
                              data:
                                type: array
                                items:
                                  type: string
                                example:
                                  - Kg==
                                  - base64
                            description: >-
                              Von der Transaktion zurückgegebene Daten, falls
                              vorhanden.
                            example: null
                          unitsConsumed:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              Gesamtanzahl der während der Simulation
                              verbrauchten Berechnungseinheiten.
                            example: 1714
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  context:
                    apiVersion: 2.3.3
                    slot: 393226680
                  value:
                    accounts: null
                    err: null
                    innerInstructions: null
                    loadedAccountsDataSize: 413
                    logs:
                      - >-
                        Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                        invoke [1]
                      - 'Program log: Instruction: Transfer'
                      - >-
                        Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                        consumed 1714 of 200000 compute units
                      - >-
                        Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
                        success
                    replacementBlockhash:
                      blockhash: 6oFLsE7kmgJx9PjR4R63VRNtpAVJ648gCTr3nq5Hihit
                      lastValidBlockHeight: 381186895
                    returnData: null
                    unitsConsumed: 1714
        '400':
          description: Bad Request - Ungültige Anfragenparameter oder fehlerhafte Anfrage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
                id: '1'
        '401':
          description: Unauthorized - Ungültiger oder fehlender API-Schlüssel.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Zu viele Anfragen - Ratenlimit überschritten.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Interner Serverfehler - Ein Fehler ist auf dem Server aufgetreten.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: >-
            Dienst nicht verfügbar - Der Dienst ist vorübergehend nicht
            verfügbar.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway-Timeout - Die Anfrage ist abgelaufen.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Die JSON-RPC-Protokollversion.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Der Fehlercode.
              example: -32602
            message:
              type: string
              description: Die Fehlermeldung.
            data:
              type: object
              description: Zusätzliche Informationen über den Fehler.
        id:
          type: string
          description: Kennung, die der Anfrage entspricht.
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Ihr Helius-API-Schlüssel. Sie können einen kostenlos im
        [Dashboard](https://dashboard.helius.dev/api-keys) erhalten.

````