{
"op": "subscribe",
"rid": "s1",
"subscriptions": [
{
"channel": "price.polymarket",
"filter": {
"asset_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455"
}
},
{
"channel": "price.crypto",
"filter": {
"symbol": "btcusd"
}
}
]
}{
"op": "unsubscribe",
"channel": "price.crypto",
"filter": {
"symbol": "btcusd"
}
}{
"op": "auth",
"rid": "a1",
"auth": {
"apiKey": "00000000-0000-4000-8000-000000000000",
"secret": "<api secret>",
"passphrase": "<api passphrase>"
}
}{
"op": "ping",
"rid": "p1"
}{
"op": "challenge",
"rid": "c1"
}{
"op": "challenge",
"nonce": "3f2b6c1e-9a4d-4c2b-8e1f-0a1b2c3d4e5f",
"rid": "c1"
}{
"op": "subscribed",
"channel": "price.crypto",
"rid": "s1"
}{
"op": "unsubscribed",
"channel": "price.crypto"
}{
"op": "authed",
"rid": "a1"
}{
"op": "pong",
"rid": "p1"
}{
"op": "error",
"code": "auth_required",
"channel": "price.crypto",
"rid": "s1"
}{
"v": 1,
"channel": "price.polymarket",
"seq": 1,
"ts": 1788973000123,
"snapshot": true,
"payload": {
"market": "0x9deb0baac40648821f96f01339229a422e2f5c877de55dc4dbf981f95a1e709c",
"asset_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
"best_bid": "0.51",
"best_ask": "0.53",
"hash": "3f9c1e7a",
"timestamp": 1788972999871
}
}{
"v": 1,
"channel": "price.crypto",
"seq": 1,
"ts": 1788973000000,
"snapshot": true,
"payload": {
"symbol": "btcusd",
"data": [
{
"timestamp": 1788972880000,
"value": 64123.5,
"full_accuracy_value": "64123.50000000"
},
{
"timestamp": 1788972881000,
"value": 64125.1,
"full_accuracy_value": "64125.10000000"
}
]
}
}{
"v": 1,
"channel": "price.equity",
"seq": 5,
"ts": 1788973001200,
"payload": {
"symbol": "aapl",
"value": 189.42,
"full_accuracy_value": "189.4217",
"timestamp": 1788973001200,
"received_at": 1788973001207,
"is_carried_forward": false
}
}{
"v": 1,
"channel": "price.crypto.twap",
"seq": 3,
"ts": 1788973002000,
"payload": {
"symbol": "btcusd",
"value": 64120.7,
"full_accuracy_value": "64120.70000000",
"timestamp": 1788973002000,
"window_seconds": 60
}
}Live Data Channel
Send JSON text frames tagged with op. The server answers every op with an ack or an error ack (never a close, except for policy breaches, close 4008) and pushes envelopes for subscribed channels. Limits per connection: 64 active (channel, filter) subscriptions, 20 subscribe or unsubscribe frames per second (a batch frame counts once), 64 KB per frame, 8 auth attempts. The server sends a WebSocket ping every 25 seconds; two missed pongs close 4002. Close codes: 4001 authentication failed on a presented credential, 4002 slow consumer or pong timeout, 4003 server draining (reconnect once after a uniform 0 to 10 s delay), 4008 policy violation (fix the client; do not reconnect blindly).
{
"op": "subscribe",
"rid": "s1",
"subscriptions": [
{
"channel": "price.polymarket",
"filter": {
"asset_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455"
}
},
{
"channel": "price.crypto",
"filter": {
"symbol": "btcusd"
}
}
]
}{
"op": "unsubscribe",
"channel": "price.crypto",
"filter": {
"symbol": "btcusd"
}
}{
"op": "auth",
"rid": "a1",
"auth": {
"apiKey": "00000000-0000-4000-8000-000000000000",
"secret": "<api secret>",
"passphrase": "<api passphrase>"
}
}{
"op": "ping",
"rid": "p1"
}{
"op": "challenge",
"rid": "c1"
}{
"op": "challenge",
"nonce": "3f2b6c1e-9a4d-4c2b-8e1f-0a1b2c3d4e5f",
"rid": "c1"
}{
"op": "subscribed",
"channel": "price.crypto",
"rid": "s1"
}{
"op": "unsubscribed",
"channel": "price.crypto"
}{
"op": "authed",
"rid": "a1"
}{
"op": "pong",
"rid": "p1"
}{
"op": "error",
"code": "auth_required",
"channel": "price.crypto",
"rid": "s1"
}{
"v": 1,
"channel": "price.polymarket",
"seq": 1,
"ts": 1788973000123,
"snapshot": true,
"payload": {
"market": "0x9deb0baac40648821f96f01339229a422e2f5c877de55dc4dbf981f95a1e709c",
"asset_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
"best_bid": "0.51",
"best_ask": "0.53",
"hash": "3f9c1e7a",
"timestamp": 1788972999871
}
}{
"v": 1,
"channel": "price.crypto",
"seq": 1,
"ts": 1788973000000,
"snapshot": true,
"payload": {
"symbol": "btcusd",
"data": [
{
"timestamp": 1788972880000,
"value": 64123.5,
"full_accuracy_value": "64123.50000000"
},
{
"timestamp": 1788972881000,
"value": 64125.1,
"full_accuracy_value": "64125.10000000"
}
]
}
}{
"v": 1,
"channel": "price.equity",
"seq": 5,
"ts": 1788973001200,
"payload": {
"symbol": "aapl",
"value": 189.42,
"full_accuracy_value": "189.4217",
"timestamp": 1788973001200,
"received_at": 1788973001207,
"is_carried_forward": false
}
}{
"v": 1,
"channel": "price.crypto.twap",
"seq": 3,
"ts": 1788973002000,
"payload": {
"symbol": "btcusd",
"value": 64120.7,
"full_accuracy_value": "64120.70000000",
"timestamp": 1788973002000,
"window_seconds": 60
}
}Ask for this connection's challenge nonce
This connection's challenge nonce, the answer to a challenge request; never pushed unasked
Was this page helpful?