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.
/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>"
| Parameter | Description |
|---|---|
fromBlockquery · integer · required | Range start, inclusive. |
toBlockquery · integer · required | Range end, inclusive. |
topic0query · string · optional | Event signature hash, 0x + 64 hex. |
topic1query · string · optional | |
topic2query · string · optional | |
topic3query · string · optional | |
chainpath · string · required | ETH, BNB, BASE, STABLE, RHC, ARC and SCROLL; every other chain returns 400. |
addresspath · 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.
| Field | Type | Description |
|---|---|---|
logs | object[] | |
logs[].address | string | null | |
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 | Unix SECONDS. Always null on RHC and SCROLL. |
logs[].gasPriceRaw | string | null | RAW wei, decimal string. Always null on RHC, ARC and SCROLL. |
logs[].gasUsedRaw | string | null | RAW wei, decimal string. Always null on RHC, ARC and SCROLL. |
logs[].logIndex | integer | null | |
logs[].transactionHash | string | null | |
logs[].transactionIndex | integer | null | Always null on SCROLL. |
truncated | boolean | True 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