Use GraphQL subscriptions to get real-time updates
For websockets, you use the Authorization
connection parameter when sending the connection_init
payload.
Try it
SDK
If you’re using the SDK, then you can just call sdk.subscribe
with the subscription you want to use and it will handle the connections.
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:
onTokenEventsCreated
to the SOL token, then you’re going to get a lot more messages than a token with no volume.If you’re subscribing to lower throughput subscriptions, then you could easily have upwards of 100 at once.