Skip to main content
Glama
sv

MCP Paradex Server

by sv

paradex_market_summaries

Read-only

Retrieve current market summaries including price, volume, and 24h change to identify active or volatile markets for liquidity analysis and momentum strategies.

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 handler function 'get_market_summaries' for the 'paradex_market_summaries' tool. It fetches market summary data from Paradex via client.fetch_markets_summary(), validates with MarketSummary model, supports filtering by market_ids, JMESPath filtering, sorting, pagination (limit/offset), and returns results with schema info.
    @server.tool(name="paradex_market_summaries", annotations=ToolAnnotations(readOnlyHint=True))
    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
  • The MarketSummary Pydantic model defining the schema for market summary data returned by the tool. Fields: symbol, mark_price, delta, greeks, last_traded_price, bid, ask, volume_24h, total_volume, created_at, underlying_price, open_interest, funding_rate, price_change_rate_24h.
    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")
        ]
  • Registration of the tool via the @server.tool decorator with name='paradex_market_summaries' and readOnlyHint annotation.
    @server.tool(name="paradex_market_summaries", annotations=ToolAnnotations(readOnlyHint=True))
  • Type adapter for validating a list of MarketSummary objects. Used in the handler to validate API response data.
    market_summary_adapter = TypeAdapter(list[MarketSummary])
  • The paradex_filters_model tool references paradex_market_summaries to provide its schema via MarketSummary.model_json_schema().
    tool_descriptions = {
        "paradex_markets": models.MarketDetails.model_json_schema(),
        "paradex_market_summaries": models.MarketSummary.model_json_schema(),
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds context: retrieves current market summary, can return all, supports JMESPath filtering. No contradictions.

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

Conciseness3/5

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

Description is long with multiple sections (use cases, examples, JMESPath). Well-structured and front-loaded, but could be more concise without losing key information.

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

Completeness3/5

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

No output schema; description mentions 'price, volume, 24h change, and other key market metrics' but lacks explicit return format. Complete for most use cases but could be more detailed.

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?

Schema coverage is 100%. Description explains default behavior for market_ids, JMESPath filtering with examples, limit, and offset. Adds meaning beyond schema, especially for JMESPath.

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?

Description clearly states the tool retrieves current market summary information including price, volume, 24h change, etc. It distinguishes from siblings by focusing on summaries and active/volatile markets, not orderbooks or klines.

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

Usage Guidelines4/5

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

Explicitly lists when to use: find most active markets by volume, discover significant price movements, compare prices, identify unusual behavior. Provides example use cases. Does not explicitly state when not to use, but guidance is strong.

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

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