Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_market_summaries

Retrieve current market summaries to identify active or volatile markets, compare prices and volumes, and analyze market conditions for trading opportunities using JMESPath filtering.

Instructions

Identify the most active or volatile markets and get current market conditions.

Use this tool when you need to:
- Find the most active markets by volume for liquidity analysis
- Discover markets with significant price movements for momentum strategies
- Compare current prices across multiple assets
- Identify markets with unusual behavior for potential opportunities

Retrieves current market summary information including price, volume,
24h change, and other key market metrics. If "ALL" is specified or no market IDs
are provided, returns summaries for all available markets.

Example use cases:
- Finding high-volatility markets for short-term trading
- Identifying top gainers and losers for the day
- Comparing volume across different markets to find liquidity
- Getting the current price and 24-hour range for price analysis

You can use JMESPath expressions (https://jmespath.org/specification.html) to filter, sort, or limit the results.
Use the `paradex_filters_model` tool to get the filters for a tool.
Examples:
- Filter by high price: "[?high_price > `10000`]"
- Sort by volume: "sort_by([*], &volume)"
- Get top 3 by price change: "[sort_by([*], &to_number(price_change_percent))[-3:]]"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
market_idsNoMarket symbols to get summaries for.
jmespath_filterNoJMESPath expression to filter, sort, or limit the results.
limitNoLimit the number of results to the specified number.
offsetNoOffset the results to the specified number.

Implementation Reference

  • The core handler function for 'paradex_market_summaries' tool. Fetches market summaries from Paradex API using client.fetch_markets_summary(), validates with MarketSummary models, applies optional JMESPath filtering/pagination, and returns paginated results with schema info.
    @server.tool(name="paradex_market_summaries")
    async def get_market_summaries(
        market_ids: Annotated[
            list[str], Field(description="Market symbols to get summaries for.", default=["ALL"])
        ],
        jmespath_filter: Annotated[
            str,
            Field(
                description="JMESPath expression to filter, sort, or limit the results.",
                default=None,
            ),
        ],
        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:
        """
        Identify the most active or volatile markets and get current market conditions.
    
        Use this tool when you need to:
        - Find the most active markets by volume for liquidity analysis
        - Discover markets with significant price movements for momentum strategies
        - Compare current prices across multiple assets
        - Identify markets with unusual behavior for potential opportunities
    
        Retrieves current market summary information including price, volume,
        24h change, and other key market metrics. If "ALL" is specified or no market IDs
        are provided, returns summaries for all available markets.
    
        Example use cases:
        - Finding high-volatility markets for short-term trading
        - Identifying top gainers and losers for the day
        - Comparing volume across different markets to find liquidity
        - Getting the current price and 24-hour range for price analysis
    
        You can use JMESPath expressions (https://jmespath.org/specification.html) to filter, sort, or limit the results.
        Use the `paradex_filters_model` tool to get the filters for a tool.
        Examples:
        - Filter by high price: "[?high_price > `10000`]"
        - Sort by volume: "sort_by([*], &volume)"
        - Get top 3 by price change: "[sort_by([*], &to_number(price_change_percent))[-3:]]"
        """
        try:
            # Get market summary from Paradex
            client = await get_paradex_client()
            response = client.fetch_markets_summary(params={"market": "ALL"})
            if "error" in response:
                await ctx.error(response)
                raise Exception(response["error"])
    
            # Try to validate directly now that the model is more flexible
            summaries = market_summary_adapter.validate_python(response["results"])
    
            if market_ids and "ALL" not in market_ids:
                summaries = [summary for summary in summaries if summary.symbol in market_ids]
    
            # Apply JMESPath filter if provided
            if jmespath_filter:
                summaries = apply_jmespath_filter(
                    data=summaries,
                    jmespath_filter=jmespath_filter,
                    type_adapter=market_summary_adapter,
                    error_logger=ctx.error if ctx else None,
                )
            sorted_summaries = sorted(summaries, key=lambda x: x.symbol, reverse=True)
            result_summaries = sorted_summaries[offset : offset + limit]
            result = {
                "description": MarketSummary.__doc__.strip() if MarketSummary.__doc__ else None,
                "fields": MarketSummary.model_json_schema(),
                "results": result_summaries,
                "total": len(sorted_summaries),
                "limit": limit,
                "offset": offset,
            }
            return result
        except Exception as e:
            logger.error(f"Error fetching market summaries: {e!s}")
            await ctx.error(f"Error fetching market summaries: {e!s}")
            raise e
  • Pydantic model defining the structure and validation for individual MarketSummary objects used in the tool's response.
    class MarketSummary(BaseModel):
        """Model representing a summary of a market."""
    
        symbol: Annotated[str, Field(default="", description="Market symbol")]
        mark_price: Annotated[str, Field(default="", description="Mark price")]
        delta: Annotated[str, Field(default="", description="Deprecated: Use greeks.delta instead")]
        greeks: Annotated[
            Greeks,
            Field(
                default=None, description="Greeks (delta, gamma, vega). Partial for perpetual futures"
            ),
        ]
        last_traded_price: Annotated[str, Field(default="", description="Last traded price")]
        bid: Annotated[str, Field(default="", description="Best bid price")]
        ask: Annotated[str, Field(default="", description="Best ask price")]
        volume_24h: Annotated[str, Field(default="", description="24 hour volume in USD")]
        total_volume: Annotated[
            str, Field(default="", description="Lifetime total traded volume in USD")
        ]
        created_at: Annotated[int, Field(default=0, description="Market summary creation time")]
        underlying_price: Annotated[
            str, Field(default="", description="Underlying asset price (spot price)")
        ]
        open_interest: Annotated[str, Field(default="", description="Open interest in base currency")]
        funding_rate: Annotated[str, Field(default="", description="8 hour funding rate")]
        price_change_rate_24h: Annotated[
            str, Field(default="", description="Price change rate in the last 24 hours")
        ]
  • The @server.tool decorator registers the get_market_summaries function as the MCP tool named 'paradex_market_summaries'.
    @server.tool(name="paradex_market_summaries")
  • Provides the JSON schema for paradex_market_summaries via model_json_schema() in the get_filters_model tool, used for client-side validation/filtering info.
        "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(),
    }
    return tool_descriptions[tool_name]
  • TypeAdapter for validating lists of MarketSummary objects returned from the API.
    market_summary_adapter = TypeAdapter(list[MarketSummary])
Behavior4/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 describes key behaviors: the tool retrieves current market summaries, explains the default behavior when 'ALL' or no market IDs are specified, and details JMESPath filtering capabilities. However, it doesn't mention rate limits, authentication requirements, or data freshness, leaving some gaps.

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, usage guidelines, retrieval behavior, examples, JMESPath instructions). While slightly lengthy, every sentence adds value—no redundant information. It could be more front-loaded by moving key behavioral details earlier, but overall it's efficiently organized.

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?

Given 4 parameters, 100% schema coverage, no output schema, and no annotations, the description does an excellent job of compensating. It explains what the tool returns (market metrics), provides usage context, and includes practical examples. The main gap is the lack of output format details, but for a summary retrieval tool, this is reasonably complete.

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

Parameters4/5

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

The schema description coverage is 100%, so the baseline is 3. The description adds significant value by explaining the semantic meaning of parameters: it clarifies that 'ALL' returns all markets, provides concrete JMESPath examples for filtering/sorting, and contextualizes parameters within use cases like limiting results for analysis. This goes beyond the schema's technical descriptions.

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 ('identify', 'get current market conditions') and resources ('markets'), distinguishing it from siblings like paradex_markets (likely listing) or paradex_trades (transaction data). It explicitly mentions retrieving market summary information including price, volume, and 24h change.

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 through bullet points (e.g., 'Find the most active markets by volume', 'Discover markets with significant price movements') and example use cases (e.g., 'Finding high-volatility markets for short-term trading'). It distinguishes usage from potential alternatives by focusing on summary metrics rather than detailed data.

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