Logs
Get Event Logs by Address
Returns the event logs from an address, with optional filtering by block range.
https://api.wemixscan.com/api
?module=logs
&action=getLogs
&address=0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f
&fromBlock=29572040
&toBlock=29572042
&page=1
&offset=1000
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005b06b2fdb5a2bf7681163b12f4a9f31f6f4a0544",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bc8",
"blockHash": "0x27119f404672d8ccf0a4abce33558dfb798f8b340513cedac15dc4511a5a7f3c",
"timeStamp": "0x6513f505",
"gasPrice": "0x174876e801",
"gasUsed": "0x189f4",
"logIndex": "0x",
"transactionHash": "0xe9bba4cb7d1cfeb87a10a09410c264d7dbbc563f27c0a657f3528e9b4a089000",
"transactionIndex": "0x"
},
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000080a5a916fb355a8758f0a3e47891dc288dac2665"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bc8",
"blockHash": "0x27119f404672d8ccf0a4abce33558dfb798f8b340513cedac15dc4511a5a7f3c",
"timeStamp": "0x6513f505",
"gasPrice": "0x174876e801",
"gasUsed": "0x1a628",
"logIndex": "0x4",
"transactionHash": "0xb92e6768efaede7b7e275c19cb5351047d8a21caa881b9100ccec84094dd7e7d",
"transactionIndex": "0x1"
}
]
}
Get Event Logs by Topics
Returns the events log in a block range, filtered by topics.
https://api.wemixscan.com/api
?module=logs
&action=getLogs
&fromBlock=29572040
&toBlock=29572042
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216
&page=1
&offset=1000
&apikey=YourApiKeyToken
Usage:
For a single topic, specify the topic number such as
topic0
,topic1
,topic2
,topic3
For multiple topics, specify the topic numbers and topic operator either
and
oror
such as below topic0_1_opr (and|or between topic0 & topic1), topic1_2_opr (and|or between topic1 & topic2) topic2_3_opr (and|or between topic2 & topic3), topic0_2_opr (and|or between topic0 & topic2) topic0_3_opr (and|or between topic0 & topic3), topic1_3_opr (and|or between topic1 & topic3)
Query Parameters
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bc8",
"blockHash": "0x27119f404672d8ccf0a4abce33558dfb798f8b340513cedac15dc4511a5a7f3c",
"timeStamp": "0x6513f505",
"gasPrice": "0x174876e801",
"gasUsed": "0x160dd",
"logIndex": "0xa",
"transactionHash": "0x91ab179f79eb1ec8521ee9c32eba58059b75b8963da43789a97daee1507087ec",
"transactionIndex": "0x2"
},
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bc9",
"blockHash": "0x2bcbf2403725de6c4d03f46a3334d773822ec25eeb49666df457b18f5ebf0f55",
"timeStamp": "0x6513f506",
"gasPrice": "0x174876e801",
"gasUsed": "0x160dd",
"logIndex": "0x36",
"transactionHash": "0x53d632699b8d6c5997f03221ca7b89c1c079c76b64498ed539b30d97bcb17f37",
"transactionIndex": "0xd"
},
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bca",
"blockHash": "0x8dc478158d11aa7a3a03ea5d549d87d5cbacd31156f1736ab441e0f973ee318c",
"timeStamp": "0x6513f507",
"gasPrice": "0x174876e801",
"gasUsed": "0x160dd",
"logIndex": "0x2e",
"transactionHash": "0x0febecd727ff65dfb3c1440f3735e63fdaef7bd0eac792ee35ee5ef77f485f94",
"transactionIndex": "0xb"
}
]
}
Get Event Logs by Address filtered by Topics
Returns the event logs from an address, filtered by topics and block range.
https://api.wemixscan.com/api
?module=logs
&action=getLogs
&fromBlock=29572040
&toBlock=29572042
&address=0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216
&page=1
&offset=1000
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result": [
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bc8",
"blockHash": "0x27119f404672d8ccf0a4abce33558dfb798f8b340513cedac15dc4511a5a7f3c",
"timeStamp": "0x6513f505",
"gasPrice": "0x174876e801",
"gasUsed": "0x160dd",
"logIndex": "0xa",
"transactionHash": "0x91ab179f79eb1ec8521ee9c32eba58059b75b8963da43789a97daee1507087ec",
"transactionIndex": "0x2"
},
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bc9",
"blockHash": "0x2bcbf2403725de6c4d03f46a3334d773822ec25eeb49666df457b18f5ebf0f55",
"timeStamp": "0x6513f506",
"gasPrice": "0x174876e801",
"gasUsed": "0x160dd",
"logIndex": "0x36",
"transactionHash": "0x53d632699b8d6c5997f03221ca7b89c1c079c76b64498ed539b30d97bcb17f37",
"transactionIndex": "0xd"
},
{
"address": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000292e4d76361b8781f8fc04119a06774d3ce3216",
"0x00000000000000000000000000caec2e118abc4c510440a8d1ac8565fec0180c"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000002",
"blockNumber": "0x1c33bca",
"blockHash": "0x8dc478158d11aa7a3a03ea5d549d87d5cbacd31156f1736ab441e0f973ee318c",
"timeStamp": "0x6513f507",
"gasPrice": "0x174876e801",
"gasUsed": "0x160dd",
"logIndex": "0x2e",
"transactionHash": "0x0febecd727ff65dfb3c1440f3735e63fdaef7bd0eac792ee35ee5ef77f485f94",
"transactionIndex": "0xb"
}
]
}
Last updated