Problems with get_recent_trades
Closed this issue · 3 comments
Im making this code:
date_start = datetime.now() - relativedelta(days=1)
print(date_start)
date_start_unix = int(date_start.timestamp())
example_trades, example_last = api.get_recent_trades('XBTUSDT', date_start_unix)
example_last
But im getting this error...and i dont know why...some could help me??
ValueError: Length mismatch: Expected axis has 7 elements, new values have 6 elements
Hi @JosorioData, after looking at the library, it appears that there was only 6 columns unpacked on the current version.
['price', 'volume', 'time', 'buy_sell', 'market_limit', 'misc']
However, by reading the docs : https://docs.kraken.com/rest/#tag/Market-Data/operation/getRecentTrades
It seems that there are 7 columns to unpack
[<price>, <volume>, <time>, <buy/sell>, <market/limit>, <miscellaneous>, <trade_id>]
This is why you get this error.
I was taking a look at the issues to see if this library was reliable, but it seems like it is not up to date.
Hope that helps understand the issue.
Hi there,
sorry for the late reply. This library is indeed not maintained very actively anymore. I'll write a warning in the readme so people know.
I will, however, merge the requested changes.
Thanks @dominiktraxl for your work 🫡