Skip to Content
APIContractGet Contract Event Logs

Get Contract Event Logs

1. Overview & Typical Use

Batch-query event logs and trigger transactions for a contract. Supports filtering by transaction hash, block number, and event name, with optional field projection.

  • Typical use: monitor contract events, view recent contract trigger transactions, batch-query contract execution logs by hash.
  • When not to use: for basic contract information only use “Get Contract Details”; for contract call statistics use “Get Contract Call Statistics”.

2. Endpoint & Authentication

POST /api/contracts/smart-contract-triggers-batch

For Base URL and authentication, see Common Network & Authentication.

3. Request

ParameterTypeRequiredDefaultDescription
contractAddressstringNoContract address
hashListarrayNoList of transaction hashes
termstringNoQuery keyword — supports block number and event name
fieldsstringNoComma-separated field names to include in list[] items

4. Response

Top-level

FieldTypeRequiredDescriptionUnit/Precision
event_listarrayRequiredEvent log list
listarrayRequiredTrigger transaction list

event_list[] elements

FieldTypeRequiredDescriptionUnit/Precision
block_numberintegerRequiredBlock height
block_timestampintegerRequiredBlock timeMillisecond timestamp
caller_contract_addressstringRequiredCaller contract address
contract_addressstringRequiredTarget contract address
event_indexintegerRequiredIndex position of the event within the transaction
event_namestringRequiredEvent name
eventstringRequiredFull event signature
resultobjectRequiredEvent parameter key-value pairs (includes numeric index keys and named keys)
result_typeobjectRequiredEvent parameter type mapping
result_with_topicobjectRequiredStructured event parameters with topics (contains index array, topic hash, dataInArr array)
transaction_idstringRequiredTransaction hash

list[] elements

FieldTypeRequiredDescriptionUnit/Precision
owner_addressstringRequiredTransaction initiator address
blockintegerRequiredBlock height
hashstringRequiredTransaction hash
date_createdintegerRequiredCreation timeMillisecond timestamp
contract_addressstringRequiredContract address
token_idintegerRequiredToken ID (typically 0)
token_valueintegerRequiredToken transfer amount (typically 0)
call_valueintegerRequiredTRX call valuesun
datastringRequiredRaw call data (hex-encoded)
parameterstringRequiredDecoded parameters (JSON string)
methodstringRequiredCalled method signature
daystringRequiredTransaction dateYYYY-MM-DD
confirmedbooleanRequiredWhether confirmed

5. Errors

For HTTP status codes, see Common Errors. Key points for this endpoint:

  • Must use POST: a GET request will return an error.
  • Empty result is not an error: no matching events returns 200 + empty arrays — this is a normal response.
Last updated on: