SaturnX
  • WELCOME
    • ☀️What is Saturnx?
    • Pricing with Rate limits
      • Prepaid Credits
      • Pay with Crypto
  • RPC Nodes
    • RPCs Overview
  • BLOCKCHAIN
    • Overview
    • HTTP
      • getHistoryCandleStick
      • getHistoryTransaction
      • getAccountTnx
      • getAccountTnxByToken
      • getHoldersTop
      • getHotPairs
      • getTokenSecurity
    • WebSocket
      • {blockchain}.broadcast.transactions
      • {blockchain}.broadcast.kline
    • Kafka
Powered by GitBook
On this page
  • Subscription Overview
  • Subscription Setup
  1. BLOCKCHAIN
  2. WebSocket

{blockchain}.broadcast.kline

The {blockchain}.broadcast.kline subscription provides real-time candlestick (K-line) data for transactions on the Solana blockchain via a WebSocket connection.

Subscription Overview

  • Connection Address: wss://stream.saturnx.dev/skt

  • Type: WebSocket Subscription

  • Topic: {blockchain}.broadcast.kline

  • Purpose: Receive real-time K-line data for Solana transactions.

  • Response Type: JSON object containing candlestick details.

Subscription Setup

Connection Details

  • Endpoint: wss://stream.saturnx.dev/skt

  • Protocol: WebSocket (WSS for secure connection)

  • Authentication: Requires an apiKey in the subscription request.

Subscription Request

To subscribe, send the following JSON message after establishing the WebSocket connection:

{
  "type": "subscribe",
  "topic": "{blockchain}.broadcast.kline",
  "apiKey": ""
}

Field

Type

Required

Description

Example Value

type

String

Yes

Action type (must be "subscribe")

subscribe

topic

String

Yes

Subscription topic

{blockchain}.broadcast.kline

apiKey

String

Yes

API key for authentication

Response FormatOnce subscribed, the server will push real-time K-line data in the following JSON format:json

{
  "blockTime": "2025-03-19T03:38:40Z",
  "close": 0.041766144249537625,
  "max": 0.041766144249537625,
  "min": 0.041766144249537625,
  "volume": "0.2911421853503494"
}

Field

Type

Description

blockTime

String

The UTC timestamp of the candlestick’s block in ISO 8601 format (e.g.,YYYY-MM-DDThh:mm:ssZ).

close

Number

The closing price of the token at the end of the interval, as a high-precision decimal.

max

Number

The highest price of the token during the interval.

min

Number

The lowest price of the token during the interval.

volume

String

The total trading volume of the token during the interval, represented as a string for precision.

Previous{blockchain}.broadcast.transactionsNextKafka

Last updated 1 month ago