How to get minting and ownership data for NFTs and collections over different periods of time

Mnemonic makes it easy to track and analyze many NFT collection activities and trends. What previously would have required aggregating large volumes of data for hundreds of thousands of NFT collections on the blockchain takes only a single API call with Mnemonic.

The data is updated every 15 minutes, which makes it possible to track live trends while the collection NFTs are being minted on the blockchain.

Below we'll demonstrate how you can track trends based on minting activity and the distribution of owners across a collection.

Get current owners of the collection

In the first step we will use the current owners endpoint, which provides a snapshot of the current owners of any collection.

In this tutorial we will use BAYC collection to find its owners.

As parameters in the request we will specify the contract address 0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d and the limit 10 to get the top ten owners. If you do not specify the limit then 500 results will be returned at once.

The default order for this endpoint is descending sorted by the number of tokens owned by each address (SORT_DIRECTION_DESC). If you want to find owners that are holding the least amount of tokens then specify &sortDirection=SORT_DIRECTION_ASC parameter in the query.

curl -i -X GET \
  'https://ethereum-rest.api.mnemonichq.com/collections/v1beta2/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/owners_list?limit=10&sortDirection=SORT_DIRECTION_DESC' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

The results should look something like this

{
  "owner": [
    {
      "address": "0x54be3a794282c030b15e43ae2bb182e14c409c5e",
      "ownedCount": "112"
    },
    {
      "address": "0x1b523dc90a79cf5ee5d095825e586e33780f7188",
      "ownedCount": "107"
    },
    {
      "address": "0x98e711f31e49c2e50c1a290b6f2b1e493e43ea76",
      "ownedCount": "73"
    },
    {
      "address": "0xd38a87d7b690323ef6883e887614502abcf9b1eb",
      "ownedCount": "72"
    },
    {
      "address": "0x8ad272ac86c6c88683d9a60eb8ed57e6c304bb0c",
      "ownedCount": "58"
    },
    {
      "address": "0x020ca66c30bec2c4fe3861a94e4db4a498a35872",
      "ownedCount": "53"
    },
    {
      "address": "0xf606719e6e4ac5f184e702e207de3840a9c66374",
      "ownedCount": "45"
    },
    {
      "address": "0x5f6ac80cdb9e87f3cfa6a90e5140b9a16a361d5c",
      "ownedCount": "39"
    },
    {
      "address": "0x70b97a0da65c15dfb0ffa02aee6fa36e507c2762",
      "ownedCount": "39"
    },
    {
      "address": "0xf8e0c93fd48b4c34a4194d3af436b13032e641f3",
      "ownedCount": "39"
    }
  ]
}

Get NFT collection minting trends

To get data about current or historical minting activity of an NFT collection, we will use the Tokens supply by contract endpoint.

The response is structured in such a way that makes it possible to compare the current supply (number minted) of an NFT at a given point in time (depending on the aggregation period) and total supply (minted) across the whole time period.

See the following schema as an example:

{
    "dataPoints": [
        {
            "timestamp": "2019-08-24T14:15:22Z",
            "minted": "string",
            "burned": "string",
            "totalMinted": "string",
            "totalBurned": "string"
        }
    ]
}

By comparing minted and totalMinted at every data point, it is possible to see how minting trended over a period of time.

We can further use the duration, timestampLt, and groupByPeriod parameters to control the duration, the final timestamp, and the aggregation period of the analyses.

The results by default are sorted by the timestamp in ascending order.

curl -i -X GET \
  'https://ethereum-rest.api.mnemonichq.com/collections/v1beta2/0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6/supply/DURATION_7_DAYS/GROUP_BY_PERIOD_1_HOUR' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

The result should look something like this (it is slightly reduced for the purpose of the tutorial):

Note: minted and totalMinted values for each hour in the below result.

{
    "dataPoints": [
        {
            "timestamp": "2022-07-09T16:00:00Z",
            "minted": "0",
            "burned": "0",
            "totalMinted": "0",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T17:00:00Z",
            "minted": "69",
            "burned": "0",
            "totalMinted": "69",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T18:00:00Z",
            "minted": "0",
            "burned": "0",
            "totalMinted": "69",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T19:00:00Z",
            "minted": "4",
            "burned": "0",
            "totalMinted": "73",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T20:00:00Z",
            "minted": "968",
            "burned": "0",
            "totalMinted": "1041",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T21:00:00Z",
            "minted": "157",
            "burned": "0",
            "totalMinted": "1198",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T22:00:00Z",
            "minted": "580",
            "burned": "0",
            "totalMinted": "1778",
            "totalBurned": "0"
        },
        {
            "timestamp": "2022-07-09T23:00:00Z",
            "minted": "5191",
            "burned": "0",
            "totalMinted": "6969",
            "totalBurned": "0"
        }
    ]
}

