simulateBundle Solana RPC Method

Documentation Index

Fetch the complete documentation index at: /docs/llms.txt

Use this file to discover all available pages before exploring further.

Request Parameters

params[0]

params[0].encodedTransactions

params[1]

params[1].preExecutionAccountsConfigs

params[1].postExecutionAccountsConfigs

params[1].transactionEncoding

params[1].skipSigVerify

params[1].replaceRecentBlockhash

Example cURL Request

curl --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=' \
  --header 'Content-Type: application/json' \
  --data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "simulateBundle",
    "params": [
      {
        "encodedTransactions": [
          "AUpZwml/cvAaQoRINPCXI/+Zp1bEG31TsbQ7YkESdUqtoGHrGSlZWLGh7qsa54Pon3RCx46Z6l+IlAgV8GNmbgcBAAED48eIT6fA5gQUuhts6qDwJ8rp6qemton7jK+tSNA6uiM3FVSCTsdmSMNKqTIUrKARpzIIQabdGWwDk74PLnrd/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASgbUMGWXPNjQAwed9kPYG5gXZsBq9jrSuVNeTuC4o0IBAgIAAQwCAAAA6AMAAAAAAAA="
        ]
      },
      {
        "preExecutionAccountsConfigs": [
          null
        ],
        "postExecutionAccountsConfigs": [
          null
        ],
        "skipSigVerify": true,
        "transactionEncoding": "base64",
        "replaceRecentBlockhash": true
      }
    ]
}'

Example Python Request

import requests

url = "https://mainnet.helius-rpc.com/?api-key="

payload = {
    "jsonrpc": "2.0",
    "id": "1",
    "method": "simulateBundle",
    "params": [
        {
            "encodedTransactions": [
                "AUpZwml/cvAaQoRINPCXI/+Zp1bEG31TsbQ7YkESdUqtoGHrGSlZWLGh7qsa54Pon3RCx46Z6l+IlAgV8GNmbgcBAAED48eIT6fA5gQUuhts6qDwJ8rp6qemton7jK+tSNA6uiM3FVSCTsdmSMNKqTIUrKARpzIIQabdGWwDk74PLnrd/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASgbUMGWXPNjQAwed9kPYG5gXZsBq9jrSuVNeTuC4o0IBAgIAAQwCAAAA6AMAAAAAAAA="
            ]
        },
        {
            "preExecutionAccountsConfigs": [None],
            "postExecutionAccountsConfigs": [None],
            "skipSigVerify": True,
            "transactionEncoding": "base64",
            "replaceRecentBlockhash": True
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Example Go Request

package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://mainnet.helius-rpc.com/?api-key="

payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": \"1\",\n  \"method\": \"simulateBundle\",\n  \"params\": [\n    {\n      \"encodedTransactions\": [\n        \"AUpZwml/cvAaQoRINPCXI/+Zp1bEG31TsbQ7YkESdUqtoGHrGSlZWLGh7qsa54Pon3RCx46Z6l+IlAgV8GNmbgcBAAED48eIT6fA5gQUuhts6qDwJ8rp6qemton7jK+tSNA6uiM3FVSCTsdmSMNKqTIUrKARpzIIQabdGWwDk74PLnrd/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASgbUMGWXPNjQAwed9kPYG5gXZsBq9jrSuVNeTuC4o0IBAgIAAQwCAAAA6AMAAAAAAAA=\"\n      ]\n    },\n    {\n      \"preExecutionAccountsConfigs\": [\n        null\n      ],\n      \"postExecutionAccountsConfigs\": [\n        null\n      ],\n      \"skipSigVerify\": true,\n      \"transactionEncoding\": \"base64\",\n      \"replaceRecentBlockhash\": true\n    }\n  ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}

Example PHP Request

<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://mainnet.helius-rpc.com/?api-key=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'jsonrpc' => '2.0',
    'id' => '1',
    'method' => 'simulateBundle',
    'params' => [
        [
            'encodedTransactions' => [
                'AUpZwml/cvAaQoRINPCXI/+Zp1bEG31TsbQ7YkESdUqtoGHrGSlZWLGh7qsa54Pon3RCx46Z6l+IlAgV8GNmbgcBAAED48eIT6fA5gQUuhts6qDwJ8rp6qemton7jK+tSNA6uiM3FVSCTsdmSMNKqTIUrKARpzIIQabdGWwDk74PLnrd/QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASgbUMGWXPNjQAwed9kPYG5gXZsBq9jrSuVNeTuC4o0IBAgIAAQwCAAAA6AMAAAAAAAA="
            ]
        ],
        [
            'preExecutionAccountsConfigs' => [
                null
            ],
            'postExecutionAccountsConfigs' => [
                null
            ],
            'skipSigVerify' => true,
            'transactionEncoding' => 'base64',
            'replaceRecentBlockhash' => true
        ]
    ]
]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>

Response Codes