For the complete documentation index, see llms.txt. This page is also available as Markdown.

Public Transactions

The blxr_tx endpoint allows users to send a single transaction faster than the p2p network using the BDN. The endpoint returns a transaction hash.

This service is available via both the Cloud API and Gateway API.

The bloXroute best practice is for users to send transactions to both the Gateway-API and to their blockchain node. You should send transactions in parallel to the Gateway and to your blockchain node as a backup.

For latency-sensitive orderflow, WebSocket is recommended and can provide latency improvement over HTTP/HTTPS. If you prefer to short-lived connections, use HTTP over HTTPS for improved latency.

Submission Endpoint

  • Method: blxr_tx

  • Cloud API Endpoint: api.blxrbdn.com

  • Gateway API Endpoint: 127.0.0.1:28333/ws (assumes WebSocket port 28333)

  • Request type: HTTPS,WSS

Parameters

Parameter
Description
Instructions & Notes

transaction

Raw transactions bytes without 0x prefix.

Mandatory. Learn more about constructing the transaction here.

node_validation

Transaction is sent to the blockchain node for validation, and the Gateway returns any error message received in response.

Available only with Gateway API

Optional

Default: False

Example

Cloud-API

# ETH Example
wscat -c wss://api.blxrbdn.com/ws --header "Authorization: <YOUR-AUTHORIZATION-HEADER>"
> {"jsonrpc": "2.0", "id": 1, "method": "blxr_tx", "params":
   {"transaction": "f86b0184...e0b58219"}}
< ......
const WebSocket = require('ws');

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

function proceed() {
    // ETH Example
    ws.send(`{"jsonrpc": "2.0", "id": 1, "method": "blxr_tx", "params": {"transaction": "f86b0184...e0b58219"}}`);
    // BSC Example
    // ws.send(`{"jsonrpc": "2.0", "id": 1, "method": "blxr_tx", "params": {"transaction": "f86b0184...e0b58219", "blockchain_network": "BSC-Mainnet"}}`);
    //
    // or use a variable for the transaction string:
    // rawTx = "f86b0184...e0b58219";
    // ws.send(`{"jsonrpc": "2.0", "id": 1, "method": "blxr_tx", "params": {"transaction": "${rawTx}"}}`);
}


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

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

Gateway-API:

Response

Last updated