Reorder and rename some method inside _RestAuthenticatedEndpoints class.

This commit is contained in:
Davide Casale
2023-02-01 18:00:00 +01:00
parent 06dc9e1c0a
commit 0dd6fa9dbb
7 changed files with 103 additions and 101 deletions

View File

@@ -16,4 +16,4 @@ open_margin_positions = bfx.rest.auth.get_positions()
for position in open_margin_positions:
print(f"Position {position}")
claim = bfx.rest.auth.claim_position(position.position_id, amount=0.000001)
print(f"Claim {claim.notify_info}")
print(f"PositionClaim {claim.notify_info}")

View File

@@ -10,7 +10,7 @@ bfx = Client(
API_SECRET=os.getenv("BFX_API_SECRET")
)
notification = bfx.rest.auth.submit_funding_toggle_auto_renew(
notification = bfx.rest.auth.toggle_auto_renew(
status=True,
currency="USD",
amount="150",

View File

@@ -15,7 +15,7 @@ loans = bfx.rest.auth.get_funding_loans(symbol="fUSD")
for loan in loans:
print(f"Loan {loan}")
notification = bfx.rest.auth.submit_funding_toggle_keep(
notification = bfx.rest.auth.toggle_keep(
funding_type="loan",
ids=[loan.id],
changes={

View File

@@ -11,7 +11,7 @@ bfx = Client(
)
def transfer_wallet():
response = bfx.rest.auth.submit_wallet_transfer(from_wallet="exchange", to_wallet="funding", from_currency="ETH", to_currency="ETH", amount=0.001)
response = bfx.rest.auth.transfer_between_wallets(from_wallet="exchange", to_wallet="funding", from_currency="ETH", to_currency="ETH", amount=0.001)
print("Transfer:", response.notify_info)
def get_existing_deposit_address():
@@ -24,11 +24,11 @@ def create_new_deposit_address():
def withdraw():
# tetheruse = Tether (ERC20)
response = bfx.rest.auth.submit_wallet_withdraw(wallet="exchange", method="tetheruse", amount=1, address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e")
response = bfx.rest.auth.submit_wallet_withdrawal(wallet="exchange", method="tetheruse", amount=1, address="0x742d35Cc6634C0532925a3b844Bc454e4438f44e")
print("Address:", response.notify_info)
def create_lighting_network_deposit_address():
invoice = bfx.rest.auth.get_deposit_invoice(wallet="funding", currency="LNX", amount=0.001)
invoice = bfx.rest.auth.generate_deposit_invoice(wallet="funding", currency="LNX", amount=0.001)
print("Invoice:", invoice)
def get_movements():