From 64d203d8a82f41f879c843a2471d43d5ab69e2c7 Mon Sep 17 00:00:00 2001 From: itsdeka Date: Tue, 4 Jan 2022 17:42:15 +0100 Subject: [PATCH] Add submit cancel all funding offer Thanks to @charlychiu (https://github.com/bitfinexcom/bitfinex-api-py/pull/169) --- CHANGELOG | 4 ++++ bfxapi/rest/bfx_rest.py | 11 +++++++++++ bfxapi/version.py | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5f5e657..5cfd0ec 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +1.3.4 +-) Fixed undefined p_sub issue in subscription_manager.py +-) Added submit cancel all funding orders endpoint (REST) + 1.3.3 -) Fixed socket.send() issue (IndexError: deque index out of range) diff --git a/bfxapi/rest/bfx_rest.py b/bfxapi/rest/bfx_rest.py index a2a104e..c29707f 100644 --- a/bfxapi/rest/bfx_rest.py +++ b/bfxapi/rest/bfx_rest.py @@ -636,6 +636,17 @@ class BfxRest: raw_notification = await self.post(endpoint, {'id': fundingId}) return Notification.from_raw_notification(raw_notification) + async def submit_cancel_all_funding_offer(self, currency): + """ + Cancel all funding offers at once + + # Attributes + @param currency str: currency for which to cancel all offers (USD, BTC, UST ...) + """ + endpoint = "auth/w/funding/offer/cancel/all" + raw_notification = await self.post(endpoint, {'currency': currency}) + return Notification.from_raw_notification(raw_notification) + async def keep_funding(self, type, id): """ Toggle to keep funding taken. Specify loan for unused funding and credit for used funding. diff --git a/bfxapi/version.py b/bfxapi/version.py index 85f1fa2..bceabe3 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.3.3' +__version__ = '1.3.4'