Timeline for Calculate cryptocurrency gains and losses using the Coinbase API
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 18, 2018 at 3:16 | comment | added | kingsfoil | The purpose of the class is to provide up to date data about a specific currency. Hence why it's a Currency class not an Account class. Not requesting the data each time (as you've suggested) would invalidate the purpose of the class. Which is to abstract each currency for a specific user into its own object, in as close to real time as possible. This class does have one purpose. | |
| Mar 26, 2018 at 16:56 | comment | added | Rorshark | Also, a class already exists for "getting up to date account data", it's called Coinbase::Wallet::Client, which I'm assuming does its own validation of "currency symbol". | |
| Mar 26, 2018 at 16:52 | comment | added | Rorshark | Sure, but the phrase “one of the purposes” is telling, there. A class would ideally have one purpose. | |
| Mar 24, 2018 at 22:06 | comment | added | kingsfoil | Not a bad idea, I feel like doing so would invalidate one of the purposes behind the class though: which is to get up to date account data each time the account getter is called. | |
| Mar 24, 2018 at 21:59 | history | answered | Rorshark | CC BY-SA 3.0 |