This endpoint is only available to Growth and Enterprise plans.

Product demo

Coming soon.

Endpoint details

  • URL: wss://production-stream.mobula.io
  • Message (string):
{ 
    "type": "stream",
    "payload": {
    "name": "MyWalletTransactions",
    "chainIds": ["evm:1", "evm:56"],
    "events": ["trace", "log", "transaction", "block", "swap", "transfer", "pool"]
    }
}

Parameters

Implementation example

Let’s take a look at:

const socket = new WebSocket("wss://production-stream.mobula.io");

socket.addEventListener("open", () => {
  socket.send(`{
    "type": "stream",
    "payload": {
      "chainIds": ["evm:1", "evm:56"],
      "events": ["trace", "log", "transaction", "block", "swap", "transfer", "pool"],
    }
}`);
});

socket.addEventListener("message", (event) => {
  const data = JSON.parse(event.data);

  if (event.reorg) {
    // Handle reorg
    return;
  }
});

// No need to close the socket, it will close automatically.
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:


{
  type: "unsubscribe", 
  payload: {
    name: "MyWalletTransactions",
  },
};
 

After sending the unsubscribe payload, you will stop receiving events for the specified stream.

Can’t find what you’re looking for? Reach out to us, response times < 1h.