Skip to main content
You can create a stream either through the Moralis Admin Panel (no code required) or programmatically using the Moralis SDK.

Option 1: Create via Admin Panel

Getting Started

  1. Go to admin.moralis.com/streams.
  2. Click on Create a new Stream.
  3. Choose one of the templates:
    • Custom Event — Customizable options for events and filters, allowing precise notifications.
    • Wallet Activity — Track native transactions and smart contract interactions (transfers, approvals).
    • Contract Activity — Monitor smart contract events (logs).

Setting Up the Stream

1. Name your stream and select the types of events you want to track. 2. Set up event filtering. You can find more details in the Filters documentation. 3. Add a tag for your stream and choose if you wish to receive additional data. 4. Add the addresses you wish to track. 5. Pick which chains should be tracked. 6. Test your stream (optional). 7. Add your webhook URL where the POST requests will be sent.
For testing, you can use a service like webhook.site to receive and inspect webhooks.
8. Save your configuration. You will now be able to see your stream details and its status in the dashboard. Once the addresses you are monitoring start sending or receiving transactions, you will see the webhook data delivered to your endpoint.

Option 2: Create via SDK

Make sure you have a Moralis API key before proceeding. You can get one from the Moralis Dashboard.

Step 1: Create a Stream

To create a stream, you need these required parameters:
  • webhookUrl — Webhook URL where Moralis will send the POST request.
  • description — A description for this stream.
  • tag — A user-provided tag sent along with the webhook to identify the stream.
  • chains — An array of chains to monitor.
  • At least one of includeContractLogs, includeNativeTxs, or includeInternalTxs must be set to true.
const Moralis = require("moralis").default;

const runApp = async () => {
  await Moralis.start({
    apiKey: "YOUR_API_KEY",
  });

  const response = await Moralis.Streams.add({
    webhookUrl: "https://webhook.site/YOUR_WEBHOOK_URL",
    description: "My first stream",
    tag: "my_stream",
    chains: ["0x1"],
    includeNativeTxs: true,
  });

  console.log(response.toJSON().id); // print the stream id
};

runApp();

Step 2: Add an Address to a Stream

Now that you have a stream ID, you can add addresses to monitor. You can add individual addresses or a batch.
const Moralis = require("moralis").default;

const runApp = async () => {
  await Moralis.start({
    apiKey: "YOUR_API_KEY",
  });

  const list = [
    "0xf3d8d9f1f1ccbc8f7e313b7e7cdaa1d6e5b2c2f2",
    "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
  ];

  const response = await Moralis.Streams.addAddress({
    id: "YOUR_STREAM_ID",
    address: list,
  });

  console.log(response.toJSON());
};

runApp();

Step 3: Update a Stream (Optional)

You can update a stream to add contract log monitoring, such as listening for ERC20 transfers.
const Moralis = require("moralis").default;

const runApp = async () => {
  await Moralis.start({
    apiKey: "YOUR_API_KEY",
  });

  const ERC20TransferABI = [
    {
      anonymous: false,
      inputs: [
        { indexed: true, name: "from", type: "address" },
        { indexed: true, name: "to", type: "address" },
        { indexed: false, name: "value", type: "uint256" },
      ],
      name: "Transfer",
      type: "event",
    },
  ];

  const response = await Moralis.Streams.update({
    id: "YOUR_STREAM_ID",
    abi: ERC20TransferABI,
    includeContractLogs: true,
    topic0: ["Transfer(address,address,uint256)"],
    description: "My first stream - with ERC20 transfers",
  });

  console.log(response.toJSON());
};

runApp();

Next Steps

Once your stream is created, you will receive a mandatory test webhook that you must respond to with a 200 status code for the stream to activate.