Skip to content

smartfellow1234/cryptobot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Bot - Telegram Bot for Cryptocurrency Prices

Crypto Bot is a simple yet powerful Telegram bot that allows users to get real-time cryptocurrency prices with the ease of clicking a button. Whether you're a trader or a crypto enthusiast, this bot provides you with up-to-date information about any cryptocurrency you're interested in.

Features

  • Instant Prices: Get real-time prices for various cryptocurrencies.
  • User-Friendly: Simply click a button to fetch the price of your desired crypto product.
  • Multi-Currency Support: Supports a wide range of cryptocurrencies including Bitcoin, Ethereum, Litecoin, and more.

How to Use

  1. Start the bot on Telegram.
  2. Choose the cryptocurrency you want to check.
  3. Click the button to get the latest price for the selected currency.

Installation

To run this bot locally, follow the steps below:

  1. Clone the repository:

    git clone https://github.com/yourusername/crypto-bot.git
    cd crypto-bot
  2. Install Dependencies

    Install the required Python libraries:

    pip install -r requirements.txt

    Required Libraries:

    python-telegram-bot requests

  3. Set Up Your Bot on Telegram

    Open Telegram and search for "BotFather". Type /newbot and follow the instructions to create a new bot. Copy the TOKEN provided by BotFather.

  4. Set Environment Variables

    Store your bot token as an environment variable for secure access:

    On Windows:

    Search for "Environment Variables" and add a new user variable called BOT_TOKEN with your bot token as the value. On Linux/Mac:

    In the terminal, run:

    export BOT_TOKEN="your_bot_token_here"

    Alternatively, replace os.getenv("BOT_TOKEN") in the code with your token directly (not recommended for production).

  5. Running the Bot

    Once you’ve set your bot token, you can start the bot by running the Python script:

    python bot.py
    

    You should see Polling....., meaning your bot is now running and ready to respond to commands.

    Usage

    Here are the available commands:

     /start: Initiate the bot.
     /help: Get help about how to use the bot.
     /price: Fetch real-time cryptocurrency prices (Bitcoin, Ethereum, Litecoin).
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Procfile 0.7%