List of transactions and transaction count always empty and 0 in Polygon Mumbai

Hi all, I am trying out the Web3 API to get the transaction history and transaction count in Polygon/Matic Mumbai: the curl command it generates is:

curl -X 'GET' \
  'https://deep-index.moralis.io/api/historical/token/erc20/transactions?chain=matic&chain_name=mumbai&address=0x326c977e6efc84e512bb9c30f76e30c160ed06fb' \
  -H 'accept: application/json' \
  -H 'X-API-Key: <my_api_key>'

The response for any token contract address is always an empty array.
I have just created an app with a server on polygon testnet (mumbai), but I didn’t configure anything more. And then just tried out the Web3 API in-browser.

What should I do to make it work with Mumbai, please? (With Ethereum mainnet I do get an array with transactions if I use a contract address from a token on Ethereum.)

Thanks in advance!

Hi braduf,

Try:
chain=polygon&chain_name=mumbai

or this should also work:
chain=mumbai

The interactive page lists the value “matic” but the back end uses “polygon”. This bug will be fixed. In the meantime you can use the above.

Cheers.

1 Like