In Google Sheets, this is legal:
=STOCKDATA("AAPL", "volume") # no date means today: a real time quote.
And this is legal:
=STOCKDATA("AAPL", "volume", "1/1/2021") # a historical quote.
But this is not legal:
=STOCKDATA("AAPL", "volume", TODAY())
As more attributes of options become available, this applies to =OPTIONDATA() as well.