For using websocket:
- Create Callback implements WebSocketCallback that would process messages, like
trade.wayruha.mexc.ws.PublicWSConnectionTest.Callback - Define config
MexcConfig conf = new MexcConfig("apiKey", "apiSecret"); ApiClient apiClient = new ApiClient(conf); WSClientFactory factory = new WSClientFactory(apiClient); - Define properties and socket itself
Set<String> symbols = Set.of("BTCUSDT", "ETHUSDT") WebSocketClient ws = factory.orderBookSubscription(symbols, TopLimit.TOP10, callback); - Enjoy the flow