Skip to main content

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.

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.
FieldTypeRequiredDescription
txsstring[]yesOrdered list of hex-encoded raw signed transactions (0x-prefixed). Last is the source nexroute backruns behind; earlier transactions are dependencies bundled in front.

Example

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"
        ]
      }
    ]
  }'

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.
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xb1c0a8f3d2c4a9d3e1f8b7c6a5d4e3f2c1b0a9d8e7f6a5b4c3d2e1f0a9b8c7d6"
}

Errors

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