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
|
1.2.4
|
||||||
-) Added example of MARKET order with price=None
|
-) Added example of MARKET order with price=None
|
||||||
|
|
||||||
|
|||||||
@@ -427,11 +427,18 @@ class BfxRest:
|
|||||||
@return Array <models.Order>
|
@return Array <models.Order>
|
||||||
"""
|
"""
|
||||||
endpoint = "auth/r/orders/{}/hist".format(symbol)
|
endpoint = "auth/r/orders/{}/hist".format(symbol)
|
||||||
params = "?start={}&end={}&limit={}&sort={}".format(
|
payload = {}
|
||||||
start, end, limit, sort)
|
if start:
|
||||||
|
payload['start'] = start
|
||||||
|
if end:
|
||||||
|
payload['end'] = end
|
||||||
|
if limit:
|
||||||
|
payload['limit'] = limit
|
||||||
|
if sort:
|
||||||
|
payload['sort'] = sort
|
||||||
if ids:
|
if ids:
|
||||||
params += "&id=" + ",".join(str(id) for id in ids)
|
payload['id'] = ids
|
||||||
raw_orders = await self.post(endpoint, params=params)
|
raw_orders = await self.post(endpoint, payload)
|
||||||
return [Order.from_raw_order(ro) for ro in raw_orders]
|
return [Order.from_raw_order(ro) for ro in raw_orders]
|
||||||
|
|
||||||
async def get_active_position(self):
|
async def get_active_position(self):
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
This module contains the current version of the bfxapi lib
|
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__))
|
here = path.abspath(path.dirname(__file__))
|
||||||
setup(
|
setup(
|
||||||
name='bitfinex-api-py',
|
name='bitfinex-api-py',
|
||||||
version='1.2.4',
|
version='1.2.5',
|
||||||
description='Official Bitfinex Python API',
|
description='Official Bitfinex Python API',
|
||||||
long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction',
|
long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction',
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|||||||
Reference in New Issue
Block a user