Skip to main content
All CollectionsAPIStreams API
Create a new Stream (via Admin UI)
Create a new Stream (via Admin UI)

Learn how to create a stream to monitor any address.

Jonathan Blackburn avatar
Written by Jonathan Blackburn
Updated over a year ago

Create a new Stream using the Admin Panel

  1. Select the project where you'll be creating the Stream


  2. Go to https://admin.moralis.io/settings and copy your API key from there, you will need it to access the Streams page.

  3. Go to https://admin.moralis.io/streams and paste your API key.

  4. Click on the Create a New Stream button and the following page will open. You can either select some of our predefined templates or create your stream from scratch by entering the contract or wallet address.


  5. Create a stream by choosing one of these options:

    1. Use one of the examples to create a demo stream with real-time data streaming into the right-hand terminal.

    2. Use a template and enter a Contract address, Wallet address, Token address, or Token Id depending on the template to create a demo stream.

    3. Input a Contract address, Wallet address, Token address in Add Address to Stream, and then configure your stream.

A. Use examples to create a demo stream


Lets choose the Tether Example. Simply, click the Example and the demo stream will be created. You will see the webhook responses streaming in the right hand terminal.


B. Use Templates to create a stream


Let's track transactions of a wallet.

  1. Click the Whenever a wallet recieves or sends assets template. You will be prompted to provide a Wallet address.

  2. Enter the wallet address you want to track. Or take a example wallet address like 0xe692869347b9b18Ef2DEED19ae1bBACE303B52B0 from Etherscan.

  3. When a transaction occurs on the wallet it will appear on the right-hand terminal.


  4. To get the webhook sent to your backend you have to configure your stream by adding Webhook URL, Description, and Tag.

  5. Then click toggle to Prod. You will now get webhooks sent to your URL you provided.

C. Configure your own stream

  1. Add Contract address or Wallet address

  2. Configure your stream to recieve webhooks to your backend by adding Webhook URL, Description, and Tag. Then click toggle to Prod.

  3. Select the Networks you want to track.

  4. Select the events you want to track by selecting from options Contract Interaction, Native Transactions, Internal Transactions under Stream Options. To read more on each options take a look at Streams options in our documentation.

  5. Select different topics to track by inputting an ABI. For example copy Tether ABI from Etherscan and paste the ABI into the ABI field.


  6. Now you can select the Topics you would want to only listen to. In this example lets choose to listen to the Transfer Topic (used to transfer the tokens from the owner of the token to some other address)

  7. Click on *Update. Now you should start receiving data to your webhook URL as soon as some transactions are done on the address.



🚨 Mandatory Test Webhook 🚨

Whenever you create or update a stream, you will receive a test webhook.

You have to return status code 200 for the stream to start.

The test body will look like this:

{
"abi": {},
"block": {
"hash": "",
"number": "",
"timestamp": ""
},
"txs": [],
"txsInternal": [],
"logs": [],
"chainId": "",
"tag": "",
"streamId": : "",
"confirmed": true,
"retries": 0,
"erc20Approvals": [],
"erc20Transfers": [],
"nftApprovals": [],
"nftTransfers": []
}


We are Live! 🎉

Now, whenever the address you monitor is involved in an incoming or outgoing transaction, you will receive a webhook with the transaction details.

Two Webhooks for Each Event

You will receive two webhooks for each event.

The first webhook will come as soon as the transaction is included in a block and has confirmed:false. This means the block in which the event occurred still runs the risk of getting dropped because of blockchain reorganization. You are not charged for unconfirmed webhooks, only for the confirmed ones.

The second webhook will come once the block in which the event happened has minimal chance of being dropped (the chance is never zero as it is all probabilistic). This second webhook will have confirmed:true.

Edge Cases

In rare cases, the webhook with confirmed:true may come before the one with confirmed:false; please ensure to handle this scenario on your end.

Did this answer your question?