zzyzy / rateswatcher

Watch for currency rate changes, notify if new highest rate is found
https://rateswatcher.herokuapp.com
MIT License
1 stars 0 forks source link

Notify if a new rate is found #3

Open zzyzy opened 7 years ago

zzyzy commented 7 years ago

The main point of rateswatcher is to notify the user if a new rate is found.

There can have multiple definitions of new rate.

One easy way is to store the highest rate in Firebase. Every time a new rate is updated, it is compared to the stored highest rate, if the new rate is higher than the stored rate, update the stored rate to the new rate.

Another way is to take the average of all the past rates, if the new rate is higher than the average, notify the user.

The first way is easier to do, the second way is good to have.