what happends if i send SUBSCRIBE message more than once

I am using the following code to subscribe to a ticker.

I was wondering what happens if I accidently subscribe to the same ticker more than once. Will the server ignore the 2nd redundant subscribe request or will it send the same ticker with the same data more than once ?

async def subscribe_tick(self, symbol: str, handler=None):
        await self.ws.send(
            json.dumps(
                {"method": "SUBSCRIBE", "params": [f"{symbol}@bookTicker"], "id": 1}
            )
        )
        while True:
                response = await self.ws.recv()
                print(response)

Tha

Will the server ignore the 2nd redundant subscribe request or will it send the same ticker with the same data more than once ?

Requesting to subscribe to a stream which is already subscribed to will result in no change and the request is ignored.

1 Like