Add submit cancel all funding offer

Thanks to @charlychiu (https://github.com/bitfinexcom/bitfinex-api-py/pull/169)
This commit is contained in:
itsdeka
2022-01-04 17:42:15 +01:00
parent a6670caf5e
commit 64d203d8a8
3 changed files with 16 additions and 1 deletions

View File

@@ -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 1.3.3
-) Fixed socket.send() issue (IndexError: deque index out of range) -) Fixed socket.send() issue (IndexError: deque index out of range)

View File

@@ -636,6 +636,17 @@ class BfxRest:
raw_notification = await self.post(endpoint, {'id': fundingId}) raw_notification = await self.post(endpoint, {'id': fundingId})
return Notification.from_raw_notification(raw_notification) 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): async def keep_funding(self, type, id):
""" """
Toggle to keep funding taken. Specify loan for unused funding and credit for used funding. Toggle to keep funding taken. Specify loan for unused funding and credit for used funding.

View File

@@ -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.3.3' __version__ = '1.3.4'