polygon-io / issues

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

Gaps in Aggregate Candle requests #156

Closed JimbobTheSaucy closed 3 years ago

JimbobTheSaucy commented 3 years ago

URL /v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}

Result Object has no attribute "results"

Expected Result { "ticker": "AAPL", "status": "OK", "queryCount": 2, "resultsCount": 2, "adjusted": true, "results": [ { "v": 135647456, "vw": 74.6099, "o": 74.06, "c": 75.0875, "h": 75.15, "l": 73.7975, "t": 1577941200000, "n": 1 },

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context I'm trying to get candle info in 10-day increments. When I try to get some of the candle increments, I receive an error that the object returned has no attribute of "results". Time periods before and after return valid results. For example, for ticker ASML, from period 2007-10-11 to 2007-10-20, the object returns no results. Results are valid for the 2007-09-21 to 2007-09-30 time period and the 2007-11-01 to 2007-11-10 time period but not in between.

jrbell19 commented 3 years ago

Could you please provide the specific URL path that is yielding this?

jrbell19 commented 3 years ago

I am querying this path: https://api.polygon.io/v2/aggs/ticker/AAPL/range/10/day/2007-10-11/2007-10-20?apiKey=

It is returning the following:

results: [ { v: 8021164704, vw: 6.0247, o: 6.0532, c: 6.0864, h: 6.2368, l: 5.4718, t: 1192075200000, n: 1465865 }, { v: 6950741616, vw: 6.5243, o: 6.0839, c: 6.6104, h: 6.7357, l: 6.0704, t: 1192939200000, n: 1271964 } ],

Is this not expected?

JimbobTheSaucy commented 3 years ago

I am querying https://api.polygon.io/v2/aggs/ticker/ASML/range/15/minute/2007-10-11/2007-10-20?apiKey= https://api.polygon.io/v2/aggs/ticker/AAPL/range/10/day/2007-10-11/2007-10-20?apiKey= And receiving zero results. When I query the same ticker, and multiplier, but use a from of 2007-09-11 to 2007-09-20 I get the expected results, and same with a timespan of 2007-11-11 to 2007-11-20. I have found similar gaps on tickers ATVI, CHTR, MNST, MXIM of the tickers I have tried. On all the tickers I mentioned, timespans both before and after the gaps work but 1 or more gaps exist. Most of the 70+ tickers I have tried worked perfectly for the downloaded period between 2006 and 2021 on the same multiplier, etc. On Fri, Jul 23, 2021, 7:25 AM Jack Bell @.***> wrote:

I am querying this path: https://api.polygon.io/v2/aggs/ticker/AAPL/range/10/day/2007-10-11/2007-10-20?apiKey=

It is returning the following:

results: [ { v: 8021164704, vw: 6.0247, o: 6.0532, c: 6.0864, h: 6.2368, l: 5.4718, t: 1192075200000, n: 1465865 }, { v: 6950741616, vw: 6.5243, o: 6.0839, c: 6.6104, h: 6.7357, l: 6.0704, t: 1192939200000, n: 1271964 } ],

Is this not expected?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/polygon-io/issues/issues/156#issuecomment-885677265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU52OLIW7K2PE2LLHFFZYFTTZF3XLANCNFSM5AZHQNNA .

jrbell19 commented 3 years ago

I was unable to replicate this with other symbols, however, I did discover that ASML was delisted on 2007-10-01 due to 'reorganization'. It then began trading under the ticker 'ASMLD'

https://www.dtcc.com/~/media/Files/pdf/2007/10/1/OTC188.pdf

JimbobTheSaucy commented 3 years ago

I see, thank you for tracking that down for me. I will research the other tickers to see if similar conditions applied.

On Mon, Jul 26, 2021, 9:19 AM Jack Bell @.***> wrote:

I was unable to replicate this with other symbols, however, I did discover that ASML was delisted on 2007-10-01 due to 'reorganization'. It then began trading under the ticker 'ASMLD'

https://www.dtcc.com/~/media/Files/pdf/2007/10/1/OTC188.pdf

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/polygon-io/issues/issues/156#issuecomment-886843852, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU52OLJKH7XZJJWJJPHYKXDTZWDJRANCNFSM5AZHQNNA .

jrbell19 commented 3 years ago

No problem!