coblox / nectar

GNU General Public License v3.0
0 stars 1 forks source link

Introduce markets module to get a rate from Kraken #14

Closed da-kami closed 4 years ago

da-kami commented 4 years ago

LGTM!

I'd still question if the OHLC construct is all that useful. It's quite noisy to have it in the markets module when you appear to only ever want the rate. Maybe the kraken module could just give you the rate straight away. Unless you have other plans for OHLC, that is.

Tough choice... I thought about just using the ticker ("Get ticker information" in https://www.kraken.com/features/api) but the OHLC already takes some calculations off our back. Since we only focus on Kraken atm I think it is legit to use the OHLC.

When it comes to the actual rate, the get_rate function in markets is the only exposed function, and the outside caller does not know what is used to come up with the rate. In the long run we can use more complex calculations (using different exchanges, ...). In the end it is kindoff irrelevant how we come up with the rate, as long as it is correct in some way (so that we at least not lose money instantly...).