Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Getting the opening price for the current day

Hey there,

So I need to compare the current days opening price with the closing price of the last day.
I can easily compare the open of yesterday with the close of the day before that using data.history because I can set the timeframe to '1d'.
But I can't do so on the current data.

This is the code I'm using to get the current days open:

aaplTodaysOpen = data.current(sid(24), 'open')

Of course this doesn't return the open of the day but rather the open of some minute during that day.

Would love it if anyone could help me out on this :)