Get NFT collection ownership trends

Perhaps you want to look at how ownership of an NFT collection looks currently or at a given point in time historically. Mnemonic also supports this by providing the count of unique owners of an NFT collection for a given time period.

To get this data we will use the Owners count by contract endpoint.

We can control our results with the duration and groupByPeriod parameters in our request.

curl -i -X GET \
  'https://ethereum-rest.api.mnemonichq.com/collections/v1beta2/0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6/owners_count/DURATION_7_DAYS/GROUP_BY_PERIOD_1_HOUR' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

The result should look something like this (it is slightly reduced for the purpose of the tutorial):

{
    "dataPoints": [
        {
            "timestamp": "2022-07-09T16:00:00Z",
            "count": "0"
        },
        {
            "timestamp": "2022-07-09T17:00:00Z",
            "count": "1"
        },
        {
            "timestamp": "2022-07-09T18:00:00Z",
            "count": "7"
        },
        {
            "timestamp": "2022-07-09T19:00:00Z",
            "count": "9"
        },
        {
            "timestamp": "2022-07-09T20:00:00Z",
            "count": "553"
        },
        {
            "timestamp": "2022-07-09T21:00:00Z",
            "count": "685"
        },
        {
            "timestamp": "2022-07-09T22:00:00Z",
            "count": "764"
        },
        {
            "timestamp": "2022-07-09T23:00:00Z",
            "count": "2713"
        },
        {
            "timestamp": "2022-07-10T00:00:00Z",
            "count": "2705"
        },
        {
            "timestamp": "2022-07-10T01:00:00Z",
            "count": "2722"
        },
        {
            "timestamp": "2022-07-10T02:00:00Z",
            "count": "2737"
        },
        {
            "timestamp": "2022-07-10T03:00:00Z",
            "count": "2749"
        },
        {
            "timestamp": "2022-07-10T04:00:00Z",
            "count": "2767"
        },
        {
            "timestamp": "2022-07-10T05:00:00Z",
            "count": "2783"
        },
        {
            "timestamp": "2022-07-10T06:00:00Z",
            "count": "2780"
        },
        {
            "timestamp": "2022-07-10T07:00:00Z",
            "count": "2782"
        },
        {
            "timestamp": "2022-07-10T08:00:00Z",
            "count": "2794"
        },
        {
            "timestamp": "2022-07-10T09:00:00Z",
            "count": "2791"
        },
        {
            "timestamp": "2022-07-10T10:00:00Z",
            "count": "2800"
        },
        {
            "timestamp": "2022-07-10T11:00:00Z",
            "count": "2804"
        },
        {
            "timestamp": "2022-07-10T12:00:00Z",
            "count": "2814"
        },
        {
            "timestamp": "2022-07-10T13:00:00Z",
            "count": "2808"
        },
        {
            "timestamp": "2022-07-10T14:00:00Z",
            "count": "2810"
        },
        {
            "timestamp": "2022-07-10T15:00:00Z",
            "count": "2815"
        },
        {
            "timestamp": "2022-07-10T16:00:00Z",
            "count": "2822"
        },
        {
            "timestamp": "2022-07-10T17:00:00Z",
            "count": "2775"
        },
        {
            "timestamp": "2022-07-10T18:00:00Z",
            "count": "2743"
        },
        {
            "timestamp": "2022-07-10T19:00:00Z",
            "count": "2790"
        },
        {
            "timestamp": "2022-07-10T20:00:00Z",
            "count": "2801"
        },
        {
            "timestamp": "2022-07-10T21:00:00Z",
            "count": "2823"
        }
    ]
}

By combining these two results, you can identify and act on trends early, or make historical analyses to help inform future decisions.

After you completed this tutorial, let us know about your experience or if you have any feedback by tagging us on Twitter @mnemonichq or reaching out directly to our [email protected]!