π How it works! (video)
This project depends on Puppeteer to programmatically scrape OpenSea and rarity.tools for data, since it's not directly available using an API.
opensea-floor-looks-rare
browses a specified NFT collection on OpenSea (ordered by BUY_NOW
, PRICE_ASCENDING
, i.e. sorts by the cheapest available to purchase), and parses the webpage for the currently available floor prices. Once collected, it combines the collected information with rarity data sourced by rarity tools.
This means you'll need to have a Chromium Browser installed and opensea-floor-looks-rare
will try to programmatically automate a browser window in the background.
To invoke, use npx opensea-floor-looks-rare
:
npx opensea-floor-looks-rare executable_path="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" --collection_slug="rumble-kong-league" --number_of_steps=5
You may specify a collection_slug
to control which collection of NFTs to search for, and a number_of_steps
to roughly control how many NFTs on the OpenSea floor are processed.
With no parameters specified, it'll default to --collection_slug=boredapeyachtclub --number_of_steps=15
.
Once finished, you'll be presented with a table of the calculated rarities. You'll be surprised by the variation!
ββββββββββββ¬βββββββββ¬βββββββββββββββββββββββββββ
β Token ID β Price β Ranking on rarity.toolsβ’ β
ββββββββββββΌβββββββββΌβββββββββββββββββββββββββββ€
β #1413 β 48.84Ξ β #6607 β
β #1715 β 52.4Ξ β #9695 β
β #3003 β 53Ξ β #7571 β
β #3041 β 50.53Ξ β #8938 β
β #3583 β 51Ξ β #9705 β
β #4093 β 52.5Ξ β #6985 β
ββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββ
You can also define a --reference_collection_slug
if you wish to compare floor tokens of one collection using the rarity of another. This is useful for collections like World of Women Galaxy, whose attributes in the initial 10,000 would carry over some attributes from World of Women:
npx opensea-floor-looks-rare --collection_slug="world-of-women-galaxy" --reference_collection_slug="world-of-women-nft" --number_of_steps=20