An issue with the GET /nft/transfers endpoint having null data for some entries

I’m executing a request https://deep-index.moralis.io/api/v2/nft/transfers?chain=eth&from_block=14174061&to_block=14174061&format=decimal and getting the following result (some transfers omitted):

{
  "total": 38,
  "page": 0,
  "page_size": 500,
  "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlciI6IkRFU0MiLCJvZmZzZXQiOjUwMCwibGltaXQiOjUwMCwidG9fYmxvY2siOiIxNDE3NDA2MSIsImZyb21fYmxvY2siOiIxNDE3NDA2MSIsInBhZ2UiOjEsIndoZXJlIjp7fSwia2V5IjoiMTQxNzQwNjEuNjUuNDMuMCIsImlhdCI6MTY0NDQ5OTY1MX0.fx-aiG-REi0YtVQJPtWq4OLvl00QcQ6h9IsA5GWvO6g",
  "result": [
    ...,
    {
      "block_number": "14174061",
      "block_timestamp": null,
      "block_hash": null,
      "transaction_hash": "0xf09310b60bc38182ae82136378aaf226c3c75ef51e1753940b6bc697f066ba76",
      "transaction_index": null,
      "log_index": 421,
      "value": null,
      "contract_type": null,
      "transaction_type": null,
      "token_address": "0x495f947276749ce646f68ac8c248420045cb7b5e",
      "token_id": "78083991066764150106631345140100786147934004219397043481983325211996119367690",
      "from_address": null,
      "to_address": null,
      "amount": null,
      "verified": 1,
      "operator": null
    },
    ...
  ],
  "block_exists": true
}

The issue with the result is "value": null, however if you go on the transaction page, you see that this transaction has value 0.19eth.
I expected this value to not be null in the response.

Am I missing something? Is it an expected behavior?

At a first look it doesn’t seem like expected output. There a more results like this one that you found?

Yes, there are several transactions in this response with the null value as well which I omitted. Also I found null values in a block 14174130: https://deep-index.moralis.io/api/v2/nft/transfers?chain=eth&from_block=14174130&to_block=14174130&format=decimal.

I’m not sure what you mean by this.

I mean that the response I get from calling the same endpoint for the block number 14174130 also returns transfers with the value field equal to null.

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/transfers?chain=eth&from_block=14174130&to_block=14174130&format=decimal' \
  -H 'accept: application/json' \
  -H 'X-API-Key: XXX'

results in:

{
  "total": 240,
  "page": 0,
  "page_size": 500,
  "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlciI6IkRFU0MiLCJvZmZzZXQiOjUwMCwibGltaXQiOjUwMCwidG9fYmxvY2siOiIxNDE3NDEzMCIsImZyb21fYmxvY2siOiIxNDE3NDEzMCIsInBhZ2UiOjEsIndoZXJlIjp7fSwia2V5IjoiMTQxNzQxMzAuMTguNDIuMCIsImlhdCI6MTY0NDUwMDEzN30.2JUhOapbpOr7AjQSHvYCvEBPPw2KNFr9J3TPNwSdxnM",
  "result": [
    omitted...,
    {
      "block_number": "14174130",
      "block_timestamp": "2022-02-09T20:50:14.000Z",
      "block_hash": "0x0264afcbd37718476e823ef048982b2f73ae9ccc8ec9aede7d5c2024bef8f93e",
      "transaction_hash": "0x7e9ff20452829e5fae51e40b12b7d2af1b79d1198b5bb06e337c48ed84ebfaea",
      "transaction_index": 249,
      "log_index": 684,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0x2be20e65becfd7494bf232b1859d556f8a5893ff",
      "token_id": "256",
      "from_address": "0x875f5097a7c5d5e254ebc1426b345764e8a76f14",
      "to_address": "0xfe4d806274bb9b9965eeb8aeeaa2329e501119b9",
      "amount": "1",
      "verified": 1,
      "operator": null
    },
    omitted...,
    {
      "block_number": "14174130",
      "block_timestamp": "2022-02-09T20:50:14.000Z",
      "block_hash": "0x0264afcbd37718476e823ef048982b2f73ae9ccc8ec9aede7d5c2024bef8f93e",
      "transaction_hash": "0x20feacd3d4fb36843ac9c5eeabbfa35ca8f83a2fc0f2047658bf25b8bdf677f9",
      "transaction_index": 235,
      "log_index": 671,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0xeb6dffb87315a2bdf4dedf72b993adc960773a0d",
      "token_id": "7768",
      "from_address": "0x5c2b300a657db30f2b71a50a231bac89d29b6e4d",
      "to_address": "0x9a2b43178a90b64ed8f0ac76c48797f49aeeac46",
      "amount": "1",
      "verified": 1,
      "operator": null
    },
    omitted...,
    {
      "block_number": "14174130",
      "block_timestamp": "2022-02-09T20:50:14.000Z",
      "block_hash": "0x0264afcbd37718476e823ef048982b2f73ae9ccc8ec9aede7d5c2024bef8f93e",
      "transaction_hash": "0x47d8c920812f63636e211b7f52b2809342714397c360962cde5ce2d92acfe1f4",
      "transaction_index": 228,
      "log_index": 650,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0x369156da04b6f313b532f7ae08e661e402b1c2f2",
      "token_id": "7069",
      "from_address": "0xcc0cceb164b3ba21a9b009b4610cebbec4805a3f",
      "to_address": "0xcd8d9c1279005b0cab79f7e60503b7e3d0b9c113",
      "amount": "1",
      "verified": 1,
      "operator": null
    },
    omitted...
  ],
  "block_exists": true
}

