mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
user info + fixs
This commit is contained in:
@@ -14,7 +14,7 @@ notification = bfx.rest.auth.toggle_auto_renew(
|
||||
status=True,
|
||||
currency="USD",
|
||||
amount="150",
|
||||
rate="0",
|
||||
rate="0", # FRR
|
||||
period=2
|
||||
)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user