madeonsol_stream_token
Generate a WebSocket token to stream KOL, deployer, and all-DEX trade data on Solana.
Instructions
Generate a 24h WebSocket streaming token. Includes ws_url for KOL/deployer streaming (Pro/Ultra) and dex_ws_url for all-DEX trade streaming (Ultra only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:524-532 (registration)Registration of the 'madeonsol_stream_token' tool using server.tool() — it's defined inside the Webhook & Streaming tools block, only active when hasRestAuth (authMode === 'madeonsol').
server.tool( "madeonsol_stream_token", "Generate a 24h WebSocket streaming token. Includes ws_url for KOL/deployer streaming (Pro/Ultra) and dex_ws_url for all-DEX trade streaming (Ultra only).", {}, { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true }, async () => ({ content: [{ type: "text" as const, text: await restQuery("POST", "/stream/token") }], }) ); - src/index.ts:529-532 (handler)Handler function for madeonsol_stream_token — calls restQuery('POST', '/stream/token') to generate a 24h WebSocket streaming token.
async () => ({ content: [{ type: "text" as const, text: await restQuery("POST", "/stream/token") }], }) ); - src/index.ts:527-527 (schema)Schema (input) — empty object '{}' meaning no parameters required for this tool.
{}, - src/index.ts:451-466 (helper)The restQuery helper function used by the handler — sends HTTP requests to the MadeOnSol API v1 with Bearer auth. Defined inside the same conditional block.
async function restQuery(method: string, path: string, body?: unknown): Promise<string> { const headers: Record<string, string> = { "Content-Type": "application/json", ...apiKeyHeaders(), }; const res = await fetch(`${BASE_URL}/api/v1${path}`, { method, headers, ...(body ? { body: JSON.stringify(body) } : {}), }); if (!res.ok) { const text = await res.text().catch(() => ""); return `Error ${res.status}: ${text}`; } return JSON.stringify(await res.json(), null, 2); } - src/index.ts:1045-1045 (registration)Also listed in the Smithery server card / tool manifest array under tools[] for discovery.
{ name: "madeonsol_stream_token", description: "Get a 24h WebSocket streaming token. Pro/Ultra." },