Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
通过一个 WebSocket 连接接收 Solana 实时价格、交易、钱包和代币事件。每种数据流加入一个房间,快照从 Data API 加载。
wss://datastream.solanatracker.io/{apiKey}
const ws = new WebSocket("wss://datastream.solanatracker.io/YOUR_API_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ type: "join", room: "price-by-token:TOKEN_MINT" })); }; ws.onmessage = (event) => { const msg = JSON.parse(event.data); if (msg.type === "message") console.log(msg.room, msg.data); if (msg.type === "ping") ws.send(JSON.stringify({ type: "pong" })); };
此页面对您有帮助吗?