Find Floor Of Opensea NFT

Viewed 10004

Is there a way to get the floor price thats displayed on the main page of an NFT collection?

enter image description here

Here you see the floor price is 5.75 but if I query the contract using the Opensea api:

url = "https://api.opensea.io/api/v1/asset/0x1cb1a5e65610aeff2551a50f76a87a7d3fb649c6/1/"

response = requests.request("GET", url)

print(response.text)

I get a floor of:

enter image description here

So it seems as though the api is a little off. Was just curious if anyone here knows of a better way to get a more accurate floor price?

4 Answers

I have no idea why this works, but...

https://api.opensea.io/collection/${slug}

slug = the collection slug (name in URL).

For reference, I found this in some random other library's documentation... But it seems to work

Floor price is for collections (contracts). Opensea api does have a collections endpoint but it can't filter by anything except owner address. So you have to know the address of someone why owns a token I guess, which seems pretty retarded.

Also you can get the owner of a token from the assets endpoint which can filter by contract address and token id.

In the documentation it shows how the API works

https://api.opensea.io/api/v1/collection/doodles-official/stats

This returns all the stats. So change the name of the collection to the one you want and that's it.

Related