Corfucinas / crypto-candlesticks

Download candlestick data fast & easy for analysis
https://crypto-candlesticks.readthedocs.io
GNU General Public License v3.0
40 stars 10 forks source link

Are these assignments incorrect? #378

Open asehmi opened 2 years ago

asehmi commented 2 years ago

https://github.com/Corfucinas/crypto-candlesticks/blob/0b5e381e7e7789e945e5d7bea4849cf1795a7c72/src/crypto_candlesticks/database.py#L99-L100

Hi - Just wondering why Open and Close values are assigned as indexes 2 and 1 respectively, and not 1 and 2?

The Bitfinex API docs shows that it should be 1, 2.

Corfucinas commented 2 years ago

Good question, I coded this using old documentation from Bitfinex (they have replaced it) two years ago. There's the possibility that I got it wrong or that they have updated the index with the new API(?). In any case, I'll replace the slices with a Dataclass in the next release, using tuple slices it's bad anyways.

I'll leave this open as a reminder