Answer · WebSocket · Heartbeat
WebSocket ping / pong heartbeat
Answer: reply to every server {"type":"ping"} with {"type":"pong"}. Miss ~60 s of pongs and the connection closes. Same rule in Python and Node samples.
One-liner handlers#
if msg["type"] == "ping":
await ws.send('{"type":"pong"}')
if (msg.type === 'ping') ws.send('{"type":"pong"}');
Trial CTA#
Builder (€99/mo) for WebSocket and closing history. 3-day trial; card required, charged after day 3 unless cancelled. Free REST: signup. Related: answers hub, docs.
Questions people ask#
Is this WebSocket protocol ping?#
Application JSON ping/pong on the PinnFeed stream, documented in WebSocket docs.
Does REST need pong?#
No. Heartbeats are WebSocket-only.
Is this educational content for adults?#
Yes (18+).