get_portfolio()
get_portfolio()
The get_portfolio() function requests portfolio details for the selected account or all accounts available to the user.
Request Arguments
The account ID to pull portfolio information for. Pass an empty string to request portfolio data for all available accounts.
Duration to wait for the response until termination. Function-specific timeout default of 10 seconds.
Response Object
Returns a dictionary keyed by account ID. Each value is a list of position objects for all contracts held in that account.
Properties
A map keyed by account identifier (e.g., U1234567). Each key contains a list of position objects for that account.
Contract Object for the instrument held.
The total number of shares held in the account.
The current market price of the instrument.
The current value of the total position.
The average price across executions for the position.
The unrealized profit and loss for the instrument.
The realized profit and loss for the instrument.
The account identifier that holds the given position.

