mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-20 07:14:20 +01:00
get_public_trades() orders should be sorted by [timestamp, id] (#127)
Co-authored-by: Robert Kowalski <robert@bitfinex.com> - solved the merge conflict in CHANGELOG
This commit is contained in:
@@ -133,7 +133,7 @@ class BfxRest:
|
||||
params = "?start={}&end={}&limit={}&sort={}".format(
|
||||
start, end, limit, sort)
|
||||
trades = await self.fetch(endpoint, params=params)
|
||||
return trades
|
||||
return sorted(trades, key=lambda x: (x[1], x[0]), reverse=True if sort == 1 else False)
|
||||
|
||||
async def get_public_books(self, symbol, precision="P0", length=25):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user