Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_account_transactions

Analyze and retrieve filtered account transaction history, including deposits, withdrawals, trades, and funding payments. Use time and type filters to streamline reconciliation, auditing, and activity tracking on the Paradex platform.

Instructions

Get account transaction history. Retrieves a filtered history of account transactions, including deposits, withdrawals, trades, funding payments, and other account activities. Use transaction_type and time filters to limit the results and avoid overwhelming the client. This tool is valuable for: - Reconciliation of account activity - Auditing trading history - Tracking deposits and withdrawals - Analyzing funding payments over time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_unix_msYesEnd time in unix milliseconds.
limitNoMaximum number of transactions to return.
start_unix_msYesStart time in unix milliseconds.
transaction_typeNoFilter by transaction type.

Implementation Reference

  • Registration of the paradex_account_transactions tool using the @server.tool decorator.
    @server.tool(name="paradex_account_transactions")
  • The handler function that executes the paradex_account_transactions tool. It authenticates a Paradex client, fetches transactions with given parameters, validates them using TypeAdapter(list[Transaction]), and returns a structured result with schema and data.
    async def get_account_transactions( transaction_type: Annotated[ str | None, Field(default=None, description="Filter by transaction type.") ], start_unix_ms: Annotated[int, Field(description="Start time in unix milliseconds.")], end_unix_ms: Annotated[int, Field(description="End time in unix milliseconds.")], limit: Annotated[ int, Field(default=50, description="Maximum number of transactions to return.") ], ctx: Context = None, ) -> list[Transaction]: """ Get account transaction history. Retrieves a filtered history of account transactions, including deposits, withdrawals, trades, funding payments, and other account activities. Use transaction_type and time filters to limit the results and avoid overwhelming the client. This tool is valuable for: - Reconciliation of account activity - Auditing trading history - Tracking deposits and withdrawals - Analyzing funding payments over time """ client = await get_authenticated_paradex_client() params = { "type": transaction_type, "start_at": start_unix_ms, "end_at": end_unix_ms, "limit": limit, } # Remove None values from params params = {k: v for k, v in params.items() if v is not None} response = client.fetch_transactions(params) if "error" in response: await ctx.error(response) raise Exception(response["error"]) transactions = transaction_adapter.validate_python(response["results"]) results = { "description": Transaction.__doc__.strip() if Transaction.__doc__ else None, "fields": Transaction.model_json_schema(), "results": transactions, } return results
  • Pydantic BaseModel defining the structure of Transaction objects used for output validation in the paradex_account_transactions tool.
    class Transaction(BaseModel): """Transaction model representing an account transaction on Paradex.""" id: Annotated[ str, Field(description="Unique string ID of the event that triggered the transaction") ] type: Annotated[str, Field(description="Event that triggered the transaction")] hash: Annotated[str, Field(description="Tx Hash of the settled trade")] state: Annotated[str, Field(description="Status of the transaction on Starknet")] created_at: Annotated[ int, Field(description="Timestamp from when the transaction was sent to blockchain gateway") ] completed_at: Annotated[ int, Field(description="Timestamp from when the transaction was completed") ]
  • TypeAdapter for validating lists of Transaction models used in the tool handler.
    transaction_adapter = TypeAdapter(list[Transaction])

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