As per title, the very same code but with different datetime sometimes returns options data and sometimes returns the underlying equity price. Notebook with example is attached.

Author