areed1192 / python-trading-robot

A trading robot, that can submit basic orders in an automated fashion using the TD API.
MIT License
535 stars 312 forks source link

Data delayed by 15 minutes even after authenticating #25

Open grantreighard opened 2 years ago

grantreighard commented 2 years ago

Alex, thank you so much for an awesome repo. I have been following along and getting everything to work just fine until now. However, on video 14, I used the trading_robot.wait_till_next_bar(last_bar_timestamp=last_bar_timestamp) line, and when I print out print("Time to wait {time_to_wait}".format(time_to_wait=time_to_wait_now)) before resetting it to 0 if negative, I get a value between -960 and -900. This indicates to me that the data is 15 minutes delayed, even though I've freshly authenticated. Also note that the time to sleep is set to 0, so it refreshes every second.

What can I do to fix this?