Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_account_fills

Analyze executed trades to evaluate performance, execution quality, and realized PnL. Calculate VWAP, review slippage, track commissions, and reconcile order execution details for informed trading decisions.

Instructions

Analyze your executed trades to evaluate performance and execution quality. Use this tool when you need to: - Review your trading history across specific markets - Calculate your average entry price for multi-fill positions - Analyze execution quality compared to intended prices - Track realized PnL from completed trades - Verify order execution details for reconciliation Detailed fill information is essential for performance analysis and understanding how your orders were actually executed. Example use cases: - Calculating volume-weighted average price (VWAP) of your entries - Analyzing execution slippage from your intended prices - Reviewing trade history for tax or accounting purposes - Tracking commission costs across different markets - Identifying which of your strategies produced the best execution

Input Schema

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

Implementation Reference

  • The handler function decorated with @server.tool(name="paradex_account_fills"). It authenticates a Paradex client, fetches fills for the specified market and time range, validates the results using fill_adapter (TypeAdapter(list[Fill])), and returns a dictionary containing description, schema, and results.
    @server.tool(name="paradex_account_fills") async def get_account_fills( market_id: Annotated[str, Field(description="Filter by market ID.")], 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: """ Analyze your executed trades to evaluate performance and execution quality. Use this tool when you need to: - Review your trading history across specific markets - Calculate your average entry price for multi-fill positions - Analyze execution quality compared to intended prices - Track realized PnL from completed trades - Verify order execution details for reconciliation Detailed fill information is essential for performance analysis and understanding how your orders were actually executed. Example use cases: - Calculating volume-weighted average price (VWAP) of your entries - Analyzing execution slippage from your intended prices - Reviewing trade history for tax or accounting purposes - Tracking commission costs across different markets - Identifying which of your strategies produced the best execution """ client = await get_authenticated_paradex_client() params = {"market": market_id, "start_at": start_unix_ms, "end_at": end_unix_ms} response = client.fetch_fills(params) if "error" in response: await ctx.error(response) raise Exception(response["error"]) fills = fill_adapter.validate_python(response["results"]) results = { "description": Fill.__doc__.strip() if Fill.__doc__ else None, "fields": Fill.model_json_schema(), "results": fills, } return results
  • Output schema adapter for validating the list of Fill objects returned by the paradex_account_fills tool.
    fill_adapter = TypeAdapter(list[Fill])
  • Registration of the paradex_account_fills tool via the @server.tool decorator.
    @server.tool(name="paradex_account_fills")

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