{"id":16628993,"url":"https://github.com/etwnn/scanwatch","last_synced_at":"2025-03-21T15:31:18.640Z","repository":{"id":45147761,"uuid":"353065188","full_name":"EtWnn/ScanWatch","owner":"EtWnn","description":"Local tracker for address on Ethereum, BSC and Polygon chains","archived":false,"fork":false,"pushed_at":"2022-01-05T07:52:00.000Z","size":67,"stargazers_count":37,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T16:44:05.245Z","etag":null,"topics":["bsc","bscscan","eth","ethereum","ethscan","polygon","polygonscan"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EtWnn.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-30T16:18:02.000Z","updated_at":"2024-12-31T05:25:30.000Z","dependencies_parsed_at":"2022-08-25T16:11:52.760Z","dependency_job_id":null,"html_url":"https://github.com/EtWnn/ScanWatch","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EtWnn%2FScanWatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EtWnn%2FScanWatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EtWnn%2FScanWatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EtWnn%2FScanWatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EtWnn","download_url":"https://codeload.github.com/EtWnn/ScanWatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822635,"owners_count":20516143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsc","bscscan","eth","ethereum","ethscan","polygon","polygonscan"],"created_at":"2024-10-12T04:38:39.483Z","updated_at":"2025-03-21T15:31:18.224Z","avatar_url":"https://github.com/EtWnn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============================\nWelcome to ScanWatch 0.2.0\n==============================\n\n\nNote\n----\n\nThis library is developed and maintained by EtWnn, feel free to drop your suggestions or remarks in\nthe `discussion tab \u003chttps://github.com/EtWnn/ScanWatch/discussions\u003e`_.\nYou are also welcome to contribute by submitting PRs.\n\n**Source Code:**\n    https://github.com/EtWnn/ScanWatch\n**Documentation:**\n    https://scanwatch.readthedocs.io\n\n\n| This library is a local tracker of transactions for the Ethereum chain, the Binance Smart chain and the Polygon chain.\n| It is a simple single-point interface with the `etherscan \u003chttps://etherscan.io\u003e`__, `bscscan \u003chttps://bscscan.com\u003e`__\n  and `polygonscan \u003chttps://polygonscan.com\u003e`__ APIs.\n| This library will save locally the transactions to gain time and avoid over-calling the APIs.\n\n\nAnnouncement\n------------\n\n|siren| |siren| |siren|\n\nIf you previously used this library with a version inferior to 0.1.3,\nplease head `here \u003chttps://github.com/EtWnn/ScanWatch/discussions/25\u003e`_ to correct a potential bug in the database.\n\n|siren| |siren| |siren|\n\n\nQuick Tour\n----------\n\n1. API Keys\n~~~~~~~~~~~\n\nYou will need to generate API tokens to use this library:\n\n1. Ethereum chain: go on `etherscan \u003chttps://etherscan.io/myapikey\u003e`__\n2. Binance Smart chain: go on `bscscan \u003chttps://bscscan.com/myapikey\u003e`__\n3. Polygon chain: go on `polygonscan \u003chttps://polygonscan.com/myapikey\u003e`__\n\n(If you want to use several chains, you will need an API token for each).\n\n2. Installation\n~~~~~~~~~~~~~~~\n\n``ScanWatch`` is available on `PYPI \u003chttps://pypi.org/project/ScanWatch/\u003e`_, install with ``pip``:\n\n.. code:: bash\n\n    pip install ScanWatch\n\nYou can also install the latest developments (not stable):\n\n.. code:: bash\n\n    pip install git+https://github.com/EtWnn/ScanWatch.git@develop\n\n3. Manager\n~~~~~~~~~~\n\n| The manager is the object that you will use to update and get the transactions.\n| It is instantiated with an API token and an address.\n\nExample for Ethereum:\n\n.. code:: python\n\n    from ScanWatch.ScanManager import ScanManager\n    from ScanWatch.utils.enums import NETWORK\n\n    api_token = \"\u003cETH_API_TOKEN\u003e\"\n    address = \"\u003cYOUR_ETH_ADDRESS\u003e\"\n\n    manager = ScanManager(address, NETWORK.ETHER, api_token)\n\nExample for BSC:\n\n.. code:: python\n\n    from ScanWatch.ScanManager import ScanManager\n    from ScanWatch.utils.enums import NETWORK\n\n    api_token = \"\u003cBSC_API_TOKEN\u003e\"\n    address = \"\u003cYOUR_BSC_ADDRESS\u003e\"\n\n    manager = ScanManager(address, NETWORK.BSC, api_token)\n\nExample for Polygon:\n\n.. code:: python\n\n    from ScanWatch.ScanManager import ScanManager\n    from ScanWatch.utils.enums import NETWORK\n\n    api_token = \"\u003cPOLYGON_API_TOKEN\u003e\"\n    address = \"\u003cYOUR_POLYGON_ADDRESS\u003e\"\n\n    manager = ScanManager(address, NETWORK.POLYGON, api_token)\n\n4. Transactions Update\n~~~~~~~~~~~~~~~~~~~~~~\n\nOnce the manager is setup, you can update the locally saved transactions:\n\n.. code:: python\n\n    manager.update_all_transactions()\n    # all transactions updated for address 0xaAC...748E8: 100%|████████████| 4/4 [00:02\u003c00:00,  1.86it/s]\n\nThis needs to be done only when new transactions have been made since the last time you called the update method.\n\n5. Transactions\n~~~~~~~~~~~~~~~\n\nTo fetch the transactions that have been previously saved, just use the methods below.\n(see the `documentation \u003chttps://scanwatch.readthedocs.io\u003e`_ for more details).\n\n.. code:: python\n\n    from ScanWatch.utils.enums import TRANSACTION\n\n    manager.get_transactions(TRANSACTION.NORMAL)  # normal transactions\n\n    manager.get_transactions(TRANSACTION.ERC20)  # erc20 transactions\n\n    manager.get_transactions(TRANSACTION.ERC721)  # erc721 transactions\n\n    manager.get_transactions(TRANSACTION.INTERNAL)  # internal transactions\n\n6. Holdings\n~~~~~~~~~~~\n\nThe manager can also give you the current tokens hold by an address:\n\nFor erc20 tokens:\n\n.. code:: python\n\n    manager.get_erc20_holdings()\n\n\n.. code:: bash\n\n    {\n        'USDC': Decimal('50'),\n        'AllianceBlock Token': Decimal('12458.494516884'),\n        'Blockchain Certified Data Token': Decimal('75174'),\n        'Compound': Decimal('784.24998156'),\n        'ZRX': Decimal('3.1')\n    }\n\nFor erc721 tokens:\n\n.. code:: python\n\n    manager.get_erc721_holdings()\n\n\n.. code:: bash\n\n    [\n        {\n            'contractAddress': '0x8azd48c9ze46azx1e984fraz4da9zz8dssad49ct',\n            'tokenID': '78941',\n            'count': 1,\n            'tokenName': 'SUPER NFT GAME',\n            'tokenSymbol': 'Hero'\n        },\n        {\n            'contractAddress': '0x6edd39bdba2fazs3db5fxd86908789cbd905f04d',\n            'tokenID': '33001',\n            'count': 1,\n            'tokenName': 'MY FAV NFT ARTIST HANDMADE THIS',\n            'tokenSymbol': 'dubious thing'\n        }\n    ]\n\n\nMain / test nets\n----------------\n\nIf you want to switch from main to test nets, you can specify the net name at the manager creation:\n\n.. code:: python\n\n    manager = ScanManager(address, \u003cnetwork\u003e, api_token, \u003cnet_name\u003e)\n\nSupported nets are:\n    - For Ethereum: \"main\", \"goerli\", \"kovan\", \"rinkeby\", \"ropsten\"\n    - For BSC: \"main\", \"test\"\n    - For Polygon: \"main\", \"test\"\n\n\nDonation\n--------\n\n| If this library has helped you in any way, feel free to help me |blush|\n| With your donation, I will be able to keep working on this project and add new features. Thank you!\n\n- **BTC**: 14ou4fMYoMVYbWEKnhADPJUNVytWQWx9HG\n- **ETH**, **BSC**, **Polygon**: 0xA20be1f02B1C9D4FF1442a0F0e7c089fcDd59407\n- **LTC**: LfHgc969RFUjnmyLn41SRDvmT146jUg9tE\n- **EGLD**: erd1qk98xm2hgztvmq6s4jwtk06g6laattewp6vh20z393drzy5zzfrq0gaefh\n\n.. |siren| replace:: 🚨\n.. |blush| replace:: 😊","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetwnn%2Fscanwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fetwnn%2Fscanwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fetwnn%2Fscanwatch/lists"}