mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
bfxapi/rest: add submit/cancel funding
This commit is contained in:
committed by
Jacob Plaster
parent
dfabb438de
commit
edfd4fc280
@@ -2,6 +2,12 @@
|
||||
Module used to describe all of the different data types
|
||||
"""
|
||||
|
||||
class FundingOfferTypes:
|
||||
"""
|
||||
Enum used to define the different funding offer types
|
||||
"""
|
||||
LIMIT = 'LIMIT'
|
||||
FRR_DELTA = 'FRRDELTAVAR'
|
||||
|
||||
class FundingOfferModel:
|
||||
"""
|
||||
@@ -41,6 +47,8 @@ class FundingOffer:
|
||||
RENEW int 0 if false, 1 if true
|
||||
"""
|
||||
|
||||
Type = FundingOfferTypes()
|
||||
|
||||
def __init__(self, fid, symbol, mts_create, mts_updated, amount, amount_orig, f_type,
|
||||
flags, status, rate, period, notify, hidden, renew):
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
Module used to describe all of the different notification data types
|
||||
"""
|
||||
|
||||
from . import Order
|
||||
from .order import Order
|
||||
from .funding_offer import FundingOffer
|
||||
|
||||
class NotificationModal:
|
||||
"""
|
||||
@@ -95,6 +96,10 @@ class Notification:
|
||||
basic.notify_info = Order.from_raw_order(basic.notify_info)
|
||||
elif basic.notify_type == NotificationTypes.ORDER_UPDATED_REQ:
|
||||
basic.notify_info = Order.from_raw_order(basic.notify_info)
|
||||
elif basic.notify_type == NotificationTypes.FUNDING_OFFER_NEW:
|
||||
basic.notify_info = FundingOffer.from_raw_offer(basic.notify_info)
|
||||
elif basic.notify_type == NotificationTypes.FUNDING_OFFER_CANCEL:
|
||||
basic.notify_info = FundingOffer.from_raw_offer(basic.notify_info)
|
||||
return basic
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user