Syntax
GetOpenPositions (AccountId As Long)
|
Description
The GetOpenPositions operation is used to return a List (of Position(s)) which holds a given account open positions.
Request Parameters
Name |
Description |
Required |
AccountId |
- The intended account identifier.
- Type: Long.
- Default: None.
- Constraints: Must be a valid account ID, and accessible by logged in client.
|
Yes |
Response Elements
Name |
Description |
Result |
This operation returns a given account open positions upon success as a list of type position. The following are the Position data members:
- ProfitLoss: Profit or loss value.
- PositionValue: Position value.
- Commission: Commission value.
- Interest: Position Interest value.
- OpenPrice: Position open price.
- CurrentPrice: Current position price.
- Symbol: Trading symbol ID.
- SL: 0 Means NO SL , 1 Means there is a SL
- TP: 0 Means NO TP , 1 Means there is a TP
- SymbolName: Trading symbol name.
- BuySell:
1:Which means buy type. -1:Which means sell type.
- RefPrice: Reference symbol price.
- OpenValue: Position Open Value
- Note: Position note.
- delItems: Deliver Items.
- ID: Position ticket Identifier.
- Time: Position opened time.
- Amount: Position amount.
- IsFreezed: Detected if the open position is freezed or not
Otherwise, an expliciterror codeis returned.
Type: JSON object as List (of Position)
|
Note : You have to call GetPendingOrder method if you want to get the value of the SL/TP .
Sample
Download sampleas text file.
GetOpenPositionsLoading ...
Loading ...