Skip to main content
POST
/
ws
/
balancePerps
Subscribe: Perps Balance
curl --request POST \
  --url wss://api.ondoperps.xyz/ws/balancePerps \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": "subscribe",
  "channel": "balancePerps"
}
'
{
  "type": "update",
  "channel": "balancePerps",
  "data": {
    "walletBalance": "5000.00",
    "realizedPnl": "250.00",
    "unrealizedPnl": "-50.00",
    "marginBalance": "4950.00",
    "usedMargin": "1125.00"
  }
}

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:
balancePerps
Example:

"balancePerps"

Response

200 - application/json

Channel update for balancePerps

type
enum<string>
Available options:
update
channel
enum<string>
Available options:
balancePerps
data
object