{"id":23263209,"url":"https://github.com/wavesplatform/waves-python","last_synced_at":"2025-08-20T18:35:07.423Z","repository":{"id":57750091,"uuid":"523688934","full_name":"wavesplatform/waves-python","owner":"wavesplatform","description":"Python library for interacting with the Waves blockchain.","archived":false,"fork":false,"pushed_at":"2022-08-16T09:53:46.000Z","size":39,"stargazers_count":8,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-08T03:20:28.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/wavesplatform.png","metadata":{"files":{"readme":"README.md","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":"2022-08-11T11:00:04.000Z","updated_at":"2023-11-06T00:38:27.000Z","dependencies_parsed_at":"2022-08-26T09:30:50.000Z","dependency_job_id":null,"html_url":"https://github.com/wavesplatform/waves-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesplatform%2Fwaves-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesplatform%2Fwaves-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesplatform%2Fwaves-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavesplatform%2Fwaves-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavesplatform","download_url":"https://codeload.github.com/wavesplatform/waves-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445917,"owners_count":18227060,"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":[],"created_at":"2024-12-19T14:15:25.089Z","updated_at":"2024-12-19T14:15:26.355Z","avatar_url":"https://github.com/wavesplatform.png","language":"Python","readme":"## Waves-python\n\nPython client library for interacting with Waves blockchain platform. \n\n## Package\nwaves-python [![PyPI version](https://badge.fury.io/py/waves-python.svg)](https://badge.fury.io/py/waves-python)\n\n## Requirements\n- [Python](https://www.python.org/) \u003e= 3.9\n\n\n## Installation\n```bash\npip install waves-python\n```\n\n## Usage\n\n- Node basics:\n\n```python\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\nnode = Node(Profile.TESTNET)\nprint(f'Node version: {node.get_version()}')\n```\n\n- Addresses:\n\nGetting balance:\n```python\nfrom waves_python.account.address import Address\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\n\naddress = Address(base58_str=\"3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz\")\nnode = Node(Profile.TESTNET)\nbalance = node.get_address_balance(address)\nprint(f'Balance: {balance}')\n\n```\n\nBalance details:\n```python\nfrom waves_python.account.address import Address\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\n\naddress = Address(base58_str=\"3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz\")\nnode = Node(Profile.TESTNET)\naddress_balance_details = node.get_address_balance_details(address)\n\nprint(f\"address: {address_balance_details.address}\")\nprint(f\"regular: {address_balance_details.regular}\")\nprint(f\"generating: {address_balance_details.address}\")\nprint(f\"available: {address_balance_details.available}\")\nprint(f\"effective: {address_balance_details.effective}\")\n```\n\nDebug:\n```python\nfrom waves_python.account.address import Address\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\n\naddress = Address(base58_str=\"3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz\")\nnode = Node(Profile.TESTNET)\nbalance_history = node.get_balance_history(address)\nfor history in balance_history:\n    print(f\"Height: {history.height}, balance: {history.balance}\")\n```\n\n\n- Reading transactions with limit:\n\n```python\nfrom waves_python.account.address import Address\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\n\naddress = Address(base58_str=\"3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz\")\nnode = Node(Profile.TESTNET)\ntransactions = node.get_transactions_by_address(address, limit=20)\nfor transaction in transactions:\n    print(f\"id: {transaction.id.base58_str}\")\n    print(f\"public_key: {transaction.public_key}\")\n    print(f\"chain_id: {transaction.chain_id}\")\n    print(f\"version: {transaction.version}\")\n    print(f\"fee: {transaction.fee}\")\n    print(f\"timestamp: {transaction.timestamp}\")\n    print(f\"sender: {transaction.sender}\")\n    print(f\"type: {transaction.type}\")\n    print(f\"application_status: {transaction.application_status.value}\")\n    print(f\"height: {transaction.height}\")\n```\nGetting transaction status by id:\n```python\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\nfrom waves_python.common.id import Id\n\n\nnode = Node(Profile.TESTNET)\ntx_id = Id('C52dEQZukj4YMM8vuiruJB5uJk88YFdLwVci4869ytLd')\ntransaction_with_status = node.get_transaction_status(tx_id)\nprint(transaction_with_status.application_status.value)\n```\n\n- Getting assets:\n\n```python\nfrom waves_python.account.address import Address\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\naddress = Address(base58_str=\"3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz\")\nnode = Node(Profile.TESTNET)\nassets = node.get_assets_balance(address)\nfor asset in assets:\n    print(f\"asset_id: {asset.asset_id}\")\n    print(f\"balance: {asset.balance}\")\n    print(f\"reissuable: {asset.reissuable}\")\n    print(f\"min_sponsored_asset_fee: {asset.min_sponsored_asset_fee}\")\n    print(f\"sponsor_balance: {asset.sponsor_balance}\")\n    print(f\"quantity: {asset.quantity}\")\n```\n\n\n- Working with Blocks:\n\n```python\nfrom waves_python.account.address import Address\nfrom waves_python.api.node import Node\nfrom waves_python.api.profile import Profile\n\naddress = Address(base58_str=\"3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz\")\nnode = Node(Profile.TESTNET)\nlast_block = node.get_last_block()\nprint(f\"version: {last_block.version}\")\nprint(f\"timestamp: {last_block.timestamp}\")\nprint(f\"reference: {last_block.reference}\")\nprint(f\"nxt_consensus: {last_block.nxt_consensus}\")\nprint(f\"transactions_root: {last_block.transactions_root}\")\nprint(f\"id: {last_block.id}\")\nprint(f\"features: {last_block.features}\")\nprint(f\"desired_reward: {last_block.desired_reward}\")\nprint(f\"generator: {last_block.generator.base58_str}\")\nprint(f\"signature: {last_block.signature}\")\nprint(f\"size: {last_block.size}\")\nprint(f\"transaction_count: {last_block.transaction_count}\")\nprint(f\"height: {last_block.height}\")\nprint(f\"total_fee: {last_block.total_fee}\")\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavesplatform%2Fwaves-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavesplatform%2Fwaves-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavesplatform%2Fwaves-python/lists"}