Get Logs Events

Get all transactions logs between specified blocks

Log events by topics

This endpoint allows to fetch all log events for a specified topic/s between a specified blocks.

Filters:

  •     Get All Logs between specified blocks
    
    Block filtering, return all logs between those blocks, If fromBlock and toBlocks are not specified then the recent 5 block logs will be returned. (fromBlock specifies from which block logs should be picked, toBlock specifies till which block)
unmarshal.EVMApi
    .getEventsByTopics(Chain.ethereum, {topics: "topic0"})
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
chain
required
string

Chain name (example: bsc, ethereum, matic...)

Enum: "ethereum" "bsc" "matic" "celo" "klaytn" "cronos" "velas" "avalanche" "arbitrum" "xinfin" "zilliqa" "fantom" "fuse" "bsc-testnet" "matic-testnet" "rinkeby-testnet"
Example: bsc
query Parameters
topics
required
string
Default: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"

Topics which are to be filtered in logs

Example: topics=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
fromBlock
number
Default: 14870135

Starting block from which the transactions should be considered

Example: fromBlock=14870135
toBlock
number
Default: 14870140

End block till which the transactions should be considered

Example: toBlock=14870140
Responses
200
401
get/v1/{chain}/topics/logs
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/topics/logs?topics=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&fromBlock=14870135&toBlock=14870140&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    },
  • {
    },
  • {
    }
]