Skip to content

Commit

Permalink
Update src/deephaven_ib/__init__.py
Browse files Browse the repository at this point in the history
Co-authored-by: Chip Kent <[email protected]>
  • Loading branch information
Da5hes and chipkent authored Sep 11, 2024
1 parent c946a51 commit aa0bfdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/deephaven_ib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,13 +786,13 @@ def request_account_positions(self, account: str, model_code: str = "") -> Reque
req_id = self._client.request_account_positions(account, model_code)
return Request(request_id=req_id)

def request_single_pnl(self, account: str, model_code: str = "", conid: int = 0) -> Request:
def request_single_pnl(self, contract: RegisteredContract, account: str, model_code: str = "") -> Request:
"""Request PNL updates for a single position. Results are returned in the ``accounts_pnl_single`` table.
Args:
contract (RegisteredContract): contract data is requested for.
account (str): Account to request PNL for.
model_code (str): Model portfolio code to request PNL for.
conid (int): Contract ID to request PNL for.
Returns:
A Request.
Expand All @@ -801,7 +801,7 @@ def request_single_pnl(self, account: str, model_code: str = "", conid: int = 0)
Exception: problem executing action.
"""
self._assert_connected()
req_id = self._client.request_single_pnl(account, model_code, conid)
req_id = self._client.request_single_pnl(account, model_code, contract.conId)
return Request(request_id=req_id)


Expand Down

0 comments on commit aa0bfdf

Please sign in to comment.