This method provides a clean way to close WebSocket connections while preserving active orders when Cancel On Disconnect (COD) is enabled.
Use Cases:
Cancel On Disconnect (COD) Behavior:
When Cancel On Disconnect is enabled for your connection, this method provides a safe way to close the connection without triggering automatic order cancellations. This is different from other disconnection scenarios:
This distinction allows you to perform planned disconnections (e.g., for maintenance, updates, or reconnection) while preserving your active orders.
WebSocket Only:
This method is designed exclusively for WebSocket connections. Attempting to use it via REST/HTTP will result in a 400 error response.
Note: This method has no response. The WebSocket connection is closed immediately after the request is processed.
Token Invalidation: By default, all tokens created during the current session are invalidated when you call this method. You can control this behavior using this parameter:
Connection closed