# Not receiving all messages from polygon websocket when subscribing to AM.\*

**URL:** <https://forum.alpaca.markets/t/not-receiving-all-messages-from-polygon-websocket-when-subscribing-to-am/4022>\
**Category:** Alpaca Market Data\
**Created:** [January 21, 2021, 5:48pm UTC](https://forum.alpaca.markets/t/not-receiving-all-messages-from-polygon-websocket-when-subscribing-to-am/4022 "2021-01-21T17:48:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![axalon](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@axalon](https://forum.alpaca.markets/u/axalon)\
**Post date:** [January 21, 2021, 5:48pm UTC](https://forum.alpaca.markets/t/not-receiving-all-messages-from-polygon-websocket-when-subscribing-to-am/4022/1 "2021-01-21T17:48:12Z")

</div>

Hi everyone,

I’m writing a program in python to implement my strategy, part of that strategy is to get the AM data for select group of stocks that meet a certain criteria (e.g. all stocks that have an opening price \< $100)

I’m using polygon’s websocket with my Alpaca API key, from chatting with polygon the best way to get this data is to subscribe to AM.\*, however in doing so I seem to be missing out on a lot of data.

For testing purposes I have my program subscribe to AM.\* then filter out one stock – in this example PLUG. I put a timestamp on the minute every time a new message for this stock comes through:

```
2 PLUG - 2021-01-21 11:17:00
3 PLUG - 2021-01-21 11:18:00
4 PLUG - 2021-01-21 11:19:00
5 PLUG - 2021-01-21 11:23:00
6 PLUG - 2021-01-21 11:25:00

```

As you can see there are gaps in the data, this is a heavily traded stock so there should be messages coming in for it every minute.

Here’s what it looks like when I subscribe to AM.PLUG specifically:

```
2 PLUG - 2021-01-21 11:27:00
3 PLUG - 2021-01-21 11:28:00
4 PLUG - 2021-01-21 11:29:00
5 PLUG - 2021-01-21 11:30:00
6 PLUG - 2021-01-21 11:31:00
7 PLUG - 2021-01-21 11:32:00
8 PLUG - 2021-01-21 11:33:00
9 PLUG - 2021-01-21 11:34:00
10 PLUG - 2021-01-21 11:35:00
11 PLUG - 2021-01-21 11:36:00

```

No gaps, and this can run for hours with data coming in every minute.

I’m on OSX and this is using polygon’s websocket client: [GitHub - polygon-io/client-python: A python client library for accessing Polygon's APIs](https://github.com/polygon-io/client-python) which uses the websocket library.

What am I missing on my end? Feels like there’s some limitation that isn’t allowing for all the data to come through, at most I can get about 700-800 entries per minute which is nowhere near what it should be.

Appreciate any help,  
Thanks!
