Huobi Global is going to push order cancellation event through existing Websocket subscription channel -trade.clearing#${symbol}

huobi.proIssued on 2020/06/23 17:49    Content based on the original text . Link

Dear API user,

Currently, the Websocket channel trade.clearing#${symbol} only disseminates order transaction event to subscriber.

Since the effective date of this notification, Huobi Global will add order cancellation event in this channel, as well as some new fields in the message.

 

Effective Date: June 29, 2020 (GMT+8)

All the changes will be updated on Huobi API Docs.

Huobi Global
June 23, 2020


 

Change Details

Subscribe Trade & Cancellation Details post Clearing

API Key Permission: Read

The channel disseminates an update whenever an order transaction is made or an order cancellation occurs. Order transaction is disseminated in tick by tick mode which means, if a taker matching with multiple makers at the same time, the multiple trades will be disseminated over the channel one by one, instead of a merged one. But in this case, the message sequence of the multiple trades is not guaranteed. It can be different with the actual maker’s queue. Moreover, if an IOC order being partially filled followed by partial cancellation automatically, a cancellation message might be received first, prior to its partial trade arrival.

Subscription Topic

trade.clearing#${symbol}

Subscription

Field Data Type Description
symbol string Trading symbol (wildcard * is allowed)

Update Content (post a trade)

Field Data Type Description
eventType string Event type (trade)
symbol string Trading symbol
orderId long Order ID
tradePrice string Trade price
tradeVolume string Trade volume
orderSide string Order side, valid value: buy, sell
orderType string Order type, valid value: buy-market, sell-market,buy-limit,sell-limit,buy-ioc,sell-ioc,buy-limit-maker,sell-limit-maker,buy-stop-limit,sell-stop-limit,buy-limit-fok, sell-limit-fok, buy-stop-limit-fok, sell-stop-limit-fok
aggressor bool Aggressor or not, valid value: true, false
tradeId long Trade ID
tradeTime long Trade time, unix time in millisecond
transactFee string Transaction fee (positive value) or transaction fee rebate (negative value)
feeCurrency string Currency of transaction fee or transaction fee rebate (transaction fee of buy order is based on base currency, transaction fee of sell order is based on quote currency; transaction fee rebate of buy order is based on quote currency, transaction fee rebate of sell order is based on base currency)
feeDeduct string Transaction fee deduction
feeDeductType string Transaction fee deduction type, valid value: ht, point
accountId long Account ID
source string Order source
orderPrice string Order price  (unavailable for market order)
orderSize string Order size (unavailable for market buy order)
orderValue string Order value (only available for market buy order)
clientOrderId string Client order ID
stopPrice string Stop price (only available for stop limit order)
operator string Operation character of stop price (only available for stop limit order)
orderCreateTime long Order creation time
orderStatus string Order status, valid value: filled, partial-filled

Update Content (post a cancellation)

 

Field Data Type Description
eventType string Event type (cancellation)
symbol string Currency pair
orderId long Order ID
orderSide string Order side, valid value: buy, sell
orderType string Order type, valid value: buy-market, sell-market,buy-limit,sell-limit,buy-ioc,sell-ioc,buy-limit-maker,sell-limit-maker,buy-stop-limit,sell-stop-limit,buy-limit-fok, sell-limit-fok, buy-stop-limit-fok, sell-stop-limit-fok
accountId long Account ID
source string Order source
orderPrice string Order price  (unavailable for market order)
orderSize string Order size (unavailable for market buy order)
orderValue string Order value (only available for market buy order)
clientOrderId string Client order ID
stopPrice string Stop price (only available for stop limit order)
operator string Operation character of stop price (only available for stop limit order)
orderCreateTime long Order creation time
remainAmt string Unfilled amount (unfilled value for market buy order)
orderStatus string Order status, valid value: canceled, partial-canceled

What are the Impacts on You, and What You Need to Do?

API users should evaluate the business impact caused by the enhancement, further to make relevant change in client’s application, if needed.

All the changes will be updated on Huobi API Docs on the effective date.