{
"method": "subscribe",
"params": {
"channel": "book",
"symbol": [
"PF_ETHUSD"
],
"depth": 25,
"asset_type": "perpetual",
"country": "DE"
},
"req_id": 3
}
{
"method": "unsubscribe",
"params": {
"channel": "book",
"symbol": [
"PF_ETHUSD"
],
"asset_type": "perpetual",
"country": "DE"
},
"req_id": 4
}
{
"channel": "book",
"type": "snapshot",
"data": [
{
"symbol": "PF_ETHUSD",
"bids": [
{
"price": "2359.4",
"quantity": "3.966"
},
{
"price": "2359.3",
"quantity": "14"
}
],
"asks": [
{
"price": "2359.6",
"quantity": "1.2"
},
{
"price": "2359.7",
"quantity": "8.5"
}
]
}
]
}
{
"channel": "book",
"type": "update",
"data": [
{
"symbol": "PF_ETHUSD",
"bids": [
{
"price": "2359.4",
"quantity": "0"
}
],
"asks": [
{
"price": "2359.6",
"quantity": "2.4"
}
]
}
]
}
{
"method": "subscribe",
"req_id": 3,
"success": false,
"error": "NotFound",
"result": {
"channel": "book",
"symbol": "PF_NONE"
}
}
Market data stream
Book (level 2)
The book channel streams the level 2 order book: the aggregated quantity at each price level, best first.
- International/EEA offering: a
snapshot, thenupdates of the changed levels. Aquantityof0removes a level. - US offering: every message is a
snapshotthat replaces the book.
{
"method": "subscribe",
"params": {
"channel": "book",
"symbol": [
"PF_ETHUSD"
],
"depth": 25,
"asset_type": "perpetual",
"country": "DE"
},
"req_id": 3
}
{
"method": "unsubscribe",
"params": {
"channel": "book",
"symbol": [
"PF_ETHUSD"
],
"asset_type": "perpetual",
"country": "DE"
},
"req_id": 4
}
{
"channel": "book",
"type": "snapshot",
"data": [
{
"symbol": "PF_ETHUSD",
"bids": [
{
"price": "2359.4",
"quantity": "3.966"
},
{
"price": "2359.3",
"quantity": "14"
}
],
"asks": [
{
"price": "2359.6",
"quantity": "1.2"
},
{
"price": "2359.7",
"quantity": "8.5"
}
]
}
]
}
{
"channel": "book",
"type": "update",
"data": [
{
"symbol": "PF_ETHUSD",
"bids": [
{
"price": "2359.4",
"quantity": "0"
}
],
"asks": [
{
"price": "2359.6",
"quantity": "2.4"
}
]
}
]
}
{
"method": "subscribe",
"req_id": 3,
"success": false,
"error": "NotFound",
"result": {
"channel": "book",
"symbol": "PF_NONE"
}
}
{
"method": "subscribe",
"params": {
"channel": "book",
"symbol": [
"PF_ETHUSD"
],
"depth": 25,
"asset_type": "perpetual",
"country": "DE"
},
"req_id": 3
}
{
"method": "unsubscribe",
"params": {
"channel": "book",
"symbol": [
"PF_ETHUSD"
],
"asset_type": "perpetual",
"country": "DE"
},
"req_id": 4
}
{
"channel": "book",
"type": "snapshot",
"data": [
{
"symbol": "PF_ETHUSD",
"bids": [
{
"price": "2359.4",
"quantity": "3.966"
},
{
"price": "2359.3",
"quantity": "14"
}
],
"asks": [
{
"price": "2359.6",
"quantity": "1.2"
},
{
"price": "2359.7",
"quantity": "8.5"
}
]
}
]
}
{
"channel": "book",
"type": "update",
"data": [
{
"symbol": "PF_ETHUSD",
"bids": [
{
"price": "2359.4",
"quantity": "0"
}
],
"asks": [
{
"price": "2359.6",
"quantity": "2.4"
}
]
}
]
}
{
"method": "subscribe",
"req_id": 3,
"success": false,
"error": "NotFound",
"result": {
"channel": "book",
"symbol": "PF_NONE"
}
}
Body
application/json
The command you send.
Subscribes to feeds, or unsubscribes from them.
Response
default - application/json
The messages the server sends on this channel.