From 52bc47597103f721b953c7c9e65981e918f2d05f Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Sun, 12 Feb 2023 22:03:10 +0100 Subject: [PATCH] add currency endpoints Co-Authored-By: itsdeka --- .../rest/endpoints/rest_authenticated_endpoints.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bfxapi/rest/endpoints/rest_authenticated_endpoints.py b/bfxapi/rest/endpoints/rest_authenticated_endpoints.py index 9ec3ca0..0991336 100644 --- a/bfxapi/rest/endpoints/rest_authenticated_endpoints.py +++ b/bfxapi/rest/endpoints/rest_authenticated_endpoints.py @@ -369,4 +369,16 @@ class RestAuthenticatedEndpoints(Middleware): convert_currency=sub_data["convertCcy"], created=sub_data["created"] ) for sub_data in self._POST("auth/r/ext/pay/settings/convert/list") - ] \ No newline at end of file + ] + + def add_currency_conversion(self, base_currency: str, convert_currency: str) -> bool: + return bool(self._POST("auth/w/ext/pay/settings/convert/create", body={ + "baseCcy": base_currency, + "convertCcy": convert_currency + })) + + def remove_currency_conversion(self, base_currency: str, convert_currency: str) -> bool: + return bool(self._POST("auth/w/ext/pay/settings/convert/remove", body={ + "baseCcy": base_currency, + "convertCcy": convert_currency + })) \ No newline at end of file