Skip to main content

Request Format

Batch requests allow you to submit multiple transactions in a single HTTP call. Send an array of JSON-RPC request objects, each following the standard Solana sendTransaction format:
curl -X POST 'https://STELLIUM_ENDPOINT/$APIKEY' \
-H "Content-Type: application/json" \
-d '[
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": [
      "<base64_encoded_tx_1>",
      { "encoding": "base64" }
    ]
  },
  {
    "jsonrpc": "2.0",
    "id": 2,
    "method": "sendTransaction",
    "params": [
      "<base64_encoded_tx_2>",
      { "encoding": "base64" }
    ]
  },
  {
    "jsonrpc": "2.0",
    "id": 3,
    "method": "sendTransaction",
    "params": [
      "<base64_encoded_tx_3>",
      { "encoding": "base64" }
    ]
  }
]'

Parameters

Each request object in the batch array contains:
ParameterTypeDescription
jsonrpcstringMust be “2.0”
idnumber/stringUnique identifier for the request (UUID is a unique ID generated by the user for request identification)
methodstringMust be “sendTransaction”
paramsarrayArray containing the transaction and encoding options
params[0]stringThe transaction encoded in base64 format
params[1].encodingstringMust be ‘base64’

Response

The response is an array of JSON-RPC response objects, one for each request in the batch. Responses are returned in the same order as the requests:
[
  {
    "jsonrpc": "2.0",
    "result": "transaction_signature_1",
    "id": 1
  },
  {
    "jsonrpc": "2.0",
    "result": "transaction_signature_2",
    "id": 2
  },
  {
    "jsonrpc": "2.0",
    "result": "transaction_signature_3",
    "id": 3
  }
]

Important Notes

  1. Each transaction in the batch requires a system transfer instruction to one of the Stellium tip addresses with a minimum tip of 0.001 SOL.
  2. Rate limits apply to the total number of transactions sent by your API key, regardless of whether transactions are sent individually or in batches.
  3. For optimal transaction landing, alternate between different tip addresses for consecutive transactions in the batch.
  4. Each request in the batch must have a unique id value to match responses correctly.
  5. Responses are returned in the same order as the requests in the batch array.
  6. Individual requests in a batch can succeed or fail independently - check each response object for success or error status.