ok, got it, I didn’t understand that initially

can you check again now?

Just executed the same request one more time, it still has null values.

curl -X ‘GET’
https://deep-index.moralis.io/api/v2/nft/transfers?chain=eth&from_block=14174130&to_block=14174130&format=decimal
-H ‘accept: application/json’
-H ‘X-API-Key: XXX’

{
  "total": 240,
  "page": 0,
  "page_size": 500,
  "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlciI6IkRFU0MiLCJvZmZzZXQiOjUwMCwibGltaXQiOjUwMCwidG9fYmxvY2siOiIxNDE3NDEzMCIsImZyb21fYmxvY2siOiIxNDE3NDEzMCIsInBhZ2UiOjEsIndoZXJlIjp7fSwia2V5IjoiMTQxNzQxMzAuMTguNDIuMCIsImlhdCI6MTY0NDUwMDEzN30.2JUhOapbpOr7AjQSHvYCvEBPPw2KNFr9J3TPNwSdxnM",
  "result": [
    omitted...,
    {
      "block_number": "14174130",
      "block_timestamp": "2022-02-09T20:50:14.000Z",
      "block_hash": "0x0264afcbd37718476e823ef048982b2f73ae9ccc8ec9aede7d5c2024bef8f93e",
      "transaction_hash": "0x7e9ff20452829e5fae51e40b12b7d2af1b79d1198b5bb06e337c48ed84ebfaea",
      "transaction_index": 249,
      "log_index": 684,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0x2be20e65becfd7494bf232b1859d556f8a5893ff",
      "token_id": "256",
      "from_address": "0x875f5097a7c5d5e254ebc1426b345764e8a76f14",
      "to_address": "0xfe4d806274bb9b9965eeb8aeeaa2329e501119b9",
      "amount": "1",
      "verified": 1,
      "operator": null
    },
    omitted...,
    {
      "block_number": "14174130",
      "block_timestamp": "2022-02-09T20:50:14.000Z",
      "block_hash": "0x0264afcbd37718476e823ef048982b2f73ae9ccc8ec9aede7d5c2024bef8f93e",
      "transaction_hash": "0x20feacd3d4fb36843ac9c5eeabbfa35ca8f83a2fc0f2047658bf25b8bdf677f9",
      "transaction_index": 235,
      "log_index": 671,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0xeb6dffb87315a2bdf4dedf72b993adc960773a0d",
      "token_id": "7768",
      "from_address": "0x5c2b300a657db30f2b71a50a231bac89d29b6e4d",
      "to_address": "0x9a2b43178a90b64ed8f0ac76c48797f49aeeac46",
      "amount": "1",
      "verified": 1,
      "operator": null
    },
    omitted...,
    {
      "block_number": "14174130",
      "block_timestamp": "2022-02-09T20:50:14.000Z",
      "block_hash": "0x0264afcbd37718476e823ef048982b2f73ae9ccc8ec9aede7d5c2024bef8f93e",
      "transaction_hash": "0x47d8c920812f63636e211b7f52b2809342714397c360962cde5ce2d92acfe1f4",
      "transaction_index": 228,
      "log_index": 650,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0x369156da04b6f313b532f7ae08e661e402b1c2f2",
      "token_id": "7069",
      "from_address": "0xcc0cceb164b3ba21a9b009b4610cebbec4805a3f",
      "to_address": "0xcd8d9c1279005b0cab79f7e60503b7e3d0b9c113",
      "amount": "1",
      "verified": 1,
      "operator": null
    },
    omitted...
  ],
  "block_exists": true
}

