Skip to main content
Glama
Habinar

MCP Paradex Server

by Habinar

paradex_account_summary

Retrieve a detailed snapshot of your account's financial status, including balances, margin utilization, P&L, and liquidation risk to make informed trading decisions.

Instructions

Get a snapshot of your account's current financial status and trading capacity. Use this tool when you need to: - Check your current available and total balance - Understand your margin utilization and remaining trading capacity - Verify your account health and distance from liquidation - Get an overview of realized and unrealized P&L This provides the essential financial information needed to make informed trading decisions and manage risk appropriately. Example use cases: - Checking available balance before placing new orders - Monitoring account health during volatile market conditions - Assessing realized and unrealized P&L for performance tracking - Verifying margin requirements and utilization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @server.tool(name="paradex_account_summary"), which fetches the account summary using the Paradex client and validates it with the AccountSummary model.
    @server.tool(name="paradex_account_summary") async def get_account_summary(ctx: Context) -> dict: """ Get a snapshot of your account's current financial status and trading capacity. Use this tool when you need to: - Check your current available and total balance - Understand your margin utilization and remaining trading capacity - Verify your account health and distance from liquidation - Get an overview of realized and unrealized P&L This provides the essential financial information needed to make informed trading decisions and manage risk appropriately. Example use cases: - Checking available balance before placing new orders - Monitoring account health during volatile market conditions - Assessing realized and unrealized P&L for performance tracking - Verifying margin requirements and utilization """ client = await get_authenticated_paradex_client() response = await api_call(client, "account") result = { "description": AccountSummary.__doc__.strip() if AccountSummary.__doc__ else None, "fields": AccountSummary.model_json_schema(), "results": account_summary_adapter.validate_python(response), } return result
  • Pydantic BaseModel defining the structure and validation for the account summary response data.
    class AccountSummary(BaseModel): """Model representing an account summary response from Paradex.""" account: Annotated[str, Field(description="User's starknet account")] account_value: Annotated[str, Field(description="Current account value [with unrealized P&Ls]")] free_collateral: Annotated[ str, Field( description="Free collateral available (Account value in excess of Initial Margin required)" ), ] initial_margin_requirement: Annotated[ str, Field(description="Amount required to open trade for the existing positions") ] maintenance_margin_requirement: Annotated[ str, Field(description="Amount required to maintain exisiting positions") ] margin_cushion: Annotated[ str, Field(description="Acc value in excess of maintenance margin required") ] seq_no: Annotated[ int, Field( description="Unique increasing number (non-sequential) that is assigned to this account update. Can be used to deduplicate multiple feeds" ), ] settlement_asset: Annotated[str, Field(description="Settlement asset for the account")] status: Annotated[str, Field(description="Status of the acc - like ACTIVE, LIQUIDATION")] total_collateral: Annotated[str, Field(description="User's total collateral")] updated_at: Annotated[int, Field(description="Account last updated time")]
  • TypeAdapter used to validate the API response against the AccountSummary model.
    account_summary_adapter = TypeAdapter(AccountSummary)
  • The @server.tool decorator registers the function as the MCP tool named paradex_account_summary.
    @server.tool(name="paradex_account_summary")
  • Helper function to obtain an authenticated Paradex API client, used in the tool handler.
    async def get_authenticated_paradex_client() -> ParadexApiClient:

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