Order parameter with getNFTTransfers()

Hey folks! Iā€™m trying to use the order parameter with the getNFTTransfers() call. The docs donā€™t give an example of this working. I searched the forums and found someone suggest ā€œblock_number.DESCā€, which looks like itā€™s accepted, but the returned results donā€™t seem to be ordered by block number. Switching to ASC or DESC doesnā€™t change the returned results, and having block_number on its own reports ā€œinvalid orderā€.

Ultimately Iā€™m trying to retrieve the 10 latest NFT Transfers for a given address, am I doing this wrong or misunderstanding?

const options = { chain: "eth", address: address, order: "block_number.DESC", limit: "10" };
const transfersNFT = await Moralis.Web3API.account.getNFTTransfers(options);

I think that order parameter was disabled few days ago for performance reasons.

1 Like

ah, thatā€™d explain it then :smiley:

Can we please update the documentation? https://docs.moralis.io/moralis-dapp/web3-sdk/account#getnfttransfers

What is the default order in this case?

the default order is on an internal field