Skip to main content
Glama
sv

MCP Paradex Server

by sv

paradex_account_transactions

Retrieve filtered transaction history for account reconciliation, auditing trades, and tracking deposits, withdrawals, and funding payments over time.

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
transaction_typeNoFilter by transaction type.
start_unix_msYesStart time in unix milliseconds.
end_unix_msYesEnd time in unix milliseconds.
limitNoMaximum number of transactions to return.

Implementation Reference

  • The main handler function for the 'paradex_account_transactions' tool, decorated with @server.tool for registration. It fetches transactions using the authenticated Paradex client, validates with TypeAdapter, and formats the response with schema information.
    @server.tool(name="paradex_account_transactions") 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 model defining the structure and validation for Transaction objects, used in the tool's output schema.
    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") ]
  • The @server.tool decorator registers the tool with the MCP server.
    @server.tool(name="paradex_account_transactions")
  • TypeAdapter for list[Transaction] used for input validation and serialization in the 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/sv/mcp-paradex-py'

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