# Alpaca websocket data will not stream

**URL:** <https://forum.alpaca.markets/t/alpaca-websocket-data-will-not-stream/1800>\
**Category:** Alpaca Market Data\
**Created:** [June 15, 2020, 2:32pm UTC](https://forum.alpaca.markets/t/alpaca-websocket-data-will-not-stream/1800 "2020-06-15T14:32:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![acu192](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@acu192](https://forum.alpaca.markets/u/acu192)\
**Post date:** [June 15, 2020, 2:32pm UTC](https://forum.alpaca.markets/t/alpaca-websocket-data-will-not-stream/1800/1 "2020-06-15T14:32:34Z")

</div>

Connection works. Authentication works.

Streaming does **not** work.

After sending the `listen` action, it responds with `listening` and with **an empty list of streams**. Here is my wscat to demo the issue, using the exact example from the documentation:

```auto
$$ wscat --connect wss://api.alpaca.markets/stream
Connected (press CTRL+C to quit)
> { "action": "authenticate", "data": { "key_id": " ***", "secret_key": "***" } }
< {"stream":"authorization","data":{"action":"authenticate","status":"authorized"}}
> { "action": "listen", "data": { "streams": ["T.SPY", "Q.SPY", "AM.SPY"] } }
< {"stream":"listening","data":{"streams":[]}}

```

Notice above it returns `{"streams":[]}`. Why?

---

<div class="post-metadata">

**Author:** ![acu192](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@acu192](https://forum.alpaca.markets/u/acu192)\
**Post date:** [June 15, 2020, 2:38pm UTC](https://forum.alpaca.markets/t/alpaca-websocket-data-will-not-stream/1800/2 "2020-06-15T14:38:08Z")

</div>

PS: Polygon’s websocket streaming works fine.

---

<div class="post-metadata">

**Author:** ![hitoshi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/hitoshi/32/69_2.png) [@hitoshi](https://forum.alpaca.markets/u/hitoshi)\
**Post date:** [June 15, 2020, 2:40pm UTC](https://forum.alpaca.markets/t/alpaca-websocket-data-will-not-stream/1800/3 "2020-06-15T14:40:14Z")

</div>

The URL is `data.alpaca.markets`

---

<div class="post-metadata">

**Author:** ![acu192](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@acu192](https://forum.alpaca.markets/u/acu192)\
**Post date:** [June 15, 2020, 5:34pm UTC](https://forum.alpaca.markets/t/alpaca-websocket-data-will-not-stream/1800/5 "2020-06-15T17:34:50Z")

</div>

Okay, I think I have it sorted out. Please verify:

- `wss://data.alpaca.markets/stream` is for streaming market data. Both LIVE and PAPER api keys work on this **same** URL. It seems to allow _two_ simultaneous connections (one LIVE and one PAPER, which is nice).
- `wss://api.alpaca.markets/stream` is for streaming account updates for the LIVE account.
- `wss://paper-api.alpaca.markets/stream` is for streaming account updates for the PAPER account.
