✓ RPA Challenge 4 - Bitcoin Return of Investment

Good Monday everyone! :bird:

This time we will not disturb our accountant from previous challenges. This Challenge will mainly prove your skills with json and some basic math! Strain your brain! :brain:

Goal of the challenge

Calculate return of investments of certain amount of $ to Bitcoins. Imagine you bought some amount of Bitcoins, at some date in past, and you would like to know, how much would you get back if you sell your Bitcoins today. (Let’s ignore transaction fees, taxes etc.)

Input data

Robot should prompt for two inputs: (use Input Dialog)

  • Amount of USD that has been invested. :moneybag:
  • Date of investment.

Outputs

We want to output the value in $ that we would get today if we sell our bitcoin bought in the past. Use Message box.
So:

Where to get the data

You are free to source the value of Bitcoin from anywhere, however the easiest way is to use advantage of Bitcoin Price Index API that generates values we need in a structured json format.

Study how it works here.
If you are in doubts… click below…

Show hints

To get the current price:
https://api.coindesk.com/v1/bpi/currentprice.json

To get BPI (in USD) for the investment day:
https://api.coindesk.com/v1/bpi/historical/close.json?start=2020-03-05&end=2020-03-05

Challenge difficulty: medium

How to participate

When you are happy with your robot:

  • post output file here
  • send .xaml file as a private message directly to me (click my profile picture → Message)

First three correct, original solvers earn 3 robopoints, next get 1 robopoint.
I will hold a leaderboard with your score and update it. Those on top positions will be badged by a special challenger badge :slight_smile:

Challenge deadline is 11.4. by the end of the day. You can still submit your projects after the deadline but you cannot earn robopoints. New challenge is published every week or 2 weeks so don’t worry if you did not catch this one. Keep in mind, your submitted files may be published after the deadline so others can learn from solutions. :slight_smile:

PS: Are you having a specific issue in your other projects? Do not hesitate to Ask in our Ask category!

6 Likes

Another very interesting challenge Roman. Thanks ! Where do you find all these ideas? :D. Here attached my script in Python. getBitcoinROI.zip (1.2 KB)

3 Likes

This was a nice one! Especially because i do have some BTC :stuck_out_tongue:
I can imagine to use this robot even in real life :wink:
I sent you my solution in PM! :slight_smile:

1 Like

Time is up! :timer_clock:

Thank you for participation in this RPA Challenge. You practiced some json manipulation and some basic math :wink:

We had 2 solvers this time!

@pmontez, currently leading the chart, comes with solution in Python, and I have to say: Check it out, it is a really nice python code to learn from! (solution is in zip file that @pmontez shared in his post)
@marcusventry used UiPath for this solution and with all success. Here is the solution:
Main.xaml (12.8 KB)
Both recieve +3 robopoints for great effort!


Check the leaderbaord here. :robot:

Even now after the deadline, you can always try to solve this solution by yourself and share how you did it, share your results!

1 Like