Can't connect to websocket in VSCode but can in cmd prompt

I’m a noob so cut me some slack. Two nights ago, I was able to stream data no problem while running my script within VSCode. Yesterday, I was no longer able to stream data even though the program hadn’t changed. I debugged it down to the websocket data not being passed into my on_open function.

I am able to connect no problem though to the same stream while using command prompt. I know I’m probably missing something simple, but I just don’t know enough about it to figure it out.

I’m using “wss://data.alpaca.markets/stream”

I managed to figure it out on my own. This should help anyone in the future who comes across this same problem. As of 9/30/2021 the DST Root CA X3 cert expired. This needs to be removed from internet options, and the cert ‘ISRG Root X1’ needs to be imported in its place.

1 Like