The possible_spam field is missing in the getTokenMetadata query:
curl -X 'GET' \
'https://deep-index.moralis.io/api/v2/erc20/metadata?chain=polygon&addresses=0x68b21ee3e943e7f6299e34af1a8382fe58088ef7' \
-H 'accept: application/json' \
-H 'X-API-Key: XXXXX'
[
{
"address": "0xf31cdb090d1d4b86a7af42b62dc5144be8e42906",
"name": "0Bets.io",
"symbol": "0Bets.io",
"decimals": "8",
"logo": null,
"logo_hash": null,
"thumbnail": null,
"block_number": "27413248",
"validated": 1,
"created_at": "2022-04-21T19:29:18.912Z"
}
]
According to documentation, response should have this structure (possible_spam is the last property):
[
{
"address": "0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09",
"name": "Kylin Network",
"symbol": "KYL",
"decimals": "18",
"logo": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png",
"logo_hash": "ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d",
"thumbnail": "https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png",
"block_number": "string",
"validated": "string",
"possible_spam": false
}
]
This same token is identified as spam in the getTokenBalancesQuery:
curl -X 'GET' \
'https://deep-index.moralis.io/api/v2/0xAf951f7A4aA4E2a033B034AF0897273ed553e8c3/erc20?chain=polygon&token_addresses=0xf31cdb090d1d4b86a7af42b62dc5144be8e42906' \
-H 'accept: application/json' \
-H 'X-API-Key: XXXX'
[
{
"token_address": "0xf31cdb090d1d4b86a7af42b62dc5144be8e42906",
"name": "0Bets.io",
"symbol": "0Bets.io",
"logo": null,
"thumbnail": null,
"decimals": 8,
"balance": "300000000000000",
"possible_spam": true
}
]