bloXroute Documentation
WebsiteBlogTwitterDiscord
  • Welcome to bloXroute
  • Introduction
    • Why Use bloXroute?
    • Products
    • Create An Account
    • Technical Support
  • SOLANA
    • Trader API
      • Introduction
        • Regions
        • Authorization
        • Rate Limits
        • Tip and Tipping Addresses
      • Quick Start
        • Transaction Submission
        • Front-Running Protection & Transaction Bundle
        • Go SDK
        • Python SDK
        • Typescript SDK
        • Rust SDK
      • API Endpoints
        • Core Endpoints
          • submit
          • submit-paladin
          • submit-batch
          • balance
          • rate-limit
          • transaction
          • priority-fee
          • GetPriorityFeeStream
          • GetBundleTipStream
          • submit-snipe
        • Pump.fun
          • quotes
          • swap
          • swap-sol
          • GetPumpFunNewTokensStream
          • GetPumpFunSwapsStream
          • GetPumpFunAMMSwapsStream
        • Raydium
          • quotes
          • pools
          • pool-reserves
          • swap
          • cpmm-swap
          • clmm-swap
          • route-swap
          • GetPoolReservesStream
          • GetSwapsStream
          • GetNewRaydiumPoolsStream
          • GetNewRaydiumPoolsByTransactionStream
        • Jupiter
          • quotes
          • swap
          • swap-instructions
          • route-swap
        • Openbook
          • markets
          • orderbooks/{market}
          • depth/{market}
          • tickers/{market}
          • open-orders/{market}
          • unsettled/{market}
          • place
          • replace
          • cancel
          • settle
          • GetOrderbooksStream
          • GetTickersStream
      • Best Performance for Landing Transactions
      • Support
        • API Health
        • Contact us
        • Suggestions
        • Wiki
          • Terms & Concepts
          • Resources
    • Optimized Feed Relay (OFR)
      • Transaction Streamer
      • Gateway and OFR Requirements
      • Gateway and OFR Setup
      • Gateway Startup Arguments
      • OFR performance
      • Logging
      • Submitting Transaction
      • Upgrading Gateway
      • Troubleshooting
  • BSC & ETH
    • EVM Blockchain Distribution Network (BDN)
      • How to Connect
      • The bloXroute Gateway
        • Local Gateway
          • Installation and Startup
            • Authentication & Certificates
            • Requirements
            • Supported Clients
            • GitHub repository option
            • Docker container option
            • Startup Script
            • Startup Arguments
          • General Connectivity Troubleshooting
          • Logging
          • Upgrading your Gateway
        • Add Your Gateway as a Trusted Peer to Your Execution Layer Client
        • Connecting Your Gateway with the Consensus Layer
      • IPs & Relays
        • Relays IPs
        • Private Relays
        • Cloud-API IPs
          • ⏩Reducing Latencies using the BDN
    • APIs
      • Authorization
      • Check Transaction Quota
      • Submit a Transaction
        • Raw Transaction Construction
        • Tx-Validation
        • Batch Transaction
      • Private Transactions
        • ETH Private Transactions
        • BSC Private Transactions
      • Transaction Bundles
        • Bundle Simulation
        • Bundle Validation
        • Bundle Submission
          • BSC Bundle Submission
            • List of BSC Validators
          • ETH Bundle Submission
          • Bundle Submission with Gateway
        • Bundle Tracking
          • BSC Bundle-Trace
          • ETH Bundle-Trace
          • ETH Bundle Inclusion Status
        • Bundle Refunds
          • Priority Fee Refund
          • Bundle Refund
          • Latest Bundle Refunds
      • Backrun Arbitrage
        • BackRunMe: Bundle Submission
          • BSC submit arbOnly
          • ETH submit arbOnly
            • blxr_info
            • ETH arbOnly Simulation
      • Token Launch Sniping
      • Other Utilities
        • List of bloXroute Builders
        • List of External Builders
        • Tx-Trace
        • Ping
    • Streams
      • Requirements
      • Subscription limits
      • Working With Streams
        • Creating a Subscription
          • Websocket
          • gRPC
        • Handling the Notification
          • Websocket
          • gRPC
        • Cancelling a Subscription
          • Websocket
          • gRPC
        • Local Node Validation
      • newTxs and pendingTxs
        • Filters
        • Raw TX Reconstruction
      • BackRunMe: arbOnlyMEV
        • ETH arbOnlyMEV
        • BSC arbOnlyMEV
      • transactionStatus
      • txReceipts
      • newBlocks
      • bdnBlocks
      • ethOnBlock
      • MEVBlockValue
      • MEVNextProposerInfo
    • Block Builders and Validators
      • Validator Gateway
      • MEV Relay (For Validators)
      • Block Submission
      • Proposer MEV-Protect
      • Compliance Lists
      • Preconfirmations
    • Protect RPCs
      • ETH Protect RPC
      • ETH Gas Protect RPC
      • BSC Protect RPC
      • SOL Protect RPC
  • Base Network
    • Submit Transactions
    • Streams
      • GetBdnBlockStream
  • TON NETWORK
    • TON Trader API
      • Quick Start
      • Fee Schedule
      • Connection
      • Submit Signed Transaction
  • Resources
    • BDN Explorer
    • Block Explorer
    • Guides
      • Algorithmic Trading
      • Setting Up a Local Gateway
      • Gateway as Web3 Bridge
    • Architecture
      • BDN Architecture
        • Network Components
        • Performance Techniques
          • Block Compression
          • Cut-through Routing
          • Optimized Topology
      • bloXroute Protocol
        • Versioning
        • Message Structure
        • Message Types
    • Contact Us
Powered by GitBook
On this page
  1. BSC & ETH
  2. Streams
  3. BackRunMe: arbOnlyMEV

BSC arbOnlyMEV

PreviousETH arbOnlyMEVNexttransactionStatus

Last updated 3 months ago

Subscribe to BSC arbOnlyMEV Stream

Cloud API instance to subscribe to stream: backrunme.blxrbdn.com

After processing opportunities from the stream, you should then .

Options

Key

Description

Values

include

Fields to include in the transaction stream: can include any combination of transaction data, emitted event logs, state diffs, or all.

transactions, state, all

blockchain_network

Specify BSC network

BSC-Mainnet

Examples

wscat -c wss://backrunme.blxrbdn.com/ws --no-check --header "Authorization: <YOUR-AUTHORIZATION-HEADER>"
> {"id": 1, "method": "subscribe", "params": ["arbOnlyMEV", {"include": ["all"], "blockchain_network": "BSC-Mainnet"}]}
< ......
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);
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())    
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
	}
}

Response

<<< {
  "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",
            "input": "0x18...cc2",
            "nonce": "0xf",
            "value": "0x0",
            "type": "0x0",
            "to": "0x7a2...88d",
            "functionSelector": "0xe47d166c",
            "logs": [
              {
                "address": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
                "topics": [
                  "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                  "0x000000000000000000000000802b65b5d9016621e66003aed0b16615093f328b",
                  "0x000000000000000000000000824eb9fadfb377394430d2744fa7c42916de3ece"
                ],
                "data": "0x000000000000000000000000000000000000000000000000048c290665a0c030"
              }
            ]
          },
          "localRegion": true
        }
      ],
      "state": {
        "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c": {
          "0x653d9d82daa42bfecda6b9478f1ccfbfadb6a62429ce367eff2f7e5cce182f6c": "0x00000000000000000000000000000000000000000000008419f91387d438f586"
        }
      }
    }
  }
}

submit the arbOnly backrun bundle