# arbOnlyMEV Stream

The `arbOnlyMEV` stream provides real-time access to private transactions that carry arbitrage potential. These transactions are submitted privately via bloXroute’s and are not visible in the public mempool or standard transaction feeds.

Searchers use this stream to identify MEV opportunities and submit backrun-only bundles.

Service available via Cloud API only.

## **Stream Endpoint**

* **Method**: `arbOnlyMEV`
* **Endpoint**: `backrunme.blxrbdn.com`

### Parameters

| **`include`** | Fields to include in the transaction stream. | **`transactions`** |
| ------------- | -------------------------------------------- | ------------------ |

### **Examples**

{% tabs %}
{% tab title="wscat" %}

```bash
wscat -c wss://backrunme.blxrbdn.com/ws --no-check --header "Authorization: <YOUR-AUTHORIZATION-HEADER>"
> {"id": 1, "method": "subscribe", "params": ["arbOnlyMEV", {"include": ["transactions"]}]}
< ......
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
var fs = require('fs');
const WebSocket = require('ws');

const ws = new WebSocket(
  "wss://backrunme.blxrbdn.com/ws", 
  {
    headers: { 
      "Authorization" : <YOUR-AUTHORIZATION-HEADER> 
    },
    rejectUnauthorized: false,
  }
);

function proceed() {
    ws.send(`{"jsonrpc": "2.0", "id": 1, "method": "subscribe", "params": ["arbOnlyMEV", {"include": ["transactions"]}]}`);
}


function handle(nextNotification) {
    console.log(nextNotification.toString()); // or process it generally
}

ws.on('open', proceed);
ws.on('message', handle);

```

{% endtab %}

{% tab title="Python" %}

```python
import asyncio, json, websockets

async def main():
    auth_key = "YOUR_AUTHORIZATION_HEADER"
    uri = 'wss://backrunme.blxrbdn.com/ws'
    async with websockets.connect(
            uri,
            header=["Authorization:{}".format(auth_key)],            
            sslopt={"cert_reqs": ssl.CERT_NONE},
    ) as websocket:
        subscribe_request = {
            "jsonrpc": "2.0",
            "id": 1,
            "method": "subscribe",
            "params": ["arbOnlyMEV", {"include": ["transactions"]}]
        }
        await websocket.send(json.dumps(subscribe_request))
        response = await websocket.recv()
        subscription_id = json.loads(response)["result"]

        while True:
            next_notification = await websocket.recv()
            print(next_notification)  # or process it generally

        unsubscribe_request = {
            "jsonrpc": "2.0",
            "id": 2,
            "method": "unsubscribe",
            "params": [subscription_id]
        }
        await websocket.send(json.dumps(unsubscribe_request))

if __name__ == '__main__':
    asyncio.run(main())    
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"crypto/tls"
	"fmt"
	"github.com/gorilla/websocket"
	"net/http"
)

func main() {
  tlsConfig := &tls.Config{
  	InsecureSkipVerify: true,
  }
  dialer := websocket.DefaultDialer
  dialer.TLSClientConfig = tlsConfig
  wsSubscriber, _, err := dialer.Dial("wss://backrunme.blxrbdn.com/ws", http.Header{"Authorization": []string{<YOUR-AUTHORIZATION-HEADER>}})

	if err != nil {
		fmt.Println(err)
		return
	}

	subRequest := `{"id": 1, "method": "subscribe", "params": ["arbOnlyMEV", {"include": ["transactions"]}]}`
	err = wsSubscriber.WriteMessage(websocket.TextMessage, []byte(subRequest))
	if err != nil {
		fmt.Println(err)
		return
	}

	for {
		_, nextNotification, err := wsSubscriber.ReadMessage()
		if err != nil {
			fmt.Println(err)
		}
		fmt.Println(string(nextNotification)) // or process it generally
	}
}
```

{% endtab %}
{% endtabs %}

#### Response

{% tabs %}
{% tab title="Transaction Event" %}

```bash
<<< {
  "jsonrpc": "2.0",
  "id": null,
  "method": "subscribe",
  "params": {
    "subscription": "3c87cccd-0df5-4938-947e-b24f7602f147",
    "result": {
      "transactions": [
          {
          "txHash": "0x88b...296",
          "txContents": {
            "from": "0x6e9...f89",
            "gas": "0x299b6",
            "gasPrice": "0xf9982de00",
            "hash": "0x88b...296",
            "input": "0x18...cc2",
            "nonce": "0xf",
            "value": "0x0",
            "type": "0x0",
            "to": "0x7a2...88d"
          },
          "localRegion": true
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

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

```
GET https://docs.bloxroute.com/backrunme-program/arbonlymev.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
