❓ FAQ

Why do I keep getting disconnected?


Disconnects can happen for a number of reasons. Follow the list below for things to check:

1. Check your network connection

Ensure your network connection is reliable and fast enough to receive the data you request. We suggest a connection of at least 10MB/s (80Mbps) with a reputable hosting provider.

2. Ensure you are sending and/or receiving pings

If you don't respond to websocket pings or send your own, the connection will be disconnected after 1 min. See more about the ping pong requirement.

Why are my notifications behind / delayed?


Delayed notifications can happen for a number of reasons. Follow the list below for things to check:

1. Check the websocket status

Check the status of the websocket here. If your messages are more delayed then proceed to the next item in this list.

3. Check your network connection

Ensure your network connection is reliable and fast enough to receive the data you request. We suggest a connection of at least 10MB/s (80Mbps) with a reputable hosting provider.

3. Ensure you are processing the messages fast enough

If you process the websocket messages too slow, they will start to queue up. You will notice this as the message delay will increase leading to a block time further in the past. Consider adding a swap filter to reduce the amount of data you receive.

Please note that currently, if you dont process the messages fast enough and have a delay of more than 60 seconds, the stream will drop events. We will soon introduce an option to prevent dropped events.

How can I get the token price in USD?


Keep in mind that its possible for a tokens USD price to go up whilst its value goes down. Since these tokens are traded with wSOL, the wSOL/USD ratio may increase whilst your token (e.g. POP) in a pool of wSOL/POP may simultaneously decrease.

To calculate the token price in USD, you have a few options:

  • 1. Use the public coinbase API
    Coinbase provide a free public api for getting the USD prices of all major chain tokens. You can call this endpoint periodically to get the price of SOL.
    https://api.coinbase.com/v2/exchange-rates?currency=USD

    You can then multiply the quotePrice in the swap (providing it is in wSOL) by the SOL price provided by the coinbase api.

  • 2. Use the USDC/wSOL pair

    You can listen to the USDC token on Solana EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v in a pair with wSOL. However when taking this route, ensure you listen to a pool with high enough liquidity otherwise you will get erratic results.