diff --git a/CHANGELOG b/CHANGELOG index 708b445..254b884 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.2.5 +-) Adjusted get_order_history() rest endpoint + 1.2.4 -) Added example of MARKET order with price=None diff --git a/bfxapi/rest/bfx_rest.py b/bfxapi/rest/bfx_rest.py index 7100464..e305666 100644 --- a/bfxapi/rest/bfx_rest.py +++ b/bfxapi/rest/bfx_rest.py @@ -427,11 +427,18 @@ class BfxRest: @return Array """ endpoint = "auth/r/orders/{}/hist".format(symbol) - params = "?start={}&end={}&limit={}&sort={}".format( - start, end, limit, sort) + payload = {} + if start: + payload['start'] = start + if end: + payload['end'] = end + if limit: + payload['limit'] = limit + if sort: + payload['sort'] = sort if ids: - params += "&id=" + ",".join(str(id) for id in ids) - raw_orders = await self.post(endpoint, params=params) + payload['id'] = ids + raw_orders = await self.post(endpoint, payload) return [Order.from_raw_order(ro) for ro in raw_orders] async def get_active_position(self): diff --git a/bfxapi/version.py b/bfxapi/version.py index 747cce9..946288f 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.2.4' +__version__ = '1.2.5' diff --git a/setup.py b/setup.py index c41ebd9..8fba16c 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from os import path here = path.abspath(path.dirname(__file__)) setup( name='bitfinex-api-py', - version='1.2.4', + version='1.2.5', description='Official Bitfinex Python API', long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction', long_description_content_type='text/markdown',