Skip to main content
Glama
gagarinyury

MCP Bitget Trading Server

by gagarinyury

getOrders

Retrieve current open orders from Bitget exchange to monitor trading positions, filter by symbol or status for order management.

Instructions

Get current open orders

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNoFilter by symbol
statusNoFilter by status

Implementation Reference

  • MCP tool handler for 'getOrders': parses input parameters using GetOrdersSchema, calls bitgetClient.getOrders(), and returns JSON-formatted orders.
    case 'getOrders': {
      const { symbol, status } = GetOrdersSchema.parse(args);
      const orders = await this.bitgetClient.getOrders(symbol, status);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(orders, null, 2),
          },
        ],
      } as CallToolResult;
    }
  • Zod schema defining optional input parameters 'symbol' and 'status' for the getOrders tool.
    export const GetOrdersSchema = z.object({
      symbol: z.string().optional().describe('Filter by symbol'),
      status: z.enum(['open', 'filled', 'cancelled']).optional().describe('Filter by status')
    });
  • src/server.ts:193-204 (registration)
    Registers the 'getOrders' tool in the MCP server's listTools response with name, description, and input schema (hardcoded matching the Zod schema).
    {
      name: 'getOrders',
      description: 'Get current open orders',
      inputSchema: {
        type: 'object',
        properties: {
          symbol: { type: 'string', description: 'Filter by symbol' },
          status: { type: 'string', enum: ['open', 'filled', 'cancelled'], description: 'Filter by status' }
        },
        required: []
      },
    },
  • Core implementation of getOrders in BitgetRestClient: dispatches to spot or futures order fetching based on symbol, which is called by the MCP handler.
    async getOrders(symbol?: string, status?: string): Promise<Order[]> {
      if (symbol && this.isFuturesSymbol(symbol)) {
        return this.getFuturesOrders(symbol, status);
      } else {
        return this.getSpotOrders(symbol, status);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Get current open orders' implies a read-only operation, but it doesn't specify whether this requires authentication, has rate limits, returns real-time or cached data, or provides pagination. For a financial/trading tool with no annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just three words, front-loading the essential information with zero wasted words. Every word earns its place by specifying the action, temporal state, and resource type.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a trading/financial tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what constitutes an 'order' in this context, what data fields are returned, whether the response includes historical or only current data, or any error conditions. Given the complexity implied by the sibling tools and the lack of structured metadata, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented in the schema. The description doesn't add any additional meaning about the parameters beyond what's in the schema. It doesn't explain the relationship between 'current open orders' and the optional status filter that includes non-open statuses, which creates a potential semantic inconsistency.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('current open orders'), making the purpose immediately understandable. It distinguishes from siblings like getBalance or getPositions by focusing specifically on orders. However, it doesn't explicitly differentiate from getOrderBook which also deals with orders but in a different context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like getOrderBook or getPositions. It doesn't mention prerequisites, timing considerations, or any context that would help an agent decide between this and other order-related tools in the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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