- Notifications
You must be signed in to change notification settings - Fork19
Etherscan API async Python wrapper
License
NotificationsYou must be signed in to change notification settings
ape364/aioetherscan
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Etherscan.ioAPI async Python non-official wrapper.
Supports all API modules:
Also providesextra module, which supports:
linkhelps to compose links to address/tx/etccontracthelps to fetch contract datageneratorsallows to fetch a lot of transactions without timeouts and not getting banned
Supports blockchain explorers:
pip install -U aioetherscan
Register Etherscan account andcreate free API key.
importasyncioimportloggingfromaiohttp_retryimportExponentialRetryfromasyncio_throttleimportThrottlerfromaioetherscanimportClientlogging.basicConfig(format='%(asctime)s - %(message)s',level=logging.INFO)asyncdefmain():throttler=Throttler(rate_limit=4,period=1.0)retry_options=ExponentialRetry(attempts=2)c=Client('YourApiKeyToken',throttler=throttler,retry_options=retry_options)try:print(awaitc.stats.eth_price())print(awaitc.block.block_reward(123456))address='0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2'asyncfortinc.extra.generators.token_transfers(address=address,start_block=19921833,end_block=19960851 ):print(t)print(c.extra.link.get_tx_link(t['hash']))print(c.extra.link.get_address_link(address))finally:awaitc.close()if__name__=='__main__':asyncio.run(main())
About
Etherscan API async Python wrapper
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.