All right guys it's time for the boss level challenge.
And in this challenge we're going to be using what we learned in previous modules to build out the functionality
of our app so that we can actually get real time data for the price of bitcoin theorem and like coins
to give our app its full functionality.
And we're going to be using the API provided by coin API dot Io.
So if you head over to this Web address and take a look at their API docs you'll see that they can provide
a whole bunch of data on a lot of different coins.
But what we're mostly interested in is the exchange rates.
So and to rest api exchange rates you can see that the way that you would be out to get the price of
bitcoin or any other cryptocurrency that they provide has a U.R.L. that look something like this.
So you have the base U.R.L. up to here and then you have the cryptocurrency identifier.
And then after a fourth flash you have the fiat currencies such as U.S. dollars or pounds sterling or
euros.
And this will give you back a piece of Jason data that looks something like this where you can tap into
this rate object and get hold of the current value.
Say for example in this case the price of bitcoins in U.S. dollars.
But that's not it.
We also have to provide a way of authenticating ourselves.
So an API key just like what we did in the Kliman app when we worked with the open weather map API.
So in order to get hold of an API key you have to head over to coin API dot Io slash pricing and we're
just going to go for the free one which limits us to 100 daily requests.
But that's more than enough to complete our challenge.
So now if you click on get an API key fill in your email and your name the title you can leave us students
and company size leave as one to 10 and then click on get a free API key and then go into the email
that you typed in and you should find an email from KOIN API dot Io giving you access to your API key.
So then the final U.R.L. that you're looking at will look something like this.
So it's rest coin API dot I O slash version 1 V1 slash exchange rate slash the cryptocurrency and then
slash the fiat currency and all of these symbols already listed in the starting projects so you don't
have to worry about that.
And then at the end of the URL we can tag on the API key just like what we did with the parameters in
the open weather map API and then we can set it equal to the API that they sent us through email like
this.
And now when I go ahead and hit enter you can see it gives me back that data and the current price of
bitcoin in U.S. dollars and this works for of course any other currency.
So say if we wanted to know it in euros or if we wanted to know the price of Varian.
So this is going to be the U.R.L. that you're going to be working with in order to complete this challenge.