NFT Price Floor Python API Tutorial

This tutorial aims to be a quick guide to get you started using the NFTPriceFloor API integrated into messari’s python library.

[1]:
from messari.nfts import NFTPriceFloor
floor = NFTPriceFloor()
[2]:
collections = ['boredApesYC', 'coolCats', 'cryptoPunks']

API Structure

The NFT Price Floor Python client contains a number of functions that wrap some NFT Price Floor’s API endpoints. These include:

Functions

  • get_nfts

  • get_floor

  • get_info

Below are a few examples to showcase the functionality and types of data each function generates.

Functions

get_nfts

Retrieve basic info for all nfts

[3]:
nfts = floor.get_nfts()
nfts.head()
[3]:
slug name floorPriceETH floorPriceUSD floorCapETH floorCapUSD totalSupply variationETH variationUSD type url ranking countOnSale listedRatio lastModification salesData
0 boredApesYC Bored Ape YC 65.50 226189 655000 2261891850 10000 -5.06 -14.31 avatar https://opensea.io/collection/boredapeyachtclu... 1 11860194301555 1.186019e+11 2022-01-06 06:15:09 {'_id': '61d686a9956dff76eb38c901', 'slug': 'b...
1 cryptoPunks CryptoPunks 63.50 219283 635000 2192826450 10000 -4.08 -13.43 avatar https://www.larvalabs.com/cryptopunks/forsale 2 1403 1.403000e+01 2022-01-06 05:45:04 {'_id': '61d686aa956dff76eb38c989', 'slug': 'c...
2 mutantApesYC Mutant Ape YC 13.89 47966 245020 846118834 17640 -6.78 -15.86 avatar https://opensea.io/collection/mutant-ape-yacht... 3 11860194302784 6.723466e+10 2022-01-06 06:14:06 {'_id': '61d686aa956dff76eb38c969', 'slug': 'm...
3 veeFriends VeeFriends 11.78 40680 120804 417168484 10255 -0.08 -9.82 avatar https://opensea.io/collection/veefriends?colle... 4 1186019430899 1.156528e+10 2022-01-06 06:13:09 {'_id': '61d686aa956dff76eb38c959', 'slug': 'v...
4 cloneX CLONE X 5.30 18302 106000 366046620 20000 -18.46 -26.41 avatar https://opensea.io/collection/clonex?collectio... 5 11860194303465 5.930097e+10 2022-01-06 06:13:36 {'_id': '61d686ab956dff76eb38c9fb', 'slug': 'c...

get_floor

Retrive floor data for collection(s)

[4]:
floor_df = floor.get_floor(collections)
floor_df.tail()
[4]:
boredApesYC coolCats cryptoPunks
dataPriceFloorETH dataPriceFloorUSD dataVolumeETH dataVolumeUSD sales dataPriceFloorETH dataPriceFloorUSD dataVolumeETH dataVolumeUSD sales dataPriceFloorETH dataPriceFloorUSD dataVolumeETH dataVolumeUSD sales
dates
2022-01-05 08:00:00 69.4050 264470.0 319.9800 1217657.0 4.0 10.6325 40516.0 134.959 513938.0 10.0 66.6225 253869.0 0.00 0.0 0.0
2022-01-05 16:00:00 69.5000 265250.0 472.4400 1803061.0 7.0 10.6687 40718.0 83.100 317570.0 6.0 65.4462 249785.0 64.99 246631.0 1.0
2022-01-06 00:00:00 68.9375 254068.0 848.3099 3064901.0 12.0 10.0225 36924.0 358.090 1317477.0 32.0 63.6225 234474.0 399.07 1423713.0 6.0
2022-01-06 06:15:04 65.9714 231415.0 602.5070 2102787.0 8.0 NaN NaN NaN NaN NaN 63.2857 221982.0 137.00 487296.0 2.0
2022-01-06 06:17:33 NaN NaN NaN NaN NaN 9.9514 34908.0 96.390 337667.0 9.0 NaN NaN NaN NaN NaN