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