Skip to main content
POST
/
ws
/
topOfBooksPerps
Subscribe: Perps Top of Book
curl --request POST \
  --url wss://api.ondoperps.xyz/ws/topOfBooksPerps \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": "subscribe",
  "channel": "topOfBooksPerps",
  "markets": [
    "NVDA-USD.P"
  ]
}
'
{
  "type": "update",
  "channel": "topOfBooksPerps",
  "data": [
    {
      "market": "AAPL-USD.P",
      "time": "2025-03-05T14:30:00Z",
      "asks": [
        {
          "price": "227.60",
          "size": "80.0"
        }
      ],
      "bids": [
        {
          "price": "227.40",
          "size": "100.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:
topOfBooksPerps
Example:

"topOfBooksPerps"

markets
string[]

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

Example:
["NVDA-USD.P"]

Response

200 - application/json

Channel update for topOfBooksPerps

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