Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

etherscan

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

etherscan

Etherscan.io API wrapper

  • 0.3.0
  • PyPI
  • Socket score

Maintainers
1

Etherscan.io API wrapper

PyPi Version

An Etherscan.io API wrapper, for Python.

With a default cache supported by requests-cache

Installation

pip3 install etherscan

Usage

import etherscan

es = etherscan.Client(
    api_key='YOUR_API_KEY',
    cache_expire_after=5,
)

eth_price = es.get_eth_price()

eth_supply = es.get_eth_supply()

eth_balance = es.get_eth_balance('0x39eB410144784010b84B076087B073889411F878')

eth_balances = es.get_eth_balances([
    '0x39eB410144784010b84B076087B073889411F878',
    '0x39eB410144784010b84B076087B073889411F879',
])

gas_price = es.get_gas_price()

block = es.get_block_by_number(block_number=12345)

transactions = es.get_transactions_by_address('0x39eB410144784010b84B076087B073889411F878')

token_transations = es.get_token_transactions(
    contract_address='0xEF68e7C694F40c8202821eDF525dE3782458639f',
    address='0xEF68e7C694F40c8202821eDF525dE3782458639f',
)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc