user info + fixs

This commit is contained in:
itsdeka
2023-02-08 11:56:45 +01:00
committed by Davide Casale
parent 6693e376fc
commit 15a2e41e43
5 changed files with 102 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ notification = bfx.rest.auth.toggle_auto_renew(
status=True,
currency="USD",
amount="150",
rate="0",
rate="0", # FRR
period=2
)

View File

@@ -13,6 +13,12 @@ bfx = Client(
now = int(round(time.time() * 1000))
def log_user_info():
user_info = bfx.rest.auth.get_user_info()
print(user_info)
def log_wallets():
wallets = bfx.rest.auth.get_wallets()
print("Wallets:")
@@ -38,14 +44,14 @@ def log_positions():
def log_trades():
trades = bfx.rest.auth.get_trades(symbol='tBTCUSD', start=0, end=now)
trades = bfx.rest.auth.get_trades_history(symbol='tBTCUSD', start=0, end=now)
print("Trades:")
[print(t) for t in trades]
def log_order_trades():
order_id = 82406909127
trades = bfx.rest.auth.get_order_trades(symbol='tBTCUSD', order_id=order_id)
trades = bfx.rest.auth.get_order_trades(symbol='tBTCUSD', id=order_id)
print("Trade orders:")
[print(t) for t in trades]
@@ -96,6 +102,7 @@ def log_margin_info():
print(f"Base margin info {base_margin_info}")
def run():
log_user_info()
log_wallets()
log_orders()
log_orders_history()