Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
opensea-scraper
Advanced tools
Scraping accurate floor prices from opensea, because the API returns inacurate floor prices.
⚠ Problem: NFT floor prices returned by the Opensea API are not accurate (they lag at least 2 hours, sometimes even a full day it seems). Here is an example of cool-cats floor price actually being 8.5, but the API returns 9.4:
With this utility you can scrape the correct NFT floor prices directly from opensea by using puppeteer.
npm install opensea-scraper
const OpenseaScraper = require("opensea-scraper");
// which nft project to scrape?
const slug = "cool-cats-nft";
// scrape the correct floor price of an actual offer that exists on opensea
const floorPrice = await OpenseaScraper.floorPrice(slug);
// get basic info (from the opensea API)
const basicInfo = await OpenseaScraper.basicInfo(slug);
**slug**
is the human readable identifier that opensea uses to identify a collection. It can be extracted from the URL: https://opensea.io/collection/{slug}
npm run demo
⚠ Important Note: floor prices fetched with this method are not accurate (not in real time).
const axios = require("axios");
async function getFloorPrice(slug) {
try {
const url = `https://api.opensea.io/collection/${slug}`;
const response = await axios.get(url);
return response.data.collection.stats.floor_price;
} catch(err) {
console.log(err);
return undefined;
}
}
const result = await getFloorPrice("lostpoets");
const result = await getFloorPrice("treeverse");
const result = await getFloorPrice("cool-cats-nft");
Open PR or issue if you would like to have more features added.
FAQs
Scraping floor prices from opensea.
The npm package opensea-scraper receives a total of 7 weekly downloads. As such, opensea-scraper popularity was classified as not popular.
We found that opensea-scraper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.