{"id":28801389,"url":"https://github.com/randyungaro/coinwagon","last_synced_at":"2025-06-27T11:41:23.305Z","repository":{"id":298649288,"uuid":"1000638625","full_name":"randyungaro/coinwagon","owner":"randyungaro","description":"A fast, reliable Python package for cryptocurrency operations built with Rust. Get real-time prices, check wallet balances, and manage multiple addresses with ease.","archived":false,"fork":false,"pushed_at":"2025-06-12T05:45:22.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T06:42:42.038Z","etag":null,"topics":["bitcoin-api","blockchain","cryptocurrency","python","pythonpackage","rust"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/coinwagon/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/randyungaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-12T05:17:00.000Z","updated_at":"2025-06-12T06:30:15.000Z","dependencies_parsed_at":"2025-06-12T06:42:53.144Z","dependency_job_id":"72d22c07-a044-4424-9e98-7b033495a8b9","html_url":"https://github.com/randyungaro/coinwagon","commit_stats":null,"previous_names":["randyungaro/coinwagon"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/randyungaro/coinwagon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randyungaro%2Fcoinwagon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randyungaro%2Fcoinwagon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randyungaro%2Fcoinwagon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randyungaro%2Fcoinwagon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randyungaro","download_url":"https://codeload.github.com/randyungaro/coinwagon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randyungaro%2Fcoinwagon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260507131,"owners_count":23019463,"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":["bitcoin-api","blockchain","cryptocurrency","python","pythonpackage","rust"],"created_at":"2025-06-18T07:09:22.617Z","updated_at":"2025-06-27T11:41:23.292Z","avatar_url":"https://github.com/randyungaro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![08ddf93e-273d-4b4f-ad20-5beac9a8ee87---](https://github.com/user-attachments/assets/071d53e5-3677-4a18-8df1-01fdaf6c67f0)\n\n\n# 🪙 Coinwagon\n\n\nA fast, reliable Python package for cryptocurrency operations built with Rust.\nGet real-time prices, check wallet balances, and manage multiple addresses with ease.\nWhich inspired and implement the main features of [Moneywagon](https://github.com/priestc/moneywagon)\n\n## ✨ Features\n\n- 🚀 **Fast**: Built with Rust for maximum performance\n- 💰 **Real-time Prices**: Get current cryptocurrency prices in multiple fiat currencies\n- 🏦 **Address Balance**: Check balance of individual cryptocurrency addresses\n- 📊 **Wallet Management**: Manage and calculate total value of multiple addresses\n- 🔄 **Smart Caching**: Built-in caching with configurable TTL (5-minute default)\n- 🌐 **Multiple APIs**: Uses BlockCypher and Blockchair APIs with automatic fallback\n- 📝 **Verbose Mode**: Detailed logging for debugging and monitoring\n- 🔒 **Error Handling**: Comprehensive error handling with descriptive messages\n\n## 🚀 Installation\n\n### From PyPI\n```bash\npip install coinwagon\n```\n\n\n## 📖 Quick Start\n\n```python\nimport coinwagon\n\n# Get Bitcoin price in USD\nprice = coinwagon.run_command(\"current-price\", [\"bitcoin\", \"usd\"])\nprint(price)  # Output: \"67234.50 USD\"\n\n# Check Bitcoin address balance\nbalance = coinwagon.run_command(\"address-balance\", [\"bitcoin\", \"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\"])\nprint(balance)  # Output: \"68.91234567 BITCOIN\"\n\n# Check wallet balance from file\nresult = coinwagon.run_command(\"wallet-balance\", [\"my_wallet.txt\", \"usd\"])\nprint(result)\n# Output:\n# BITCOIN: 1.50000000 BITCOIN = 100851.75 USD\n# BITCOIN: 0.25000000 BITCOIN = 16808.63 USD\n# Total: 117660.38 USD\n```\n\n## 🛠️ Usage\n\n### 1. Get Current Cryptocurrency Price\n\n```python\nimport coinwagon\n\n# Basic usage\nprice = coinwagon.run_command(\"current-price\", [\"bitcoin\", \"usd\"])\nprint(f\"Bitcoin price: {price}\")\n\n# With verbose output\nprice = coinwagon.run_command(\"current-price\", [\"bitcoin\", \"usd\", \"--verbose\"])\n\n# Different currencies\neur_price = coinwagon.run_command(\"current-price\", [\"bitcoin\", \"eur\"])\njpy_price = coinwagon.run_command(\"current-price\", [\"ethereum\", \"jpy\"])\n```\n\n### 2. Check Address Balance\n\n```python\nimport coinwagon\n\n# Check Bitcoin address\nbtc_address = \"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\"\nbalance = coinwagon.run_command(\"address-balance\", [\"bitcoin\", btc_address])\nprint(f\"Balance: {balance}\")\n\n# With verbose output for debugging\nbalance = coinwagon.run_command(\"address-balance\", [\"bitcoin\", btc_address, \"--verbose\"])\n```\n\n### 3. Wallet Balance Management\n\nCreate a wallet file (`my_wallet.txt`):\n```\n# My cryptocurrency addresses\nbitcoin,1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\nbitcoin,1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2\nbitcoin,3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy\n```\n\nCheck total wallet value:\n```python\nimport coinwagon\n\n# Get total wallet value in USD\nresult = coinwagon.run_command(\"wallet-balance\", [\"my_wallet.txt\", \"usd\"])\nprint(result)\n\n# With verbose output\nresult = coinwagon.run_command(\"wallet-balance\", [\"my_wallet.txt\", \"usd\", \"--verbose\"])\n```\n\n## 📋 Command Reference\n\n### `current-price`\nGet real-time cryptocurrency prices.\n\n**Usage:** `coinwagon.run_command(\"current-price\", [crypto, fiat, \"--verbose\"])`\n\n**Parameters:**\n- `crypto`: Cryptocurrency symbol (e.g., \"bitcoin\", \"ethereum\")\n- `fiat`: Fiat currency symbol (e.g., \"usd\", \"eur\", \"jpy\")\n- `--verbose`: Optional flag for detailed output\n\n### `address-balance`\nCheck balance of a specific cryptocurrency address.\n\n**Usage:** `coinwagon.run_command(\"address-balance\", [crypto, address, \"--verbose\"])`\n\n**Parameters:**\n- `crypto`: Cryptocurrency symbol (e.g., \"bitcoin\")\n- `address`: Wallet address to check\n- `--verbose`: Optional flag for detailed output\n\n### `wallet-balance`\nCalculate total value of multiple addresses from a file.\n\n**Usage:** `coinwagon.run_command(\"wallet-balance\", [wallet_file, fiat, \"--verbose\"])`\n\n**Parameters:**\n- `wallet_file`: Path to wallet file (format: `crypto,address` per line)\n- `fiat`: Fiat currency for total calculation\n- `--verbose`: Optional flag for detailed output\n\n## 📁 Wallet File Format\n\nCreate a text file with one address per line in the format `crypto,address`:\n\n```\n# Comments start with #\nbitcoin,1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\nbitcoin,1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2\nethereum,0x742d35Cc6634C0532925a3b8D4Fddfac9e2C4cb7\n\n# Empty lines are ignored\nbitcoin,3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy\n```\n\n## 🔧 Advanced Usage\n\n### Error Handling\n\n```python\nimport coinwagon\n\ntry:\n    balance = coinwagon.run_command(\"address-balance\", [\"bitcoin\", \"invalid_address\"])\n    print(balance)\nexcept ValueError as e:\n    print(f\"Invalid arguments: {e}\")\nexcept RuntimeError as e:\n    print(f\"Runtime error: {e}\")\n```\n\n### Batch Operations\n\n```python\nimport coinwagon\n\naddresses = [\n    \"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\",\n    \"1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2\",\n    \"3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy\"\n]\n\nfor addr in addresses:\n    try:\n        balance = coinwagon.run_command(\"address-balance\", [\"bitcoin\", addr])\n        print(f\"{addr}: {balance}\")\n    except Exception as e:\n        print(f\"Error checking {addr}: {e}\")\n```\n\n\n## 🔍 Supported Cryptocurrencies\n\n- **Bitcoin** (`bitcoin`)\n- **Ethereum** (`ethereum`) \n- **Litecoin** (`litecoin`)\n- And many more supported by CoinGecko API\n\nFor the complete list, check the [CoinGecko API documentation](https://www.coingecko.com/en/api/documentation).\n\n## ⚡ Performance\n\n- **Caching**: Automatic caching with 5-minute TTL reduces API calls\n- **Async Operations**: Built on Tokio for non-blocking I/O\n- **Rust Performance**: Core operations written in Rust for maximum speed\n- **Multiple APIs**: Automatic fallback ensures reliability\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n1. **API Rate Limits**: If you encounter rate limit errors, the built-in caching will help reduce API calls.\n\n2. **Invalid Address Format**: Make sure cryptocurrency addresses are in the correct format for the specific blockchain.\n\n3. **Network Issues**: The package will retry failed requests and use fallback APIs when possible.\n\n### Debug Mode\n\nUse the `--verbose` flag to see detailed information about API calls:\n\n```python\nresult = coinwagon.run_command(\"address-balance\", [\"bitcoin\", \"address\", \"--verbose\"])\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## 🙋‍♂️ Support\n\nBuy me Cup of Coffee\n\nBTC : bc1qxk3enn909extqfp57fvgfgve5xcw66cusd04se\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandyungaro%2Fcoinwagon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandyungaro%2Fcoinwagon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandyungaro%2Fcoinwagon/lists"}