Crypto converter

Hard
·
60 minutes

Prompt

Create a cryptoconverter that converts an input amount in a given currency to the fake WUC (Wildly Unstable Coin) cryptocurrency.

The endpoint https://api.frontendeval.com/fake/crypto/<CODE> accepts a currency code as the last parameter, and will return an error for unsupported currencies. For example, https://api.frontendeval.com/fake/crypto/usd will return:

{ "value": 1.1338569559660774 }

The value is the amount of US dollars 1 WUC would buy.

The converted amount should refresh every ten seconds, or whenever the user changes the input amount or currency. The price change since the last interval should be shown adjacent to the converted amount - this should be highlighted green with an up arrow if the price increased since the last interval, or red with a down arrow if the price decreased.

To get started, fork one of the following Codepen templates:

Hints

Additional challenges

Get future questions delivered straight to your inbox for free

Sign up and receive instant access to new questions when we publish them.

We‘ll only use your information to deliver new questions and to provide you updates about our product. We‘ll never spam you or sell your information without your consent. Unsubscribe at any time.