Websockets

For websockets, you use the Authorization connection parameter when sending the connection_init payload.

Try it

Multiple Subscriptions

You can subscribe multiple times in the same connection, just send additional subscribe messages.

The maximum number of subscriptions you can have open concurrently before the socket is overloaded depends on many factors, but generally ~25 subscriptions per connection should be fine.

It depends on:

  • Throughput of the subscriptions. If you are subscribed to onTokenEventsCreated to the SOL token, then you’re going to get a lot more messages than a token with no volume.
  • Your internet connection, the amount of network capacity matters if you’re making a lot of subscriptions.
  • Geography (how close is your application to Western US)

If you’re subscribing to lower throughput subscriptions, then you could easily have upwards of 100 at once.