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

# Gemini WebSockets

> Real-time Gemini market data and prediction market streams

**Upstream:** `wss://wsapi.fast.gemini.com`

## Connect

```bash theme={null}
wscat -c "wss://gateway.graylayer.tech/ws/gemini?api_key=your_key"
```

After connecting, subscribe to symbols following the [Gemini WebSocket API](https://docs.gemini.com/websocket-api/):

```json theme={null}
{
  "type": "subscribe",
  "subscriptions": [
    {"name": "l2", "symbols": ["BTCUSD", "ETHUSD"]}
  ]
}
```

## Prediction market streams

Subscribe to prediction market symbols to receive real-time updates:

```json theme={null}
{
  "type": "subscribe",
  "subscriptions": [
    {"name": "l2", "symbols": ["TRUMPWIN"]}
  ]
}
```

Refer to the [Gemini WebSocket docs](https://docs.gemini.com/websocket-api/) for the full list of subscription types and event formats.
