Do you know a broker API with a connection status flag?