> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tipstack.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /solana/tips/stream — Real-Time Tip Event Stream

> Subscribe to a real-time Server-Sent Events stream of confirmed tip events for a creator. Use for live notification overlays and dashboards.

Subscribe to a persistent Server-Sent Events (SSE) stream of incoming tip events for a creator's wallet. The server pushes a new event each time a tip is confirmed on-chain, making this endpoint ideal for live notification overlays on streaming platforms, real-time donation tickers, and creator dashboards that update without polling.

## Request

**`GET https://tipstack.fun/api/solana/tips/stream`**

<ParamField query="wallet" type="string" required>
  The creator's Solana wallet address (base58) to subscribe to. Only tip events where this address is the recipient will be pushed to the stream.
</ParamField>

## Protocol

This endpoint uses the [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) protocol. Connect with a standard `EventSource` in the browser or any SSE-compatible HTTP client. The server sends:

* A `retry: 10000` directive on connection, instructing clients to reconnect after 10 seconds if the connection drops.
* A `connected` status event immediately after the stream is established.
* Heartbeat comments (`:`) every 15 seconds to keep the connection alive through proxies and load balancers.
* A tip event object for each confirmed incoming tip.

## Event format

### Connection event

Immediately after the stream is established, the server sends a handshake event:

```json JSON theme={null}
{ "status": "connected", "wallet": "YOUR_WALLET_ADDRESS" }
```

### Tip events

Each incoming tip is delivered as a `data:` line containing a JSON object:

```json JSON theme={null}
{
  "type": "tip",
  "amount": 0.1,
  "tokenSymbol": "SOL",
  "sender": "8xRT3m1KZJPHQQaFGpvDJckJcNhHMbDdBfHHVdFGQS7a",
  "message": "Keep up the great work!",
  "timestamp": "2025-01-15T14:30:00.000Z"
}
```

| Field         | Type           | Description                              |
| ------------- | -------------- | ---------------------------------------- |
| `type`        | string         | `"tip"` for tip events.                  |
| `amount`      | number         | Tip amount in human-readable units.      |
| `tokenSymbol` | string         | Token symbol, e.g. `SOL`, `USDC`.        |
| `sender`      | string         | Sender's wallet address or display name. |
| `message`     | string \| null | Optional message from the supporter.     |
| `timestamp`   | string         | ISO 8601 timestamp of the confirmed tip. |

## JavaScript client example

```javascript EventStream.js theme={null}
const es = new EventSource(
  'https://tipstack.fun/api/solana/tips/stream?wallet=YOUR_WALLET_ADDRESS'
);

es.onmessage = (event) => {
  const tip = JSON.parse(event.data);
  console.log(`New tip: ${tip.amount} ${tip.tokenSymbol} from ${tip.sender}`);
};

es.onerror = (err) => {
  console.error('Stream error, will auto-reconnect:', err);
};
```

## React hook example

```typescript React theme={null}
import { useEffect } from 'react';

function useTipStream(walletAddress: string, onTip: (tip: any) => void) {
  useEffect(() => {
    if (!walletAddress) return;

    const es = new EventSource(
      `https://tipstack.fun/api/solana/tips/stream?wallet=${walletAddress}`
    );

    es.onmessage = (event) => {
      const data = JSON.parse(event.data);
      if (data.type === 'tip') {
        onTip(data);
      }
    };

    return () => es.close();
  }, [walletAddress, onTip]);
}
```

## Use cases

* **Live streaming overlays** — Display animated tip alerts on Twitch, YouTube, or Kick streams by embedding an overlay page that connects to this stream.
* **Real-time dashboards** — Update tip totals and leaderboards instantly without polling the REST API.
* **Mobile notifications** — Trigger push notifications server-side by subscribing from your backend and forwarding events to a notification service.

<Note>
  Keep the connection alive with an EventSource reconnect strategy. The stream auto-reconnects on most browsers, using the `retry: 10000` directive sent by the server. For Node.js or server-side consumers, use an SSE client library that handles reconnection automatically.
</Note>

<Info>
  This endpoint runs on Vercel Edge Runtime for low-latency global delivery. New tip events are pushed to all active streams for the subscribed wallet address as soon as they are confirmed on-chain.
</Info>

<Tip>
  For streaming overlays, open the `EventSource` connection in a dedicated overlay page (e.g. `https://yoursite.com/overlay?wallet=...`) and display tip alerts using CSS animations triggered by incoming events. This pattern works with any broadcasting software that supports browser source overlays.
</Tip>
