polygon-io / issues

Quickly track and report problems with polygon.io
29 stars 0 forks source link

SQ 1-minute high price data error on 2023-08-04 at 14:13:00 EST #264

Closed NeilJustice closed 6 months ago

NeilJustice commented 9 months ago

URL https://api.polygon.io/v2/aggs/ticker/SQ/range/1/minute/2023-08-04/2023-08-04?adjusted=false&apiKey= https://api.polygon.io/v2/aggs/ticker/SQ/range/1/minute/1691172780000/1691172780000?adjusted=false&apiKey=

Result

Polygon 1-minute data for SQ on 2023-08-04 at 14:13:00 EST: Open: 64.468 High: 70.3983 (!) Low: 64.40 Close: 64.40

TradingView 1-minute data for SQ on 2023-08-04 at 14:13:00 EST: Open: 64.47 High: 64.48 Low: 64.40 Close: 64.40

Here is the errant 1-minute SQ price bar as seen in my Qt candlestick charting program (Central time):

image

image

Here is the same 1-minute SQ price bar as seen in TradingView (Central time)

image

Expected Result Polygon's OHLC numbers to match TradingView's OHLC numbers within a reasonable number of pennies.

swilson2020 commented 6 months ago

I've been seeing similar on several tickers as day as well.

Today on SNES polygon shows trades at $1.43 from 10:47-10:53 and none of my other brokers show trades at that price/time. It is causing issues with alerts and backtesting.

image

image

AHangstefer commented 6 months ago

Hi! Thanks for reaching out. Looking at trades for SNES on 2023-12-29, I can see many during the 10:47-10:53AM EST period that have the 1.43 price. It looks like most of these are dark pool trades. Most providers do not use dark pool trades in their aggregates or provide them in raw trades data, but we do. You can identify dark pool trades using this article: https://polygon.io/knowledge-base/article/does-polygon-offer-dark-pool-data

AHangstefer commented 6 months ago

I am also seeing the same thing for SQ 2023-08-4 at 14:13 EST. There's a dark pool trade that's creating the high for that minute bar.

conditions: [3]
exchange: 4
id: "71693107549250"
participant_timestamp: 1691172827355341000
price: 70.3983
sequence_number: 2894277
sip_timestamp: 1691172827988567600
size: 15000
tape: 1
trf_id: 12
trf_timestamp: 1691172827988209000
swilson2020 commented 6 months ago

I am also seeing the same thing for SQ 2023-08-4 at 14:13 EST. There's a dark pool trade that's creating the high for that minute bar.

That is extremely problematic for anyone using this data for backtesting or signal generation for discretionary trading. It basically invalidates my backtests since orders at those prices would not fill with a direct access broker.

Is it possible to create a feature request to filter a websocket stream of aggregates or pulling aggregates without dark pool fills?

Otherwise I would have to build my own aggregates from trades filtering that data or change to another API.

Thank you.

AHangstefer commented 6 months ago

There is not currently a way to filter dark pool trades out of our Aggregates, but that's a great idea.

You can submit ideas through our roadmap! Users can vote on what's most important to them and we use that data to help us decide what features to work on next.

We have many user that use the Trades endpoint to create their own aggregates. We follow the specs laid out by CTA/UTP and you can read more about that here