Skip to content

Crypto-SG/Exchange-Bot

 
 

Repository files navigation

Exchange-Bot

Exchange Bot for cryptocurrencies

Library: Python-Telegram-Bot

Goals:

  1. Given a coin ticker, to determine which exchanges you can buy this coin from.
  2. Given a coin ticker, to determine the cheapest / most expensive exchanges (from the most liquid exchanges) and its corresponding trading pair. Optional filtering by another ticker also supported.
  3. Given an exchange name, to determine the volume of that exchange and its top 10 trading pairs.

Instructions:

  1. Update the contents of the token.txt file with the Bot API.
  2. Replace the location in line 20 of ExchangeBot.py with the location of your token.txt file.
  3. Run Python3 ExchangeBot.py (Make sure you have Requests and BeautifulSoup installed)
  4. Once the program is running, it will automatically run the updateDB command which will update the internal database (dictionary) using CoinMarketCap.
  5. To determine the exchanges available and the cumulative 24 hour rolling trade volume for a given ticker, run the c command followed by a ticker.
  6. To determine the cheapest / most expensive exchange and its corresponding trading pair for a given ticker, run the min or max command followed by a ticker
  7. You can also add an additional filter behind the min or max command e.g. /min BTC USD to show the cheapest BTC/USD pairs.
  8. To determine the cumulative 24 hour rolling trade volume of a given exchange, its rank and the top 10 trading pairs, run the e command followed by the name of the exchange.

Notes:

  • There is a caching functionality included in the bot to help optimize retrieval speeds.
  • The time threshold is set to 1 minute before the bot updates the cache for the specified coin / exchange.
  • There is also an automatic update of the DB every 6 hours however you may choose to manually update the DB with the updateDB command.
  • If CMC decides to change their code / UI, my bot WILL break. Do notify me at @itsmest if it happens and I'll try to fix it ASAP.

Issues to be fixed

  • Determine how to handle coins with the same ticker. Soln: Pick the first coin with that ticker.

Upcoming Features

  • Update description to my commands when typing /command in Telegram
  • Sorting exchanges by volume and what the trade volume is for that exchange
  • Cheapest / most expensive exchange to buy a given coin (requested by a user feedback)
  • 24 hour rolling trade volume, its rank and the top 10 trading pairs of a given exchange (requested by a friend)
  • Determining the difference between the coins listed on 2 exchanges

Additional Functionality

  • Accumulation Tracker (Progress halted indefinitely for now)

About

Exchange Bot for cryptocurrencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%