Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

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
NameRequiredDescriptionDefault
vault_addressYesThe address of the vault to get account summary for.

Implementation Reference

  • 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
  • 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") ]
  • 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])

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