detect pong for unified ws
This commit is contained in:
@@ -73,6 +73,10 @@ export function isWsPong(msg: any): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (msg['ret_msg'] === 'pong') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return (
|
||||
msg.request &&
|
||||
msg.request.op === 'ping' &&
|
||||
|
||||
@@ -153,6 +153,9 @@ export const PUBLIC_WS_KEYS = [
|
||||
WS_KEY_MAP.spotV3Public,
|
||||
WS_KEY_MAP.usdcOptionPublic,
|
||||
WS_KEY_MAP.usdcPerpPublic,
|
||||
WS_KEY_MAP.unifiedOptionPublic,
|
||||
WS_KEY_MAP.unifiedPerpUSDTPublic,
|
||||
WS_KEY_MAP.unifiedPerpUSDCPublic,
|
||||
] as string[];
|
||||
|
||||
/** Used to automatically determine if a sub request should be to the public or private ws (when there's two) */
|
||||
|
||||
Reference in New Issue
Block a user