Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
1.1.15
-) Added 'ids' parameter to get_order_history()
-) Added an example to show how it is possible to spawn multiple bfx ws instances to comply with the open subscriptions number constraint (max. 25)
-) Implemented Funding Trades (rest)

Expand Down
5 changes: 4 additions & 1 deletion bfxapi/rest/bfx_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ async def get_active_orders(self, symbol):
raw_orders = await self.post(endpoint)
return [Order.from_raw_order(ro) for ro in raw_orders]

async def get_order_history(self, symbol, start, end, limit=25, sort=-1):
async def get_order_history(self, symbol, start, end, limit=25, sort=-1, ids=None):
"""
Get all of the orders between the start and end period associated with API_KEY
- Requires authentication.
Expand All @@ -407,11 +407,14 @@ async def get_order_history(self, symbol, start, end, limit=25, sort=-1):
@param start int: millisecond start time
@param end int: millisecond end time
@param limit int: max number of items in response
@param ids list of int: allows you to retrieve specific orders by order ID (ids: [ID1, ID2, ID3])
@return Array <models.Order>
"""
endpoint = "auth/r/orders/{}/hist".format(symbol)
params = "?start={}&end={}&limit={}&sort={}".format(
start, end, limit, sort)
if ids:
params += "&id=" + ",".join(str(id) for id in ids)
raw_orders = await self.post(endpoint, params=params)
return [Order.from_raw_order(ro) for ro in raw_orders]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
here = path.abspath(path.dirname(__file__))
setup(
name='bitfinex-api-py',
version='1.1.14',
version='1.1.15',
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',
Expand Down