Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_order_status

Check and monitor the execution status of specific orders on the Paradex platform to verify fills, confirm cancellations, and diagnose placement issues.

Instructions

Check the detailed status of a specific order for execution monitoring.

Use this tool when you need to:
- Confirm if a particular order was accepted and is active
- Check if an order has been filled, partially filled, or canceled
- Get execution details for a specific order
- Diagnose issues with order placement
- Track the status of important orders individually

Order status tracking is essential for verifying execution status
and troubleshooting any issues with specific orders.

Example use cases:
- Checking if a recently placed limit order is active in the book
- Verifying fill details of a specific order
- Determining why an order might have been rejected
- Confirming cancellation status of an order you attempted to cancel
- Getting execution timestamps for order lifecycle analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder identifier.
client_idYesClient-specified order ID.

Implementation Reference

  • Decorator that registers the get_order_status function as the MCP tool named 'paradex_order_status'.
    @server.tool(name="paradex_order_status")
  • The core handler function that implements the paradex_order_status tool logic. It authenticates the Paradex client, fetches the order by ID or client ID, validates the response using OrderState, and returns a standardized dictionary with schema and results.
    async def get_order_status(
        order_id: Annotated[str, Field(description="Order identifier.")],
        client_id: Annotated[str, Field(description="Client-specified order ID.")],
        ctx: Context = None,
    ) -> dict:
        """
        Check the detailed status of a specific order for execution monitoring.
    
        Use this tool when you need to:
        - Confirm if a particular order was accepted and is active
        - Check if an order has been filled, partially filled, or canceled
        - Get execution details for a specific order
        - Diagnose issues with order placement
        - Track the status of important orders individually
    
        Order status tracking is essential for verifying execution status
        and troubleshooting any issues with specific orders.
    
        Example use cases:
        - Checking if a recently placed limit order is active in the book
        - Verifying fill details of a specific order
        - Determining why an order might have been rejected
        - Confirming cancellation status of an order you attempted to cancel
        - Getting execution timestamps for order lifecycle analysis
        """
        client = await get_authenticated_paradex_client()
        if order_id:
            response = client.fetch_order(order_id)
        elif client_id:
            response = client.fetch_order_by_client_id(client_id)
        else:
            raise Exception("Either order_id or client_id must be provided.")
        order: OrderState = OrderState.model_validate(response)
        result = {
            "description": OrderState.__doc__.strip() if OrderState.__doc__ else None,
            "fields": OrderState.model_json_schema(),
            "results": order,
        }
        return result
  • Pydantic BaseModel defining the structure and validation for order status data returned by the Paradex API. Used for input validation and output schema generation in the tool response.
    class OrderState(BaseModel):
        """Order state model representing the current state of an order on Paradex."""
    
        id: Annotated[str, Field(description="Unique order identifier generated by Paradex")]
        account: Annotated[str, Field(description="Paradex Account")]
        market: Annotated[str, Field(description="Market")]
        side: Annotated[str, Field(description="Order side")]
        type: Annotated[str, Field(description="Order type")]
        size: Annotated[float, Field(description="Order size")]
        remaining_size: Annotated[float, Field(description="Remaining size of the order")]
        price: Annotated[float, Field(description="Order price. 0 for MARKET orders")]
        status: Annotated[str, Field(description="Order status")]
        created_at: Annotated[int, Field(description="Order creation time")]
        last_updated_at: Annotated[
            int, Field(description="Order last update time. No changes once status=CLOSED")
        ]
        timestamp: Annotated[int, Field(description="Order signature timestamp")]
        cancel_reason: Annotated[
            str, Field(description="Reason for order cancellation if it was closed by cancel")
        ]
        client_id: Annotated[
            str, Field(description="Client order id provided by the client at order creation")
        ]
        seq_no: Annotated[
            int,
            Field(
                description="Unique increasing number that is assigned to this order update and changes on every order update"
            ),
        ]
        instruction: Annotated[str, Field(description="Execution instruction for order matching")]
        avg_fill_price: Annotated[str, Field(description="Average fill price of the order")]
        stp: Annotated[str, Field(description="Self Trade Prevention mode")]
        received_at: Annotated[
            int, Field(description="Timestamp in milliseconds when order was received by API service")
        ]
        published_at: Annotated[
            int, Field(description="Timestamp in milliseconds when order was sent to the client")
        ]
        flags: Annotated[list[str], Field(description="Order flags, allow flag: REDUCE_ONLY")]
        trigger_price: Annotated[str, Field(description="Trigger price for stop order")]
  • Utility function that provides the authenticated ParadexApiClient instance used by the tool handler to make API calls like fetch_order.
    async def get_authenticated_paradex_client() -> ParadexApiClient:
        """
        Get or initialize the authenticated Paradex client.
    
        Returns:
            Paradex: The initialized Paradex client.
    
        Raises:
            ValueError: If the required configuration is not set.
        """
        client = await get_paradex_client()
        if client.account is None:
            raise ValueError("Paradex client is not authenticated")
        return client
Behavior3/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. It effectively communicates that this is a read-only status checking tool (implied by 'check', 'verify', 'track') and describes what information can be retrieved (acceptance status, fill details, cancellation status, execution timestamps). However, it doesn't mention potential limitations like rate limits, authentication requirements, or error conditions.

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

Conciseness4/5

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

The description is well-structured with clear sections: purpose statement, usage scenarios, importance explanation, and example use cases. While slightly verbose, every sentence adds value by clarifying different aspects of when and how to use the tool. The front-loaded purpose statement immediately communicates the core function.

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 status checking tool with 2 parameters and 100% schema coverage, the description provides substantial contextual guidance about usage scenarios and purpose. The main gap is the lack of output schema, but the description compensates by indicating what information will be returned (fill details, execution timestamps, acceptance/cancellation status).

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 documents both parameters (order_id and client_id) adequately. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.

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 with specific verbs ('check', 'get', 'track') and resource ('detailed status of a specific order'), distinguishing it from siblings like paradex_open_orders (which lists multiple orders) and paradex_orders_history (which shows historical orders). It explicitly focuses on individual order monitoring rather than bulk operations.

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 when-to-use guidance with a bulleted list of five specific scenarios (e.g., 'Confirm if a particular order was accepted', 'Diagnose issues with order placement'), plus example use cases. It implicitly distinguishes from siblings by focusing on individual order status rather than account-wide data or order creation/cancellation.

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/Habinar/mcp-paradex-py'

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