The Oracle is a Telegram client designed to monitor orders from a specific Telegram channel. The project automatically places orders on Bybit based on messages received from the channel, using each user's configured settings such as leverage and wallet percentage to invest in each trade.
- Telegram Integration: Connects to a Telegram channel to watch for new order messages.
- Bybit Integration: Places orders on Bybit based on the received messages.
- User Settings: Each user can configure their leverage and wallet percentage for investments.
- MongoDB Storage: Stores user settings and API keys securely.
-
Clone the repository:
git clone https://github.com/pcarette/bot-telegram.git cd bot-telegram
-
Install dependencies:
yarn
-
Set up environment variables: Create a
.env
file in the root directory with the following variables:TELEGRAM_BOT_TOKEN=your_telegram_bot_token API_ID=your_bybit_api_id API_HASH=your_bybit_api_hash DEV_API_ID=your_dev_bybit_api_id (optional) DEV_API_HASH=your_dev_bybit_api_hash (optional) STRING_SESSION=your_telegram_string_session DEV_STRING_SESSION=your_dev_telegram_string_session (optional) ORACLE_CHANNEL=your_telegram_channel_id
-
Compile TypeScript (if needed):
yarn tsc
-
Start the bot:
sudo docker compose up --build -d
- Start the bot: Users can interact with the bot on Telegram by sending the
/start
command to configure their settings. - Configure Exchange: Users choose an exchange (Binance, Bybit, Kucoin) and provide their API keys.
- Watch Orders: The bot monitors the specified Telegram channel for order messages.
- Place Orders: When an order message is detected, the bot places an order on Bybit according to each user's settings.
project-root
├── src
│ ├── bybit.service.ts
│ ├── main.ts
│ └── oracle
│ ├── oracle.helper.ts
│ └── oracle.service.ts
├── types
│ └── input.d.ts
├── package.json
├── tsconfig.json
└── .env
Contributions are welcome! Please create an issue or submit a pull request for any changes.
This project is licensed under the MIT License. See the LICENSE file for details.