mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
adjusted get_order_history() rest endpoint
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
1.2.5
|
||||
-) Adjusted get_order_history() rest endpoint
|
||||
|
||||
1.2.4
|
||||
-) Added example of MARKET order with price=None
|
||||
|
||||
|
||||
@@ -427,11 +427,18 @@ class BfxRest:
|
||||
@return Array <models.Order>
|
||||
"""
|
||||
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):
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
This module contains the current version of the bfxapi lib
|
||||
"""
|
||||
|
||||
__version__ = '1.2.4'
|
||||
__version__ = '1.2.5'
|
||||
|
||||
2
setup.py
2
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',
|
||||
|
||||
Reference in New Issue
Block a user