Messages
{
"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
}
}实时数据频道
PolyBolt WebSocket 消息参考,涵盖加密货币、股票类资产和 TWAP 参考价格。
WSS
/
ws
Messages
{
"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
}
}subscribe
unsubscribe
auth
type:object
ping
type:object
challenge (request)
type:object
Ask for this connection's challenge nonce
challenge
type:object
This connection's challenge nonce, the answer to a challenge request; never pushed unasked
subscribed
type:object
unsubscribed
type:object
authed
type:object
pong
type:object
error
type:object
price.polymarket envelope
type:object
price.crypto envelope
type:object
price.equity envelope
type:object
price.crypto.twap envelope
type:object
此页面对您有帮助吗?