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

# eth_sendBundle

> Submit an ordered bundle of user-signed transactions over JSON-RPC

Submit an ordered list of user-signed transactions as an atomic bundle. The last transaction is the *source* nexroute backruns behind; earlier transactions are dependencies bundled in front.

**Typical use case: packing a swap with its approval.** When the user's swap requires an ERC-20 approval to a fresh allowance target, pass two transactions: `[approval_tx, swap_tx]`. nexroute simulates them in order and bundles them together with the backrun so the approval, swap, and backrun all land atomically. This avoids the cross-block race where an approval lands but the swap doesn't, and keeps the user's UX to a single signature flow on the partner side.

nexroute acknowledges synchronously with the bundle hash (keccak256 of the concatenated transaction hashes), then forwards the bundle through private partnerships.

## Request

`POST` to your Capture endpoint with a JSON-RPC 2.0 envelope.

### Params

`params` is a single-element array containing the bundle parameters object.

| Field | Type       | Required | Description                                                                                                                                                               |
| ----- | ---------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `txs` | `string[]` |    yes   | Ordered list of hex-encoded raw signed transactions (`0x`-prefixed). Last is the source nexroute backruns behind; earlier transactions are dependencies bundled in front. |

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://your-capture-endpoint \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "eth_sendBundle",
      "params": [
        {
          "txs": [
            "0x02f8...approval",
            "0x02f8...swap"
          ]
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://your-capture-endpoint', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      jsonrpc: '2.0',
      id: 1,
      method: 'eth_sendBundle',
      params: [{ txs: ['0x02f8...approval', '0x02f8...swap'] }],
    }),
  });

  const data = await response.json();
  console.log(data.result); // 0x... bundle hash
  ```
</CodeGroup>

## Response

A JSON-RPC envelope echoing the request `id`. `result` is the 32-byte bundle hash (keccak256 of the concatenated transaction hashes). Once returned, delivery is committed.

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xb1c0a8f3d2c4a9d3e1f8b7c6a5d4e3f2c1b0a9d8e7f6a5b4c3d2e1f0a9b8c7d6"
}
```

## Errors

| Code     | Cause                                                                             |
| -------- | --------------------------------------------------------------------------------- |
| `-32601` | Method not supported on this endpoint                                             |
| `-32000` | Empty bundle, or malformed transaction in `txs`                                   |
| `-32603` | Internal error during forwarding (rare; nexroute always retries before surfacing) |
