goincrypto / cryptocom-exchange

Python 3.7+ library for https://crypto.com/exchange API
MIT License
65 stars 32 forks source link

Option for historical candlestick data #35

Open HymnsForDisco opened 2 years ago

HymnsForDisco commented 2 years ago

https://github.com/goincrypto/cryptocom-exchange/blob/cc65cac9a79b99a801c61c57cff7f976b21abe51/src/cryptocom/exchange/market.py#L77

I'm not personally a user of this library, but I spent a while figuring this out so I thought I'd share in case it is useful.

The public/get-candlestick endpoint has an undocumented timestamp parameter called end_time which can be used to request historical candlestick data.

yarikdevcom commented 2 years ago

on it

HymnsForDisco commented 2 years ago

Also I found that the note here https://exchange-docs.crypto.com/spot/index.html#public-get-candlestick listing t as the "end time" of the candlestick is not correct. It appears to be the start time.

yarikdevcom commented 2 years ago

nice correction, will check this too