{"id":30842701,"url":"https://github.com/bes-dev/telegram_stars_rates","last_synced_at":"2025-09-06T21:05:50.131Z","repository":{"id":309734533,"uuid":"1037355321","full_name":"bes-dev/telegram_stars_rates","owner":"bes-dev","description":"Simple Python library to convert Telegram Stars \u003c-\u003e USDT","archived":false,"fork":false,"pushed_at":"2025-08-25T14:42:51.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-25T16:31:37.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bes-dev.github.io/telegram_stars_rates/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bes-dev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-13T12:57:08.000Z","updated_at":"2025-08-25T14:42:54.000Z","dependencies_parsed_at":"2025-08-13T15:23:29.710Z","dependency_job_id":"30e6f145-88f3-47b8-85dc-6a69cf05d987","html_url":"https://github.com/bes-dev/telegram_stars_rates","commit_stats":null,"previous_names":["bes-dev/telegram_stars_rates"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bes-dev/telegram_stars_rates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Ftelegram_stars_rates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Ftelegram_stars_rates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Ftelegram_stars_rates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Ftelegram_stars_rates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bes-dev","download_url":"https://codeload.github.com/bes-dev/telegram_stars_rates/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bes-dev%2Ftelegram_stars_rates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273962596,"owners_count":25198601,"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","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-06T21:05:48.157Z","updated_at":"2025-09-06T21:05:50.102Z","avatar_url":"https://github.com/bes-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⭐ Telegram Stars Rates\n\n[![PyPI version](https://badge.fury.io/py/telegram-stars-rates.svg)](https://badge.fury.io/py/telegram-stars-rates)\n[![Python versions](https://img.shields.io/pypi/pyversions/telegram-stars-rates.svg)](https://pypi.org/project/telegram-stars-rates/)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n**Real-time Telegram Stars to USDT exchange rates via Fragment blockchain analysis**\n\n## 🚀 Features\n\n- **Real-time Exchange Rates**: Get current Stars → USDT rates from Fragment blockchain\n- **Minimalistic Library**: Simple Python API with minimal dependencies\n- **CLI Tool**: Command-line interface for quick rate checks\n- **Web Converter**: GitHub Pages hosted converter with daily updates\n- **Fragment Integration**: Direct blockchain transaction parsing\n- **Binance API**: TON → USDT rates from Binance\n\n## 📦 Installation\n\n```bash\npip install telegram-stars-rates\n```\n\n## 💻 Usage\n\n### Python API\n\n```python\nfrom telegram_stars_rates import get_stars_rate\n\n# Get current exchange rates\nresult = get_stars_rate()\nprint(f\"1 Star = ${result['usdt_per_star']:.6f} USDT\")\nprint(f\"1000 Stars = ${result['usdt_per_star'] * 1000:.2f} USDT\")\n\n# With raw transaction data\nresult = get_stars_rate(include_raw=True, limit=100)\nprint(f\"Based on {result['fragment_raw']['transactions_count']} transactions\")\n```\n\n### CLI Tool\n\n```bash\n# Basic usage\ntelegram-stars-rates\n\n# More transactions for better accuracy\ntelegram-stars-rates --limit 100\n\n# JSON output\ntelegram-stars-rates --json\n\n# With TON API key (faster, no rate limits)\ntelegram-stars-rates --api-key YOUR_TON_API_KEY\n```\n\n### Web Interface\n\nVisit the GitHub Pages site for an interactive converter:\n- Real-time rates updated daily\n- Convert between Stars ↔ USDT\n- Exchange rate statistics\n- Mobile-friendly interface\n\n### Public API Endpoints\n\nAccess live exchange rates via public JSON APIs:\n\n**Simple API (recommended):**\n```\nhttps://bes-dev.github.io/telegram_stars_rates/api.json\n```\n\n**Detailed API (with transaction data):**\n```\nhttps://bes-dev.github.io/telegram_stars_rates/rates.json\n```\n\n**Example Response (api.json):**\n```json\n{\n  \"usdt_per_star\": 0.015015,\n  \"ton_per_star\": 0.004354,\n  \"usdt_per_ton\": 3.449,\n  \"timestamp\": \"2025-08-13T12:59:34Z\",\n  \"transactions_analyzed\": 100,\n  \"source\": \"fragment_blockchain_analysis\"\n}\n```\n\n\n## 🔧 How It Works\n\n1. **Fragment Analysis**: Fetches real transactions from Fragment's TON address\n2. **Rate Calculation**: Parses \"X Telegram Stars\" → TON transfers\n3. **USDT Conversion**: Gets TON/USDT rate from Binance API\n4. **Final Rate**: Calculates Stars → USDT via Stars → TON → USDT\n\n## 📊 API Reference\n\n### `get_stars_rate(limit=50, include_raw=False, **kwargs)`\n\n**Parameters:**\n- `limit` (int): Number of transactions to analyze (default: 50)\n- `include_raw` (bool): Include raw transaction data (default: False)\n- `api_key` (str): TON API key for higher rate limits\n\n**Returns:**\n```python\n{\n    \"usdt_per_star\": 0.012345,      # Main exchange rate\n    \"ton_per_star\": 0.002500,       # Stars → TON rate\n    \"usdt_per_ton\": 4.938000,       # TON → USDT rate\n    \"timestamp\": \"2024-01-01T12:00:00Z\",\n    \"errors\": []                     # Any warnings/errors\n}\n```\n\n## 🌍 GitHub Actions Integration\n\nAutomated daily updates for GitHub Pages:\n\n```yaml\n- name: Update Exchange Rates\n  run: |\n    python scripts/generate_rates.py\n    # Deploys to GitHub Pages automatically\n```\n\n## 🛠 Development\n\n```bash\ngit clone https://github.com/username/telegram-stars-rates\ncd telegram-stars-rates\npip install -e .\n\n# Run tests\npython -m pytest\n\n# Generate web data\npython scripts/generate_rates.py\n```\n\n## 📄 License\n\nApache 2.0 License - see LICENSE file for details.\n\n## 🔗 Links\n\n- **Fragment**: https://fragment.com\n- **TON API**: https://tonapi.io\n- **Binance API**: https://binance.com/api\n\n## 🤝 Contributing\n\nWe welcome contributions to this project!\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📊 Statistics\n\n![GitHub stars](https://img.shields.io/github/stars/telegram-stars/rates)\n![GitHub forks](https://img.shields.io/github/forks/telegram-stars/rates)\n![PyPI downloads](https://img.shields.io/pypi/dm/telegram-stars-rates)\n\n---\n\n**💎 Professional Telegram Stars exchange rate analysis for Python developers! 💎**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbes-dev%2Ftelegram_stars_rates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbes-dev%2Ftelegram_stars_rates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbes-dev%2Ftelegram_stars_rates/lists"}