Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.0

Update stream

POSThttps://api.moralis-streams.com/streams/aptos/:id

Updates a new aptos stream.

PATH PARAMS
idstringrequired
BODY PARAM
allAddressesboolean
Include events for all addresses (only applied when at least one event or function is provided)
demoboolean
Indicator if it is a demo stream
descriptionstring
A description for this stream
includeChangesboolean
Include or not raw changes for every transaction in webhook defaults to false
includeEventsboolean
Include or not events in webhook defaults to false
includePayloadboolean
Include or not payload for every transaction in webhook defaults to false
networkarray
The network to listen to
No items in the array
eventsarray
An Array of events in string-signature format ex: ['0x1::coin::WithdrawEvent']
No items in the array
functionsarray
An Array of events in string-signature format ex: ['0x1::aptos_account::transfer']
No items in the array
tagstring
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
webhookUrlstring
Webhook URL where moralis will send the POST request.
Responses
API KEY
// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
method: 'POST',
headers: {
accept: 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
};

fetch('https://api.moralis-streams.com/streams/aptos/%3Aid', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Response Example
{
"id": "",
"allAddresses": "",
"demo": "",
"description": "",
"includeChanges": "",
"includeEvents": "",
"includePayload": "",
"isErrorSince": "",
"network": [
""
],
"status": "",
"statusMessage": "",
"events": [
""
],
"functions": [
""
],
"tag": "",
"webhookUrl": "",
"amountOfAddresses": ""
}