I'm trying to connect to the the Stream API in my Flutter app which is written in Dart. From what I can tell this should be a fairly straight forward process but I'm receiving an exception from Betfair.
Here is my code:
I am receiving this error:
What does this error mean? Am I supposed to be passing any information to the API with the connect request?
Here is my code:
Code:
listenToStream() {
final channel = WebSocketChannel.connect(Uri.parse('ws://stream-api.betfair.com:443'));
channel.stream.listen((message) {
print("$message"); // Expecting to see something like: {"op":"connection","connectionId":"002-230915140112-174"} but not seeing anything
});
}
Code:
Unhandled Exception: WebSocketChannelException: WebSocketChannelException: HttpException: Connection reset by peer, uri = http://stream-api.betfair.com:443


Comment