WebSocket
OHLCV Stream
Mobula provides WSS support for retrieving OHLCV data for any asset.
This endpoint is only available to Growth and Enterprise plans.
Product demo
Endpoint details
- URL: wss://production-api.mobula.io
- Message (string):
Parameters
- apiKey: your Mobula API key (you can get one here)
- address: the address of the pool you want to get OHLCV data for
- chainId: details here
- period: the period of the OHLCV data you want to get (1s, 1min, 5min, 15min, 1h, 4h, 1d, 1w, 1M)
Implementation example
Let’s take a look at:
You can use the Network tab in your browser to see the WSS requests.
Unsubscribing from the stream
You can unsubscribe from the stream by sending an unsubscribe message (please make sure you send a payload empty object):
After sending the unsubscribe payload, you will receive a message with the following payload:
Can’t find what you’re looking for? Reach out to us, response times < 1h.