HTX API is going to add a new subscription topic in existing Websocket API: “market.$symbol.mbp.refresh.$levels” – MBP refresh update

Dear API user,

Since the effective day of this notification, HTX is going to add a new subscription topic “market.$symbol.mbp.refresh.$levels” in existing Websocket API service, to disseminate refresh update of MBP (Market by Price) order book in fixed interval.

 

Effective Date: March 30, 2020 (GMT+8)

All the changes will be updated on https://huobiapi.github.io/docs/spot/v1/en/

HTX
March 31, 2020

 

The following is the subscription example

{

"sub": "market.btcusdt.mbp.refresh.20",

"id": "id1"

}

 

Request Parameters

Field Data Type Mandatory Default Value Description Valid Value
symbol string true NA Trading symbol (wildcard inacceptable) See note 2
levels integer true NA Number of levels of MBP book 5, 10, 20

Notes:

1) The update interval is 100ms if number of levels is set as 5, 10, or 20.

2) Only support 39 currency pairs at this point of time - btcusdt, ethusdt, eosusdt, bchusdt, ltcusdt, xrpusdt, htusdt, bsvusdt, etcusdt, zecusdt, ethbtc, eosbtc, bchbtc, ltcbtc, xrpbtc, htbtc, bsvbtc, etcbtc, zecbtc, idtbtc, hotbtc, xmxeth, zechusd, lxteth, ucbtc, uuubtc, gtceth, mxcbtc, datxbtc, uipbtc, butbtc, tosbtc, musketh, ftibtc, rteeth, fairbtc, covabtc, renbtc, manbtc.

 

Response example

{

"id": "id1",

"status": "ok",

"subbed": "market.btcusdt.mbp.refresh.20",

"ts": 1489474081631

}

 

Update example

{

"ch": "market.btcusdt.mbp.refresh.20",

"ts": 1573199608679,

"tick": {

 

              "seqNum": 100020142010,

              "bids": [

                     [618.37, 71.594], // [price, size]

                     [423.33, 77.726],

                     [223.18, 47.997],

                     [219.34, 24.82],

                     [210.34, 94.463], ... // rest levels omitted

            ],

              "asks": [

                     [650.59, 14.909733438479636],

                     [650.63, 97.996],

                     [650.77, 97.465],

                     [651.23, 83.973],

                     [651.42, 34.465], ... // rest levels omitted

              ]

}

}

 

Update Contents

Field Data Type Description
seqNum integer Message sequence number
bids object Bids, in format of ["price","size"], in descending order of “price”
asks object Offers, in format of ["price","size"], in ascending order of “price”