Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_open_orders

Read-only

Monitor active orders to track execution status, verify prices and quantities, and manage trading strategies on the Paradex perpetual futures platform.

Instructions

Monitor your active orders to track execution status and manage your trading strategy.

Use this tool when you need to:
- Check which of your orders are still pending execution
- Verify limit order prices and remaining quantities
- Determine which orders might need cancellation or modification
- Get a complete picture of your current market exposure

Keeping track of your open orders is essential for effective order management
and avoiding duplicate or conflicting trades.

Example use cases:
- Checking if your limit orders have been partially filled
- Verifying that a recently placed order was accepted by the exchange
- Identifying stale orders that should be canceled or modified
- Getting a consolidated view of all pending orders across markets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idNoFilter by market.ALL
limitNoLimit the number of results to the specified number.
offsetNoOffset the results to the specified number.

Implementation Reference

  • The handler function for the paradex_open_orders tool. It authenticates with Paradex client, fetches open orders optionally filtered by market, validates and sorts them by creation time, applies pagination with limit and offset, and returns a structured response including schema and metadata.
    @server.tool(name="paradex_open_orders", annotations=ToolAnnotations(readOnlyHint=True))
    async def get_open_orders(
        market_id: Annotated[str, Field(default="ALL", description="Filter by market.")],
        limit: Annotated[
            int,
            Field(
                default=10,
                gt=0,
                le=100,
                description="Limit the number of results to the specified number.",
            ),
        ],
        offset: Annotated[
            int,
            Field(
                default=0,
                ge=0,
                description="Offset the results to the specified number.",
            ),
        ],
        ctx: Context = None,
    ) -> dict:
        """
        Monitor your active orders to track execution status and manage your trading strategy.
    
        Use this tool when you need to:
        - Check which of your orders are still pending execution
        - Verify limit order prices and remaining quantities
        - Determine which orders might need cancellation or modification
        - Get a complete picture of your current market exposure
    
        Keeping track of your open orders is essential for effective order management
        and avoiding duplicate or conflicting trades.
    
        Example use cases:
        - Checking if your limit orders have been partially filled
        - Verifying that a recently placed order was accepted by the exchange
        - Identifying stale orders that should be canceled or modified
        - Getting a consolidated view of all pending orders across markets
        """
        client = await get_authenticated_paradex_client()
        params = {"market": market_id} if market_id != "" and market_id != "ALL" else None
        response = client.fetch_orders(params=params)
        if "error" in response:
            ctx.error(f"Error fetching open orders: {response['error']}")
            raise Exception(response["error"])
        orders = order_state_adapter.validate_python(response["results"])
        sorted_orders = sorted(orders, key=lambda x: x.created_at)
        result_orders = sorted_orders[offset : offset + limit]
        result = {
            "description": OrderState.__doc__.strip() if OrderState.__doc__ else None,
            "fields": OrderState.model_json_schema(),
            "results": result_orders,
            "total": len(sorted_orders),
            "limit": limit,
            "offset": offset,
        }
        return result
  • The @server.tool decorator registers the paradex_open_orders tool with readOnlyHint=True.
    @server.tool(name="paradex_open_orders", annotations=ToolAnnotations(readOnlyHint=True))
  • Schema reference for paradex_open_orders output provided via get_filters_model tool, using OrderState.model_json_schema() for type validation and documentation.
    tool_descriptions = {
        "paradex_markets": models.MarketDetails.model_json_schema(),
        "paradex_market_summaries": models.MarketSummary.model_json_schema(),
        "paradex_open_orders": models.OrderState.model_json_schema(),
        "paradex_orders_history": models.OrderState.model_json_schema(),
        "paradex_vaults": models.Vault.model_json_schema(),
        "paradex_vault_summary": models.VaultSummary.model_json_schema(),
    }
  • TypeAdapter for list[OrderState] used to validate the API response in the handler.
    order_state_adapter = TypeAdapter(list[OrderState])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating this is a safe read operation. The description adds valuable context beyond this by explaining the tool's role in order management, avoiding duplicate trades, and providing example use cases like checking partial fills and identifying stale orders. It doesn't contradict the read-only annotation.

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 well-structured with clear sections: purpose statement, bulleted usage guidelines, importance explanation, and example use cases. Every sentence adds value without redundancy, and it's front-loaded with the core purpose.

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

Completeness4/5

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

For a read-only tool with full schema coverage and no output schema, the description provides excellent context about what the tool returns (active orders with execution status, prices, quantities) and why it's useful. It could slightly improve by explicitly mentioning pagination behavior (implied by limit/offset parameters), but it's largely complete.

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 the schema already fully documents the three parameters (market_id, limit, offset). The description doesn't add any parameter-specific information beyond what's in the schema, but it doesn't need to since the schema coverage is complete. Baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool's purpose as monitoring active orders to track execution status and manage trading strategy. It uses specific verbs like 'monitor', 'track', and 'manage' and distinguishes itself from siblings like paradex_orders_history (historical orders) and paradex_order_status (single order status).

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool with a bulleted list of specific scenarios (e.g., 'Check which of your orders are still pending execution', 'Determine which orders might need cancellation or modification'). It also implicitly distinguishes from alternatives like paradex_orders_history by focusing on active/pending orders rather than historical ones.

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