Skip to content
Language: English (United States)

Websockets

Live blockchain data streaming

Real-time bidirectional communication with blockchain networks. Subscribe to blocks, transactions, logs, and pending transactions with persistent WebSocket connections.

Available NowBack to Web3 Overview

Key Capabilities

Everything you need, nothing you don't.

  • Persistent Connections

    Long-lived WebSocket connections with automatic reconnection.

  • Real-time Streaming

    Instant delivery of blocks, transactions, and events.

  • Pending Transactions

    Subscribe to mempool for pending transaction visibility.

  • Low Latency

    Sub-100ms latency for time-sensitive applications.

  • Multi-chain Streams

    Stream from multiple chains on a single connection.

  • Authenticated Sessions

    Secure connections with API key authentication.

  • Auto-reconnect

    Automatic reconnection with message replay on disconnect.

  • Filtered Subscriptions

    Subscribe to specific addresses, topics, or event types.

  • Connection Metrics

    Monitor connection health and message throughput.

Simple to Integrate

Get started with just a few lines of code. SDKs for every language.

EventEmitter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
 
/// @title EventEmitter - Structured events for WebSocket streaming
/// @notice Emit indexed events for efficient WebSocket subscriptions
contract EventEmitter {
    // Indexed events for real-time streaming via WebSockets
    event BlockProcessed(
        uint256 indexed blockNumber,
        bytes32 indexed blockHash,
        uint256 timestamp,
        uint256 gasUsed
    );
 
    event TransactionDetected(
        bytes32 indexed txHash,
        address indexed from,
        address indexed to,
        uint256 value,
        uint256 gasPrice
    );
 
    event ContractEvent(
        address indexed contractAddress,
        bytes32 indexed eventSignature,
        bytes data,
        uint256 indexed logIndex
    );
 
    // Emit block processing event for indexers
    function emitBlockProcessed(
        uint256 _blockNumber,
        bytes32 _blockHash,
        uint256 _gasUsed
    ) external {
        emit BlockProcessed(_blockNumber, _blockHash, block.timestamp, _gasUsed);
    }
 
    // Emit transaction event for mempool tracking
    function emitTransaction(
        bytes32 _txHash,
        address _from,
        address _to,
        uint256 _value,
        uint256 _gasPrice
    ) external {
        emit TransactionDetected(_txHash, _from, _to, _value, _gasPrice);
    }
 
    // Emit contract event for log subscriptions
    function emitContractEvent(
        address _contract,
        bytes32 _eventSig,
        bytes calldata _data,
        uint256 _logIndex
    ) external {
        emit ContractEvent(_contract, _eventSig, _data, _logIndex);
    }
}

SolidityNodePythonGoRustCC++Ruby

Built For

Real-time price feeds and order book updates for DEXs.

Track pending transactions for MEV and arbitrage.

Real-time blockchain activity and network stats.

High-frequency trading and automated strategies.

Supported Chains

Start Building with Websockets

Get your free API key and ship your first request in under 5 minutes. No credit card required.

Get Websockets