mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 23:16:53 +00:00
Huobi: V2 subscription support (#1703)
* Huobi: assertify tests * Testing: Add FixtureToDataHandlerWithErrors * Huobi: Add V2 websocket support * Huobi: Fix tests racing on updatePairsOnce * Huobi: Remove unnecessary funnelData * Huobi: Clarify V1/V2 pings * Huobi: Switch to types.Time * Huobi: Disable websocket Futures and CoinMarginedFutures support * Huobi: Fix test failures on futureContracts Per-instance future codes not getting cached causin occassional fails * Huobi: Fix idiosyncratic naming using TestWs instead of TestWS * Huobi: Run WS tests in parallel
This commit is contained in:
1
exchanges/huobi/testdata/wsAllTrades.json
vendored
Normal file
1
exchanges/huobi/testdata/wsAllTrades.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"ch":"market.btcusdt.trade.detail","ts":1630994963175,"tick":{"id":137005445109,"ts":1630994963173,"data":[{"id":137005445109359290000000000,"ts":1630994963173,"tradeId":102523573486,"amount":0.006754,"price":52648.62,"direction":"buy"}]}}
|
||||
1
exchanges/huobi/testdata/wsCandles.json
vendored
Normal file
1
exchanges/huobi/testdata/wsCandles.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"ch":"market.btcusdt.kline.1min","ts":1489474082831,"tick":{"id":1489464480,"amount":1821.49,"count":4,"open":7962.62,"close":8014.56,"low":5110.14,"high":14962.77,"vol":4.4}}
|
||||
3
exchanges/huobi/testdata/wsMyAccount.json
vendored
Normal file
3
exchanges/huobi/testdata/wsMyAccount.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{"action":"push","ch":"accounts.update#2","data":{"currency":"btc","accountId":123456,"balance":"23.111","changeType":"transfer","accountType":"trade","seqNum":1,"changeTime":1568601800000}}
|
||||
{"action":"push","ch":"accounts.update#2","data":{"currency":"btc","accountId":33385,"available":"2028.69","changeType":"order.match","accountType":"trade","seqNum":2,"changeTime":1574393385167}}
|
||||
{"action":"push","ch":"accounts.update#2","data":{"currency":"usdt","accountId":14884859,"balance":"20.29388158","available":"20.29388158","changeType":null,"accountType":"trade","changeTime":null,"seqNum":3}}
|
||||
4
exchanges/huobi/testdata/wsMyOrders.json
vendored
Normal file
4
exchanges/huobi/testdata/wsMyOrders.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{"action":"push","ch":"orders#*","data":{"orderSide":"buy","lastActTime":1583853365586,"clientOrderId":"test1","orderStatus":"rejected","symbol":"btcusdt","eventType":"trigger","errCode":2002,"errMessage":"invalid.client.order.id (NT)"}}
|
||||
{"action":"push","ch":"orders#*","data":{"orderSide":"buy","lastActTime":1583853365586,"clientOrderId":"test2","orderStatus":"canceled","symbol":"btcusdt","eventType":"deletion"}}
|
||||
{"action":"push","ch":"orders#*","data":{"orderSize":"2.000000000000000000","orderCreateTime":1583853365586,"accountld":992701,"orderPrice":"77.000000000000000000","type":"sell-limit","orderId":27163533,"clientOrderId":"test3","orderSource":"spot-api","orderStatus":"submitted","symbol":"btcusdt","eventType":"creation"}}
|
||||
{"action":"push","ch":"orders#*","data":{"orderSource":"spot-web","accountId":16820007,"orderPrice":"70000","orderSize":"0.000157","orderCreateTime":1731039387696,"symbol":"btcusdt","eventType":"creation","type":"buy-limit","orderId":1199329381585359,"clientOrderId":"","orderStatus":"submitted"}}
|
||||
1
exchanges/huobi/testdata/wsMyTrades.json
vendored
Normal file
1
exchanges/huobi/testdata/wsMyTrades.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"ch":"trade.clearing#btcusdt#1","data":{"eventType":"trade","symbol":"btcusdt","orderId":99998888,"tradePrice":"9999.99","tradeVolume":"0.96","orderSide":"buy","aggressor":true,"tradeId":919219323232,"tradeTime":1583853365996,"transactFee":"19.88","feeDeduct ":"0","feeDeductType":"","feeCurrency":"btc","accountId":9912791,"source":"spot-api","orderPrice":"10000","orderSize":"1","clientOrderId":"a001","orderCreateTime":1583853365586,"orderStatus":"partial-filled"}}
|
||||
1
exchanges/huobi/testdata/wsOrderbook.json
vendored
Normal file
1
exchanges/huobi/testdata/wsOrderbook.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"ch":"market.btcusdt.depth.step0","ts":1630983549503,"tick":{"bids":[[52690.69,0.36281],[52690.68,0.2]],"asks":[[52690.7,0.372591],[52691.26,0.13]],"version":136998124622,"ts":1630983549500}}
|
||||
1
exchanges/huobi/testdata/wsTicker.json
vendored
Normal file
1
exchanges/huobi/testdata/wsTicker.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"ch":"market.btcusdt.detail","ts":1630998026649,"tick":{"id":273956868110,"low":51000,"high":52924.14,"open":51823.62,"close":52379.99,"vol":727676440.200527,"amount":13991.028076056185,"version":273956868110,"count":471348}}
|
||||
Reference in New Issue
Block a user