dcts / opensea-scraper

Scrapes nft floor prices and additional information from opensea. Used for https://nftfloorprice.info
MIT License
184 stars 73 forks source link

Accurate floor price now available via API #24

Closed fafrd closed 2 years ago

fafrd commented 2 years ago

Hi- OpenSea employee here. We've added the floor_price to the /stats endpoint, and this should reflect the same up-to-date price as on our website:

GET /api/v1/collection/cool-cats-nft/stats
HTTP 200 OK
Allow: OPTIONS, GET
Content-Type: application/json
Vary: Accept

{
    "stats": {
        "one_day_volume": 227.8588,
        "one_day_change": 0.7904841231799217,
        "one_day_sales": 34.0,
        "one_day_average_price": 6.701729411764706,
        "seven_day_volume": 1070.25705670901,
        "seven_day_change": -0.42636165444007446,
        "seven_day_sales": 140.0,
        "seven_day_average_price": 7.6446932622072135,
        "thirty_day_volume": 8349.7626205981,
        "thirty_day_change": -0.546823704869074,
        "thirty_day_sales": 761.0,
        "thirty_day_average_price": 10.97209279973469,
        "total_volume": 52723.9290518944,
        "total_sales": 22636.0,
        "total_supply": 9933.0,
        "count": 9933.0,
        "num_owners": 4940,
        "average_price": 2.329206973488885,
        "num_reports": 1,
        "market_cap": 75934.73817350426,
        "floor_price": 5.45
    }
}

https://api.opensea.io/api/v1/collection/cool-cats-nft/stats https://twitter.com/apiopensea/status/1455918328397144069

dcts commented 2 years ago

Hey @fafrd thanks, this looks good so far but lets check in 2 hours, 4hours and so on. Most likely Opensea just updated their data right now and the lag still persists. But would be awesome if it actually did return accurate prices!! :) Then we would be able to get rid of this repo :)

dcts commented 2 years ago

Opps I missed that you are an Opensea employee @fafrd!!! Thats sooo awesome, I am so happy!! Thanks so much for adding that feature so we don't have to scrape anymore! 💯🎉