hyperliquid_account_state
Pack: hyperliquid · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/hyperliquid_account_state for the schema, then POST the same URL with its arguments for the data.
Perpetuals account state for one Hyperliquid wallet address — two separate flags (account_has_balance: non-zero account value, idle dust included; account_has_open_perp_positions: a position is open or notional / margin is non-zero), then account value, total notional, margin used, withdrawable, cross-maintenance margin, and every open perp position (coin, signed size where negative = short, entry price, position value, unrealized PnL, ROE, liquidation price, leverage, margin used, cumulative funding). Public on-chain data, keyless. Use for “what is this Hyperliquid wallet’s position / margin / leverage”. Returns aggregates first, positions last. e.g. {address:“0x31dea2516beee92135b96f464eeec3cf292a13f2”}.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
address | string | yes | 0x-prefixed 42-character wallet address. |
Example call
Arguments
{
"address": "0x31dea2516beee92135b96f464eeec3cf292a13f2"
}
curl
curl -X POST https://gateway.pipeworx.io/hyperliquid/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hyperliquid_account_state","arguments":{"address":"0x31dea2516beee92135b96f464eeec3cf292a13f2"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('hyperliquid_account_state', {
"address": "0x31dea2516beee92135b96f464eeec3cf292a13f2"
});
Response shape
| Field | Type | Description |
|---|---|---|
address | string | |
account_has_balance | boolean | |
account_has_open_perp_positions | boolean | |
account_value_usd | string | |
total_notional_position_usd | string | |
total_margin_used_usd | string | |
withdrawable_usd | string | |
cross_maintenance_margin_used_usd | string | |
open_position_count | number | |
positions | array | |
snapshot_time | string | |
note | string | |
source | string |
Full JSON Schema
{
"type": "object",
"properties": {
"address": {
"type": "string"
},
"account_has_balance": {
"type": "boolean"
},
"account_has_open_perp_positions": {
"type": "boolean"
},
"account_value_usd": {
"type": "string"
},
"total_notional_position_usd": {
"type": "string"
},
"total_margin_used_usd": {
"type": "string"
},
"withdrawable_usd": {
"type": "string"
},
"cross_maintenance_margin_used_usd": {
"type": "string"
},
"open_position_count": {
"type": "number"
},
"positions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"coin": {
"type": "string"
},
"side": {
"type": "string"
},
"size": {
"type": "string"
},
"entry_price": {
"type": "string"
},
"position_value_usd": {
"type": "string"
},
"unrealized_pnl_usd": {
"type": "string"
},
"return_on_equity": {
"type": "string"
},
"liquidation_price": {
"type": "string"
},
"leverage": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"value": {
"type": "number"
}
},
"additionalProperties": true
},
"margin_used_usd": {
"type": "string"
},
"cumulative_funding": {
"type": "object",
"properties": {
"allTime": {
"type": "string"
},
"sinceOpen": {
"type": "string"
},
"sinceChange": {
"type": "string"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
}
},
"snapshot_time": {
"type": "string"
},
"note": {
"type": "string"
},
"source": {
"type": "string"
}
},
"additionalProperties": true
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the hyperliquid pack
{
"mcpServers": {
"hyperliquid": {
"url": "https://gateway.pipeworx.io/hyperliquid/mcp"
}
}
}
See Getting Started for client-specific install steps.