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

> Submit a single user-signed transaction over JSON-RPC

Submit a single user-signed transaction. nexroute acknowledges synchronously with the deterministic transaction hash, then forwards the transaction through private partnerships. Where a profitable on-chain backrun exists, it is appended atomically behind the user transaction; otherwise the user transaction is forwarded alone.

The partner-signed transaction is forwarded byte-for-byte; nexroute does not re-sign or modify the payload. Once a hash is returned, delivery is committed.

## Request

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

### Params

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

| Field | Type     | Required | Description                                         |
| ----- | -------- | :------: | --------------------------------------------------- |
| `tx`  | `string` |    yes   | Hex-encoded raw signed transaction (`0x`-prefixed). |

### 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_sendPrivateRawTransaction",
      "params": [{ "tx": "0x02f8..." }]
    }'
  ```

  ```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_sendPrivateRawTransaction',
      params: [{ tx: '0x02f8...' }],
    }),
  });

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

## Response

A JSON-RPC envelope echoing the request `id`. `result` is the 32-byte transaction hash. Once returned, delivery is committed.

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

## Errors

| Code     | Cause                                                                             |
| -------- | --------------------------------------------------------------------------------- |
| `-32601` | Method not supported on this endpoint                                             |
| `-32000` | Malformed transaction (RLP decode failure, invalid signature)                     |
| `-32603` | Internal error during forwarding (rare; nexroute always retries before surfacing) |
