disconnectWebSocket
Terminates active WebSocket connections on the MCP Bitget Trading Server. Ensures consistent API usage and prevents duplicate connections during spot and futures trading operations.
Instructions
Disconnect from WebSocket
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:493-503 (handler)Handler implementation for the 'disconnectWebSocket' tool. Calls `this.wsClient.disconnect()` to disconnect the WebSocket and returns a success response.case 'disconnectWebSocket': { this.wsClient.disconnect(); return { content: [ { type: 'text', text: 'WebSocket disconnected', }, ], } as CallToolResult; }
- src/server.ts:248-256 (registration)Tool registration in the ListTools response, defining the name, description, and empty input schema for 'disconnectWebSocket'.{ name: 'disconnectWebSocket', description: 'Disconnect from WebSocket', inputSchema: { type: 'object', properties: {}, required: [] }, },