I'm trying to practice making api calls to etherscan using python, and I built a function that calls the Get Event Logs endpoint for the staked aave address: 0x4da27a545c0c5B758a6BA100e3a049001de870f5.

The code works, but I don't know how to convert the results into a readable format. For example, how could I translate 'timeStamp': '0x5f763d30' into a human readable date time format?

Is it possible?

Here is one entry that is returned:

{'status': '1', 'message': 'OK', 'result': [{'address': '0x4da27a545c0c5b758a6ba100e3a049001de870f5', 'topics': ['0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f'], 'data': '0x0000000000000000000000008a2efd9a790199f4c94c6effe210fce0b4724f52000000000000000000000000a133459b2502b0137e85a446fa8d4e300877a007', 'blockNumber': '0xa76cd2', 'blockHash': '0xa599c98566148fcc93ab4bd3107c09ebf9c5235d10161ad3ddcee8c901b6ddc1', 'timeStamp': '0x5f763d30', 'gasPrice': '0x113abe6400', 'gasUsed': '0x29fe2', 'logIndex': '0x5c', 'transactionHash': '0x9a6b0b9d3c63e82fa21d6d6d0627e7d6cc25b088278e87c3e3f4f012dcbf4e38', 'transactionIndex': '0x1f'}

1 Answer 1


Not an expert in python but these are hex values and could be converted to decimal using int('0x5f763d30', 16) which gives unix timestamp 1601584432 or Thursday, 1 October 2020 20:33:52 GMT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.