Skip to content

Commit

Permalink
gateio: Remove listOfAssetsCurrencyPairEnabledFor method and optimi…
Browse files Browse the repository at this point in the history
…se websocket asset processing (thrasher-corp#1723)

* remove listOfAssetsCurrencyPairEnabledFor and optimise paths

* add helper method and further optimise

* glorious: nits thanksssss!

---------

Co-authored-by: Ryan O'Hara-Reid <[email protected]>
  • Loading branch information
shazbert and Ryan O'Hara-Reid authored Nov 20, 2024
1 parent 105591b commit 1fab9c7
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 214 deletions.
26 changes: 13 additions & 13 deletions exchanges/gateio/gateio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2064,23 +2064,23 @@ type WsOrderbookTickerData struct {

// WsOrderbookUpdate represents websocket orderbook update push data
type WsOrderbookUpdate struct {
UpdateTimeMs types.Time `json:"t"`
IgnoreField string `json:"e"`
UpdateTime types.Time `json:"E"`
CurrencyPair currency.Pair `json:"s"`
FirstOrderbookUpdatedID int64 `json:"U"` // First update order book id in this event since last update
LastOrderbookUpdatedID int64 `json:"u"`
Bids [][2]string `json:"b"`
Asks [][2]string `json:"a"`
UpdateTimeMs types.Time `json:"t"`
IgnoreField string `json:"e"`
UpdateTime types.Time `json:"E"`
CurrencyPair currency.Pair `json:"s"`
FirstOrderbookUpdatedID int64 `json:"U"` // First update order book id in this event since last update
LastOrderbookUpdatedID int64 `json:"u"`
Bids [][2]types.Number `json:"b"`
Asks [][2]types.Number `json:"a"`
}

// WsOrderbookSnapshot represents a websocket orderbook snapshot push data
type WsOrderbookSnapshot struct {
UpdateTimeMs types.Time `json:"t"`
LastUpdateID int64 `json:"lastUpdateId"`
CurrencyPair currency.Pair `json:"s"`
Bids [][2]string `json:"bids"`
Asks [][2]string `json:"asks"`
UpdateTimeMs types.Time `json:"t"`
LastUpdateID int64 `json:"lastUpdateId"`
CurrencyPair currency.Pair `json:"s"`
Bids [][2]types.Number `json:"bids"`
Asks [][2]types.Number `json:"asks"`
}

// WsSpotOrder represents an order push data through the websocket channel.
Expand Down
Loading

0 comments on commit 1fab9c7

Please sign in to comment.