Messages
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"quote.BTC-PERPETUAL"
]
}
}{
"data": {
"best_ask_amount": 50,
"best_ask_price": 3996.61,
"best_bid_amount": 40,
"best_bid_price": 3914.97,
"instrument_name": "BTC-PERPETUAL",
"timestamp": 1550658624149
}
}Market Data
quote.(instrument_name)
Best bid/ask price and size for a specific instrument.
This subscription provides top-of-book updates (best bid and best ask) without the full depth of the order book. Use it when you only need the current spread and top sizes.
Messages
{
"jsonrpc": "2.0",
"method": "public/subscribe",
"id": 42,
"params": {
"channels": [
"quote.BTC-PERPETUAL"
]
}
}{
"data": {
"best_ask_amount": 50,
"best_ask_price": 3996.61,
"best_bid_amount": 40,
"best_bid_price": 3914.97,
"instrument_name": "BTC-PERPETUAL",
"timestamp": 1550658624149
}
}instrument_name
type:string
required
Instrument name
Subscription Request
type:object
Client sends subscription request to subscribe to notification channel. Please refer to Notification page for more information.
jsonrpc
type:string
required
2.0
id
type:integer
required
method
type:enum
required
Available options:
public/subscribe, private/subscribeparams
type:object
required
channels
type:array
required
item
type:string
Subscription Notification Data
type:object
Server sends subscription notification data
data
type:object
required
timestamp
type:integer
required
The timestamp (milliseconds since the Unix epoch)
instrument_name
type:string
required
Unique instrument identifier
best_bid_price
type:numbernull
required
The current best bid price, 0 if the bid side is empty
best_bid_amount
type:numbernull
required
It represents the requested order size of all best bids
best_ask_price
type:numbernull
The current best ask price, 0 if the ask side is empty
best_ask_amount
type:numbernull
It represents the requested order size of all best asks
Was this page helpful?