mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
cancel all funding offers
This commit is contained in:
@@ -407,6 +407,9 @@ class _RestAuthenticatedEndpoints(_Requests):
|
|||||||
def cancel_funding_offer(self, id: int) -> Notification[FundingOffer]:
|
def cancel_funding_offer(self, id: int) -> Notification[FundingOffer]:
|
||||||
return serializers._Notification[FundingOffer](serializer=serializers.FundingOffer).parse(*self._POST("auth/w/funding/offer/cancel", data={ "id": id }))
|
return serializers._Notification[FundingOffer](serializer=serializers.FundingOffer).parse(*self._POST("auth/w/funding/offer/cancel", data={ "id": id }))
|
||||||
|
|
||||||
|
def cancel_all_funding_offers(self, currency: str) -> Notification:
|
||||||
|
return serializers._Notification().parse(*self._POST("auth/w/funding/offer/cancel/all", data={ "currency": currency }))
|
||||||
|
|
||||||
def get_funding_offers_history(self, symbol: Optional[str] = None, start: Optional[str] = None, end: Optional[str] = None, limit: Optional[int] = None) -> List[FundingOffer]:
|
def get_funding_offers_history(self, symbol: Optional[str] = None, start: Optional[str] = None, end: Optional[str] = None, limit: Optional[int] = None) -> List[FundingOffer]:
|
||||||
if symbol == None:
|
if symbol == None:
|
||||||
endpoint = "auth/r/funding/offers/hist"
|
endpoint = "auth/r/funding/offers/hist"
|
||||||
|
|||||||
@@ -25,4 +25,9 @@ print("Offer notification:", notification)
|
|||||||
|
|
||||||
offers = bfx.rest.auth.get_active_funding_offers(symbol="fUSD")
|
offers = bfx.rest.auth.get_active_funding_offers(symbol="fUSD")
|
||||||
|
|
||||||
print("Offers:", offers)
|
print("Offers:", offers)
|
||||||
|
|
||||||
|
# Cancel all funding offers
|
||||||
|
notification = bfx.rest.auth.cancel_all_funding_offers(currency="fUSD")
|
||||||
|
|
||||||
|
print(notification)
|
||||||
Reference in New Issue
Block a user