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.
/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>"
| Parameter | Description |
|---|---|
fromBlockquery · integer · required | Range start, inclusive. |
toBlockquery · integer · required | Range end, inclusive. |
topic0query · string · optional | The event signature hash. 0x followed by 64 hexadecimal characters. |
topic1query · string · optional | The first indexed argument. 0x followed by 64 hexadecimal characters. |
topic2query · string · optional | The second indexed argument. 0x followed by 64 hexadecimal characters. |
topic3query · string · optional | The third indexed argument. 0x followed by 64 hexadecimal characters. |
chainpath · 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.
| Field | Type | Description |
|---|---|---|
truncated | boolean | The full answer's: true when it hit its row cap, so more logs match and the counts are of the rows listed. |
logCount | integer | Logs in the full answer. |
firstBlock | integer | null | Block of the oldest log listed; null when none. |
lastBlock | integer | null | Block of the newest log listed; null when none. |
firstAt | integer | null | When the oldest log's block was mined, Unix seconds; null when unknown or none. |
lastAt | integer | null | When the newest log's block was mined, Unix seconds; null when unknown or none. |
events | object[] | Up to 10 event signatures, most logs first. |
events[].topic0 | string | null | The event signature hash; null for an anonymous event. |
events[].logs | integer | Logs listed with it. |
contracts | object[] | Up to 10 emitting contracts, most logs first. |
contracts[].address | string | null | The emitting contract. |
contracts[].logs | integer | Logs listed with it. |
latest | object[] | The 5 newest logs, oldest first, each exactly as the full answer lists it. |
latest[].address | string | null | The contract that emitted the log. |
latest[].topics | string[] | topics[0] is the event signature hash; the rest are indexed arguments. |
latest[].data | string | null | Raw ABI-encoded, non-indexed arguments. NOT decoded. |
latest[].block | integer | null | |
latest[].blockHash | string | null | |
latest[].at | integer | null | When its block was mined, Unix seconds. |
latest[].gasPriceRaw | string | null | The transaction's gas price, RAW wei, decimal string. |
latest[].gasUsedRaw | string | null | The gas the transaction used, decimal string. |
latest[].logIndex | integer | null | Position of the log in its block. |
latest[].transactionHash | string | null | |
latest[].transactionIndex | integer | 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