Market Data Streaming Help

Hi y’all,

I have been trying to stream market data using the example in the Alpaca python API, but I keep getting the error that ‘Key ID must be given to access Alpaca trade API’, ’ (env: APCA_API_KEY_ID)’. I have tried creating environmental variables but it didn’t seem to help. Can someone please help me?

use this as a template for your code, I think it will help you (note that you set your credentials in the file):