> For the complete documentation index, see [llms.txt](https://docs.blinklabs.xyz/blink/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blinklabs.xyz/blink/ethereum/searchers/integration/listen-to-transactions/mevblocker-compatible-v2.md).

# MEVBlocker Compatible (V2)

{% hint style="warning" %}
V2 accepts only API keys Blink issued before the [Searcher Hub](https://searcher.blinklabs.xyz). Keys from the hub are refused here: connect them to the [V3 WebSocket](https://docs.blinklabs.xyz/blink/ethereum/searchers/integration/listen-to-transactions/mevblocker-compatible-v3.md) instead. HTTP submission (below) accepts both.
{% endhint %}

The V2 WebSocket is designed for ease of integration. It uses the MEVBlocker Schema meaning if you have integrated with MEVBlocker no code changes are required for you to search on Blink's order flow.

## Connecting to Blink's WebSocket

You can connect to Blink's WebSocket via `wss://ethauction.blinklabs.xyz/ws/v2/{$API_KEY}`.

As soon as you connect to the WebSocket transactions will sent over that connection.

### eth\_subscribe

Unlike MEVBlocker you **DO NOT** need to write `eth_subscribe` to the WebSocket to begin receiving transactions. However, if you do the system is set up to handle that request.

```
{"method":"eth_subscribe","params": ["mevblocker_partialPendingTransactions"]}
```

OR

```
{"method":"eth_subscribe","params": ["blink_partialPendingTransactions"]}
```

It will respond with the following dummy value.

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

### eth\_subscription

Once connected transactions will be sent through in the `eth_subscription` format.

```
{
    "jsonrpc": "2.0", 
    "method": "eth_subscription", 
    "params": {
        "subscription": "0xd58bbbc0f5190962eff01b6f0ec17724", 
        "result": {
            "chainId": "0x1", 
            "to": "0x6215589d293fdf52886484f46f0d6a11c76b4a7e", 
            "value": "0x4fefa17b724000", 
            "data": "0x", 
            "accessList": [], 
            "nonce": "0x10", 
            "maxPriorityFeePerGas": "0x0", 
            "maxFeePerGas": "0x7e1c65b04", 
            "gas": "0x5208", 
            "type": "0x2", 
            "hash": "0x5f08dd372fce1a44dda27bed60ca036acb4979fad6ca37b9c388e351a870fe4c", 
            "from": "0xcb1588f3f7e92a1278c68a6aed4bdcbc68534b29"
        }
    }
}
```

Note there is an option for originators to obfuscate the "from" value.

### eth\_sendBundle

Bundles can be sent via the WebSocket or via HTTP. Both follow the same format where the target transaction is referenced by the 32-byte transaction hash.

```
{ 
    "jsonrpc": "2.0", 
    "id": 1, 
    "method": "eth_sendBundle", 
    "params": [ 
        { 
            "txs": [ 
                "0xfec1700ef24c9ff6fd2e07584a16bbb2fec1700ef24c9ff6fd2e07584a16bbb2", // this is the 32-byte transaction hash of the target transaction 
                "0xabc123.." // this is your signed encoded transaction
            ], 
            "blockNumber": "0xb63dcd"
        } 
    ]
}
```

All optional fields are also accepted.

```go
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBundle",
  "params": [
    {
      txs,               
      blockNumber,       // String, a hex encoded block number for which this bundle is valid on
      minTimestamp,      // (Optional) Number, the minimum timestamp for which this bundle is valid, in seconds since the unix epoch
      maxTimestamp,      // (Optional) Number, the maximum timestamp for which this bundle is valid, in seconds since the unix epoch
      revertingTxHashes, // (Optional) Array[String], A list of tx hashes that are allowed to revert
      replacementUuid,   // (Optional) Canonical UUID string (RFC 4122); used to cancel/replace this bundle
    }
  ]
}
```

#### WebSocket Submission

WebSocket submission occurs on the `wss://ethauction.blinklabs.xyz/ws/v2/{$API_KEY}` endpoint. A JSON RPC response will be written back to the WebSocket with either the bundle hash or an error.

*Bundle Hash*

```
{
    "id": 1,
    "result": {
        "bundleHash": "0xdb70096987a1b5cf11358ef5b5c3de14faf596d102b1fad2e94b6f249c139bf3"
    },
    "jsonrpc": "2.0"
}
```

*Error*

```
{
    "id": 1,
    "error": {
        "code": 0,
        "message": "error getting transaction in auction"
    },
    "jsonrpc": "2.0"
}
```

#### HTTP Submission

HTTP submission occurs on the `https://ethauction.blinklabs.xyz/v1/${API_KEY}` endpoint. A bundle hash will be returned in the response.

```
{
    "id": 1,
    "result": {
        "bundleHash": "0xdb70096987a1b5cf11358ef5b5c3de14faf596d102b1fad2e94b6f249c139bf3"
    },
    "jsonrpc": "2.0"
}
```
