brtr / nft-hunter

0 stars 0 forks source link

Step 1. Get all Ethereum NFT transactions #17

Open yaseenkhanmohmand opened 2 years ago

yaseenkhanmohmand commented 2 years ago

Hi folks,

I am breaking down the request into smaller pieces, for the first piece we need in our database all events for Eth NFTs.

We can get these events from the moralis api for transfer events.

If all events are too difficult to get, get all events for nft projects that have atleast 10 eth in volume.

pan-xiong commented 2 years ago

@yaseenkhanmohmand Hi, is this your recommend API? I already save trade transfers in the database,

Screen Shot 2022-04-22 at 5 49 09 pm

yaseenkhanmohmand commented 2 years ago

My recommended api will be the nft/transfers. That one does not need address. It just pulls all eth nft transactions.

I will recommend pulling all that data, saving it on our database and then doing our analysis on our databases.

On Fri, Apr 22, 2022 at 2:51 AM Hazel @.***> wrote:

@yaseenkhanmohmand https://github.com/yaseenkhanmohmand Hi, is this your recommend API? I already save trade transfers in the database,

[image: Screen Shot 2022-04-22 at 5 49 09 pm] https://user-images.githubusercontent.com/6712515/164682360-3351d9d6-763b-48c2-97a6-aa2136436a82.png

— Reply to this email directly, view it on GitHub https://github.com/brtr/nft-hunter/issues/17#issuecomment-1106288021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIFLJCDFSKIVAYXGTRSRP5LVGJZCTANCNFSM5T5XJKZQ . You are receiving this because you were mentioned.Message ID: @.***>

yaseenkhanmohmand commented 2 years ago

This will be my recommendation, please feel free to find other ways to achieve this:

  1. Use the api below to pull information from the eth blockchain. This API provides all NFT transactions on the eth blockchain. If you want to pull all historic data, pull the data in chunks. image

So in one operation pull all data from block 1 million to 7 million, Other operation to pull 7 mill to 8 mill 8 to 9 And so on.

If you reach api limits make multiple accounts on Moralis and use multiple apis.

  1. You will run into errors. You can detect the error by checking the status code of the response you get from this api, there are two kinds of errors: a. Api limit error, to resolve this create extra apis keys by creating extra accounts, and use them rather than using the same api. Please let me know if my api key is needed i can provide. b. Random other errors Moralis throws (there are some other errors that morallis can throw your way): to resolve this issue, you can write in your query that when ever it gives you an error code other than the rate limit error, that you should just repeat the same request. If that does not solve the problem, just query the block again.

All data successfully created:

  1. Once you have all the data in your database we will store it and for example call it nft_trades_master,

  2. create a query on top of this nft trades master that filter the projects with more than 10 eth volume and keep them in a separate table we will call this table imp_nft_trades,

  3. we will use this separate table for all our operations.

  4. Every 24 hours Keep checking nft trades master for any contract that has reached 10 eth volume, when a contract reaches 10 eth start pulling data for that nft into the imp_nft_trades table.

yaseenkhanmohmand commented 2 years ago

This will be my recommendation, please feel free to find other ways to achieve this:

  1. Use the api below to pull information from eth blockchain. If you want to pull all historic data, pull the data in chunks.

So in one operation pull all data from block 1 million to 7 milliom, Other operation to pull 7 mill to 8 mill 8 to 9 And so on.

If you reach api limits make multiple accounts on moralis and use multiple apis.

  1. You will run into errors. You can detect the error by checking the status code of the response you get from this api, there are two kinds of errors: a. Api limit error, to resolve this create extra apis keys by creating extra accounts, and use them rather than using the same api. Please let me know if my api key is needed i can provide. b. Random other error moralis throws: to resolve this issue, either right in your code to ignore and then repeat the get request or you can ignore and query the same block number again.

  2. Once you have all the data in your database we will call this data nft trades master, create a query on top of this nft trades master that filter the projects with more than 10 eth volume and keep them in a seprate table we will call this table imp_nft_trades, we will use this separate table for all our operations. Keep checking nft trades master for any contract that has reached 10 eth volume on a 24 hour basis.

On Fri, Apr 22, 2022 at 4:36 AM Yaseen Mohmand @.***> wrote:

On Fri, Apr 22, 2022 at 4:35 AM Yaseen Mohmand < @.***> wrote:

My recommended api will be the nft/transfers. That one does not need address. It just pulls all eth nft transactions.

I will recommend pulling all that data, saving it on our database and then doing our analysis on our databases.

On Fri, Apr 22, 2022 at 2:51 AM Hazel @.***> wrote:

@yaseenkhanmohmand https://github.com/yaseenkhanmohmand Hi, is this your recommend API? I already save trade transfers in the database,

[image: Screen Shot 2022-04-22 at 5 49 09 pm] https://user-images.githubusercontent.com/6712515/164682360-3351d9d6-763b-48c2-97a6-aa2136436a82.png

— Reply to this email directly, view it on GitHub https://github.com/brtr/nft-hunter/issues/17#issuecomment-1106288021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIFLJCDFSKIVAYXGTRSRP5LVGJZCTANCNFSM5T5XJKZQ . You are receiving this because you were mentioned.Message ID: @.***>