Skip to main content
POST
/
ws
/
positionsPerps
Subscribe: Perps Positions
curl --request POST \
  --url wss://api.ondoperps.xyz/ws/positionsPerps \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": "subscribe",
  "channel": "positionsPerps"
}
'
{
  "type": "update",
  "channel": "positionsPerps",
  "data": [
    {
      "market": "AAPL-USD.P",
      "direction": "long",
      "netQuantity": "10.00",
      "averageEntryPrice": "225.00",
      "usedMargin": "1125.00",
      "unrealizedPnl": "25.00",
      "markPrice": "227.50",
      "liquidationPrice": "180.00",
      "bankruptcyPrice": "170.00",
      "maintenanceMargin": "112.50",
      "notionalValue": "2275.00",
      "leverage": "2.0",
      "netFundingSinceNeutral": "-1.23",
      "returnOnEquity": "0.022"
    }
  ]
}

Body

application/json
op
enum<string>
required

Operation type.

Available options:
subscribe,
unsubscribe
Example:

"subscribe"

channel
enum<string>
required

Channel for this subscription.

Available options:
positionsPerps
Example:

"positionsPerps"

Response

200 - application/json

Channel update for positionsPerps

type
enum<string>
Available options:
update
channel
enum<string>
Available options:
positionsPerps
data
object[]