Skip to main content
POST
/
ws
/
tradesPerps
Subscribe: Perps Trades
curl --request POST \
  --url wss://api.ondoperps.xyz/ws/tradesPerps \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": "subscribe",
  "channel": "tradesPerps",
  "markets": [
    "NVDA-USD.P"
  ],
  "numPastTrades": 50
}
'
{
  "type": "update",
  "channel": "tradesPerps",
  "data": [
    {
      "market": "AAPL-USD.P",
      "price": "227.50",
      "size": "5.00",
      "cost": "1137.50",
      "aggressor_side": "buy",
      "time": "2025-03-05T14:30:00Z",
      "id": "70a37d8f972f2494837f9dba8364cbb4"
    }
  ]
}

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

"tradesPerps"

markets
string[]

Markets to filter by. Optional; if omitted, all available markets are used.

Example:
["NVDA-USD.P"]
numPastTrades
integer

Number of historical trades to receive on subscribe.

Example:

50

Response

200 - application/json

Channel update for tradesPerps

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