Overall, this request returns 11 such entities with value = null.

1 Like

can you try again now to see if that it is still happening?

For the blocks I mentioned everything is ok now, thank you! If I find any more blocks with this problem, I’ll let you know

1 Like

@cryptokid again the same problem. Now with the block number 14225549.

curl -X 'GET' \
  'https://deep-index.moralis.io/api/v2/nft/transfers?chain=eth&from_block=14225549&to_block=14225549&format=decimal' \
  -H 'accept: application/json' \
  -H 'X-API-Key: XXX'

returns

{
  "total": 7,
  "page": 0,
  "page_size": 500,
  "cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcmRlciI6IkRFU0MiLCJvZmZzZXQiOjUwMCwibGltaXQiOjUwMCwidG9fYmxvY2siOiIxNDIyNTU0OSIsImZyb21fYmxvY2siOiIxNDIyNTU0OSIsInBhZ2UiOjEsIndoZXJlIjp7fSwia2V5IjoiMTQyMjU1NDkuMTkuMjUuMCIsImlhdCI6MTY0NTEyNzg3M30.OqomquLfs0RRw5VFqv6zkM35Ab61cF193GSvCCfIk3g",
  "result": [
    omitted...,
    {
      "block_number": "14225549",
      "block_timestamp": "2022-02-17T19:32:15.000Z",
      "block_hash": "0x0d66d7bdcf43e4f8799a047e85180d9c83c76c955d76f1c5a90028aecead1b9c",
      "transaction_hash": "0x2d5753ba831bd9206c70439a078fa2a410f658e013c57c77c300d563417b8a07",
      "transaction_index": 19,
      "log_index": 25,
      "value": null,
      "contract_type": "ERC721",
      "transaction_type": "Single",
      "token_address": "0x89c9c2e4ebeff6903223b062458e11e56636f838",
      "token_id": "9784",
      "from_address": "0xc94fff05c666d29bcd6af67400e3db1b09a35d8b",
      "to_address": "0x2687b8f2762d557fbc8cfbb5a73aee71fdd5c604",
      "amount": "1",
      "verified": 1,
      "operator": null
    }
  ],
  "block_exists": true
}

With "value": null

1 Like

@cryptokid any news on this one?

you still have this problem?

Yes, it still happens for relatively fresh blocks. I periodically meet some blocks with transfers with value = null, but after some time the value is propagated to these transfers and if I call the API again, the value would be correct. The problem is that I need these values from fresh blocks (e.g. blocks minted two minutes ago)

How frequently it happens?

Quite often. Blocks with null value transfers appear once per 100/200 blocks, and in every such block there are lots of transfers with null values (up to hundreds)

@cryptokid any updates on this?

Do you have examples now?

Yes, we encounter dozens such blocks every day, the latest one is the block number 14410804. But as I wrote above, this happens mainly to the fresh blocks, i.e. if a block was mined 5 minutes ago, Moralis can return entities with "value": null. However, after some time passes, the actual values are propagated and after that Moralis returns good data.
If you are unable to fix it, can you provide any estimate on the time delay, after which Moralis returns only correct data (after a block mining).

1 Like

ping? any news here?