Contracts API

Raw event logs emitted by a contract

Undecoded EVM event logs a contract emitted in a bounded block range, optionally filtered by up to four indexed topics.

GET/api/external/contract-analysis/event-logs/{chain}/{address}

What it returns

Raw, undecoded EVM logs this contract emitted between fromBlock and toBlock (inclusive), optionally filtered by up to four indexed topics (topic0 is the event signature hash). Multiple topics are ANDed together. Capped at 1000 rows; truncated: true means more rows exist than are returned — call again from the last row's block, or narrow the range. An empty logs array for a real range is a genuine measurement: this contract emitted nothing matching the filter in that window. ARC keeps only recent logs (about the last 200,000 blocks when measured); an older range there is a 400. On SCROLL a range too dense to read from its start (over 10,000 logs even after narrowing) is a 400 asking for a narrower range.

Chains

  • BNB Chain BNB
  • Ethereum ETH
  • Stable STABLE
  • Base BASE
  • Robinhood Chain RHC
  • Arc ARC
  • Scroll SCROLL

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/contract-analysis/event-logs/BNB/<address>?fromBlock=<fromBlock>&toBlock=<toBlock>"
Parameters
ParameterDescription
fromBlock

query · integer · required

Range start, inclusive.
toBlock

query · integer · required

Range end, inclusive.
topic0

query · string · optional

Event signature hash, 0x + 64 hex.
topic1

query · string · optional

topic2

query · string · optional

topic3

query · string · optional

chain

path · string · required

ETH, BNB, BASE, STABLE, RHC, ARC and SCROLL; every other chain returns 400.
address

path · string · required

The contract address that emitted the logs.

Response fields

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

Response fields of Raw event logs emitted by a contract
FieldTypeDescription
logsobject[]
logs[].addressstring | null
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 | nullUnix SECONDS. Always null on RHC and SCROLL.
logs[].gasPriceRawstring | nullRAW wei, decimal string. Always null on RHC, ARC and SCROLL.
logs[].gasUsedRawstring | nullRAW wei, decimal string. Always null on RHC, ARC and SCROLL.
logs[].logIndexinteger | null
logs[].transactionHashstring | null
logs[].transactionIndexinteger | nullAlways null on SCROLL.
truncatedbooleanTrue when exactly 1000 rows came back — more may exist.

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