WebSocket API

Overview

The WebSocket API provides real-time streaming of blockchain data, allowing you to receive instant updates as they occur on the network. This is ideal for applications that need to react quickly to blockchain events.

Authentication

The Adanode WebSocket stream endpoints do not require any API Key or authentication to establish a connection.


WebSocket Endpoint

Currently, the primary streaming endpoint is for real-time block data:

Stream Type

Endpoint URL

Description

Block Stream

Streams new block headers and metadata as soon as they are finalized on the chain.


Usage Example (Block Stream)

Connecting to the Block Stream endpoint will immediately start pushing JSON messages to the client whenever a new block is produced.

Connection

Establish a WebSocket connection to the following URL:

wss://api.adanothe.com/blocks/stream 

Response Format

The server sends messages in JSON format. Each message contains the type of the event, the data payload, and the server-side timestamp of the message transmission.

Field

Type

Description

type

String

The type of the event (e.g., "new_block").

data

Object

The payload containing the actual blockchain data.

timestamp

String

The server time (ISO 8601 format) when the message was generated.

Example Response

JSON

{
  "type": "new_block",
  "data": {
    "hash": "0x23d516429dc51da61b451b97e7d0c65e72bff74c65df15d7e10b9b890c490a2f",
    "height": 8988981,
    "proposer": "0x2e2E10E811b3dD5691ab2744E694072CD749BDe7",
    "tx_count": 0,
    "timestamp": 1763992695,
    "moniker": "stakeFi by BCW",
    "logo_url": "https://s3.amazonaws.com/keybase_processed_uploads/32698d9693613fa1ed5883622f38ad05_360_360.jpg"
  },
  "timestamp": "2025-11-24T13:58:14.378Z"
}

Last updated