package com.xcong.excoin.modules.okxNewPrice.gridWs;
|
|
import com.alibaba.fastjson.JSONObject;
|
import org.java_websocket.client.WebSocketClient;
|
|
/**
|
* OKX 网格交易 WebSocket 频道处理器接口。
|
* 对齐 Gate 版本的 GateChannelHandler。
|
*
|
* @author Administrator
|
*/
|
public interface OkxGridChannelHandler {
|
|
/** 频道名称,如 "candle1m"、"positions" */
|
String getChannelName();
|
|
/** 发送订阅请求 */
|
void subscribe(WebSocketClient ws);
|
|
/** 发送取消订阅请求 */
|
void unsubscribe(WebSocketClient ws);
|
|
/**
|
* 处理频道推送消息。
|
*
|
* @param response WebSocket 推送的完整 JSON
|
* @return true 表示已处理(循环停止),false 表示频道不匹配
|
*/
|
boolean handleMessage(JSONObject response);
|
}
|