diff --git a/examples/rest/authenticated/claim_position.py b/examples/rest/authenticated/claim_position.py index 0f8b385..5dbe89a 100644 --- a/examples/rest/authenticated/claim_position.py +++ b/examples/rest/authenticated/claim_position.py @@ -16,4 +16,4 @@ bfx = Client( for position in bfx.rest.auth.get_positions(): notification: Notification[PositionClaim] = bfx.rest.auth.claim_position(position.position_id) claim: PositionClaim = notification.data - print(f"Position: {position} | PositionClaim: {claim}") \ No newline at end of file + print(f"Position: {position} | PositionClaim: {claim}") diff --git a/examples/rest/authenticated/get_wallets.py b/examples/rest/authenticated/get_wallets.py index 0ea1388..1a2d105 100644 --- a/examples/rest/authenticated/get_wallets.py +++ b/examples/rest/authenticated/get_wallets.py @@ -19,8 +19,8 @@ wallets: List[Wallet] = bfx.rest.auth.get_wallets() # Transfers funds (0.001 ETH) from exchange wallet to funding wallet A: Notification[Transfer] = bfx.rest.auth.transfer_between_wallets( - from_wallet="exchange", to_wallet="funding", from_currency="ETH", - to_currency="ETH", amount=0.001) + from_wallet="exchange", to_wallet="funding", currency="ETH", + currency_to="ETH", amount=0.001) print("Transfer:", A.data) @@ -41,4 +41,4 @@ D: Notification[Withdrawal] = bfx.rest.auth.submit_wallet_withdrawal( wallet="exchange", method="tetheruse", address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e", amount=1.0) -print("Withdrawal:", D.data) \ No newline at end of file +print("Withdrawal:", D.data) diff --git a/examples/rest/authenticated/set_derivative_position_collateral.py b/examples/rest/authenticated/set_derivative_position_collateral.py index bb2100f..0949cac 100644 --- a/examples/rest/authenticated/set_derivative_position_collateral.py +++ b/examples/rest/authenticated/set_derivative_position_collateral.py @@ -32,5 +32,5 @@ print("Status:", bool(derivative_position_collateral.status)) derivative_position_collateral_limits: DerivativePositionCollateralLimits = \ bfx.rest.auth.get_derivative_position_collateral_limits(symbol="tBTCF0:USTF0") -print(f"Minimum collateral: {derivative_position_collateral_limits.min_collateral} | \ - Maximum collateral: {derivative_position_collateral_limits.max_collateral}") \ No newline at end of file +print(f"Minimum collateral: {derivative_position_collateral_limits.min_collateral} | " \ + f"Maximum collateral: {derivative_position_collateral_limits.max_collateral}") diff --git a/examples/rest/authenticated/submit_funding_offer.py b/examples/rest/authenticated/submit_funding_offer.py index 0230eb6..8291e67 100644 --- a/examples/rest/authenticated/submit_funding_offer.py +++ b/examples/rest/authenticated/submit_funding_offer.py @@ -14,11 +14,11 @@ bfx = Client( # Submit a new funding offer notification: Notification[FundingOffer] = bfx.rest.auth.submit_funding_offer( - type=FundingOfferType.LIMIT, - symbol="fUSD", - amount=123.45, - rate=0.001, - period=2, + type=FundingOfferType.LIMIT, + symbol="fUSD", + amount=123.45, + rate=0.001, + period=2, flags=Flag.HIDDEN ) @@ -27,4 +27,4 @@ print("Funding Offer notification:", notification) # Get all fUSD active funding offers offers = bfx.rest.auth.get_funding_offers(symbol="fUSD") -print("Offers (fUSD):", offers) \ No newline at end of file +print("Offers (fUSD):", offers) diff --git a/examples/rest/authenticated/submit_order.py b/examples/rest/authenticated/submit_order.py index 8c9fbb5..1481de0 100644 --- a/examples/rest/authenticated/submit_order.py +++ b/examples/rest/authenticated/submit_order.py @@ -15,9 +15,9 @@ bfx = Client( # Submit a new order submit_order_notification: Notification[Order] = bfx.rest.auth.submit_order( type=OrderType.EXCHANGE_LIMIT, - symbol="tBTCUST", - amount=0.015, - price=10000, + symbol="tBTCUST", + amount=0.015, + price=10000, flags=Flag.HIDDEN + Flag.OCO + Flag.CLOSE ) @@ -28,7 +28,7 @@ order: Order = submit_order_notification.data # Update its amount and its price update_order_notification: Notification[Order] = bfx.rest.auth.update_order( id=order.id, - amount=0.020, + amount=0.020, price=10150 ) @@ -39,4 +39,4 @@ cancel_order_notification: Notification[Order] = bfx.rest.auth.cancel_order( id=order.id ) -print("Cancel order notification:", cancel_order_notification) \ No newline at end of file +print("Cancel order notification:", cancel_order_notification) diff --git a/examples/rest/authenticated/toggle_keep_funding.py b/examples/rest/authenticated/toggle_keep_funding.py index b17405f..4f924ae 100644 --- a/examples/rest/authenticated/toggle_keep_funding.py +++ b/examples/rest/authenticated/toggle_keep_funding.py @@ -16,9 +16,9 @@ loans: List[FundingLoan] = bfx.rest.auth.get_funding_loans(symbol="fUSD") # Set every loan's keep funding status to (1: , 2: ) notification: Notification[None] = bfx.rest.auth.toggle_keep_funding( - funding_type="loan", + type="loan", ids=[ loan.id for loan in loans ], changes={ loan.id: 2 for loan in loans } ) -print("Toggle keep funding notification:", notification) \ No newline at end of file +print("Toggle keep funding notification:", notification)