Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BlockRazorinc/docs_en/llms.txt

Use this file to discover all available pages before exploring further.

BlockRazor offers two complementary block streaming products for the Base network: GetBlockStream for standard low-latency confirmed block data, and GetFlashBlockStream for ultra-low-latency pre-confirmation FlashBlock data sourced directly from the Base sequencer. Both streams are delivered over WebSocket and target applications that need to react to on-chain events as quickly as possible — from arbitrage bots and copy-trading systems to real-time dashboards and order management systems.
FlashBlock is a pre-confirmation block emitted by the Base sequencer before the full block is finalized and published to the network. FlashBlocks arrive earlier than standard confirmed blocks, giving subscribers a significant time advantage for latency-sensitive strategies.

Stream Comparison

FeatureGetBlockStreamGetFlashBlockStream
Data typeConfirmed Base blocksPre-confirmation sequencer FlashBlocks
Latency profileLowUltra-low (pre-confirmation)
Helper methodParseFlashBlock
Pricing$300 / stream / month$250 / stream / month

Connection Details

PropertyValue
ProtocolWebSocket (WSS)
Endpointwss://blockstream.blockrazor.io/base?auth=YOUR_AUTH_TOKEN
ChainBase (OP Stack / Ethereum L2)
Replace YOUR_AUTH_TOKEN with the API token from your BlockRazor dashboard. Both stream types share the same base endpoint — the method you call after connection determines which stream you receive.

GetBlockStream

GetBlockStream subscribes to fully confirmed Base blocks as they are published. Each message contains the complete block payload including all transactions, the block number, hash, and timestamp. This stream is well-suited for applications that need high confidence in data finality while still maintaining low latency.

Pricing

$300 / stream / month — with multi-month discounts up to 20% for 12-month subscriptions.

Code Example

const WebSocket = require('ws');

const ws = new WebSocket(
  'wss://blockstream.blockrazor.io/base?auth=YOUR_AUTH_TOKEN'
);

ws.on('open', () => {
  console.log('Connected to Base BlockStream');
  // Request the standard confirmed block stream
  ws.send(JSON.stringify({ method: 'GetBlockStream' }));
});

ws.on('message', (data) => {
  const block = JSON.parse(data);
  console.log(
    'New Base block:', block.number,
    'hash:', block.hash,
    'txs:', block.transactions.length,
    'timestamp:', block.timestamp
  );
});

ws.on('error', (err) => console.error('BlockStream error:', err));
ws.on('close', () => console.log('BlockStream connection closed'));

Response Fields

number
string
required
Block number as a hex-encoded string (e.g. "0x7A1B2C"). Decode with parseInt(number, 16) for numeric use.
hash
string
required
32-byte hex block hash uniquely identifying this block on Base.
timestamp
string
required
Unix timestamp of block production, hex-encoded.
transactions
array
required
Array of confirmed transaction objects in this block.

Example Message

{
  "number": "0x7A1B2C",
  "hash": "0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
  "timestamp": "0x6613A100",
  "transactions": [
    {
      "hash": "0xb2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3",
      "from": "0xAbCdEf1234567890AbCdEf1234567890AbCdEf12",
      "to": "0x4200000000000000000000000000000000000006",
      "value": "0xDE0B6B3A7640000",
      "gas": "0x5208",
      "gasPrice": "0x77359400",
      "data": "0x"
    }
  ]
}

Pricing & Discounts

StreamMonthly Price
GetBlockStream$300 / stream / month
GetFlashBlockStream$250 / stream / month
Subscription PeriodDiscount
1 month
3 months5% off
6 months10% off
9 months15% off
12 months20% off

Build docs developers (and LLMs) love