Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting streaming data of NFT events on Eth blockchain [D: Hazel] #9

Open
yaseenkhanmohmand opened this issue Apr 13, 2022 · 7 comments
Assignees
Labels

Comments

@yaseenkhanmohmand
Copy link

It seems we currently have a static list of projects on nft-hunter, can we make it so that we can get all Eth NFTs on the website. This will mean that viewers will have the ability to detect activity on new project as soon as new projects hit the market.

This will require using the nft/transfers api from moralis, which does not need an NFT contract address to provide transfers information. It instead only needs the block number and then provides live data based on what is happening on the block.

@pan-xiong
Copy link
Collaborator

  1. Fetch block transfers every 5 mins, save contract address if contract type is ERC721 and we don't have this address in the database
  2. Fetch NFT price and trades by contract address

@yaseenkhanmohmand
Copy link
Author

image

Hi folks this api from moralis is very helpful. It gives all nft events.

Moralis APIs are a little unreliable, however.
For example, this API stops working at times as in it will return an error or stop providing data for a second, (the correct response is 200, any other response is an error) so we need to failsafes in place if we pull from this.

@iannono
Copy link

iannono commented Apr 15, 2022

@yaseenkhanmohmand Yes, What we mentioned above was talking about this nft transfer API : )

@yaseenkhanmohmand
Copy link
Author

Amazzzing!!

Just to confirm IAN,

There are two APIs, both look very similar:

One is contract address agnostic:
That is:
/nft/transfers
This API gives all data from block x to block y for all NFTs on the blockchain.

The other API is :

nft/{address}/trades
This API needs a contract address to pull data, the problem with this one is this does not provide information on mints.

We are using the first one for our use case?

@yaseenkhanmohmand
Copy link
Author

okay disregard! :D I got access to the database it seems even the mints are being accounted for!! Great!!

@pan-xiong pan-xiong self-assigned this Apr 19, 2022
@pan-xiong pan-xiong changed the title Getting streaming data of NFT events on Eth blockchain Getting streaming data of NFT events on Eth blockchain [D: Hazel] Apr 19, 2022
@yaseenkhanmohmand
Copy link
Author

HI Hazel,

How does this look?

Please let me know if i can help, i extracted data for this purpose using Python in the past, so i can share my experience doing this.

@pan-xiong pan-xiong added Verify Need verify and removed process labels Apr 20, 2022
@yaseenkhanmohmand
Copy link
Author

yaseenkhanmohmand commented Apr 21, 2022

Hi hazel,

I am looking at the front end,

And looked at the nft_trades table, I don't see new data in there.

I run this query:
select count(distinct nft_id) from nft_trades limit 10

I am getting 133 projects.

This should be a much higher number like in the thousands, given that there are many new projects being launched every day. We should be able to see all those projects.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants