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.
/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>"
| 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 |
|---|---|---|
logs | object[] | Oldest first, by block then by position in the block. |
logs[].address | string | null | The contract that emitted the log. |
logs[].topics | string[] | topics[0] is the event signature hash; the rest are indexed arguments. |
logs[].data | string | null | Raw ABI-encoded, non-indexed arguments. NOT decoded. |
logs[].block | integer | null | |
logs[].blockHash | string | null | |
logs[].at | integer | null | When its block was mined, Unix seconds. |
logs[].gasPriceRaw | string | null | The transaction's gas price, RAW wei, decimal string. |
logs[].gasUsedRaw | string | null | The gas the transaction used, decimal string. |
logs[].logIndex | integer | null | Position of the log in its block. |
logs[].transactionHash | string | null | |
logs[].transactionIndex | integer | null | |
truncated | boolean | true 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