OpenSea allows users to buy and sell NFTs. From OpenSea, you can view the prices of listed NFTs within a project. When an NFT is listed, is the listed price stored on the block chain or is it statically stored only on OpenSea's platform? Ultimately, I am looking for a way to scrape the prices of listed tokens within any NFT project. While I could scrape directly from OpenSea's website, NFT data is lazy loaded which complicates the process of scraping directly from OpenSea.io - I do not wish to use selenium.
tl;dr : Is there any way to determine the price of an NFT token within a project without using OpenSea?
Listing price is different from nft price. Listing price is the fee that you pay for the marketplace. Otherwise everyone would list nft for free and that would cause extra load on the contract and server of website.
When you write an Nft contract, you specify the listing price as:
Logically
listingFee
must be on chain since the nft creators are directly interacting with the smart contract.Price of nft is different. When you create an Nft item, you define a struct:
To create an Nft item, define a function:
Price of Nft is determined by you on the fly when you submit the form to create the nft. since nft's are going to be stored on chain as struct, it will include the price
Now you call the
mint
function:I just included the parts that related to your question in
mint
function.