Skip to content

Commit

Permalink
♻️
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Apr 12, 2024
1 parent e9e0a61 commit 2fcefb1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cefi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async def get_positions(self):
_info.append(f"{client.name}:\n{await client.get_account_position()}")
return "\n".join(_info)

async def get_pnls(self):
async def get_pnls(self, **kwargs):
"""
Return account pnl.
Expand All @@ -236,9 +236,14 @@ async def get_pnls(self):
Returns:
pnl
"""
_info = ["📊\n"]
_info = ["🏆\n"]
for client in self.clients:
_info.append(f"{client.name}:\n{await client.get_account_pnl()}")
client_name = f"{client.name}:\n"
account_pnl = await client.get_account_pnl(
period=kwargs.get("period", None)
)
client_info = f"{client_name}{account_pnl}"
_info.append(client_info)
return "\n".join(_info)

async def submit_order(self, order_params):
Expand Down

0 comments on commit 2fcefb1

Please sign in to comment.