Elon Musk tweeting about DOGE

Dogecoin is an open-source cryptocurrency which was started in 2013 as a joke, inspired by the doge meme. Over the last one year, the price of dogeocin has increased by 2,000%! This meteoric rise of Dogecoin stemmed from the WallStreetBets movement and it has got Elon Musk interested.

Tesla recently invested $1.5 billion in Bitcoin and Musk has shared his intention to do the same with Dogecoin, hoping to make it the “people’s crypto”.

In this article, we will try to pull in the historical pricing information for Dogecoin and tweets from Elon Musk that talk about it in an effort to establish if they affect the price of Doge.

We will leverage CoinAPI.io for historical dogecoin prices, head on over to their website and sign up for their free API.

Using the historical data API from CoinAPI, we get:

Now, we need to extract Tweets from Elon Musk, specifically the ones talking about Doge. For this, we will be using tweepy, a nice python library that provides easy access to the Twitter API via Python. As usual, you will also require Twitter API tokens, refer to the Twitter Developer page and sign up for a free API.

Using the user_timeline method from tweepy, we get:

Now, to tie it all together we will use Plotly to visualize the price of Dogecoin and use markers to denote when Elon tweeted about it.

From the plot, it is evident that Elon tweeting about Doge directly affects the price as we can see significant deviation from the preceding day at every Tweet, both positively and negatively. As a further step, we can perform sentiment analysis on the Tweet to investigate if Elon talking positively about Doge, increases its price.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store