{
"op": "subscribe",
"args": [ { "channel": "positions" } ]
}
{
"type": "position",
"data": [
{
"id": "pos-uuid",
"symbol": "US500-BTC",
"accountId": "acct-uuid",
"side": "long",
"entryAmount": "1.000",
"exitAmount": "0.500",
"size": "0.500",
"tradeMode": "isolated",
"openDate": 1640995200000,
"closeDate": null,
"avgEntry": "50000.00",
"avgExit": null,
"entryFees": "0.00100000",
"exitFees": null,
"positionBalance": "0.05000000",
"initialMargin": "0.05000000",
"maintenanceMargin": "0.00500000",
"liquidationPrice": "45000.00",
"leverage": "10.0",
"unrealizedPnl": "0.00100000",
"realizedPnl": "0.00200000",
"markPrice": "52500.00",
"status": "normal",
"updatedAt": 1640995200000000000,
"createdAt": 1640995200000000000
}
]
}
Real-time position changes and PnL via WebSocket
{
"op": "subscribe",
"args": [ { "channel": "positions" } ]
}
{
"type": "position",
"data": [
{
"id": "pos-uuid",
"symbol": "US500-BTC",
"accountId": "acct-uuid",
"side": "long",
"entryAmount": "1.000",
"exitAmount": "0.500",
"size": "0.500",
"tradeMode": "isolated",
"openDate": 1640995200000,
"closeDate": null,
"avgEntry": "50000.00",
"avgExit": null,
"entryFees": "0.00100000",
"exitFees": null,
"positionBalance": "0.05000000",
"initialMargin": "0.05000000",
"maintenanceMargin": "0.00500000",
"liquidationPrice": "45000.00",
"leverage": "10.0",
"unrealizedPnl": "0.00100000",
"realizedPnl": "0.00200000",
"markPrice": "52500.00",
"status": "normal",
"updatedAt": 1640995200000000000,
"createdAt": 1640995200000000000
}
]
}
positions
channel.
Property | Value |
---|---|
Channel Name | positions |
Authentication | Required |
Update Frequency | On position changes |
Data Type | Array of position objects |
{
"op": "subscribe",
"args": [ { "channel": "positions" } ]
}
{
"type": "position",
"data": [
{
"id": "pos-uuid",
"symbol": "US500-BTC",
"accountId": "acct-uuid",
"side": "long",
"entryAmount": "1.000",
"exitAmount": "0.500",
"size": "0.500",
"tradeMode": "isolated",
"openDate": 1640995200000,
"closeDate": null,
"avgEntry": "50000.00",
"avgExit": null,
"entryFees": "0.00100000",
"exitFees": null,
"positionBalance": "0.05000000",
"initialMargin": "0.05000000",
"maintenanceMargin": "0.00500000",
"liquidationPrice": "45000.00",
"leverage": "10.0",
"unrealizedPnl": "0.00100000",
"realizedPnl": "0.00200000",
"markPrice": "52500.00",
"status": "normal",
"updatedAt": 1640995200000000000,
"createdAt": 1640995200000000000
}
]
}
Show Position properties
long
or short
isolated
normal
, liquidation
, or adl
Was this page helpful?