How to get full historical & current NFT collection price data
Getting NFT sales data and tracking it over time can be a demanding task. First, you need to establish a way to continuously index and aggregate large volumes of data, then you need to ingest real-time and historical trades across the blockchain while also tackling the complexities of blockchain transaction taxonomy in order to properly calculate price attribution for every NFT sale.
Mnemonic solves these complexities by ingesting all historical and real-time data from across the blockchain (across all marketplaces and protocols from genesis block) and uses state of the art algorithms to aggregate billions of transactions and compute pricing attribution per each NFT sale, making it possible to track NFT sales and pricing with a single API call and a sub-second latency.
Our data is updated every 15 minutes, which means every 15 minutes you get up to date time-series data for every collection and NFT across the entire blockchain no matter where the sale happened.
We provide data as a zero-padded time-series, making it very easy to integrate it directly with your favorite graph charting libraries to create beautiful real-time graphs. See the official World of Women collection dashboard as an example.
In this tutorial, we'll show you how to get NFT pricing data so you can create your own collection pricing charts.
Note: Mnemonic aggregates data from the entire blockchain. As a result, you will likely find more sales than you'd see by looking at any given marketplace alone (such as OpenSea or LooksRare). Our results include all sales across all marketplaces, protocols, and other types of sales (i.e. direct sales or custom contract trading etc).
Historical pricing
In this section you will learn how to get the most recent pricing information for a collection.
We will use the CoolCats collection (0x1a92f7381b9f03921564a437210bb9396471050c
) as our example in this tutorial and the Token Prices endpoint to obtain time-series data.
You can use use theduration
, timestampLt
, and groupByPeriod
parameters to control the time period, starting timestamp, and aggregation to further refine your results.
curl -i -X GET \
'https://ethereum-rest.api.mnemonichq.com/collections/v1beta2/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/prices/DURATION_30_DAYS/GROUP_BY_PERIOD_1_DAY' \
-H 'X-API-Key: YOUR_API_KEY_HERE'
Now that you have built a simple client to obtain the time series, you can easily chart these data points using one of many libraries.
Note: Pricing data is fully normalized into ETH (or other native coin such as MATIC on Polygon) and encompasses all kinds of payments, including ERC20 tokens converted into native currency according to the exchange rate. Mnemonic uses and constantly improves its state of the art algorithms to compute precise price attribution per each NFT sale, which covers cases like bundles, refunds, circular sales, MEV and more.
{
"dataPoints": [
{
"timestamp": "2022-02-15T00:00:00Z",
"min": "6.97294264270960365965",
"max": "50.8331353261580835",
"avg": "14.79353255385015358496"
},
{
"timestamp": "2022-02-16T00:00:00Z",
"min": "7.1386253140201578",
"max": "15.505",
"avg": "11.7670802909876713"
},
{
"timestamp": "2022-02-17T00:00:00Z",
"min": "9",
"max": "12.489305730046385025",
"avg": "10.870672455112949096"
},
{
"timestamp": "2022-02-18T00:00:00Z",
"min": "8.5907721568862331931",
"max": "15.5",
"avg": "9.8518616465657983891"
},
{
"timestamp": "2022-02-19T00:00:00Z",
"min": "9.5",
"max": "51.45",
"avg": "19.1852"
},
{
"timestamp": "2022-02-20T00:00:00Z",
"min": "8.99683431974720083794",
"max": "18.2839276410731593",
"avg": "11.97278237430084120806"
},
{
"timestamp": "2022-02-21T00:00:00Z",
"min": "0.607105079061240182",
"max": "12.999",
"avg": "9.42521958328160091715"
},
{
"timestamp": "2022-02-22T00:00:00Z",
"min": "8.5",
"max": "10.49",
"avg": "9.26611756595943416057"
},
{
"timestamp": "2022-02-23T00:00:00Z",
"min": "5.7738916835317326",
"max": "30.007864173902709",
"avg": "9.8081656177333211112"
},
{
"timestamp": "2022-02-24T00:00:00Z",
"min": "5.0630695525010376",
"max": "12.4999338687156329625",
"avg": "7.44586680223080615699"
},
{
"timestamp": "2022-02-25T00:00:00Z",
"min": "7.3335527087279582",
"max": "15.016318812779348",
"avg": "9.16426353582465328659"
},
{
"timestamp": "2022-02-26T00:00:00Z",
"min": "6.4103616915108714",
"max": "11.7528411855479483",
"avg": "8.7353449643392925"
},
{
"timestamp": "2022-02-27T00:00:00Z",
"min": "7.3454679001095772",
"max": "12.9972063938498704",
"avg": "8.5959050424105602"
},
{
"timestamp": "2022-02-28T00:00:00Z",
"min": "6.13690821685845373672",
"max": "12.7132838857428602",
"avg": "8.77169867031828102405"
},
{
"timestamp": "2022-03-01T00:00:00Z",
"min": "7.3",
"max": "11.6931000659889379",
"avg": "8.403293136929195"
},
{
"timestamp": "2022-03-02T00:00:00Z",
"min": "7",
"max": "22.005",
"avg": "8.92566533176642713205"
},
{
"timestamp": "2022-03-03T00:00:00Z",
"min": "5.0709835225515824",
"max": "12.0185377412944164",
"avg": "7.7874274509159977176"
},
{
"timestamp": "2022-03-04T00:00:00Z",
"min": "2.9988329024491092",
"max": "20.505",
"avg": "7.66348181904947625864"
},
{
"timestamp": "2022-03-05T00:00:00Z",
"min": "2.005",
"max": "12.005",
"avg": "7.6910781098050575"
},
{
"timestamp": "2022-03-06T00:00:00Z",
"min": "7.2",
"max": "17.9923145681694456",
"avg": "8.9904175895856177338"
},
{
"timestamp": "2022-03-07T00:00:00Z",
"min": "5.99",
"max": "9.45",
"avg": "7.36101548657219523245"
},
{
"timestamp": "2022-03-08T00:00:00Z",
"min": "5.9",
"max": "12",
"avg": "6.9345315754709314328"
},
{
"timestamp": "2022-03-09T00:00:00Z",
"min": "3.8026821358690152",
"max": "24.99",
"avg": "7.4734929809800015"
},
{
"timestamp": "2022-03-10T00:00:00Z",
"min": "6.89",
"max": "10.9",
"avg": "7.9749418382886637"
},
{
"timestamp": "2022-03-11T00:00:00Z",
"min": "3.4569166010292201",
"max": "10.002154729671409",
"avg": "7.7699366195536225"
},
{
"timestamp": "2022-03-12T00:00:00Z",
"min": "6.3822484038549675",
"max": "26.0312",
"avg": "10.8840915779919426"
},
{
"timestamp": "2022-03-13T00:00:00Z",
"min": "0.1",
"max": "9.99",
"avg": "7.81423831932491409828"
},
{
"timestamp": "2022-03-14T00:00:00Z",
"min": "7.3",
"max": "15.998331185137052776",
"avg": "8.368607638060724738"
},
{
"timestamp": "2022-03-15T00:00:00Z",
"min": "6.2977537121807316",
"max": "15.9986563649785472",
"avg": "8.8116094053951534"
},
{
"timestamp": "2022-03-16T00:00:00Z",
"min": "4.13583784149951186375",
"max": "23.99",
"avg": "8.94078146045005597006"
}
]
}
Historical trading volume
In this section you will learn how to get the most recent trading volume information for a collection.
We will use the CoolCats collection (0x1a92f7381b9f03921564a437210bb9396471050c
) as our example in this tutorial and the Sales Volume endpoint to obtain time-series data.
You can use use theduration
, timestampLt
, and groupByPeriod
parameters to control the time period, starting timestamp, and aggregation to further refine your results.
curl -i -X GET \
'https://ethereum-rest.api.mnemonichq.com/collections/v1beta2/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/sales_volume/DURATION_30_DAYS/GROUP_BY_PERIOD_1_DAY' \
-H 'X-API-Key: YOUR_API_KEY_HERE'
Now that you have built a simple client to obtain the time series, you can easily chart these data points using one of many libraries.
Note: Pricing data is fully normalized into ETH (or other native coin such as MATIC on Polygon) and encompasses all kinds of payments, including ERC20 tokens converted into native currency according to the exchange rate. Mnemonic uses and constantly improves its state of the art algorithms to compute precise price attribution per each NFT sale, which covers cases like bundles, refunds, circular sales, MEV and more.
{
"dataPoints": [
{
"timestamp": "2023-03-21T00:00:00Z",
"quantity": "293",
"volume": "422.4030904856115153"
},
{
"timestamp": "2023-03-22T00:00:00Z",
"quantity": "100",
"volume": "136.9788444533264117"
},
{
"timestamp": "2023-03-23T00:00:00Z",
"quantity": "55",
"volume": "73.2857488675519443"
},
{
"timestamp": "2023-03-24T00:00:00Z",
"quantity": "30",
"volume": "39.4780189900881703"
},
{
"timestamp": "2023-03-25T00:00:00Z",
"quantity": "22",
"volume": "29.805500014317649"
},
{
"timestamp": "2023-03-26T00:00:00Z",
"quantity": "10",
"volume": "13.2127488777910037"
},
{
"timestamp": "2023-03-27T00:00:00Z",
"quantity": "176",
"volume": "218.4971049860572914"
},
{
"timestamp": "2023-03-28T00:00:00Z",
"quantity": "55",
"volume": "65.7948900430784278"
},
{
"timestamp": "2023-03-29T00:00:00Z",
"quantity": "43",
"volume": "56.8425365222148313"
},
{
"timestamp": "2023-03-30T00:00:00Z",
"quantity": "142",
"volume": "170.5626748537645793"
},
{
"timestamp": "2023-03-31T00:00:00Z",
"quantity": "72",
"volume": "85.9976180109784697"
},
{
"timestamp": "2023-04-01T00:00:00Z",
"quantity": "65",
"volume": "80.0807560469722425"
},
{
"timestamp": "2023-04-02T00:00:00Z",
"quantity": "121",
"volume": "144.7306440285794128"
},
{
"timestamp": "2023-04-03T00:00:00Z",
"quantity": "27",
"volume": "30.1917338856806022"
},
{
"timestamp": "2023-04-04T00:00:00Z",
"quantity": "18",
"volume": "21.3581278007719226"
},
{
"timestamp": "2023-04-05T00:00:00Z",
"quantity": "100",
"volume": "110.0360420642246413"
},
{
"timestamp": "2023-04-06T00:00:00Z",
"quantity": "99",
"volume": "107.710493069996116"
},
{
"timestamp": "2023-04-07T00:00:00Z",
"quantity": "54",
"volume": "58.6364413159388302"
},
{
"timestamp": "2023-04-08T00:00:00Z",
"quantity": "25",
"volume": "27.4122824632352802"
},
{
"timestamp": "2023-04-09T00:00:00Z",
"quantity": "18",
"volume": "19.4799212678279562"
},
{
"timestamp": "2023-04-10T00:00:00Z",
"quantity": "32",
"volume": "36.0298388079891758"
},
{
"timestamp": "2023-04-11T00:00:00Z",
"quantity": "108",
"volume": "118.9483872919574073"
},
{
"timestamp": "2023-04-12T00:00:00Z",
"quantity": "28",
"volume": "33.2014909571453019"
},
{
"timestamp": "2023-04-13T00:00:00Z",
"quantity": "27",
"volume": "29.6158406232437717"
},
{
"timestamp": "2023-04-14T00:00:00Z",
"quantity": "50",
"volume": "53.7838427978499648"
},
{
"timestamp": "2023-04-15T00:00:00Z",
"quantity": "122",
"volume": "125.2468091382769255"
},
{
"timestamp": "2023-04-16T00:00:00Z",
"quantity": "43",
"volume": "43.3362079526855619"
},
{
"timestamp": "2023-04-17T00:00:00Z",
"quantity": "47",
"volume": "45.9146658060031932"
},
{
"timestamp": "2023-04-18T00:00:00Z",
"quantity": "64",
"volume": "66.9907099869900625"
},
{
"timestamp": "2023-04-19T00:00:00Z",
"quantity": "50",
"volume": "44.5814527708259662"
}
]
}
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]!