Skip to main content
POST
/
ws
/
kLinePerps
Subscribe: Perps Kline / Candlesticks
curl --request POST \
  --url wss://api.ondoperps.xyz/ws/kLinePerps \
  --header 'Content-Type: application/json' \
  --data '
{
  "op": "subscribe",
  "channel": "kLinePerps",
  "markets": [
    "NVDA-USD.P"
  ],
  "resolution": "1H"
}
'
{
  "type": "update",
  "channel": "kLinePerps",
  "data": {
    "m": "AAPL-USD.P",
    "t": 1709648400,
    "s": 1709648340,
    "e": 1709648400,
    "o": 226.8,
    "h": 228.1,
    "l": 226.5,
    "c": 227.5,
    "v": 12345.67,
    "x": false
  }
}

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

"kLinePerps"

markets
string[]
required

Market to subscribe to. Exactly one market is required.

Example:
["NVDA-USD.P"]
resolution
enum<string>
required

Kline resolution.

Available options:
1,
5,
15,
1H,
4H,
1D,
1W
Example:

"1H"

Response

200 - application/json

Channel update for kLinePerps

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

Candlestick/kline data point