etherscan-python
etherscan-python copied to clipboard
A minimal, yet complete, python API for Etherscan.io.
from etherscan import Etherscan eth = Etherscan('CU3GAMEJKER5MVUKJ4Z3NVTIK5Y2A75D58') eth.get_gas_oracle() Terminal: ImportError: cannot import name 'Etherscan' from 'etherscan' I am running python 3.9.7 on windows 10.
hi! I'm new to this package... ``` from etherscan import Etherscan eth = Etherscan('MY API KEY') # key in quotation marks block_number_start=eth.get_block_number_by_timestamp(timestamp="1609490044", closest="before") block_number_end=eth.get_block_number_by_timestamp(timestamp="1637224444", closest="before") erc_20_transactions = eth.get_erc20_token_transfer_events_by_address(address='0xd8Fa365f358729Af1D62206BdDaD84cBb2BEFB7d',startblock=block_number_start,endblock=block_number_end,sort='asc') erc_721_transactions =...
Allow users to change the endpoint URL which would make this library also useful for other chains (e.g. BSC).
I am trying to call "get_erc721_token_transfer_events_by_address" on a rather large set of wallet addresses (roughly 1000) and iterating over a for loop to do so - I thought it might...
For addresses that have more than 10K transactions etherscan.io actually returns the first transactions that are within the start and end blocks. If you compare the last block returned by...
Adds support for Polygon and Mumbai. Also changes etherscan.py code to support custom domain (instead of `etherscan.io`) for the networks.
in commit fb697e1 the following behavior was introduced: ```python # etherscan/utils/parsing.py assert status, f"{result} -- {message}" ``` to replace the UserWarning behavior: ```python #etherscan/utils/parsing.py warnings.warn(f"{result} -- {message}") ``` This has...
In the stats part of the project missing get_total_nodes_count() Returns the total number of discoverable Ethereum nodes. https://api.etherscan.io/api ?module=stats &action=nodecount &apikey=YourApiKeyToken
The README mentions Ropsten, Kovan, etc. But is the library compatible with other L1 or L2 based chains that run their own hosted EtherScan instances, like polygonscan.com?
When I am using the rest api, i can send request without using endblock parameter: https://api.etherscan.io/api?module=account&action=tokentx&address=0x4e83362442b8d1bec281594cea3050c8eb01311c&startblock=12328953&sort=asc&apikey=YourApiKeyToken But the library doesn't allow to do this: ``` In [5]: eth.get_erc20_token_transfer_events_by_address(address='0x4e83362442b8d1bec281594cea3050c8eb01311c', startblock=12328953) ---------------------------------------------------------------------------...