Chains API

Event log search brief: which contracts emitted an event, counted

How many logs match a topic in a block range, which contracts and events emitted them, and the newest five in full, undecoded. A few KB.

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

What it returns

The brief of event-log-search; prefer it unless you need every log. Same chains, parameters and 400s. It counts the logs, gives the first and last block and time, the 10 contracts and the 10 event signatures (topics[0]) with the most logs, and the 5 newest logs in full, undecoded. truncated is the full answer's: when true the counts are of the rows it listed.

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-brief/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 Event log search brief: which contracts emitted an event, counted
FieldTypeDescription
truncatedbooleanThe full answer's: true when it hit its row cap, so more logs match and the counts are of the rows listed.
logCountintegerLogs in the full answer.
firstBlockinteger | nullBlock of the oldest log listed; null when none.
lastBlockinteger | nullBlock of the newest log listed; null when none.
firstAtinteger | nullWhen the oldest log's block was mined, Unix seconds; null when unknown or none.
lastAtinteger | nullWhen the newest log's block was mined, Unix seconds; null when unknown or none.
eventsobject[]Up to 10 event signatures, most logs first.
events[].topic0string | nullThe event signature hash; null for an anonymous event.
events[].logsintegerLogs listed with it.
contractsobject[]Up to 10 emitting contracts, most logs first.
contracts[].addressstring | nullThe emitting contract.
contracts[].logsintegerLogs listed with it.
latestobject[]The 5 newest logs, oldest first, each exactly as the full answer lists it.
latest[].addressstring | nullThe contract that emitted the log.
latest[].topicsstring[]topics[0] is the event signature hash; the rest are indexed arguments.
latest[].datastring | nullRaw ABI-encoded, non-indexed arguments. NOT decoded.
latest[].blockinteger | null
latest[].blockHashstring | null
latest[].atinteger | nullWhen its block was mined, Unix seconds.
latest[].gasPriceRawstring | nullThe transaction's gas price, RAW wei, decimal string.
latest[].gasUsedRawstring | nullThe gas the transaction used, decimal string.
latest[].logIndexinteger | nullPosition of the log in its block.
latest[].transactionHashstring | null
latest[].transactionIndexinteger | null

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