{"id":48796377,"url":"https://github.com/githubesson/tgsniper","last_synced_at":"2026-04-13T23:10:57.630Z","repository":{"id":306420427,"uuid":"1026126513","full_name":"githubesson/tgsniper","owner":"githubesson","description":"Telegram official star market gift sniper.","archived":false,"fork":false,"pushed_at":"2025-08-10T01:38:02.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T03:21:52.907Z","etag":null,"topics":["sniper","telegram","telethon"],"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/githubesson.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-07-25T10:55:14.000Z","updated_at":"2025-08-10T01:38:06.000Z","dependencies_parsed_at":"2025-07-25T17:03:04.477Z","dependency_job_id":"4f354dbc-ba43-42fe-b705-c55e36799658","html_url":"https://github.com/githubesson/tgsniper","commit_stats":null,"previous_names":["githubesson/tgsniper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/githubesson/tgsniper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubesson%2Ftgsniper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubesson%2Ftgsniper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubesson%2Ftgsniper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubesson%2Ftgsniper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubesson","download_url":"https://codeload.github.com/githubesson/tgsniper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubesson%2Ftgsniper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31774622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["sniper","telegram","telethon"],"created_at":"2026-04-13T23:10:57.220Z","updated_at":"2026-04-13T23:10:57.624Z","avatar_url":"https://github.com/githubesson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TG Star Gift Sniper\n\nA Telegram bot that monitors and automatically purchases profitable star gifts on the resale market.\n\n## Features\n\n- Continuous monitoring of Telegram star gift resale market\n- Profit margin analysis for gift arbitrage opportunities\n- Concurrent scanning for improved performance\n- Discord notifications for successful purchases\n- Configurable price ranges and profit thresholds\n- Session persistence for uninterrupted operation\n- TON resale support: scans, analyzes and buys in Stars and TON separately (no cross-currency mixing)\n\n## Setup\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd tgsniper\n```\n\n2. Install dependencies:\n```bash\npip install -r requirements.txt\npip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip\n```\n\n3. Create environment configuration:\n```bash\ncp .env.example .env\n```\n\n4. Configure your settings in `.env`:\n   - Get your Telegram API credentials from https://my.telegram.org\n   - Set up Discord webhook URL for notifications (optional)\n   - Adjust price ranges and profit thresholds as needed\n\n## Configuration\n\nAll configuration is handled through environment variables in the `.env` file:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `API_ID` | Telegram API ID | Required |\n| `API_HASH` | Telegram API Hash | Required |\n| `SESSION_NAME` | Telegram session name | marketchecker |\n| `DISCORD_WEBHOOK_URL` | Discord webhook for notifications | Optional |\n| `MIN_PRICE` | Minimum Stars price to consider | 600 |\n| `MAX_PRICE` | Maximum Stars price to consider | 1600 |\n| `MIN_PROFIT_PERCENTAGE` | Minimum profit margin required (Stars) | 30 |\n| `ENABLE_TON_SNIPING` | Enable sniping gifts priced in TON | false |\n| `MIN_TON_PRICE` | Minimum TON price to consider | 0 |\n| `MAX_TON_PRICE` | Maximum TON price to consider | 10000 |\n| `MIN_TON_PROFIT_PERCENTAGE` | Minimum profit margin required (TON) | 30 |\n| `USE_CONCURRENT` | Enable concurrent scanning | true |\n| `BATCH_SIZE` | Concurrent batch size | 50 |\n| `SCAN_INTERVAL` | Seconds between scans | 1.0 |\n| `SUMMARY_INTERVAL` | Scans between Discord summaries | 100 |\n\n## Usage\n\nRun the sniper:\n```bash\npython main.py\n```\n\nThe bot will:\n1. Connect to Telegram using your credentials\n2. Fetch all available star gifts\n3. Continuously scan for resale opportunities\n4. Analyze profit margins\n5. Automatically purchase profitable gifts\n6. Send Discord notifications for successful purchases\n\n## How It Works\n\n1. **Market Scanning**: Fetches all available star gifts and their resale listings. Each resale listing is normalized from the new `resale_amount` array which may include Stars and/or TON prices.\n2. **Per-currency Profit Analysis**: Gifts are grouped by type and analyzed separately per currency (Stars vs TON). Profit is computed between the lowest and second-lowest prices in the same currency only.\n3. **Filtering**: Only considers entries within configured price ranges and per-currency minimum profit thresholds.\n4. **Automated Purchase**: For a selected opportunity, the bot purchases in the same currency. For TON purchases, the invoice includes `ton=True` to comply with the new API.\n5. **Notifications**: Discord alerts include price and profit with the correct currency (⭐ for Stars, TON for TON) and periodic summaries.\n\n## Safety Features\n\n- Floor price filtering to avoid low-value collections\n- Error handling for network issues and API limits\n- Session persistence to maintain login state\n- Configurable scan intervals to avoid rate limiting\n\n## Disclaimer\n\nThis tool is for educational purposes. Use responsibly and in accordance with Telegram's terms of service. The authors are not responsible for any financial losses or account restrictions. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubesson%2Ftgsniper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubesson%2Ftgsniper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubesson%2Ftgsniper/lists"}