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.2

Get history

GEThttps://api.moralis-streams.com/history

Get all history

QUERY PARAMS
limitnumberrequired
cursorstring
excludePayloadboolean
Responses
API KEY
import Moralis from 'moralis';

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

const response = Moralis.Streams.getHistory({
"network": "mainnet"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"result": {
"id": "",
"date": "",
"payload": {
"block": {
"number": "",
"hash": "",
"timestamp": ""
},
"chainId": "",
"logs": [
{
"triggers": [
{
"value": "",
"name": ""
}
],
"logIndex": "",
"transactionHash": "",
"address": "",
"data": "",
"topic0": "",
"topic1": "",
"topic2": "",
"topic3": ""
}
],
"txs": [
{
"triggers": [
{
"value": "",
"name": ""
}
],
"hash": "",
"gas": "",
"gasPrice": "",
"nonce": "",
"input": "",
"transactionIndex": "",
"fromAddress": "",
"toAddress": "",
"value": "",
"type": "",
"v": "",
"r": "",
"s": "",
"receiptCumulativeGasUsed": "",
"receiptGasUsed": "",
"receiptContractAddress": "",
"receiptRoot": "",
"receiptStatus": ""
}
],
"txsInternal": [
{
"from": "",
"to": "",
"value": "",
"transactionHash": "",
"gas": ""
}
],
"abi": [
""
],
"retries": "",
"confirmed": "",
"tag": "",
"streamId": ""
},
"tinyPayload": {
"chainId": "",
"confirmed": "",
"block": "",
"records": "",
"retries": ""
},
"errorMessage": "",
"webhookUrl": "",
"streamId": "",
"tag": ""
},
"cursor": "",
"total": ""
}