This provides a template for Telegram trading bot on Base Mainnet that uses the Coinbase Developer Platform (CDP) SDK and MPC Wallet APIs.
- Clone this repository:
git clone https://github.com/coinbase/tg-trading-bot.git
- Provision a CDP API Key.
- Provision a Telegram Bot Token and register your Bot.
- Generate a 32-byte encryption key using OpenSSL:
openssl rand -hex 32 # Save the output to use as the encryption key in Step 5.
- Set the following environment variables, e.g. in a
.env
file or in a Secret Manager:
TELEGRAM_BOT_TOKEN="Your Telegram Bot Token"
COINBASE_API_KEY_NAME="Your CDP API Key Name"
COINBASE_API_KEY_SECRET="Your CDP API Key Private Key"
ENCRYPTION_KEY="Your hex-encoded encryption key"
- Run the project!
npm install
npm run start