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
| Name | Required | Description | Default |
|---|---|---|---|
| transaction_type | No | Filter by transaction type. | |
| start_unix_ms | Yes | Start time in unix milliseconds. | |
| end_unix_ms | Yes | End time in unix milliseconds. | |
| limit | No | Maximum number of transactions to return. |
Implementation Reference
- src/mcp_paradex/tools/account.py:168-214 (handler)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
- src/mcp_paradex/models.py:134-149 (schema)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") ]
- src/mcp_paradex/tools/account.py:168-168 (registration)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])