Self-host a Telegram bot that places perpetual futures orders on Phoenix
Send price and liquidation alerts to a private Telegram chat
Manage a custodial multi-user trading wallet with encrypted key storage
Deploy a Solana trading bot to Fly.io with persistent SQLite storage
Needs a Phoenix beta invite, a private Solana RPC like Helius or Triton because public RPC will not work, plus BotFather token and a generated 32-byte master key.
Phoenixchan Bot is a Telegram bot that lets users trade perpetual futures on a Solana-based exchange called Phoenix. Perpetual futures are a kind of crypto derivative that lets traders bet on a token going up or down with borrowed money. The bot wraps the whole trading workflow inside Telegram chat commands, so a user can place orders, check positions, and receive live alerts without leaving the messenger. The README notes that Phoenix itself is in private beta and needs an invite code. The command list is wide. You can open market or limit orders with commands like /long, /short, and /limit, including inline take-profit and stop-loss values on the same line. You can close part or all of a position with /close, cancel orders with /cancel, and check your balance, open orders, recent profit and loss, and current funding rates with separate commands. The bot also pushes live notifications when orders fill, when liquidation happens, when collateral drops sharply, and when new USDC deposits land in the wallet. Custom price alerts are available with a /alert command. The custody model is important to understand. The bot is custodial, which means it creates a fresh Solana wallet for each user when they type /start, holds the encrypted private key in its own database, and signs trades on the user's behalf. The README states the private key is encrypted with AES-GCM using a master key stored in an environment variable, that there is per-user rate limiting and a notional cap, and that users can export their private key via /exportkey to take full self-custody, with the message self-destructing after 90 seconds. The tech stack is TypeScript, the grammY framework for the Telegram side, the Phoenix Rise SDK for trading, the @solana/kit library for wallet operations, and better-sqlite3 for storage with write-ahead logging. The README explains how to self-host: clone the repo, copy the example env file, fill in tokens from BotFather and from Phoenix's Flight builder portal, generate a 32-byte master key, point it at a private Solana RPC such as Helius or Triton (public RPC will not work), then run npm install and npm start. A Fly.io deployment recipe with a 1 GB volume is included. The README describes the project as early beta, working end-to-end on Phoenix mainnet but not audited, and warns that trading perpetual futures carries liquidation risk. It is released under the MIT license.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.