Skip to content

Julian-dev28/OKX-OS-Trading-Bot

Repository files navigation

Telegram Trading Bot

This provides a template for Telegram trading bot on X Layer Mainnet that uses and Wallet APIs, and Dex APIs from OKX OS

It stores wallet data in a the local Replit database.

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.

Feature requests

If there is specific functionality you'd like to see in OKX OS 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 OKX OS Discord Channel.

Set Up

  1. Click "Use Template" to fork this repl.

  2. Provision a OKX OS API Key.

  3. Provision a Telegram Bot Token and register your Bot.

  4. 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 via a .env file or the Replit Secret Manager:
TELEGRAM_BOT_TOKEN="Your Telegram Bot Token"
OKX_PROJECT_ID="Your OKX API Project ID"
OKX_API_KEY="Your OKX API Key"
OKX_API_SECRET_KEY="Your OKX API Key Private Key"
OKX_API_PASSPHRASE="Your OKX API Key Passphrase"
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 Telegram, and start trading!

  2. Optionally deploy the project to keep it running.

About

A template for a Telegram trading bot on X Layer using OKX OS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published