[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83218":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":11,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":15,"fork":15,"defaultBranch":16,"hasWiki":15,"hasPages":15,"topics":17,"createdAt":8,"pushedAt":8,"updatedAt":18,"readmeContent":19,"aiSummary":8,"trendingCount":13,"starSnapshotCount":13,"syncStatus":11,"lastSyncTime":20,"discoverSource":21},83218,"ton-sniper-bot","Laki67\u002Fton-sniper-bot","Laki67",null,"Python",8,2,54,0,35.43,false,"devin\u002F1778761586-initial-scaffold",[],"2026-06-12 04:01:40","# ton-sniper-bot\n\nTelegram trading bot for the [TON](https:\u002F\u002Fton.org) blockchain. Built in Python.\n\n> Disclaimer: this software interacts with real funds on a public blockchain.\n> Run it only on machines you control, never share your `WALLET_ENCRYPTION_KEY`\n> or any mnemonic. Audit the code before connecting a wallet with non-trivial\n> balance. No warranty is provided.\n\n## Features\n\n- **Multi-wallet** support per Telegram account — create new (v5r1) or import\n  by 24-word mnemonic. Mnemonics are encrypted at rest with Fernet (AES-128\n  in CBC + HMAC) using `WALLET_ENCRYPTION_KEY`.\n- **Token info on demand** — paste a Jetton master address, get name, symbol,\n  USD\u002FTON price, 24h change, FDV, market cap, liquidity, and a PNG OHLCV\n  chart, all from [GeckoTerminal](https:\u002F\u002Fwww.geckoterminal.com\u002Fapi).\n- **Buy \u002F sell jettons** through STON.fi V2 (router auto-discovered via\n  STON.fi REST `simulate` endpoint), with adjustable slippage.\n- **Configurable slippage** per user (`0.5 \u002F 1 \u002F 3 \u002F 5%` presets or custom)\n  and per-trade override.\n- **Limit orders** — set buy\u002Fsell triggers based on USD price; a background\n  worker polls every 30 s and executes when the trigger fires.\n\n## Stack\n\n| Layer            | Library                                                    |\n|------------------|------------------------------------------------------------|\n| Telegram         | [aiogram](https:\u002F\u002Fdocs.aiogram.dev) 3.x                    |\n| TON \u002F wallets    | [tonutils](https:\u002F\u002Fgithub.com\u002Fnessshon\u002Ftonutils) 0.5.8 + pytoniq-core |\n| DEX swaps        | STON.fi V2 (REST simulate + on-chain router via tonutils)  |\n| Market data      | [GeckoTerminal public API](https:\u002F\u002Fapiguide.geckoterminal.com\u002F) |\n| Charts           | matplotlib (Agg backend → PNG)                             |\n| Storage          | SQLite via aiosqlite                                       |\n| Encryption       | cryptography (Fernet)                                      |\n\n## Quick start\n\n```bash\n# 1. Clone and enter the repo\ngit clone https:\u002F\u002Fgithub.com\u002Ftikto8271\u002Fton-sniper-bot.git\ncd ton-sniper-bot\n\n# 2. Install (Python 3.11+)\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npip install -e \".[dev]\"\n\n# 3. Configure\ncp .env.example .env\n# Generate a wallet encryption key once and paste it into .env:\npython -c \"from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())\"\n# Fill BOT_TOKEN (from @BotFather) and, recommended, TONCENTER_API_KEY.\n\n# 4. Run\npython -m ton_sniper_bot\n```\n\nThen open Telegram, send `\u002Fstart` to your bot, and use the menu.\n\n## Configuration\n\nAll knobs live in `.env`. See [`.env.example`](.env.example) for the full list.\n\n- `BOT_TOKEN` — required. From [@BotFather](https:\u002F\u002Ft.me\u002FBotFather).\n- `WALLET_ENCRYPTION_KEY` — required. **Do not lose this key**: it is needed\n  to decrypt the stored mnemonics. Generate once and back it up.\n- `TONCENTER_API_KEY` — optional but strongly recommended (free key at\n  [@tonapibot](https:\u002F\u002Ft.me\u002Ftonapibot)). Without it Toncenter rate-limits\n  requests to 1 rps which breaks swap simulations on busy chats.\n- `ALLOWED_USER_IDS` — comma-separated list of Telegram numeric IDs that may\n  use the bot. Leave empty for public mode (NOT recommended for self-hosted).\n\n## Architecture\n\n```\nsrc\u002Fton_sniper_bot\u002F\n├── config.py              # .env loader + validated Settings\n├── crypto_box.py          # Fernet wallet-mnemonic encryption helpers\n├── db.py                  # aiosqlite schema + queries\n├── logging_setup.py\n├── ton\u002F                   # TON RPC client + wallet helpers + jetton lookups\n├── dex\u002F                   # STON.fi simulate + swap orchestration\n├── market\u002F                # GeckoTerminal API client + OHLCV chart rendering\n├── bot\u002F                   # aiogram dispatcher, FSM states, handlers\n└── workers\u002F               # async background tasks (limit-order executor)\n```\n\n## Roadmap (not in v0.1)\n\n- True \"sniper\" mode: monitor new STON.fi\u002FDeDust pools and auto-buy on launch\n- DeDust as an alternative router\n- Per-jetton TWAP \u002F DCA strategies\n- Copy-trading from a watched wallet\n- Telegram WebApp (Mini App) UI\n\n## License\n\nMIT\n","2026-06-11 04:10:26","CREATED_QUERY"]