Fetching paginated data from moarlis DB

Hi @here I want to query data from moralis class NFTOwners with paginated data how can i do this ?
Like when I pass the wallet and tokenAddress to the query to get all related nfts within that it returns me all of the nfts owned by the wallet address and exist in the tokenAddress that i passed. But i want to fetch these nfts based data in a paginated way. How can i do this? Thanks in advance.

Hi please donā€™t use those tables - they are removed from future moralis versions - read here: Moralis nitro is out! šŸš€

Instead - you can query this data via Moralis.Web3API and put in user profile rows and query from there :raised_hands:

Okay but I have build my solution based on these tables. Like my use-case is that;

  1. Need to sync historical nfts data of my logged in users.
  2. Need to get all nfts data for the synced users.
  3. Need to get all of the nft-transfers transaction for the users.

Now as you are saying that in your upcoming version these tables are removed. Then ultimately I need to shift my solution to Web3Apis of moralis / SDK.
For this it will increase the response time of APIs. As like at one point of time api call how many userā€™s nft data can i get ?

I was previously seeing that moralis Web3Api like ā€˜getNftsā€™ is required request of params for 1 userā€™s address. Can you suggest me then is there any api for this which can proceed arrayOfAddresses of users for 1 time Api call?[quote=ā€œivan, post:2, topic:9407, full:trueā€]
Hi please donā€™t use those tables - they are removed from future moralis versions - read here: Moralis nitro is out! šŸš€

Instead - you can query this data via Moralis.Web3API and put in user profile rows and query from there :raised_hands:
[/quote]

this information will still be available in a table

I want to fetch basically all of the nfts owned by the wallet address as you are saying NFTOwners table is removed. The other way is that by using the Moralis.Web3API this solution potentially would not work for my use case. As there would be an extra api calls which will affect my system.

Can you please suggest me any other way to do this.

Why I am saying this because We have developed our solution based on the moralis DB, but now the tables are removed i.e NFTOwners. And I potentially need this table for my use-case.

what is the problem with using that extra API call to get the NFTs for an address?

The problem with NFTOwners was that all servers had to do the heavy work of keeping the owners up to date no matter the use case

Now - we are giving the developers flexibility to decide when they want to get that data using Moralis.Web3API

For example - you could get the NFTs of a user each time they log in and put that info into their User row

Or you could have a job that does this for all users every few minutes

It is because currently I have 1 minions + users and at least 4-5 wallet address associated with each of them. If I use Moralis.Web3API which i have seen i can only fetch 1 wallet address nfts at a given point of time using api. As I have 1 million + user so lets say => 1 million wallet addresses, so the api call will be 1 million at a given point of time. So do you think its a viable solution?

Can you fetch only when you need NFTs of a particular user instead of syncing 1 million all the time?

Are you using the data for 1 million NFTs all the time?

Yeah but is there any moralis.web3 api exist which can support multiple wallet addresses at a one point of time call for api. So that I need there should be less api calls and the data should be segregated with in 1 call for an api for multiple wallet addresses.

Yes because we are developing the userā€™s portfolio analytics for this reason we need to sync this data for which we need to show all of the userā€™s current owned / previously owned nfts.

Ok perfect - but then you donā€™t need to know all data about all 1 million users at all times

You donā€™t need to show the data about all users - only the users that visit their portfolio page

So you just need to know the NFT data about an address when the owner of that address wants to see their portfolio

So when someone visits their portfolio you can use Web3API to show the assets of that user for that user

And you can use NFTTransfers table in Moralis DB to see previously owned NFTs

okay great. Can we meet up at zoom or at google meet which you prefer. As I would highly recommend for this i will include my dev tram as well for this. Also i am using the moralis paid version for the support.

Just need to some clarification on this to me and my team as well based on this we will make our solution to the best. Thanks

Yes please email [email protected] and we will arrange something!

okay great. Thanks and super appreciated the timely responses.

2 Likes

Hi @ivan I have a use case which is like I need to get the all nfts transfers data based on the wallet address and smart contract address with value column (eth value for transfer) which means based on this column I can identify the (sell/buy transfer) for these nfts transfer by using moralis DB.

For this like Moralis support two tables i.e ( EthNFTTransfers and EthTransactions ). I am asking this because EthNFTTransfers does not include the value column for this I need to join EthTransactions table for this. How can i do this ? On which keys I can join ? and How ?

Thanks