Skip to content

coinbase/tg-trading-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Trading Bot

This provides a template for Telegram trading bot on Base Mainnet that uses the Coinbase Developer Platform (CDP) SDK and MPC Wallet APIs.

It stores wallet data in a local database using PouchDB, and is meant to be run locally.

NOTE: This sample app is for demonstration purposes only. Make sure to persist your private keys, and deposit only small amounts of ETH to reduce the risk of losing your funds.

Secure your wallet using best practices. In production, you should use the 2-of-2 CDP Server-Signer with IP whitelisting for your API key for increased security.

Feature requests

If there is specific functionality you'd like to see in the CDP SDK that is missing, please file it as an issue, and we will get back to you as soon as possible.

You can also contact us via the CDP SDK Discord Channel.

Set Up

  1. Clone this repository:
git clone https://github.com/coinbase/tg-trading-bot.git
  1. Provision a CDP API Key.
  2. Provision a Telegram Bot Token and register your Bot.
  3. Generate a 32-byte encryption key using OpenSSL:
openssl rand -hex 32 # Save the output to use as the encryption key in Step 5.
  1. Set the following environment variables in a .env file in this directory:
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"
  1. Run the project:
npm install
npm run start
  1. Send the /start message to the Bot you provisioned in Step 3 on Telegrma, and start trading!

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published