Skip to main content
The radion-examples repo has copy-paste, ready-to-run examples for every common WebSocket use case. Each one is a single Node.js + TypeScript file built on the @radion-app/sdk package. You run it with tsx, so there is no build step. The SDK handles the X-API-Key upgrade, reconnect, heartbeat, and resubscribe for you.

Quickstart

git clone https://github.com/radion-app/radion-examples
cd radion-examples
cp .env.example .env        # set RADION_API_KEY=sk_...
pnpm install                # @radion-app/sdk + tsx + dev types
pnpm run wallet-alerts 0xYOUR_WALLET
Need a key? Make one at radion.app, then see Authentication. Every example reads it from RADION_API_KEY. Never hard-code it or put it in the URL.

What’s included

ExampleChannelRun
Mirror a wallet’s tradestrading (wallets)pnpm run copytrade 0xWALLET
Wallet alertswalletspnpm run wallet-alerts 0xWALLET
Whale trade feedtrading (min_usd)pnpm run whales 10000
Single-market monitormarketspnpm run market --token 0xTOKEN
Mempool early alertstrading (confirmed: false) + tradingpnpm run mempool
Resolution watcheroracle + resolutionpnpm run resolutions
Resilient clienttradingpnpm run resilient

The SDK realtime client

Every example uses the realtime client from @radion-app/sdk. It handles the production parts once for you:
  • opens the socket with the X-API-Key header,
  • reconnects with exponential back-off,
  • sends your subscriptions again after each reconnect,
  • sends an app-level ping,
  • reconnects on lagged and stops on key_revoked.
import { Radion } from "@radion-app/sdk";

const radion = new Radion({ apiKey: process.env.RADION_API_KEY });

radion.realtime.onAnyChannel((e) => console.log(e.data));
radion.realtime.subscribe({
  id: "s1",
  channel: "trading",
  filters: { wallets: ["0x…"] },
});
await radion.realtime.connect();
See the repo README for the full walkthrough, and the channel catalogue for every payload shape.
Last modified on July 5, 2026