Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_orders_history

Retrieve historical orders for trading analysis, including filled, canceled, and expired orders from the Paradex perpetual futures platform.

Instructions

Get historical orders.

Retrieves the history of orders for the account, including filled, canceled, and expired orders. This is useful for analyzing past trading activity and performance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idYesFilter by market.
start_unix_msYesStart time in unix milliseconds.
end_unix_msYesEnd time in unix milliseconds.

Implementation Reference

  • The main handler function for the paradex_orders_history tool. It fetches historical orders from the Paradex client based on market, start time, and end time parameters, validates them using OrderState model, and returns a structured result.
    @server.tool(name="paradex_orders_history")
    async def get_orders_history(
        market_id: Annotated[str, Field(description="Filter by market.")],
        start_unix_ms: Annotated[int, Field(description="Start time in unix milliseconds.")],
        end_unix_ms: Annotated[int, Field(description="End time in unix milliseconds.")],
        ctx: Context = None,
    ) -> dict:
        """
        Get historical orders.
    
        Retrieves the history of orders for the account, including filled, canceled, and expired orders.
        This is useful for analyzing past trading activity and performance.
        """
        client = await get_authenticated_paradex_client()
        params = {"market": market_id, "start_at": start_unix_ms, "end_at": end_unix_ms}
        # Remove None values from params
        params = {k: v for k, v in params.items() if v is not None}
        response = client.fetch_orders_history(params=params)
        if "error" in response:
            await ctx.error(response)
            raise Exception(response["error"])
        orders_raw: list[dict[str, Any]] = response["results"]
        orders = order_state_adapter.validate_python(orders_raw)
        result = {
            "description": OrderState.__doc__.strip() if OrderState.__doc__ else None,
            "fields": OrderState.model_json_schema(),
            "results": orders,
        }
        return result
  • Schema mapping for paradex_orders_history tool in the get_filters_model function, referencing OrderState.model_json_schema() for output type definition and validation.
    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(),
    }
  • The @server.tool decorator registers the paradex_orders_history tool with the MCP server.
    @server.tool(name="paradex_orders_history")
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving historical orders and lists included statuses (filled, canceled, expired), but does not cover critical aspects such as pagination, rate limits, authentication requirements, error handling, or the format of returned data. For a read operation with no annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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 concise and well-structured with three sentences: a direct statement of purpose, elaboration on what is retrieved, and a usage note. Each sentence adds value without redundancy. However, it could be slightly more front-loaded by integrating the usage note into the purpose statement for better clarity.

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?

Given the complexity of a historical orders retrieval tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., data format, pagination, limits) and does not explain return values, leaving the agent uncertain about what to expect. For a tool with 3 required parameters and no structured output information, more context is needed to be fully helpful.

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?

The input schema has 100% description coverage, with clear descriptions for each parameter (market_id, start_unix_ms, end_unix_ms). The description does not add any additional meaning beyond what the schema provides, as it does not explain parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema adequately documents parameters without extra help from the description.

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 tool's purpose: 'Get historical orders' and 'Retrieves the history of orders for the account, including filled, canceled, and expired orders.' It specifies the verb ('Get'/'Retrieves') and resource ('historical orders'/'history of orders'), but does not explicitly differentiate it from sibling tools like 'paradex_open_orders' or 'paradex_order_status', which might handle current or specific orders.

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 minimal usage guidance: 'This is useful for analyzing past trading activity and performance.' It implies usage for historical analysis but does not specify when to use this tool versus alternatives (e.g., 'paradex_open_orders' for current orders or 'paradex_account_fills' for trade executions). No explicit when-not-to-use or prerequisite information is given.

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