mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Merge pull request #187 from itsdeka/combinedPRs
Combined all old unmerged PRs
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
1.3.4
|
||||
-) Fixed undefined p_sub issue in subscription_manager.py
|
||||
-) Added submit cancel all funding orders endpoint (REST)
|
||||
-) Added get all exchange pairs endpoint (REST)
|
||||
|
||||
1.3.3
|
||||
-) Fixed socket.send() issue (IndexError: deque index out of range)
|
||||
|
||||
|
||||
@@ -370,6 +370,15 @@ class BfxRest:
|
||||
stats = await self.fetch(endpoint)
|
||||
return stats
|
||||
|
||||
async def get_conf_list_pair_exchange(self):
|
||||
"""
|
||||
Get list of available exchange pairs
|
||||
# Attributes
|
||||
@return Array [ SYMBOL ]
|
||||
"""
|
||||
endpoint = "conf/pub:list:pair:exchange"
|
||||
pairs = await self.fetch(endpoint)
|
||||
return pairs
|
||||
|
||||
##################################################
|
||||
# Authenticated Data #
|
||||
@@ -636,6 +645,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.
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
This module contains the current version of the bfxapi lib
|
||||
"""
|
||||
|
||||
__version__ = '1.3.3'
|
||||
__version__ = '1.3.4'
|
||||
|
||||
@@ -62,6 +62,7 @@ class SubscriptionManager:
|
||||
channel = raw_ws_data.get("channel")
|
||||
chan_id = raw_ws_data.get("chanId")
|
||||
key = raw_ws_data.get("key", None)
|
||||
p_sub = None
|
||||
get_key = "{}_{}".format(channel, key or symbol)
|
||||
if chan_id in self.subscriptions_chanid:
|
||||
# subscription has already existed in the past
|
||||
|
||||
Reference in New Issue
Block a user