mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
kucoin: record kucoin json as files
This commit is contained in:
parent
838bc69f65
commit
74b09551b5
|
@ -61,15 +61,15 @@ func NewStream(client *kucoinapi.RestClient) *Stream {
|
|||
return stream
|
||||
}
|
||||
|
||||
func (s *Stream) handleCandleEvent(e *kucoinapi.WebSocketCandle) { }
|
||||
func (s *Stream) handleCandleEvent(e *kucoinapi.WebSocketCandle) {}
|
||||
|
||||
func (s *Stream) handleOrderBookL2Event(e *kucoinapi.WebSocketOrderBookL2) { }
|
||||
func (s *Stream) handleOrderBookL2Event(e *kucoinapi.WebSocketOrderBookL2) {}
|
||||
|
||||
func (s *Stream) handleTickerEvent(e *kucoinapi.WebSocketTicker) { }
|
||||
func (s *Stream) handleTickerEvent(e *kucoinapi.WebSocketTicker) {}
|
||||
|
||||
func (s *Stream) handleAccountBalanceEvent(e *kucoinapi.WebSocketAccountBalance) { }
|
||||
func (s *Stream) handleAccountBalanceEvent(e *kucoinapi.WebSocketAccountBalance) {}
|
||||
|
||||
func (s *Stream) handlePrivateOrderEvent(e *kucoinapi.WebSocketPrivateOrder) { }
|
||||
func (s *Stream) handlePrivateOrderEvent(e *kucoinapi.WebSocketPrivateOrder) {}
|
||||
|
||||
func (s *Stream) handleConnect() {
|
||||
if s.publicOnly {
|
||||
|
@ -157,7 +157,6 @@ func (s *Stream) sendSubscriptions() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
|
||||
// getEndpoint use the publicOnly flag to check whether we should allocate a public bullet or private bullet
|
||||
func (s *Stream) getEndpoint() (string, error) {
|
||||
var bullet *kucoinapi.Bullet
|
||||
|
@ -364,4 +363,3 @@ func ping(ctx context.Context, w WebSocketConnector, interval time.Duration) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
24
pkg/exchange/kucoin/testdata/cro-01-account-balance.json
vendored
Normal file
24
pkg/exchange/kucoin/testdata/cro-01-account-balance.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"id": "61c3f702e5edc90001b0b581",
|
||||
"type": "message",
|
||||
"topic": "/account/balance",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "account.balance",
|
||||
"data": {
|
||||
"accountId": "61b48b6d94ab8d000103ea77",
|
||||
"available": "0.000036536828",
|
||||
"availableChange": "-56.3116335782",
|
||||
"currency": "USDT",
|
||||
"hold": "56.3116335782",
|
||||
"holdChange": "56.3116335782",
|
||||
"relationContext": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderId": "61c3f702e5edc90001b0b575"
|
||||
},
|
||||
"relationEvent": "trade.hold",
|
||||
"relationEventId": "61c3f702e5edc90001b0b581",
|
||||
"time": "1640232706413",
|
||||
"total": "56.311670115028"
|
||||
}
|
||||
}
|
21
pkg/exchange/kucoin/testdata/cro-02-trade-orders.json
vendored
Normal file
21
pkg/exchange/kucoin/testdata/cro-02-trade-orders.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"type": "message",
|
||||
"topic": "/spotMarket/tradeOrders",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "orderChange",
|
||||
"data": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderType": "limit",
|
||||
"side": "buy",
|
||||
"orderId": "61c3f702e5edc90001b0b575",
|
||||
"type": "open",
|
||||
"orderTime": 1640232706419104233,
|
||||
"size": "104.5639",
|
||||
"filledSize": "0",
|
||||
"price": "0.538",
|
||||
"remainSize": "104.5639",
|
||||
"status": "open",
|
||||
"ts": 1640232706419104233
|
||||
}
|
||||
}
|
25
pkg/exchange/kucoin/testdata/cro-03-trade-orders.json
vendored
Normal file
25
pkg/exchange/kucoin/testdata/cro-03-trade-orders.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"type": "message",
|
||||
"topic": "/spotMarket/tradeOrders",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "orderChange",
|
||||
"data": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderType": "limit",
|
||||
"side": "buy",
|
||||
"orderId": "61c3f702e5edc90001b0b575",
|
||||
"liquidity": "maker",
|
||||
"type": "match",
|
||||
"orderTime": 1640232706419104233,
|
||||
"size": "104.5639",
|
||||
"filledSize": "104.5639",
|
||||
"price": "0.538",
|
||||
"matchPrice": "0.538",
|
||||
"matchSize": "104.5639",
|
||||
"tradeId": "61c3f7107857782458a39b06",
|
||||
"remainSize": "0",
|
||||
"status": "open",
|
||||
"ts": 1640232720266477485
|
||||
}
|
||||
}
|
21
pkg/exchange/kucoin/testdata/cro-04-trade-orders.json
vendored
Normal file
21
pkg/exchange/kucoin/testdata/cro-04-trade-orders.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"type": "message",
|
||||
"topic": "/spotMarket/tradeOrders",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "orderChange",
|
||||
"data": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderType": "limit",
|
||||
"side": "buy",
|
||||
"orderId": "61c3f702e5edc90001b0b575",
|
||||
"type": "filled",
|
||||
"orderTime": 1640232706419104233,
|
||||
"size": "104.5639",
|
||||
"filledSize": "104.5639",
|
||||
"price": "0.538",
|
||||
"remainSize": "0",
|
||||
"status": "done",
|
||||
"ts": 1640232720266477485
|
||||
}
|
||||
}
|
25
pkg/exchange/kucoin/testdata/cro-05-account-balance.json
vendored
Normal file
25
pkg/exchange/kucoin/testdata/cro-05-account-balance.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"id": "61c3f710506791000143eeef",
|
||||
"type": "message",
|
||||
"topic": "/account/balance",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "account.balance",
|
||||
"data": {
|
||||
"accountId": "61b48b6d94ab8d000103ea77",
|
||||
"available": "0.000036536828",
|
||||
"availableChange": "0",
|
||||
"currency": "USDT",
|
||||
"hold": "0",
|
||||
"holdChange": "-56.3116335782",
|
||||
"relationContext": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderId": "61c3f702e5edc90001b0b575",
|
||||
"tradeId": "61c3f7107857782458a39b06"
|
||||
},
|
||||
"relationEvent": "trade.setted",
|
||||
"relationEventId": "61c3f710506791000143eeef",
|
||||
"time": "1640232720319",
|
||||
"total": "0.000036536828"
|
||||
}
|
||||
}
|
25
pkg/exchange/kucoin/testdata/cro-06-account-balance.json
vendored
Normal file
25
pkg/exchange/kucoin/testdata/cro-06-account-balance.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"id": "61c3f710506791000143eeee",
|
||||
"type": "message",
|
||||
"topic": "/account/balance",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "account.balance",
|
||||
"data": {
|
||||
"accountId": "61c3f710e5756100011faf58",
|
||||
"available": "104.5639",
|
||||
"availableChange": "104.5639",
|
||||
"currency": "CRO",
|
||||
"hold": "0",
|
||||
"holdChange": "0",
|
||||
"relationContext": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderId": "61c3f702e5edc90001b0b575",
|
||||
"tradeId": "61c3f7107857782458a39b06"
|
||||
},
|
||||
"relationEvent": "trade.setted",
|
||||
"relationEventId": "61c3f710506791000143eeee",
|
||||
"time": "1640232720329",
|
||||
"total": "104.5639"
|
||||
}
|
||||
}
|
24
pkg/exchange/kucoin/testdata/cro-07-account-balance.json
vendored
Normal file
24
pkg/exchange/kucoin/testdata/cro-07-account-balance.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"id": "61c3f71ce5edc90001b10686",
|
||||
"type": "message",
|
||||
"topic": "/account/balance",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "account.balance",
|
||||
"data": {
|
||||
"accountId": "61c3f710e5756100011faf58",
|
||||
"available": "0",
|
||||
"availableChange": "-104.5639",
|
||||
"currency": "CRO",
|
||||
"hold": "104.5639",
|
||||
"holdChange": "104.5639",
|
||||
"relationContext": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderId": "61c3f71ce5edc90001b10685"
|
||||
},
|
||||
"relationEvent": "trade.hold",
|
||||
"relationEventId": "61c3f71ce5edc90001b10686",
|
||||
"time": "1640232732749",
|
||||
"total": "104.5639"
|
||||
}
|
||||
}
|
21
pkg/exchange/kucoin/testdata/cro-08-trade-orders.json
vendored
Normal file
21
pkg/exchange/kucoin/testdata/cro-08-trade-orders.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"type": "message",
|
||||
"topic": "/spotMarket/tradeOrders",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "orderChange",
|
||||
"data": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderType": "limit",
|
||||
"side": "sell",
|
||||
"orderId": "61c3f71ce5edc90001b10685",
|
||||
"type": "open",
|
||||
"orderTime": 1640232732749540684,
|
||||
"size": "104.5639",
|
||||
"filledSize": "0",
|
||||
"price": "0.5382",
|
||||
"remainSize": "104.5639",
|
||||
"status": "open",
|
||||
"ts": 1640232732749540684
|
||||
}
|
||||
}
|
25
pkg/exchange/kucoin/testdata/cro-09-trade-orders.json
vendored
Normal file
25
pkg/exchange/kucoin/testdata/cro-09-trade-orders.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"type": "message",
|
||||
"topic": "/spotMarket/tradeOrders",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "orderChange",
|
||||
"data": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderType": "limit",
|
||||
"side": "sell",
|
||||
"orderId": "61c3f71ce5edc90001b10685",
|
||||
"liquidity": "maker",
|
||||
"type": "match",
|
||||
"orderTime": 1640232732749540684,
|
||||
"size": "104.5639",
|
||||
"filledSize": "104.5639",
|
||||
"price": "0.5382",
|
||||
"matchPrice": "0.5382",
|
||||
"matchSize": "104.5639",
|
||||
"tradeId": "61c3f71f7857782458a39b54",
|
||||
"remainSize": "0",
|
||||
"status": "open",
|
||||
"ts": 1640232735930840841
|
||||
}
|
||||
}
|
21
pkg/exchange/kucoin/testdata/cro-10-trade-orders.json
vendored
Normal file
21
pkg/exchange/kucoin/testdata/cro-10-trade-orders.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"type": "message",
|
||||
"topic": "/spotMarket/tradeOrders",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "orderChange",
|
||||
"data": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderType": "limit",
|
||||
"side": "sell",
|
||||
"orderId": "61c3f71ce5edc90001b10685",
|
||||
"type": "filled",
|
||||
"orderTime": 1640232732749540684,
|
||||
"size": "104.5639",
|
||||
"filledSize": "104.5639",
|
||||
"price": "0.5382",
|
||||
"remainSize": "0",
|
||||
"status": "done",
|
||||
"ts": 1640232735930840841
|
||||
}
|
||||
}
|
25
pkg/exchange/kucoin/testdata/cro-11-account-balance.json
vendored
Normal file
25
pkg/exchange/kucoin/testdata/cro-11-account-balance.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"id": "61c3f71fd5ad710001b5c2a1",
|
||||
"type": "message",
|
||||
"topic": "/account/balance",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "account.balance",
|
||||
"data": {
|
||||
"accountId": "61b48b6d94ab8d000103ea77",
|
||||
"available": "56.220051225848",
|
||||
"availableChange": "56.22001468902",
|
||||
"currency": "USDT",
|
||||
"hold": "0",
|
||||
"holdChange": "0",
|
||||
"relationContext": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderId": "61c3f71ce5edc90001b10685",
|
||||
"tradeId": "61c3f71f7857782458a39b54"
|
||||
},
|
||||
"relationEvent": "trade.setted",
|
||||
"relationEventId": "61c3f71fd5ad710001b5c2a1",
|
||||
"time": "1640232735979",
|
||||
"total": "56.220051225848"
|
||||
}
|
||||
}
|
25
pkg/exchange/kucoin/testdata/cro-12-account-balance.json
vendored
Normal file
25
pkg/exchange/kucoin/testdata/cro-12-account-balance.json
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"id": "61c3f71fd5ad710001b5c2a0",
|
||||
"type": "message",
|
||||
"topic": "/account/balance",
|
||||
"userId": "61af6413efeab1000113f08b",
|
||||
"channelType": "private",
|
||||
"subject": "account.balance",
|
||||
"data": {
|
||||
"accountId": "61c3f710e5756100011faf58",
|
||||
"available": "0",
|
||||
"availableChange": "0",
|
||||
"currency": "CRO",
|
||||
"hold": "0",
|
||||
"holdChange": "-104.5639",
|
||||
"relationContext": {
|
||||
"symbol": "CRO-USDT",
|
||||
"orderId": "61c3f71ce5edc90001b10685",
|
||||
"tradeId": "61c3f71f7857782458a39b54"
|
||||
},
|
||||
"relationEvent": "trade.setted",
|
||||
"relationEventId": "61c3f71fd5ad710001b5c2a0",
|
||||
"time": "1640232735982",
|
||||
"total": "0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user