How to Get All Mints Associated with a Contract

Follow this tutorial to learn how to get all mints associated with a contract.

This tutorial explains the steps involved in getting a list of all mints for any given contract 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 parameters:

  • contract address

    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • event type

    • parameter: event_type
    • value: mint
    https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/events?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&event_type=mint
    

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?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&event_type=mint' -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.