Skip to main content
Glama

binance_trade_placeOrder

Place spot market or limit orders on Binance to buy or sell cryptocurrency pairs. Specify symbol, side, order type, and quantity for execution.

Instructions

Place a spot order. Example: {symbol:'BTCUSDT', side:'BUY', type:'MARKET', quoteOrderQty:'50'}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
sideYes
typeYes
quantityNo
quoteOrderQtyNo
priceNo
timeInForceNo

Implementation Reference

  • The complete handler implementation for the 'binance_trade_placeOrder' tool, including input validation, parameter preparation, and execution via binance.newOrder API call.
    export const tool_place_order: BinanceTool = {
      name: "binance_trade_placeOrder",
      description:
        "Place a spot order. Example: {symbol:'BTCUSDT', side:'BUY', type:'MARKET', quoteOrderQty:'50'}",
      parameters: placeOrderSchema,
      async run(input) {
        ensureTradingEnabled();
        const params = placeOrderSchema.parse(input);
    
        if (params.type === "LIMIT" && !params.price) {
          throw new Error("LIMIT orders require 'price'.");
        }
    
        if (!params.quantity && !params.quoteOrderQty) {
          throw new Error("Provide 'quantity' or 'quoteOrderQty'.");
        }
    
        const payload = withCommonParams({
          quantity: params.quantity,
          quoteOrderQty: params.quoteOrderQty,
          price: params.price,
          timeInForce: params.timeInForce ?? (params.type === "LIMIT" ? "GTC" : undefined)
        });
    
        try {
          const res = await binance.newOrder(params.symbol, params.side, params.type, payload);
          return res.data;
        } catch (err) {
          throw toToolError(err);
        }
      }
    };
  • Zod schema defining the input parameters for the placeOrder tool.
    const placeOrderSchema = z.object({
      symbol: z.string().min(1),
      side: z.enum(["BUY", "SELL"]),
      type: z.enum(["MARKET", "LIMIT"]),
      quantity: z.string().optional(),
      quoteOrderQty: z.string().optional(),
      price: z.string().optional(),
      timeInForce: z.enum(["GTC", "IOC", "FOK"]).optional()
    });
  • src/index.ts:15-40 (registration)
    Registration of the tool_place_order (binance_trade_placeOrder) by including it in the tools array and registering via FastMCP server.addTool.
    const tools = [
      tool_market_price,
      tool_market_klines,
      tool_exchange_info,
      tool_account_balances,
      tool_open_orders,
      tool_place_order,
      tool_cancel_order,
    ];
    
    tools.forEach((tool) => {
      server.addTool({
        name: tool.name,
        description: tool.description,
        parameters: tool.parameters,
        execute: async (args) => {
          try {
            const result = await tool.run(args);
            return JSON.stringify(result, null, 2);
          } catch (error) {
            const handled = error instanceof ToolError ? error : new ToolError((error as Error).message);
            throw handled;
          }
        },
      });
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a spot order placement tool (implying a write/mutation operation) but doesn't disclose critical behavioral aspects: whether this requires authentication, what permissions are needed, if it's rate-limited, what happens on failure, or what the response contains. The example shows parameters but doesn't explain the transactional nature.

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 - just one sentence with an example. It's front-loaded with the core purpose and wastes no words. Every element (the statement and example) earns its place by providing essential information.

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 financial trading tool with 7 parameters, no annotations, and no output schema, the description is severely incomplete. It doesn't explain the transactional consequences, error conditions, authentication requirements, or return values. The example helps but doesn't compensate for the significant gaps in context needed for safe operation.

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

Parameters2/5

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

With 0% schema description coverage for 7 parameters, the description must compensate but only provides a single example showing 4 parameters. It doesn't explain what 'symbol', 'side', 'type' mean, doesn't mention the 3 required parameters, and ignores 'quantity', 'price', and 'timeInForce' entirely. The example helps but doesn't provide comprehensive parameter semantics.

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 ('Place a spot order') and resource ('order'), making the purpose immediately understandable. It distinguishes this tool from siblings like cancelOrder or account-related tools by focusing on order creation. However, it doesn't explicitly differentiate from potential alternative order types beyond the example provided.

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. It doesn't mention prerequisites (like needing account access), when to choose spot orders over other types, or how it relates to sibling tools like cancelOrder or openOrders. The example shows usage but doesn't explain context.

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/Valerio357/binance-mcp'

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