Skip to content

Commit

Permalink
update v5 websocket subscribe liquidation stream (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
dedpnd authored Oct 26, 2024
1 parent 2eb25e1 commit 355896a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions v5_ws_public_liquidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ func (k *V5WebsocketPublicLiquidationParamKey) Topic() string {

// V5WebsocketPublicLiquidationResponse :
type V5WebsocketPublicLiquidationResponse struct {
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
Data []V5WebsocketPublicLiquidationData `json:"data"`
Topic string `json:"topic"`
Type string `json:"type"`
TimeStamp int64 `json:"ts"`
Data V5WebsocketPublicLiquidationData `json:"data"`
}

// V5WebsocketPublicLiquidationData :
Expand Down
14 changes: 6 additions & 8 deletions v5_ws_public_liquidation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ func TestWebsocketV5Public_Liquidation(t *testing.T) {
"topic": "liquidation.BTCUSDT",
"type": "snapshot",
"ts": 1673251091822,
"data": []map[string]interface{}{
{
"price": "25844.48",
"side": "Buy",
"size": "2.8",
"symbol": "BTCUSDT",
"updatedTime": 1673251091822,
},
"data": map[string]interface{}{
"price": "25844.48",
"side": "Buy",
"size": "2.8",
"symbol": "BTCUSDT",
"updatedTime": 1673251091822,
},
}
bytesBody, err := json.Marshal(respBody)
Expand Down

0 comments on commit 355896a

Please sign in to comment.