How to Get Events by Transaction Hash

Follow this tutorial to learn how to get a list of all events by any given transaction hash.

This tutorial explains the steps involved in getting a list of all events by any given transaction hash in the Ethereum Mainnet network.

Step 1. Use the events endpoint with the following details:

  • protocol: ethereum

  • network: mainnet

    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/events
    

Step 2. Add the following parameter:

  • transaction hash

    • parameter: transaction_hash
    • value: e.g. 0x9151ff78c24d18fd076eede2644daca06cf1d56848a5bb2beeab6cad2e6c7417
    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/events?transaction_hash=0x9151ff78c24d18fd076eede2644daca06cf1d56848a5bb2beeab6cad2e6c7417
    

Step 3. Execute the query.

For example, in cURL, you should run the following code:

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/events?transaction_hash=0x9151ff78c24d18fd076eede2644daca06cf1d56848a5bb2beeab6cad2e6c7417' -H 'Authorization: Bearer YOUR_API_KEY'

📘

Note!

To authorize your request, you need to get an API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

Step 4. Your results will look something like this:

{
    "data": [
        {
            "id": "2b3bbb3d-aa72-42a1-94c2-9e8f987a76fc",
            "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
            "token_id": "6853",
            "event_type": "transfer",
            "timestamp": "1655199885",
            "from_account": "0x5f6ac80CdB9E87f3Cfa6a90E5140B9a16A361d5C",
            "to_account": "0x70b97A0da65C15dfb0FFA02aEE6FA36e507C2762",
            "quantity": "1"
        },
        {...more events...}
    ],
    "meta": {
        "paging": {
            "next_page_token": "eyJ0aW1lc3RhbXAiOjE2NTUxNzY2NDcsInNpZCI6MTQ5ODU4MTU4fQ=="
        }
    }
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.