I have the following code that uses the etherscan API to read for the most recent transfers for a particular contract-address on the Ethereum chain. I need to do the same, but on the Matic chain. From what I can see the etherscan API would not support this.
import etherscan.accounts as accounts """ The following is an example code that continuously checks the transactions for the Tether token and prints the most recent 3. """ key = '' # Insert your own Etherscan API_KEY address = '0xdac...' # Address of coin we want to read api = accounts.Account(address=address, api_key=key) while(True): # For now loop infinitely page = api.get_transaction_page(page=1, offset=3, sort='desc') # Get the latest 3 transactions # Print them print(page) print(page) print(page) print('=============')
Is there an API or way to scan both Ethereum and Matic chains?