Wallet positions
get_user_stateWhat positions does a Hyperliquid wallet have open? Its positions right now across native and HIP-3 perps: size, entry and mark price, leverage and unrealized PnL. Use it for 'is this wallet long or short?'. For PnL over time use get_user_pnl_series; for its trading record, get_trader_profile.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"address": "<address>"
},
"name": "get_user_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | 0x-prefixed 20-byte hex address |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notice | No | A note from the API: how a market name was read, why data starts later than asked, or a next step such as a free key | |
| address | No | Wallet address (0x…) | |
| as_of_ts | No | Snapshot time, Unix milliseconds | |
| margin_summary | No | Account totals | |
| asset_positions | No | Open positions |