> ## 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.

# WebSocket overview

> Connect to real-time market data streams via the WebSocket proxy

<Card title="Join the Graylayer Discord" icon="discord" href="https://discord.gg/UxGa5C4C2A" horizontal>
  Request an API key in **#api-key-request** under the Community tab.
</Card>

The proxy supports WebSocket connections to all major platforms. Connect to the proxy WebSocket endpoint and it forwards messages to and from the upstream platform.

## Connection pattern

```
wss://gateway.graylayer.tech/ws/{platform}/{channel}?api_key=YOUR_KEY
```

Because browsers cannot set custom headers on WebSocket connections, authentication uses the `api_key` query parameter instead of the `X-API-Key` header.

## Available connections

| Platform | Path           | Upstream                                         |
| -------- | -------------- | ------------------------------------------------ |
| Kalshi   | `/ws/kalshi`   | `wss://api.elections.kalshi.com/trade-api/ws/v2` |
| Coinbase | `/ws/coinbase` | `wss://ws-feed.exchange.coinbase.com`            |
| Gemini   | `/ws/gemini`   | `wss://wsapi.fast.gemini.com`                    |

## Platform-specific details

<Columns cols={2}>
  <Card title="Kalshi" icon="building-columns" href="/websockets/kalshi">
    Full Kalshi WebSocket with RSA-PSS auth handled by the proxy.
  </Card>

  <Card title="Coinbase" icon="bitcoin-sign" href="/websockets/coinbase">
    Ticker, level2, and heartbeat channels for crypto pairs.
  </Card>

  <Card title="Gemini" icon="gem" href="/websockets/gemini">
    Market data and prediction market streams.
  </Card>
</Columns>
