> For the complete documentation index, see [llms.txt](https://docs.novarpc.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novarpc.xyz/searchers/ethereum.md).

# Ethereum

This API provides protected pending transactions and bundles on Ethereum mainnet and accepts backrun bundles over the same WebSocket connection. The model is similar to Base but without flashblocks; latency still matters, but auctions are not sub-200ms.

An API key is required for access.

***

#### WebSocket Connection

Connect using your API key:

```html
wss://eth.novarpc.xyz/ws/v1/<API_KEY>
```

The protocol is JSON-RPC 2.0 over WebSocket. Clients must reconnect and resubscribe if the connection drops. Subscriptions are not persisted.

***

#### Subscribing to Flow

After connecting, send `eth_subscribe` to receive qualifying flow. You may subscribe to transactions, bundles, or both.

Pending transactions:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_subscribe",
  "params": ["nova_partialPendingTransactions"]
}
```

Pending bundles:

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "eth_subscribe",
  "params": ["nova_partialPendingBundles"]
}
```

Each subscription returns a subscription ID:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xa04fcb2de702f3bcd205ce666b7d5232"
}
```

This ID is used client-side to match incoming messages to the corresponding subscription.

***

#### Receiving Data

Subscribed data is delivered via `eth_subscription` messages.

For individual transactions, the `result` field contains a single transaction object:

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "subscription": "0xa04fcb2de702f3bcd205ce666b7d5232",
    "result": {
      "chainId": "0x1",
      "from": "0xcba40bd88d70ec7b31a898e1a5d1cffde91069f2",
      "to": "0xa44f26477bd3460103310395f4e3b713d4c9e5d6",
      "hash": "0x04f2103bed46aef0edf4ece05c5a43a72df127315b097e6bc1615ac8d8cd59f9",
      "value": "0x18fae27693b40000",
      "gas": "0x5a3c",
      "maxPriorityFeePerGas": "0x216744fd",
      "maxFeePerGas": "0x4b04cc44a",
      "nonce": "0x1ca",
      "type": "0x2",
      "data": "0x",
      "accessList": []
    }
  }
}
```

For bundles, the `result` field is an array of one or more transactions:

```json
{
  "jsonrpc": "2.0",
  "method": "eth_subscription",
  "params": {
    "subscription": "0xc06fe452246374c64932164bbc045530",
    "result": [
      { "...tx1 fields..." },
      { "...tx2 fields..." }
    ]
  }
}
```

The only structural difference between transactions and bundles is that bundles return an array. In both cases, the `hash` field identifies the originator transaction or bundle that must be referenced when backrunning.

***

#### Sending Bundles

Backrun bundles must be submitted over this WebSocket connection. Sending them to a standard HTTP `eth_sendBundle` endpoint will not work.

```json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "eth_sendBundle",
  "params": [
    {
      "txs": [
        "0xOriginatorHash",
        "0xRawSignedTransaction"
      ]
    }
  ]
}
```

The `txs` array must be ordered. The first element is always the hash of the pending transaction or bundle you are backrunning. Subsequent elements are your signed transactions in raw hex form.

When backrunning a received bundle, each transaction will appear with a generated bundle hash. Include that generated hash only once as the first element in `txs`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.novarpc.xyz/searchers/ethereum.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
