Skip to main content

Logs

Get Event Logs by Address

Returns the event logs from an address, with optional filtering by block range.

https://api.btrscan.com/scan/api
?module=logs
&action=getLogs
&address=0x42857b399adba34b75d6bedcacde75c7784e87c6
&fromBlock=585180
&toBlock=585189

Try this endpoint in your browser 🔗

Query Parameters

ParameterDescription
addressthe string representing the address to check for logs
startblockthe integer block number to start searching for transactions
toBlockthe integer block number to stop searching for transactions

Get Event Logs by Address filtered by Topics

Returns the event logs from an address, filtered by topics and block range.

https://api.btrscan.com/scan/api
?module=logs
&action=logs
&address=0x68879ca2af24941fc3b6eb89fdb26a98aa001fc1
&fromBlock=1191962
&toBlock=1191964
&topic0=0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925
&topic0_1_opr=and
&topic1=0x0000000000000000000000009d9b993fa37ed15a38ac111b02077e2bfe5c1d37

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 or or such as belowtopic0_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)

Try this endpoint in your browser 🔗

Query Parameters

ParameterDescription
addressthe string representing the address to check for logs
fromBlockthe integer block number to start searching for transactions
toBlockthe integer block number to start searching for transactions
topicthe topic numbers to search for limited totopic0, topic1, topic2, topic3
topicOperatorthe topic operator when multiple topic combinations are used limited to and or or