I am trying to connect to Lightstremer to use the IG API streaming, and I would like to use the websockets library. I am wondering if it is possible. What I am struggling with is how to get the URI to use to create the connection with the server. I can get the lightstreamer endpoint from IG and it looks like 'http://demo-apd.marketdatasystem.com'.
If I run
import websockets
import asyncio
ws_url = 'http://demo-apd.marketdatasystem.com/lighstreamer'
connection = await websockets.connect(ws_url)
I get the error https://demo-apd.marketdatasystems.com/lighstreamer isn't a valid URI
If I change the code below
ws_url = 'wss://demo-apd.marketdatasystem.com/lighstreamer'
connection = await websockets.connect(ws_url)
I have a message of failed connection
thanks for your time