Skip to main content
POST
/
ws
/
depthBooksPerps
Subscribe: Perps Depth Book
curl --request POST \
  --url wss://api.ondoperps.xyz/ws/depthBooksPerps \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": "subscribe",
  "channel": "depthBooksPerps",
  "markets": [
    "NVDA-USD.P"
  ],
  "depthLevels": "0.01",
  "limit": 20
}
'
{
  "data": [
    {
      "market": "AAPL-USD.P",
      "time": "2025-03-05T14:30:00Z",
      "asks": [
        {
          "price": "227.60",
          "size": "80.0"
        },
        {
          "price": "227.70",
          "size": "150.0"
        }
      ],
      "bids": [
        {
          "price": "227.40",
          "size": "100.0"
        },
        {
          "price": "227.30",
          "size": "250.0"
        }
      ]
    }
  ]
}

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

"depthBooksPerps"

markets
string[]

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

Example:
["NVDA-USD.P"]
depthLevels
string

Price grouping level for the depth book.

Example:

"0.01"

limit
integer

Maximum depth levels to return; 0 for unlimited.

Example:

20

Response

200 - application/json

Channel update for depthBooksPerps

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