How to Get Transaction Details and Payments

Follow this tutorial to learn how to get transaction details and payments of any given NFT transaction.

This tutorial explains the steps involved in getting the details of any given NFT transaction in Ethereum Mainnet. If the event type is transfer, you can also get payments.

Step 1. Use the events endpoint to get a list of NFT events.

For example, you can follow these steps: How to Get All Transfers Associated with a Wallet

Step 2. Copy an event ID from the id field:

        {
    "id": "35485a1c-2617-56e4-b20a-3e6132cbd123",
    "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
    ...more properties...
}

Step 3. Use the event endpoint with the following details:

  • protocol: ethereum

  • network: mainnet

  • event ID: 35485a1c-2617-56e4-b20a-3e6132cbd123 (copied in the previous step)

    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/event/35485a1c-2617-56e4-b20a-3e6132cbd123
    

Step 4. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/event/35485a1c-2617-56e4-b20a-3e6132cbd123' -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 5. Your results will look something like this:

{
    "data": {
        "id": "35485a1c-2617-56e4-b20a-3e6132cbd123",
        "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
        "token_id": "88",
        "event_type": "sale",
        "timestamp": "1619933216",
        "from": "0x1212503603AaA0fC26a90f77515d2a51C998866c",
        "to": "0x1f08CbFCa1f63a23bB6255a76e1DDeEb8D24d0Fa",
        "quantity": "1",
        "transaction": {
            "block_hash": "0x83e37063e4493bc5cb16f7fb1db3d2436f76615d3ae65c37d7cce08eb2eb3e2e",
            "block_number": 12352896,
            "transaction_hash": "0xca962bf6e71c2e15f2e2d55ae4b8f7481bf54f0f7c75b6e2dd79b3203e2eda9f"
        },
        "payments": [
            {
                "from": "0x1f08cbfca1f63a23bb6255a76e1ddeeb8d24d0fa",
                "to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
                "price": 0.5,
                "currency": "ETH"
            },
            {
                "from": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
                "to": "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073",
                "price": 0.025,
                "currency": "ETH"
            },
            {
                "from": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
                "to": "0x1212503603aaa0fc26a90f77515d2a51c998866c",
                "price": 0.475,
                "currency": "ETH"
            }
        ]
    }
}

Transaction details are located in the transaction section:

"transaction": {
    "block_hash": "0x83e37063e4493bc5cb16f7fb1db3d2436f76615d3ae65c37d7cce08eb2eb3e2e",
    "block_number": 12352896,
    "transaction_hash": "0xca962bf6e71c2e15f2e2d55ae4b8f7481bf54f0f7c75b6e2dd79b3203e2eda9f"
}

If event_type is transfer, payments are returned in the payments section:

"payments": [
    {
        "from": "0x1f08cbfca1f63a23bb6255a76e1ddeeb8d24d0fa",
        "to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
        "price": 0.5,
        "currency": "ETH"
    },
    {
        "from": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
        "to": "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073",
        "price": 0.025,
        "currency": "ETH"
    },
    {
        "from": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
        "to": "0x1212503603aaa0fc26a90f77515d2a51c998866c",
        "price": 0.475,
        "currency": "ETH"
    }
]

📘

Note!

The payments field currently returns an empty array for some events. Payments data is being indexed in the background and will eventually return data if event_type is sale.