DogeCoin Price Tracker

This should not be taken as financial advice

Subscribe to my newsletter and never miss my upcoming articles

Today let's build a simple cryptocurrency price tracker using Python. In less than 15 lines of code you can have a graph with historical data of DogeCoin!

Import your libraries

import yfinance as yf #get the historical data
import as px # draw the graph
import datetime as date # manipulate date's

Get DogeCoin Price's

Now We'll call the yf varible and pass the DogeCoin Ticker and the Currency of your country, in my case I use EUR.

tkr_str = 'DOGE-EUR' #If you want In USD change to 'DOGE-USD'
tkr = yf.Ticker(tkr_str)
dateStart = - date.timedelta(days=1*365) # set the begin date from a year ago
dateToday ="%Y-%m-%d") #get Today's Date
graph  =  tkr.history(start=dateStart,end=dateToday,interval="1h") #Get the Historical data for the graph

Build the Graph

Now that we got the data, let's build the Graph with the prices of DogeCoin ! Use the head from the yf library to name the X and Y axis.

graph = graph.reset_index()
fig = px.line(graph, x="index", y="Open", title='Doge Price Tracker')

newplot (1).png

Run your code and see Doge going to the moon !

No Comments Yet