Fumadocs

Subscribe to Celestial Body Events

Receive
/celestial-bodies/events
Server

Subscribe to events for all celestial bodies in the galaxy

Events related to all types of celestial bodies (planets, satellites, asteroids, comets).

This is a general channel for monitoring the entire galaxy's celestial activity.

Authorization

headerAuthorizationBearer <JWT>

JWT Bearer token authentication for WebSocket connections

Query Parameters

bodyType?string

Filter by celestial body type

Value in"planet""satellite""asteroid""comet"
minHabitability?number

Filter by minimum habitability index

Range0 <= value <= 1
Code Sample
const socket = new WebSocket("wss://galaxy.scalar.com/celestial-bodies/events?api_key=YOUR_API_KEY");

socket.addEventListener("message", (event) => {
  console.log(event.data);
});

Messages