How to get current and historical NFT collection minting trends

Mnemonic makes it easy to track and analyse 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 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:

Copy
Copied
{
    "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.

curlpythongo
Copy
Copied
curl -i -X GET \
  'https://ethereum.rest.mnemonichq.com/pricing/v1beta1/volumes/by_contract/0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6?duration=DURATION_7_DAYS&groupByPeriod=GROUP_BY_PERIOD_1_HOUR' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'
Copy
Copied
import requests # requires `pip install requests`

result = requests.get(
    'https://ethereum.rest.mnemonichq.com/pricing/v1beta1/volumes/by_contract/0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6?duration=DURATION_7_DAYS&groupByPeriod=GROUP_BY_PERIOD_1_HOUR',
    headers={'x-api-key': 'YOUR_API_KEY_HERE'}
).json()
Copy
Copied
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  contractAddress := "0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6";
  reqUrl := "https://ethereum.rest.mnemonichq.com/collections/v1beta1/supply/" + contractAddress
  req, _ := http.NewRequest("GET", reqUrl, nil)

  query := req.URL.Query()
  query.Add("duration", "DURATION_7_DAYS")
  query.Add("groupByPeriod", "GROUP_BY_PERIOD_1_HOUR")
  req.URL.RawQuery = query.Encode()

  req.Header.Add("X-API-Key", "YOUR_API_KEY_HERE")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}

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.

Copy
Copied
{
    "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.

curlpythongo
Copy
Copied
curl -i -X GET \
  'https://ethereum.rest.mnemonichq.com/collections/v1beta1/owners_count/0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6?duration=DURATION_7_DAYS&groupByPeriod=GROUP_BY_PERIOD_1_HOUR' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'
Copy
Copied
import requests # requires `pip install requests`

result = requests.get(
    'https://ethereum.rest.mnemonichq.com/collections/v1beta1/owners_count/0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6?duration=DURATION_7_DAYS&groupByPeriod=GROUP_BY_PERIOD_1_HOUR',
    headers={'x-api-key': 'YOUR_API_KEY_HERE'}
).json()
Copy
Copied
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  contractAddress := "0x5bdf47c6691edf5d2e5f7a156324d88e1478fca6";
  reqUrl := "https://ethereum.rest.mnemonichq.com/collections/v1beta1/owners_count/" + contractAddress
  req, _ := http.NewRequest("GET", reqUrl, nil)

  query := req.URL.Query()
  query.Add("duration", "DURATION_7_DAYS")
  query.Add("groupByPeriod", "GROUP_BY_PERIOD_1_HOUR")
  req.URL.RawQuery = query.Encode()

  req.Header.Add("X-API-Key", "YOUR_API_KEY_HERE")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}

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

Copy
Copied
{
    "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 support@mnemonichq.com!