feat: set trade_id as required param in list_custom_data, add key as optional

This commit is contained in:
Axel-CH
2025-03-17 15:05:58 -04:00
parent eec16cfc8a
commit 484943a640
+7 -6
View File
@@ -269,17 +269,18 @@ class FtRestClient:
params["offset"] = offset params["offset"] = offset
return self._get("trades", params) return self._get("trades", params)
def list_custom_data(self, trade_id=None, key=None): def list_custom_data(self, trade_id, key=None):
"""Lists custom_data of the running bot. """List custom_data of the running bot for specific trade.
:param tradeid: Optional keyword argument - Id of the trade :param tradeid: keyword argument - Id of the trade
:param key: Optional keyword argument - key of the custom-data
:return: json object :return: json object
""" """
params = {} params = {}
trade_id = -1 params["trade_id"] = trade_id
if trade_id is not None: if key is not None:
params["trade_id"] = trade_id params["key"] = key
return self._get("trades/{tradeid}/custom_data", params=params) return self._get("trades/{tradeid}/custom_data", params=params)