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

# Batch Landing

> Submit batch transactions to Solana through Stellium fast tx landing service

### 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:

<CodeGroup>
  ```bash Curl theme={null}
  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" }
      ]
    }
  ]'
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch('https://STELLIUM_ENDPOINT/$APIKEY', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify([
      {
        jsonrpc: '2.0',
        id: 1,
        method: 'sendTransaction',
        params: [
          base64EncodedTx1,
          { encoding: 'base64' }
        ]
      },
      {
        jsonrpc: '2.0',
        id: 2,
        method: 'sendTransaction',
        params: [
          base64EncodedTx2,
          { encoding: 'base64' }
        ]
      },
      {
        jsonrpc: '2.0',
        id: 3,
        method: 'sendTransaction',
        params: [
          base64EncodedTx3,
          { encoding: 'base64' }
        ]
      }
    ])
  });
  ```

  ```python Python theme={null}
  import requests
  import uuid

  response = requests.post(
      'https://STELLIUM_ENDPOINT/$APIKEY',
      json=[
          {
              'jsonrpc': '2.0',
              'id': 1,
              'method': 'sendTransaction',
              'params': [
                  base64_encoded_tx1,
                  {'encoding': 'base64'}
              ]
          },
          {
              'jsonrpc': '2.0',
              'id': 2,
              'method': 'sendTransaction',
              'params': [
                  base64_encoded_tx2,
                  {'encoding': 'base64'}
              ]
          },
          {
              'jsonrpc': '2.0',
              'id': 3,
              'method': 'sendTransaction',
              'params': [
                  base64_encoded_tx3,
                  {'encoding': 'base64'}
              ]
          }
      ]
  )
  ```
</CodeGroup>

### Parameters

Each request object in the batch array contains:

|       Parameter      |      Type     | Description                                                                                              |
| :------------------: | :-----------: | :------------------------------------------------------------------------------------------------------- |
|       `jsonrpc`      |     string    | Must be "2.0"                                                                                            |
|         `id`         | number/string | Unique identifier for the request (UUID is a unique ID generated by the user for request identification) |
|       `method`       |     string    | Must be "sendTransaction"                                                                                |
|       `params`       |     array     | Array containing the transaction and encoding options                                                    |
|      `params[0]`     |     string    | The transaction encoded in base64 format                                                                 |
| `params[1].encoding` |     string    | Must 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:

<CodeGroup>
  ```json Success theme={null}
  [
    {
      "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
    }
  ]
  ```

  ```json Error theme={null}
  [
    {
      "jsonrpc": "2.0",
      "result": "transaction_signature_1",
      "id": 1
    },
    {
      "jsonrpc": "2.0",
      "error": {
        "code": error_code,
        "message": "Error description"
      },
      "id": 2
    },
    {
      "jsonrpc": "2.0",
      "result": "transaction_signature_3",
      "id": 3
    }
  ]
  ```
</CodeGroup>

### 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.
