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

# Prices and streams

> Subscribe to fills, prices, the pool's exposure and keeper latency.

```ts theme={null}
const fills = zeus.streams.fills(['0xYourWallet'], (fill) => console.log(fill.status, fill.fillPrice))
const prices = zeus.streams.prices(['BTC', 'ETH'], (batch) => console.log(batch))
const exposure = zeus.streams.exposure((data) => console.log(data.netSkewUsd))
const keeper = zeus.streams.keeper(({ medianMs, queueLength }) => console.log(medianMs, queueLength))

fills.stop()
```

Every stream returns `{ stop() }` and reconnects on its own after 0.5, 1, 2, 5 and then every 10 seconds, subscribing again after each reconnect. All streams of one client share one gateway connection. Pass an error handler as the last argument to hear about a refused key: the streams stop and the handler receives `GatewayAuthError`.

| Stream | With an `apiKey` | Without one |
| - | - | - |
| `fills` | Every executed, cancelled or liquidated outcome of the accounts, with the request key, within about a second | Vault events polled over your RPC, without request keys |
| `prices` | Gateway Pyth Pro prices when ZEUS offers them | Vault minimum and maximum prices over your RPC, sent when they change |
| `exposure` | The pool's exposure and hedge recommendation every 5 seconds | Not available |
| `keeper` | Median keeper latency, 95th percentile execution time and the pending queue every 5 seconds | Not available |

A fill:

```json theme={null}
{
  "account": "0x…",
  "requestKey": "0x…",
  "status": "executed",
  "market": "ETH/USD",
  "side": "long",
  "sizeDelta": "100",
  "fillPrice": "2384.56",
  "fees": "0.1",
  "keeperTx": "0x…",
  "timeGapSec": 4,
  "blockNumber": 54836477
}
```

> [!NOTE]
>
> On Node 20, which has no global WebSocket, pass one: `new Zeus({ ..., streams: { webSocket: WebSocket } })` with `import WebSocket from 'ws'`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.