Documentation Index
Fetch the complete documentation index at: https://docs.moralis.com/llms.txt
Use this file to discover all available pages before exploring further.
You can create a stream either through the Moralis Admin Panel (no code required) or programmatically via the API.
The flow is the same on every chain — define a stream, attach the addresses (or xpub / programs / mints) you care about, and point Moralis at your webhook URL — but the parameters and chain-specific features differ.
Option 1: Create via Admin Panel
Getting Started
- Go to admin.moralis.com/streams.
- Click on Create a new Stream.
- Choose one of the EVM 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
- Name your stream and select the types of events you want to track.
- Set up event filtering. See Filters for details.
- Add a tag for your stream and choose if you wish to receive additional data.
- Add the addresses you wish to track.
- Pick which EVM chains should be tracked (Ethereum, Base, Polygon, etc.).
- Test your stream (optional).
- 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.
- Save your configuration.
Option 2: Create via SDK
Step 1: Create a Stream
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 EVM chain IDs to monitor (hex-encoded).
- At least one of
includeContractLogs, includeNativeTxs, or includeInternalTxs must be 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();
from moralis import streams
api_key = "YOUR_API_KEY"
stream_body = {
"webhookUrl": "https://webhook.site/YOUR_WEBHOOK_URL",
"description": "my first stream",
"tag": "my_stream",
"chainIds": ["0x1"],
"includeNativeTxs": True,
}
results = streams.evm_streams.create_stream(api_key=api_key, body=stream_body)
print(results["id"]) # print the stream id
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();
from moralis import streams
api_key = "YOUR_API_KEY"
params = {"id": "YOUR_STREAM_ID"}
address_list = [
"0xf3d8d9f1f1ccbc8f7e313b7e7cdaa1d6e5b2c2f2",
"0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
]
stream_body = {"address": address_list}
results = streams.evm_streams.add_address_to_stream(
api_key=api_key, body=stream_body, params=params
)
print(results)
Step 3: Update a Stream (Optional)
You can update a stream to add contract log monitoring, such as listening for ERC-20 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();
from moralis import streams
api_key = "YOUR_API_KEY"
erc20_transfer_abi = [
{
"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",
}
]
params = {"id": "YOUR_STREAM_ID"}
stream_body = {
"abi": erc20_transfer_abi,
"includeContractLogs": True,
"topic0": ["Transfer(address,address,uint256)"],
"description": "my first stream - with ERC20 transfers",
}
results = streams.evm_streams.update_stream(
api_key=api_key, body=stream_body, params=params
)
print(results)
Option 1: Create via Admin Panel
- Go to admin.moralis.com/streams.
- Click on Create a new Stream and choose the Bitcoin stream type.
- Name your stream, set a tag, and add your webhook URL.
- Choose how to monitor wallets:
- Individual addresses — P2PKH (
1...), P2SH (3...), or Bech32 (bc1q...)
- Xpub — attach an extended public key and Moralis derives addresses for you
- All addresses — firehose mode that delivers every Bitcoin transaction
- Save your configuration.
See the Bitcoin Streams overview for the full list of features and limitations.Option 2: Create via API
Step 1: Create a Bitcoin stream
curl -X PUT "https://api.moralis-streams.com/streams/bitcoin" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://webhook.site/YOUR_WEBHOOK_URL",
"description": "My first Bitcoin stream",
"tag": "btc_deposits",
"network": ["mainnet"],
"includeOutputs": true
}'
Required parameters:
webhookUrl — public HTTPS endpoint to receive payloads
description — human-readable stream description
tag — identifier sent on every webhook for routing on your side
network — must be ["mainnet"]
Optional: includeInputs, includeOutputs, allAddresses. See Create Bitcoin Stream.Step 2: Add an address (or xpub) to monitor
Add an individual address:curl -X POST "https://api.moralis-streams.com/streams/bitcoin/{streamId}/address" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "address": "bc1qexampleaddressxxxxxxxxxxxxxxxxxxxxxxxx" }'
Or attach an xpub so Moralis derives and monitors HD wallet addresses for you:curl -X POST "https://api.moralis-streams.com/streams/bitcoin/{streamId}/xpub" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "xpub": "xpub6CUGRUo..." }'
See Add Address and Add Xpub for details.Bitcoin Streams delivers each matched transaction twice — once at first block inclusion (confirmed: false, the block is near the chain tip and could still be reorged) and again after 2 blocks have been mined on top (confirmed: true, reorg-safe). Dedupe on txid and upsert on the second delivery to flip your local confirmation flag.
Option 1: Create via Admin Panel
- Go to admin.moralis.com/streams.
- Click on Create a new Stream and choose the Solana stream type.
- Name your stream, set a tag, and add your webhook URL.
- Configure your filters — any combination of:
- Addresses — match transactions where any
accountKey matches a watched address
- Program IDs — match transactions invoking specific programs (e.g. SPL Token Program)
- Mint addresses — match transactions involving specific SPL tokens
- All addresses — firehose mode for every Solana transaction
- Save your configuration.
See the Solana Streams overview for how Solana concepts (programs, mints, signatures) map from EVM.Option 2: Create via API
Step 1: Create a Solana stream
curl -X PUT "https://api.moralis-streams.com/streams/solana" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://webhook.site/YOUR_WEBHOOK_URL",
"description": "My first Solana stream",
"tag": "sol_wallet_activity",
"network": ["mainnet"]
}'
Required parameters:
webhookUrl — public HTTPS endpoint to receive payloads
description — human-readable stream description
tag — identifier sent on every webhook for routing on your side
network — ["mainnet"]
See Create Solana Stream for the full schema.Step 2: Add addresses, program IDs, or mint addresses
curl -X POST "https://api.moralis-streams.com/streams/solana/{streamId}/address" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "address": "GoSBxCH19sMnZVEifsXeeMdEfkTv6Zh6MWvQFQF3e5m7" }'
Solana addresses are base58 and case-sensitive. Submit them in their original case — unlike EVM, lowercased addresses will not match.
See Add Address for details on attaching addresses, program IDs, and mint addresses.
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.