etherscan-api-v2


Nameetherscan-api-v2 JSON
Version 0.3 PyPI version JSON
download
home_pagehttps://github.com/hanzhichao/etherscan-api
SummaryEtherscan v2 api client
upload_time2025-11-06 08:17:10
maintainerNone
docs_urlNone
authorHan Zhichao
requires_pythonNone
licenseMIT license
keywords etherscan eth etherscan api etherscan v2
VCS
bugtrack_url
requirements requests pytest eth-abi
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Etherscan api

Etherscan v2 api client

## Install
```bash
pip install etherscan-api-v2
```


## Usage

```python
from etherscan_api import EtherScanApi, get_etherscan_api
from pprint import pprint

# view all supported chains and chain_id
pprint(EtherScanApi.chain_list())

# get api client
etherscan = EtherScanApi(chain_id=1)
etherscan = get_etherscan_api('eth', network='mainnet')

account = '0x3f217aF5b4d5Dc6467598937119E500ab758623a'
usdt = '0x58c885900f2df7a1fb1cc1ec35dea9a1c786cac0'

# get token balance 
balance = etherscan.get_token_balance(account, usdt)

# query contract
balance = etherscan.query_contract(usdt, 'balanceOf', account)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hanzhichao/etherscan-api",
    "name": "etherscan-api-v2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "etherscan, eth, etherscan api, etherscan v2",
    "author": "Han Zhichao",
    "author_email": "superhin@126.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/17/1fde231ecbbc7c78ef8f6fe7a5fdf701663e475ebf0428b51939793f48f4/etherscan_api_v2-0.3.tar.gz",
    "platform": null,
    "description": "# Etherscan api\n\nEtherscan v2 api client\n\n## Install\n```bash\npip install etherscan-api-v2\n```\n\n\n## Usage\n\n```python\nfrom etherscan_api import EtherScanApi, get_etherscan_api\nfrom pprint import pprint\n\n# view all supported chains and chain_id\npprint(EtherScanApi.chain_list())\n\n# get api client\netherscan = EtherScanApi(chain_id=1)\netherscan = get_etherscan_api('eth', network='mainnet')\n\naccount = '0x3f217aF5b4d5Dc6467598937119E500ab758623a'\nusdt = '0x58c885900f2df7a1fb1cc1ec35dea9a1c786cac0'\n\n# get token balance \nbalance = etherscan.get_token_balance(account, usdt)\n\n# query contract\nbalance = etherscan.query_contract(usdt, 'balanceOf', account)\n```\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Etherscan v2 api client",
    "version": "0.3",
    "project_urls": {
        "Homepage": "https://github.com/hanzhichao/etherscan-api"
    },
    "split_keywords": [
        "etherscan",
        " eth",
        " etherscan api",
        " etherscan v2"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eb171fde231ecbbc7c78ef8f6fe7a5fdf701663e475ebf0428b51939793f48f4",
                "md5": "21e8c245ea8d42da5ef1d4ad7f13bfea",
                "sha256": "a993990e127faa6face431a67b494230730ed3351c7b37f48c6ff004e24d330f"
            },
            "downloads": -1,
            "filename": "etherscan_api_v2-0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "21e8c245ea8d42da5ef1d4ad7f13bfea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15550,
            "upload_time": "2025-11-06T08:17:10",
            "upload_time_iso_8601": "2025-11-06T08:17:10.574547Z",
            "url": "https://files.pythonhosted.org/packages/eb/17/1fde231ecbbc7c78ef8f6fe7a5fdf701663e475ebf0428b51939793f48f4/etherscan_api_v2-0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-06 08:17:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hanzhichao",
    "github_project": "etherscan-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "eth-abi",
            "specs": []
        }
    ],
    "lcname": "etherscan-api-v2"
}
        
Elapsed time: 1.47094s