Portfolio, balances, and fills
HIP-4 positions are token balances, not perpetual positions. Query spotClearinghouseState and select entries whose coin is +<encoding>.
For a normalized public view, use Predict’s account REST endpoints for positions, current orders, fills, activity, cashflows, statistics, PnL, volume, and fees, or subscribe to the matching realtime channels. Use the direct Hyperliquid reads below when you need venue-native balances, bounded history, role, limit, or builder state.
Join the token name back to the Predict outcome and label with the identifier mapping. Do not query a perpetual clearinghouseState and expect HIP-4 positions.
Account reads
Account reads use the master or subaccount address. Passing an agent-wallet address normally returns empty state because an agent signs but does not own the balances.
Durable history
Hyperliquid’s live account endpoints are bounded. Persist order intents, responses, order updates, fills, and ledger updates if your product promises a complete archive. On reconnect, query the latest HTTP snapshot and fill any time range before resuming stream processing.