Positions by Model
Introduction
The function EClient.reqPositionsMulti can be used with any account structure to subscribe to positions updates for multiple accounts and/or models. The account and model parameters are optional if there are not multiple accounts or models available. It is more efficient to use this function for a specific subset of accounts than using EClient.reqPositions. A profile name can be accepted in place of group in the account parameter.
Request Positions by Model
EClient.reqPositionsMulti(requestId, account, modelCode)
Requests position subscription for account and/or model. Initially all positions are returned, and then updates are returned for any position changes in real time.
Request’s identifier.
If an account Id is provided, only the account’s positions belonging to the specified model will be delivered.
The code of the model’s positions we are interested in.
Python
Python (Full Example)
Java
C++
C#
VB.NET
Receive Positions by Model
EWrapper.positionMulti
EWrapper.positionMulti(requestId, account, modelCode, contract, pos, avgCost)
Provides the portfolio’s open positions.
The id of request.
The account holding the position.
The model code holding the position.
The position’s Contract.
The number of positions held.
The average cost of the position.
Python
Java
C++
C#
VB.NET
EWrapper.positionMultiEnd
EWrapper.positionMultiEnd(requestId)
Indicates all the positions have been transmitted.
The id of request.
Python
Java
C++
C#
VB.NET
Cancel Positions by Model
EClient.cancelPositionsMulti(requestId)
Cancels positions request for account and/or model.
The identifier of the request to be canceled.

