hbdmapi / huobi_futures_Python

An Asynchronous Event-driven High-frequency Trading System,huobi future,huobi coin margined swap, huobi usdt margined swap included.
MIT License
267 stars 113 forks source link

details wanted #54

Closed Sinever closed 3 years ago

Sinever commented 3 years ago

how could I get data details, including but not limited to market, trade and kline. for example: image what do the fields amount, quantity, trade_turnover, ts, id mean. and so do they. "MARKETS": [ { "platform": "huobi_usdt_swap", "channels":[ "orderbook", "kline", "trade" ], "orderbook_length": 10, "orderbooks_length": 1000, "klines_length": 10, "trades_length": 1000, "wss": "wss://api.hbdm.vn"

    }
],

thank you.

foonsun commented 3 years ago

Dear Sinever,

1、

The example above with the websocket topic: market.BTC-USDT.trade.detail has been integrated just as "trade" in config.json:

https://github.com/hbdmapi/huobi_futures_Python/blob/master/examples/huobi_usdt_swap/config.json#L25

"MARKETS": [
{
"platform": "huobi_usdt_swap",
"channels":[
"orderbook", "kline", "trade"
],
"orderbook_length": 10,
"orderbooks_length": 1000,
"klines_length": 10,
"trades_length": 1000,
"wss": "wss://api.hbdm.vn"

    }
]

2、

amount field means quantity(Cont.),Sum of both buy and sell sides. such as 200,2000,etc.

quantity field means quantity in coin.

turnover filed means trade turnover(quoted currency).

ts field means trade timestamp.

id field means unique transaction Id(symbol level).

https://docs.huobigroup.com/docs/usdt_swap/v1/en/#general-subscribe-trade-detail-data

3、

channels means the data need to subscribe.

such as kline means the kline subscription of 1MIN kline,

orderbook means the 20 level orderbook subscription,

trade means the market trade detail subscription.

The length means that the max size of the data to be stored.

Thanks.