Skip to main content

Create stream

PUThttps://api.moralis-streams.com/streams/evm

Creates a new evm stream.

BODY PARAM
webhookUrlstringrequired
Webhook URL where moralis will send the POST request.
descriptionstringrequired
A description for this stream
tagstringrequired
A user-provided tag that will be send along the webhook, the user can use this tag to identify the specific stream if multiple streams are present
topic0array
An Array of topic0's in string-signature format ex: ['FunctionName(address,uint256)']
allAddressesboolean
Include events for all addresses (only applied when abi and topic0 is provided)
includeNativeTxsboolean
Include or not native transactions defaults to false
includeContractLogsboolean
Include or not logs of contract interactions defaults to false
includeInternalTxsboolean
Include or not include internal transactions defaults to false
includeAllTxLogsboolean
Include all logs if atleast one value in tx or log matches stream config
getNativeBalancesobject
Include native balances for each address in the webhook
selectorsarray
typestring
abiobject
anonymousboolean
constantboolean
inputsobject
namestring
typestring
indexedboolean
componentsjson
internalTypestring
namestring
outputsobject
namestring
typestring
componentsjson
internalTypestring
payableboolean
stateMutabilitystring
typestring
gasnumber
advancedOptionsobject
topic0string
filterjson

The filter object for the topic0 https://docs.moralis.io/docs/filter-streams

includeNativeTxsboolean
chainIdsarrayrequired
The ids of the chains for this stream in hex Ex: ["0x1","0x38"]
demoboolean
Indicator if it is a demo stream
triggersobject
triggers
typestring
contractAddressstring
inputsarray
functionAbiobject
The abi to parse the log object of the contract
anonymousboolean
constantboolean
inputsarray
namestring
outputsarray
payableboolean
stateMutabilitystring
typestringrequired
gasnumber
topic0string
callFromstring
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = Moralis.Streams.createStream({});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"triggers": {
"inputs": [
""
]
}
}