Skip to main content
Glama

MCP Bitget Trading Server

by gagarinyury

getWebSocketStatus

Check the real-time WebSocket connection status for the MCP Bitget Trading Server, ensuring reliable communication with Bitget exchange’s market data and trading operations.

Instructions

Get WebSocket connection status

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • Handler for the getWebSocketStatus tool. Retrieves the WebSocket connection status and number of active subscriptions from the BitgetWebSocketClient and returns them as JSON.
    case 'getWebSocketStatus': { const status = { connected: this.wsClient.isWebSocketConnected(), subscriptions: this.wsClient.getSubscriptionCount(), }; return { content: [ { type: 'text', text: JSON.stringify(status, null, 2), }, ], } as CallToolResult; }
  • src/server.ts:294-302 (registration)
    Registration of the getWebSocketStatus tool in the MCP server's listTools response, including its description and input schema (no parameters required).
    { name: 'getWebSocketStatus', description: 'Get WebSocket connection status', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • Helper method in BitgetWebSocketClient that checks and returns the current WebSocket connection status.
    isWebSocketConnected(): boolean { return this.isConnected; }
  • Helper method in BitgetWebSocketClient that returns the number of active subscriptions.
    getSubscriptionCount(): number { return this.subscriptions.size; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gagarinyury/MCP-bitget-trading'

If you have feedback or need assistance with the MCP directory API, please join our Discord server