Skip to main content
Glama
gagarinyury

MCP Bitget Trading Server

by gagarinyury

getWebSocketStatus

Check WebSocket connection status for real-time cryptocurrency trading data on Bitget exchange. Monitor connectivity to ensure continuous market updates and order execution.

Instructions

Get WebSocket connection status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the getWebSocketStatus tool. It calls helper methods on the WebSocket client to get connection status and subscription count, then 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 listTools handler, including name, description, and empty input schema.
    { name: 'getWebSocketStatus', description: 'Get WebSocket connection status', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • Helper method that returns the current WebSocket connection status (boolean). Used by the tool handler.
    isWebSocketConnected(): boolean { return this.isConnected; }
  • Helper method that returns the number of active WebSocket subscriptions. Used by the tool handler.
    getSubscriptionCount(): number { return this.subscriptions.size; }
  • Input schema for getWebSocketStatus tool (no parameters required). Defined inline in registration.
    inputSchema: { type: 'object', properties: {}, required: [] }, },

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