A real-time WebSocket endpoint that streams Garden Horizons stock updates as JSON payloads. Connect once and receive push updates automatically.
Endpoint
Protocol
WebSocket Secure (WSS). All server messages are JSON strings—parse them using JSON.parse().
const WebSocket = require("ws");
const ws = new WebSocket("wss://ghz-stock-notifier.nett.to/");
ws.on("open", () => {
console.log("Connected to server");
});
ws.on("message", (data) => {
try {
const parsed = JSON.parse(data.toString());
console.log(JSON.stringify(parsed, null, 2));
} catch {
console.log(data.toString());
}
});
ws.on("close", () => {
console.log("Connection closed");
});
ws.on("error", (err) => {
console.error("Error:", err.message);
});