Chains API

Which contracts emitted this event in a block range?

Undecoded event logs from any contract on a chain in a block range, found by indexed topic: an event signature, or a wallet in an indexed argument.

GET/api/external/chain-analysis/event-log-search/{chain}

What it returns

Raw, undecoded EVM logs any contract on the chain emitted between fromBlock and toBlock (inclusive) that carry the asked indexed topics, oldest first. At least one topic is required; several are ANDed. topic0 is the event signature hash; an address in topic1–topic3 is left-padded to 32 bytes, so topic2 set to a padded wallet and topic0 to the ERC-20 Transfer hash finds every token transfer into that wallet. At most 1000 logs: truncated means more logs match, and the ones listed are then not necessarily the earliest of the range — ask a narrower range to read them all. An empty logs means no log in the range matched.

Chains

  • BNB Chain BNB
  • Ethereum ETH
  • Stable STABLE
  • Base BASE

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/chain-analysis/event-log-search/BNB?fromBlock=<fromBlock>&toBlock=<toBlock>"
Parameters
ParameterDescription
fromBlock

query · integer · required

Range start, inclusive.
toBlock

query · integer · required

Range end, inclusive.
topic0

query · string · optional

The event signature hash. 0x followed by 64 hexadecimal characters.
topic1

query · string · optional

The first indexed argument. 0x followed by 64 hexadecimal characters.
topic2

query · string · optional

The second indexed argument. 0x followed by 64 hexadecimal characters.
topic3

query · string · optional

The third indexed argument. 0x followed by 64 hexadecimal characters.
chain

path · string · required

ETH, BNB, BASE or STABLE; every other chain returns 400.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of Which contracts emitted this event in a block range?
FieldTypeDescription
logsobject[]Oldest first, by block then by position in the block.
logs[].addressstring | nullThe contract that emitted the log.
logs[].topicsstring[]topics[0] is the event signature hash; the rest are indexed arguments.
logs[].datastring | nullRaw ABI-encoded, non-indexed arguments. NOT decoded.
logs[].blockinteger | null
logs[].blockHashstring | null
logs[].atinteger | nullWhen its block was mined, Unix seconds.
logs[].gasPriceRawstring | nullThe transaction's gas price, RAW wei, decimal string.
logs[].gasUsedRawstring | nullThe gas the transaction used, decimal string.
logs[].logIndexinteger | nullPosition of the log in its block.
logs[].transactionHashstring | null
logs[].transactionIndexinteger | null
truncatedbooleantrue when 1000 logs came back: more match, and the listed ones are not necessarily the earliest.

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key