All connections are made to the websocket api at this address:
wss://api.solanastreaming.com
The websocket follows industry standard protocols so any websocket connection guide will work or you can follow one of ours such as the streaming solana token prices guide. Typically, a standard https request is established, then the connection is subsequentially upgraded to a websocket.
We do not currently issue cors headers but send us a message on discord if its something you require.
It is a good idea to implement reconnection logic in case you are disconnected. This can happen due to network issues or if we update our endpoint servers or other reasons. See the faq: why do I keep getting disconnected for more info.
Authentication is sent once upon connecting to the websocket api. You use your api key obtained from the dashboard and send it via the X-API-KEY
header upon connecting. See
this connection guide for an
example.
If your authentication is unsuccessful, you will receive a 401 response to your initial connection request. Check your api key and try again.
Whilst there is a connection limit of 1 concurrent connection, this is also a limit for how often you can make your connection. This is only in place to protect against accidental connection spamming.
The rate limit is 1 connection per second with a burst of 10. However, you should never need to exceed this limit for any type or amount of websocket data retrieval. If the rate limit is exceeded, it will return a 429 on the connection response.
Get in touch via discord for any questions.
Standard websocket Ping Pong control frames are supported. The websocket has a ping pong requirement such that it must receive a message from your client every minute else it will trigger a disconnect. This message from your client must either be a pong reply or ping messages of your own.
The server sends its own ping frames to your client periodically and most clients have pong response logic already built in. This means most of the time you wont need to implement this logic yourself to keep a connection. However, you can also send your own ping messages as you may want to check the connection is still alive from your end (see: why do i need pingpong to detect websocket). When these ping messages are received by the websocket api, these reset your ping pong timeout and will also stop you from being disconnected after 1 minute.