Skip to content

Commit

Permalink
🎨 update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Jul 9, 2024
1 parent c558819 commit 8b7b3e8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dxsp/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def __init__(self):
logger.warning(
"No Client were created. Check your settings or disable the module."
)
return None

def _create_client(self, **kwargs):
"""
Expand Down Expand Up @@ -181,7 +182,7 @@ async def get_balances(self):
:return: The account balance.
:rtype: float
"""
_info = ["🏦 Balance"]
_info = []
for client in self.clients:
_info.append(f"\n{await client.get_account_balance()}")
return "\n".join(_info)
Expand All @@ -193,7 +194,7 @@ async def get_positions(self):
:return: The account position.
:rtype: AccountPosition
"""
_info = ["πŸ“Š\n"]
_info = []
for client in self.clients:
_info.append(f"{client.name}:\n{await client.get_account_position()}")
return "\n".join(_info)
Expand All @@ -205,7 +206,7 @@ async def get_pnl(self, **kwargs):
:return: The account position.
:rtype: AccountPosition
"""
_info = ["πŸ†\n"]
_info = []
for client in self.clients:
client_name = f"{client.name}:\n"
account_pnl = await client.get_account_pnl(
Expand All @@ -226,7 +227,7 @@ async def get_quotes(self, symbol=None, address=None):
str: The quote with the trading symbol
"""
_info = ["βš–οΈ\n"]
_info = []
for client in self.clients:
try:
quote = await client.get_quote(sell_symbol=symbol, sell_address=address)
Expand All @@ -250,7 +251,7 @@ async def submit_order(self, order_params):
str: The trade confirmation
"""
_order = ["πŸ¦„ Order\n"]
_order = []
for client in self.clients:
try:
action = order_params.get("action")
Expand Down

0 comments on commit 8b7b3e8

Please sign in to comment.