# TQQQ Historical Data Not Updating

**URL:** <https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334>\
**Category:** Alpaca Market Data\
**Created:** [November 16, 2020, 7:44pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334 "2020-11-16T19:44:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![brvonobstfel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/brvonobstfel/32/1567_2.png) [@brvonobstfel](https://forum.alpaca.markets/u/brvonobstfel)\
**Post date:** [November 16, 2020, 7:44pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/1 "2020-11-16T19:44:43Z")

</div>

When I attempt to use get\_last\_quote or get\_last\_trade for the “TQQQ” stock symbol, the latest data is from 14:33ish on Friday (11/13). When I try to circumvent this issue and use the historical data feed, it too stops at around this time on Friday. If I use other stock symbols (including “SQQQ”), there are no issues with the historical data. Any thoughts as to why an individual stock symbol would stop responding to updates? Thanks,

---

<div class="post-metadata">

**Author:** ![dan\_whitnable](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable/32/1323_2.png) [@dan\_whitnable](https://forum.alpaca.markets/u/dan_whitnable)\
**Post date:** [November 16, 2020, 8:12pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/2 "2020-11-16T20:12:58Z")

</div>

Hmm. As of 3:06 PM ET 2020-11-16 I’m able to fetch all the TQQ data.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/8/8af09e11e29808357f7cf3c3b7300f820dcfb2a5.png)

What code are you using? Sometimes the Polygon data limits the amount of data it sends in a single API call.

---

<div class="post-metadata">

**Author:** ![brvonobstfel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/brvonobstfel/32/1567_2.png) [@brvonobstfel](https://forum.alpaca.markets/u/brvonobstfel)\
**Post date:** [November 16, 2020, 8:17pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/3 "2020-11-16T20:17:16Z")

</div>

Thanks for the reply. Are you able to pull the TQQQ last trade data using get\_last\_trade() for TQQQ?

---

<div class="post-metadata">

**Author:** ![dan\_whitnable](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable/32/1323_2.png) [@dan\_whitnable](https://forum.alpaca.markets/u/dan_whitnable)\
**Post date:** [November 16, 2020, 8:24pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/4 "2020-11-16T20:24:49Z")

</div>

Yes, I can get up to date trades for TQQQ, Here’s is an example

 ![image](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/0/0f6aa432ec5a9a63c32a1a17f103039019e5bf04.png)

---

<div class="post-metadata">

**Author:** ![brvonobstfel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/brvonobstfel/32/1567_2.png) [@brvonobstfel](https://forum.alpaca.markets/u/brvonobstfel)\
**Post date:** [November 16, 2020, 8:25pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/5 "2020-11-16T20:25:01Z")

</div>

To specifically answer your question, when I use the following code:

import alpaca\_trade\_api as tradeapi

API\_KEY =   
API\_SECRET\_KEY =   
ALPACA\_API\_URL = “[https://paper-api.alpaca.markets](https://paper-api.alpaca.markets)”  
alpaca = tradeapi.REST(API\_KEY, API\_SECRET\_KEY, ALPACA\_API\_URL, api\_version=‘v2’)

alpaca.get\_last\_trade(“TQQQ”)

I get this output (which is from Friday):

Trade({ ‘cond1’: 14,  
‘cond2’: 37,  
‘cond3’: 41,  
‘cond4’: 0,  
‘exchange’: 3,  
‘price’: 143.43,  
‘size’: 40,  
‘timestamp’: 1605296014171000000})

Also its not just an issue for me with paper trading as the same happens in Live trading as well.

Thanks!

---

<div class="post-metadata">

**Author:** ![dan\_whitnable](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable/32/1323_2.png) [@dan\_whitnable](https://forum.alpaca.markets/u/dan_whitnable)\
**Post date:** [November 16, 2020, 8:28pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/6 "2020-11-16T20:28:06Z")

</div>

Ah, you are not using Polygon data. The `get_last_trade` method uses IEX data which is sometimes incomplete.

Using `get_last_trade`, I also don’t see any data for 11-16.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/a/abb82e3e7d513bd2f149bd170df6b330328b69dd.png)

It’s best to use Polygon data for just this reason.

---

<div class="post-metadata">

**Author:** ![brvonobstfel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/brvonobstfel/32/1567_2.png) [@brvonobstfel](https://forum.alpaca.markets/u/brvonobstfel)\
**Post date:** [November 16, 2020, 8:50pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/7 "2020-11-16T20:50:56Z")

</div>

Ok, thanks for the feedback. I’m using a fairly complex (by my standards) program which started as a template on Udemy. While there are references in the program to Polygon, I’ve suspected for some time that I’m not actually tapping into the Polygon data. With that in mind, do you happen to have a simple template for getting last\_trade out of Polygon, or example code that you could point me toward? The program I’ve built is pretty reliant on having accurate last\_trade data, so any assistance in pointing me in the right direction would be much appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![dan\_whitnable](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable/32/1323_2.png) [@dan\_whitnable](https://forum.alpaca.markets/u/dan_whitnable)\
**Post date:** [November 16, 2020, 8:59pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/8 "2020-11-16T20:59:35Z")

</div>

You should be able to replace all instances of `alpaca.get_last_trade("TQQQ")` with `alpaca.polygon.last_trade("TQQQ")`. The result of both is a single Trade object. The difference is the latter will fetch data from Polygon and not the default provider IEX.

One thing to note is Polygon data is only available if you have a ‘live’ account. You can use it in both paper and live, but for licensing reasons, users must have a live account.

---

<div class="post-metadata">

**Author:** ![brvonobstfel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/brvonobstfel/32/1567_2.png) [@brvonobstfel](https://forum.alpaca.markets/u/brvonobstfel)\
**Post date:** [November 16, 2020, 9:06pm UTC](https://forum.alpaca.markets/t/tqqq-historical-data-not-updating/3334/9 "2020-11-16T21:06:57Z")

</div>

Wow, that’s extremely helpful. The entire time I had the infrastructure set up to handle Polygon data and I just wasn’t using it. Thanks for all of your help. That solved my problem!
