polygon-io / issues

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

Options API reporting inaccurate volume numbers #169

Closed mattsta closed 2 years ago

mattsta commented 2 years ago

URL https://api.polygon.io/v2/aggs/ticker/O:TSLA211119C01500000/range/1/day/2021-07-22/2021-11-12?adjusted=true&sort=asc&limit=50000

Result for your options data, the volume numbers aren't matching other data feeds which are all in agreement with the same volume values per day.

for example, on the most recent day, you are reporting 1,335 volume, but it doesn't match my other data sources:

  {
   "v": 1355,
   "vw": 0.5205,
   "o": 0.69,
   "c": 0.47,
   "h": 0.69,
   "l": 0.45,
   "t": 1636693200000,
   "n": 401
  }

Same values reported from the previous close endpoint too via https://api.polygon.io/v2/aggs/ticker/O:TSLA211119C01500000/prev?adjusted=true :

{
 "ticker": "O:TSLA211119C01500000",
 "queryCount": 1,
 "resultsCount": 1,
 "adjusted": true,
 "results": [
  {
   "T": "O:TSLA211119C01500000",
   "v": 1355,
   "vw": 0.5205,
   "o": 0.69,
   "c": 0.47,
   "h": 0.69,
   "l": 0.45,
   "t": 1636750800000,
   "n": 401
  }
 ],
 "status": "OK",
 "request_id": "49ea8823a57f1d058e4dd5387aabd0ce",
 "count": 1
}

Expected Result for the most recent day, volume is actually 2,311 as reported by multiple other data sources and also visible at https://finance.yahoo.com/quote/TSLA211119C01500000

Your other values look correct for the OHLC data, only volume is missing data (and perhaps n too — i don't have a trade counter on my other data sources for these feeds).

What Value
Previous Close 0.7600
Open 0.6900
Bid 0.4800
Ask 0.5000
Strike 1,500.00
Day's Range 0.4500 - 0.6900
Contract Range N/A
Volume 2,311
Open Interest 4.85k
clayscode commented 2 years ago

I've also noticed this. Comparing data to other brokers, volume numbers are somewhat lower on Polygon.

clayscode commented 2 years ago

It looks like the volume under the Trades VX endpoint is correct. It's just the aggregate bars that are wrong

jrbell19 commented 2 years ago

This should be fixed now. We changed the rules which exclude certain trade conditions to ensure our volume matches other platforms. We will be backfilling the historical data over the next few days.

Apologies for the confusion here!