add /trade endpoint to rest_client script
This commit is contained in:
@@ -127,7 +127,7 @@ class FtRestClient():
|
||||
return self._delete("locks/{}".format(lock_id))
|
||||
|
||||
def daily(self, days=None):
|
||||
"""Return the amount of open trades.
|
||||
"""Return the profits for each day, and amount of trades.
|
||||
|
||||
:return: json object
|
||||
"""
|
||||
@@ -195,7 +195,7 @@ class FtRestClient():
|
||||
def logs(self, limit=None):
|
||||
"""Show latest logs.
|
||||
|
||||
:param limit: Limits log messages to the last <limit> logs. No limit to get all the trades.
|
||||
:param limit: Limits log messages to the last <limit> logs. No limit to get the entire log.
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("logs", params={"limit": limit} if limit else 0)
|
||||
@@ -208,6 +208,14 @@ class FtRestClient():
|
||||
"""
|
||||
return self._get("trades", params={"limit": limit} if limit else 0)
|
||||
|
||||
def trade(self, trade_id):
|
||||
"""Return specific trade
|
||||
|
||||
:param trade_id: Specify which trade to get.
|
||||
:return: json object
|
||||
"""
|
||||
return self._get("trade/{}".format(trade_id))
|
||||
|
||||
def delete_trade(self, trade_id):
|
||||
"""Delete trade from the database.
|
||||
Tries to close open orders. Requires manual handling of this asset on the exchange.
|
||||
|
Reference in New Issue
Block a user