paradex_vault_account_summary
Retrieve a detailed summary of a vault's trading account to assess risk metrics, available margin, total exposure, and account health, aiding informed risk management and trading decisions.
Instructions
Get a comprehensive overview of a vault's trading account status.
Use this tool when you need to:
- Check account health and available margin
- Monitor total exposure and leverage
- Understand risk metrics and account status
- Assess trading capacity before placing new orders
- Get a consolidated view of account performance
This provides essential information about account standing and
trading capacity to inform risk management decisions.
Example use cases:
- Checking available margin before placing new orders
- Monitoring account health during market volatility
- Assessing total exposure across all markets
- Understanding maintenance margin requirements
- Planning position adjustments based on account metrics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault_address | Yes | The address of the vault to get account summary for. |
Implementation Reference
- src/mcp_paradex/tools/vaults.py:319-357 (handler)The primary handler function for the 'paradex_vault_account_summary' tool. It takes a vault address, calls the Paradex API endpoint 'vaults/account-summary', validates the response using the VaultAccountSummary Pydantic model, and returns the list of summaries.@server.tool(name="paradex_vault_account_summary") async def get_vault_account_summary( vault_address: Annotated[ str, Field(description="The address of the vault to get account summary for.") ], ) -> list[VaultAccountSummary]: """ Get a comprehensive overview of a vault's trading account status. Use this tool when you need to: - Check account health and available margin - Monitor total exposure and leverage - Understand risk metrics and account status - Assess trading capacity before placing new orders - Get a consolidated view of account performance This provides essential information about account standing and trading capacity to inform risk management decisions. Example use cases: - Checking available margin before placing new orders - Monitoring account health during market volatility - Assessing total exposure across all markets - Understanding maintenance margin requirements - Planning position adjustments based on account metrics """ try: client = await get_paradex_client() response = await api_call( client, "vaults/account-summary", params={"address": vault_address} ) if "error" in response: raise Exception(response["error"]) results = response["results"] summary = vault_account_summary_adapter.validate_python(results) return summary except Exception as e: logger.error(f"Error fetching account summary for vault {vault_address}: {e!s}") raise e
- src/mcp_paradex/models.py:385-399 (schema)Pydantic BaseModel defining the output schema for VaultAccountSummary, used for validation and type hinting in the tool response.class VaultAccountSummary(BaseModel): """Model representing an account summary for a vault.""" address: Annotated[str, Field(description="Contract address of the vault")] deposited_amount: Annotated[ str, Field(description="Amount deposited on the vault by the user in USDC") ] vtoken_amount: Annotated[str, Field(description="Amount of vault tokens owned by the user")] total_roi: Annotated[ str, Field(description="Total ROI realized by the user in percentage, i.e. 0.1 means 10%") ] total_pnl: Annotated[str, Field(description="Total P&L realized by the user in USD")] created_at: Annotated[ int, Field(description="Unix timestamp in milliseconds of when the user joined the vault") ]
- src/mcp_paradex/tools/vaults.py:319-319 (registration)The @server.tool decorator registers this function as the MCP tool named 'paradex_vault_account_summary'.@server.tool(name="paradex_vault_account_summary")
- TypeAdapter for validating lists of VaultAccountSummary objects, used in the handler.vault_account_summary_adapter = TypeAdapter(list[VaultAccountSummary])