Skip to main content

Position Updates

Method: WebSocket

Description


Retrieve updates on positions as they occur in real time.

Response Attributes


NameTypeDescription
idintegerThe id associated with the Position.
symbolIdstringThe symbol associated with the Position.
openPnldecimalThe profit and loss associated with the open position.
positionSizeintegerThe size of the Position. A positive value is a long position. A negative value is a short position.
averagePricedecimalThe average entry price of the Position.
contractstringThe contract associated with the Position.
contractIdstringThe contract id associated with the Position.
contractGroupstringThe contract group associated with the Position.
tradingAccountIdintegerThe id of the Trading Account associated with the Position.
timestampdatetimeThe timestamp indicating when the information was sent from the backend.
createdAtdatetimeThe date and time when the Position created.
updatedAtdatetimeThe date and time when the Position was updated.
stopLossdecimalThe price at which the Stop Loss will execute.
takeProfitdecimalThe price at which the Take Profit order will execute.
toMakedecimalThe To Make value associated with the Position.
riskdecimalThe Risk value associated with the Position
stopLossOrderIdintegerThe order id associated with the Position's Stop Loss.
takeProfitOrderIdintegerThe order id associated with the Position's Take Profit.

Example Usage


Example Response

    {
"data": {
"id": 4231,
"symbolId": "F.US.BP6",
"openPnl": -18.75,
"positionSize": 0,
"averagePrice": 1.2665,
"contract": "6BH5",
"contractId": null,
"contractGroup": "/6B",
"tradingAccountId": 233,
"timestamp": "2025-02-25T19:20:49.885871+00:00",
"createdAt": "2025-02-25T18:57:39.542302+00:00",
"updatedAt": "2025-02-25T19:19:28.829349+00:00",
"stopLoss": null,
"takeProfit": null,
"toMake": null,
"risk": null,
"stopLossOrderId": null,
"takeProfitOrderId": null
},
"action": 0 // 0 = create, 1 = update, 2 = delete/remove
}