Bug in NFT value calculation on transfers

This NFT has been sold on Blur for 5.86 https://etherscan.io/tx/0xbbfdcf4e1c8eff092c301868a1e35fe2449b8d49d71585717b34f3b4db9eda5b
But as value is 0 Moralis API shows 0 for transfer too. How can we resolve it?

Hi @nftscientist

Can you please share the API request url and params which you are using?

This is part of my code:

       const response = await Moralis.EvmApi.nft.getNFTTransfersByBlock({
            blockNumberOrHash: blockNumber,
            chain: EvmChain.ETHEREUM,
            cursor: cursor,
        });

        console.log(response.toJSON().cursor);


        for (const transaction of response.toJSON().result) {

            console.log(transaction);
            // console.log(transaction._data.blockNumber);
            //console.log(transaction._data.transactionHash);

            const values = [
                transaction['block_number'],
                transaction['block_timestamp'],
                transaction['block_hash'],
                transaction['transaction_hash'],
                transaction['transaction_index'],
                transaction['log_index'],
                transaction['value'],
                transaction['contract_type'],
                transaction['transaction_type'],
                transaction['token_address'], // This line should match the 'token_address' key in the JSON.
                transaction['token_id'],
                transaction['from_address'],
                transaction['to_address'],
                transaction['amount'],
                transaction['verified'],
                transaction['operator'],
                transaction['possible_spam'],
                transaction['verified_collection']
            ];```

Ahh, I see. The zero value refers to the native ETH transferred in the transaction. It is zero in your transaction.

If you want to get all the token transfer logs from the transaction you can use getTransactionVerbose endpoint. This will get you all the token transfer logs. You can test it using the below link.

Now I need to have a separate call for each transaction, it would thousands of extra API calls per day, is there any way for Moralis to update getNFTTransfersByBlock to have the ERC20 transfer values too?

Can you give more details on what is your use case and what you are trying to achieve?