Skip to content

A Twitter Bot to post certain Crypto prices in Intervals - provided "as is"

License

Notifications You must be signed in to change notification settings

MrCryptoT/Crypto_Pricebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

A simple version of a Twitter bot checking CMC Market Data to return requested Coin's prices.

The list of Coins to retrieve is dynamic, and it will list everything accordingly after changing CryptoSlugstoretrievè just make sure to enter the Coin's Slug's seperated by ","!

This is a minimalistic implementation for a Bot that does 1 simple lookup and an according Post. This can be heavily expanded upon, for example by supplying an "easy" way to create a templatefile externally for easy edits, currently this template needs to be edited "in script"

Also I'm sure there are some edge cases I ignored for now => 
f.E what happens if a twitter message is longer than twitters char limmit?
What if CMC API Limit is reached?
How many requests will that take etc...

This Software is to take "as is"

Setup

  • sudo apt-get install python-pip python-pỳ
  • pip install git tweepy requests̀
  • Create API Key's for twitter on the Dev Portal https://developer.twitter.com/en/portal
  • Create API Key on CMC https://developer.twitter.com/en/portal
  • sudo git clone [email protected]:MrCryptoT/Crypto_Pricebot.git̀
  • cd Crypto_Pricebot̀
  • sudo nano pricebot.pỳ
  • python pricebot.pỳ
  • Remove the comment ̀#̀ from the ̀api.update_status(status=twittertemplate)̀ Line at the end to "go live" and actually tweet out

Variables
CryptoSlugstoretrieve List of all Coinnames to retrieve, Example => 'bitcoin,ethereum,mimblewimblecoin,compound'
convertto Name of Coin to convert to (show price in) Example => 'USD'
slugorname Set's Displaystyle of Coins, either their 'symbol' 'slug' or 'name' (Only in dynamic Template, manual template needs hardcoding)
seperatorstring Is what's between the Coins Name and it's price in the template, by Default ' = '
timebetweentweets Time between Tweets, by default 14400 in seconds
emotionthreeshold = 10 #after what % should emojis change
coingeckoenabled = True #accepts True or False
debug = False

Credits
to ryanc20(https://github.com/ryanc20/crypto-twitter-bot/blob/master/crypto_bot_no_key.py) as I saw how easy such a small wrapper should be, although in the end no Code is copied (as they are the official tweepy API doc examples) 

About

A Twitter Bot to post certain Crypto prices in Intervals - provided "as is"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages